|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectClient.Statement
public class Statement
A class which stores information about a message anyone sent. Includes useful methods for printing out statements to a JTextPane.
| Field Summary | |
|---|---|
static java.lang.String[] |
emoticons
All of the possible emoticons. |
static java.util.HashMap<java.lang.String,java.lang.String> |
textToEmoticon
A HashMap linking emoticon strings (above) to file locations. |
| Constructor Summary | |
|---|---|
Statement(java.lang.String username,
java.lang.String message)
Construct a new Statement. |
|
| Method Summary | |
|---|---|
static java.lang.String |
colorate(java.lang.String string)
Hashes the input string, and returns the input string surrounded by html to make it a random color determined by the hash. |
static java.lang.String |
emotify(java.lang.String message)
Adds html for emoticons. |
static java.lang.String |
htmlimg(java.lang.String src)
Returns a html img thing for a particular image address. |
static java.lang.String |
htmlLineBreak(java.lang.String string)
Inputs line breaks so that the line will wrap around after 34 monospace characters. |
static java.util.HashMap<java.lang.String,java.lang.String> |
initializeHashmap()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String[] emoticons
public static java.util.HashMap<java.lang.String,java.lang.String> textToEmoticon
| Constructor Detail |
|---|
public Statement(java.lang.String username,
java.lang.String message)
username - who said the statementmessage - what the statement is| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String colorate(java.lang.String string)
string - the string to colorate
public static java.lang.String htmlLineBreak(java.lang.String string)
string - the string to insert linebreaks to
public static java.util.HashMap<java.lang.String,java.lang.String> initializeHashmap()
public static java.lang.String emotify(java.lang.String message)
message - the message to add emoticons to
public static java.lang.String htmlimg(java.lang.String src)
src - where the image is located
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||