vooga.social.chat
Class ChatParser
java.lang.Object
vooga.social.chat.ChatParser
public class ChatParser
- extends java.lang.Object
Parses the text that a user receives, and performs other string
decomposition/modification functions for the chat. It will become much more
sophisticated, including colors for channels and users, extracting channel
names and commands, and changing the output for certain message types, like
system messages.
This one parses INCOMING messages only. So, it takes a message and formats it
as html. All color information, for example, takes place in this one.
Preferences are modified here.
- Author:
- Alex Kritchevsky
Method Summary |
java.lang.String |
parseIncoming(long fromChannel,
java.lang.String senderName,
java.lang.String message)
Parses the input to the input field; currently just sends the unmodified
string as a message but in the future should support parsing a user's
name to send a private message as well as other features. |
void |
setTimeStampsActive(boolean state)
tells the parser whether or not to append time stamps. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChatParser
public ChatParser()
parseIncoming
public java.lang.String parseIncoming(long fromChannel,
java.lang.String senderName,
java.lang.String message)
- Parses the input to the input field; currently just sends the unmodified
string as a message but in the future should support parsing a user's
name to send a private message as well as other features.
- Parameters:
fromChannel
- s
- message
-
setTimeStampsActive
public void setTimeStampsActive(boolean state)
- tells the parser whether or not to append time stamps.
- Parameters:
state
-