--- /dev/null
+Shaggy: java-powered citadel/ux client
+by Will Schenk (chilly@alumni.psu.edu, chilly @ uncnsrd)
+
+Last mod: 27 Jul 1999
+
+This is the java client. I would like this to be both an application and
+an applet. Mostly this should be straight forward, but with an applet
+you're stuck in the "sandbox" so connecting to a different bbs won't work
+(unless you set up some sort of ugly proxy) and I'm not sure how downloading
+files will work -- there may be an ugly way using Applet.showUrl()
+to make it possible.
+
+At the moment, my aim is just use this client to connect, so basically
+that means that I should get the client to do all the stuff that I use
+the bbs for. 'm sure that there are many features that I don't use, and
+so that'll give you an idea of where I'll need input: things like aide
+commands and editing configuration and other stuff I don't use. :)
+
+I've also run into some issues with non-obvious resolutions in how to
+layout the gui and it's behavior. Ideas are welcome.
+
+I'll try and keep the STATUS file up-to-date with the current niftyness
+of the features and lack thereof.
+
+I'm developing with sun's jdk 1.1.7 (linuxppc) but trying to stay with
+the 1.0.2 api. This is for two reasons: 1) I know the 1.0 api well
+enough so I don't have to go messing around with the docs to figure out
+the calls and 2) if we do want to use this as an applet it will allow
+the largest availability of compatable browsers. (netscape implemented
+1.1 in 4.0, but not the new awt event model (I think it wasn't until 4.05).
+IE did something similarily goofy.) Ergo, there will be many complaints
+about using a deprecated api when compiling.
+
+- BUILDING
+I've including a copy of my "java make script", a perl script called "jmake".
+Assuming javac is in your path and nothing funky is going on with your
+$CLASSPATH, typing
+
+./jmake
+
+should compile any java source files that are
+newer than the corrosponding class files. The "main" java file is
+"citadel.java", so if you are concerned about anything being out of
+whack,
+
+javac -depend citadel.java
+
+will build the main class, and recursively work down all the classes that
+it references, so everything needed will be rebuilt. (Contrast with jmake:
+it builds all java classes in the directory, even those just hanging out
+there having nothing to do with the citadel client.)
+
+- RUNNING
+At the moment there is no applet class, so it only works as an application.
+The easiest way to run the client is:
+
+java citadel [host]
+
+where [host] is the optional network address of the server. host defaults
+to 127.0.0.1. You'll have to change the code in net.java if you want it
+to use a different port.
+
+ideally, when it's distributed there should be either a zip or jar file
+(both are actually zip files, only difference is the letters) with all the
+classes. This makes the applet load faster, and it's cleaner.
+
+-- will
--- /dev/null
+mod: 28 Jul 1999
+
+Basic:
+- Connect to server and login (connects, gets "hello" and throws up window)
+ * TODO: new user. (need to understand registration)
+- can log off (shows goodbye, and in application lets you connect to a
+ different server)
+
+- can recieve express messages (GEXP style, though don't get for multiple
+ messages yet)
+- can send and "reply" to express messages, uses either single or multi
+ depending on server support.
+- who is online (double clicking on list will send express msg to user)
+
+"main"
+- Splits rooms up into new and no-new
+ * no floor support yet.
+ * doesn't sort the room names, even though there's "no pressing reason not to"
+
+- Go to next room with messages
+- go to any old room by double-clicking from list
+ * can't get to hidden or guessable-named rooms
+- can go to password protected rooms (untested)
+
+"message"
+- read new, all, or last-5 message in a room
+- forward and
+- enter messages in room (only type 0)
+ - handles Mail room, but 1) depends on the fact that the room is named
+ "Mail" (ie: doesn't pass the flag returned from GOTO)
+* doesn't say anything about having mail or going there first, just lists
+ Mail in the "new" list.
+* No reply button when in mail room.
+- can see "next" and "prev" message. (goes through the MSGS list which it
+ gets when you first enter the room) no way to jump around (yet?).
+- I update (via: SLRP) the user's "highest read" message everytime they
+ read a message higher than the previous. This changes the behavior from
+ the text client, if you enter a room and read 2 new messages out of 5, then
+ go to the next room, the three unread messages will still be unread with
+ the java client while they wouldn't be with the text client. I like it
+ better personally, but hey, that's me.
+- can view room info
+
+everything else isn't done.
--- /dev/null
+/* whoWindow.java
+ * Who is online window
+ */
+
+import java.awt.*;
+import java.util.Vector;
+
+public class whoWindow extends Frame {
+ Button refresh, page, close;
+ List users;
+ Vector list;
+
+ public whoWindow() {
+ super( "Citadel: Who is online" );
+
+ NamedPanel np = new NamedPanel( "Who is currently online" );
+ np.setLayout( new BorderLayout() );
+ np.add( "Center", users = new List() );
+ users.setFont( new Font( "Courier", Font.PLAIN, 12 ) );
+
+ Panel p = new Panel();
+ p.add( refresh = new Button( "Refresh" ) );
+ p.add( page = new Button( "Page" ) );
+ p.add( close = new Button( "Close" ) );
+
+ add( "Center", np );
+ add( "South", p );
+
+ refresh();
+
+ resize( 400, 300 );
+ show();
+ }
+
+ public boolean handleEvent( Event e ) {
+ if( e.id == Event.WINDOW_DESTROY ) {
+ dispose();
+ citadel.me.wo = null;
+ }
+ return super.handleEvent( e );
+ }
+
+ public boolean action( Event e, Object o ) {
+ if( e.target == close ) {
+ dispose();
+ citadel.me.wo = null;
+ } else if( (e.target == page) || (e.target == users) ) {
+ int i = users.getSelectedIndex();
+ try {
+ String user = (String)list.elementAt( i );
+ citadel.me.page_user( user );
+ } catch( Exception exp ) {}
+ } else if( e.target == refresh ) {
+ refresh();
+ }
+ return super.action( e, o );
+ }
+
+ public void refresh() {
+ list = new Vector();
+ users.clear();
+
+ citReply r = citadel.me.getReply( "RWHO" );
+ int i = 0;
+ String s;
+ while( (s = r.getLine( i++ )) != null ) {
+ int j = s.indexOf( '|' ) + 1;
+ int k = s.indexOf( '|', j );
+ int l = s.indexOf( '|', k + 1 );
+ String user = s.substring( j, k );
+ String room = s.substring( k+1, l );
+ list.addElement( user );
+ users.addItem( pad( user, room ) );
+ }
+ }
+
+ public String pad( String u, String r ) {
+ StringBuffer s = new StringBuffer( u );
+ while( s.length() < 30 )
+ s.append( ' ' );
+ s.append( r );
+ return s.toString();
+ }
+}