Parameters
You can pass the client program a number of options via the PARAM tag, like this:
<APPLET CODE="Ewgie.class" WIDTH=480 HEIGHT=550>
<PARAM NAME=host VALUE=www.eit.com>
<PARAM NAME=port VALUE=1971>
<PARAM NAME=room VALUE="">
<PARAM NAME=bgcolor VALUE="50,50,50">
<PARAM NAME=fgcolor VALUE="0,255,0">
<PARAM NAME=fontsize VALUE=12>
<PARAM NAME=login VALUE=on>
<PARAM NAME=namepanel VALUE=on>
<PARAM NAME=statuspanel VALUE=on>
<PARAM NAME=buttonpanel VALUE=on>
<PARAM NAME=controlpanel VALUE=right>
<PARAM NAME=controlbuttons VALUE=on>
<PARAM NAME=whiteboard VALUE=on>
<PARAM NAME=debug VALUE=off>
</APPLET>
If you are using a browser that knows how to extract multiple Java class files from a zip file, you can write the APPLET tag this way:
<APPLET ARCHIVE="Ewgie.zip" CODE="Ewgie.class"
WIDTH=480 HEIGHT=550>
</APPLET>
This can speed up the applet loading time considerably and is recommended for users with modems. But note that very few browsers support this feature - as of this writing, only Netscape 3.0b6 supports the option as written above.
-
host and port
You can set the default host the client is to connect to. If run within a browser this should be the same machine the program files are located on.
If no port is set, the default port, 1971, will be used. The client has no default host.
-
room
This sets the room people will start in when they first connect to the server. If the value is set to "" (nothing), then they will start chat in the server's default main room. You can use this parameter to make multiple client pages, each which connects to a different room upon startup.
-
bgcolor and fgcolor
You can set the foreground and background colors of the client and all its windows with the bgcolor and fgcolor values - specify the colors as above, an RGB (Red, Green, Blue) value. The default colors are white for the background and black for the foreground. One nifty combination I like is "0,255,0" for the foreground and "50,50,50" for the background.
-
fontsize
This parameter sets the default font size of text in the chat area and text entry field. This is the font size that will be displayed when the client starts. Note that on particular computer platforms you may not always be able to get the exact size you want. Font sizes 12, 18, and 24 are usually available.
-
login
The login parameter starts Ewgie as a small interface in which you can enter your name and password. The client will appear as a window which you can resize and in which you can take advantage of the options in its menu bar. This can be set to on or off.
-
namepanel
If namepanel is set to off, then the name entry field and font size selector will be hidden - this gives more space to the chat screen; this mode is intended for those who are already familiar with the system. This can be set to on or off.
-
statuspanel
statuspanel set to off removes the status bar at the top of the display. This option is provided for those who like to customize the chat interface. This can be set to on or off.
-
buttonpanel
buttonpanel set to off removes the various buttons at the bottom of the display. This option is provided for those who like to customize the chat interface. This can be set to on or off.
-
controlpanel
controlpanel can have the value on, off, left, right, and window. These options control how the rooms/people control panel is displayed on startup.
If set to on, the panel is hidden on startup but is available via either the "Panels" menu (if the client is within a window) or the "People/Rooms" button in the button panel. If set to off, it will not be possible to open the control panel. If set to left or right, the control panel will attach itself to the left or right of the main chat window upon startup, unless the chat area is embedded within a Web page. If set to window, the panel will display itself in a separate window automatically upon startup.
-
controlbuttons
This can be set to on or off - if set to off, the buttons within the control panel will be removed. This gives more space to room and member information but can confuse people new to using the client.
-
whiteboard
If whiteboard is set to off, then the whiteboard button (and any other controls to access it) will be hidden. This can be set to on or off.
-
debug
This can be set to on or off - if set to on, you will be able to see all communications the server sends to the client as well as any exceptions that occur in the program. Turn this option on if you detect recurring bugs in the client.
Templates
The Ewgie distribution comes with six templates for the client applet which are provided as examples:
| Ewgie.html |
A standard client with all features turned on and starting as a login dialog. |
| Ewgie2.html |
A standard client with all features turned on and starting as a login dialog, makes use of the zip archive feature. |
| Ewgie3.html |
A standard client with all features enabled and with the chat area embedded within the page. |
| Ewgie4.html |
A standard client with all features enabled and with the chat area embedded within the page, makes use of the zip archive feature. |
| Ewgie5.html |
A client with the chat area embedded within the page. Many features are turned off, making for a clean and simple interface. |
| Ewgie6.html |
A client with the chat area embedded within the page. Many features are turned off, making for a clean and simple interface. This makes use of the zip archive feature. |
Running the client
If you want you can run the client as a stand-alone application. If you have the Java Developer's Kit (or some other Java virtual machine) installed on your computer, you can run the client like this:
java Ewgie
You can use all the usual applet parameters on the command line as name/value pairs separated by an equals sign:
java Ewgie port=1971 host=www.eit.com
bgcolor="0,50,0"
|