| javax.swing.JApplet client.LlamaChat
LlamaChat | public class LlamaChat extends JApplet (Code) | | For use in a webpage:
<OBJECT
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="615" height="360"
codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,mn">
<PARAM name="code" value="LlamaChat.class">
<PARAM name="archive" value="LlamaChat.jar">
<PARAM name="type" value="application/x-java-applet;version=1.4">
<PARAM name="scriptable" value="true">
<param name="username" value="[replace with username]">
<param name="port" value="[replace with port]">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.4"
width="615" height="331"
code="LlamaChat.class" archive="LlamaChat.jar"
pluginspage="http://java.sun.com/j2se/1.4.1/download.html"
username="[replace with username]"
port="[replace with port]">
<NOEMBED>
No Java 1.4 plugin
</NOEMBED></EMBED>
</COMMENT>
</OBJECT>
This is the LlamaChat client applet; The above html needs values for
username, port, site, and location; Username is the name of the connecting
user, port is the port on which the server is running, site is the
IP address or hostname of the server, location is the location of the
client applet on the web
author: Joseph Monti countjoe@users.sourceforge.net version: 0.8 |
Inner Class :final protected class MyKeyListener implements KeyListener | |
Inner Class :final protected class MyMouseListener implements MouseListener | |
admin | public boolean admin(Code) | | |
chanAdmin | public boolean chanAdmin(Code) | | |
myAction | MyAction myAction(Code) | | |
myHyperlinkListener | MyHyperlinkListener myHyperlinkListener(Code) | | |
myKeyListener | MyKeyListener myKeyListener(Code) | | |
myMouseListener | MyMouseListener myMouseListener(Code) | | |
showUserStatus | public boolean showUserStatus(Code) | | |
close | public void close()(Code) | | cleans up a connection by removing all user from all maintained lists
|
error | public void error(String s)(Code) | | signifies an error and reports it to the user
Parameters: s - the error message |
getURL | final protected URL getURL(String filename)(Code) | | Method to take a filename and return a URL object
Parameters: filename - the name of the file to be turned into URL the url representing filename |
init | public void init()(Code) | | Initializes the graphical components
|
newChannel | public void newChannel(String name, boolean pass)(Code) | | creates a new channel, if the channel exists it is removed
(this method doubles as a removeChannel)
Parameters: name - the name of the channel |
parseCommand | public boolean parseCommand(String cmd)(Code) | | Method to parse a command and perform the specified action
Parameters: cmd - the command that the user typed a status indicator to tell if the command was valid |
recieveChat | public void recieveChat(String un, String message)(Code) | | Recieving method for a chat message
Parameters: un - the name of the user sending the chat Parameters: message - the message that was sent |
recievePrivate | public void recievePrivate(String un, String message)(Code) | | Recieving method for private
Parameters: un - the name of the user sending the message Parameters: message - the message that was sent |
recieveWhisper | public void recieveWhisper(String un, String message)(Code) | | Reciving method for a whisper
Parameters: un - the name of the user sending the whisper Parameters: message - the message that was sent |
rename | public void rename(String on, String nn)(Code) | | changes the name of a user, updating list of admins,
afks, ignoes, and master user list
Parameters: on - old username Parameters: nn - new username |
sendText | public void sendText(String un, String message, boolean whisper)(Code) | | Sends a text to the chat window. Parses the message to pick
out emoticons.
Parameters: un - the name of the user sending the message Parameters: message - the message to be sent Parameters: whisper - indicates the message was a wisper and makes the message italic |
serverMessage | public void serverMessage(String s)(Code) | | A shortcut to be used when a message from the server (or any automated
message) must ben sent to the client
Parameters: s - the message |
setAdmin | public void setAdmin()(Code) | | sets this user to be an admin
|
setConnected | public void setConnected(boolean b)(Code) | | used to manage the connection icons to signify connection and
secure status
Parameters: b - true if connected |
start | public void start()(Code) | | |
updateList | public void updateList()(Code) | | sorts the user list and rebuilds the user list from
the sorted user vector,
|
userAdd | public void userAdd(String un)(Code) | | adds a new user to the interal list of users
Parameters: un - the name of the user to be added |
userDel | public void userDel(String un)(Code) | | removes a user from the user list
Parameters: un - the name of the user to be removed |
|
|