|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectformatter.Message
public class Message
Messages are logical combinations of a sender, time stamp, and text
with font. They are the small strings of text that you send back and forth in IMs.
| Constructor Summary | |
|---|---|
Message(java.lang.String sender,
Timestamp time,
java.lang.String message,
boolean auto)
Creates a new Message. Assumes black-on-white text. |
|
Message(java.lang.String sender,
Timestamp time,
java.lang.String message,
java.awt.Color color,
java.awt.Font font,
boolean auto)
Creates a new Message. |
|
| Method Summary | |
|---|---|
void |
append(java.lang.String msg)
Appends the text of the String to the end of this Message |
void |
append(java.lang.String msg,
java.lang.String f,
java.awt.Color c)
Appends the text of the String to the end of this Message |
void |
append(java.lang.String msg,
java.lang.String f,
java.awt.Color c,
int s,
boolean b,
boolean i)
Appends the text of the String to the end of this Message |
void |
appendNewline()
Puts a simple newline at the end of the current message. |
java.awt.Color |
getColor()
Gets the font Color of the message. |
java.awt.Font |
getFont()
Gets the font face of the message. |
java.lang.String |
getMessage()
Gets the text of the message sent. |
java.lang.String |
getSender()
Gets the screenname of the sender of this message. |
Timestamp |
getTimestamp()
Gets the Time this message was sent. |
boolean |
isAutoGenerated()
Returns true when the Message is auto-generated
and false when it is not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Message(java.lang.String sender,
Timestamp time,
java.lang.String message,
boolean auto)
Message. Assumes black-on-white text.
sender - Screen name of the sender.time - The time the message was sent.message - The text of the message.auto - Whether this is an auto-generated message or not.
public Message(java.lang.String sender,
Timestamp time,
java.lang.String message,
java.awt.Color color,
java.awt.Font font,
boolean auto)
Message.
sender - Screen name of the sender.time - The time the message was sent.message - The text of the message.color - The color of the text of the message.font - The font the message should be in.auto - Whether this is an auto-generated message or not.| Method Detail |
|---|
public java.lang.String getSender()
public java.lang.String getMessage()
public java.awt.Color getColor()
public java.awt.Font getFont()
public Timestamp getTimestamp()
getTimestamp in interface Eventpublic boolean isAutoGenerated()
true when the Message is auto-generated
and false when it is not.
public void append(java.lang.String msg)
String to the end of this Message
msg - The text to append to the end of this Message.
public void append(java.lang.String msg,
java.lang.String f,
java.awt.Color c)
String to the end of this Message
msg - The text to append to the end of this Message.f - The font name of this part of the message.c - The color of this part of the message.
public void append(java.lang.String msg,
java.lang.String f,
java.awt.Color c,
int s,
boolean b,
boolean i)
String to the end of this Message
msg - The text to append to the end of this Message.f - The font name of this part of the message.c - The color of this part of the message.s - The size of the font in pts.b - true if the appended part of the message is bold,
false otherwise.i - true if the appended part of the message is italicized,
false otherwise.public void appendNewline()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||