|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.core.DefaultMessage
public class DefaultMessage
The default implementation of the Message
interface. This class is
capable of rendering itself on JTextComponent
s and JLabel
s.
In the case of labels, it is also able to lookup an icon to be displayed on
the label.
getIcon()
,
Serialized FormField Summary | |
---|---|
static DefaultMessage |
EMPTY_MESSAGE
A convenience instance representing an empty message. |
Constructor Summary | |
---|---|
DefaultMessage(String text)
Creates a new DefaultMessage with the given text and a default
severity of Severity.INFO . |
|
DefaultMessage(String message,
Severity severity)
Creates a new DefaultMessage with the given text and severity. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
Icon |
getIcon()
Returns the icon associated with this instance's severity. |
String |
getMessage()
The textual representation of the message. |
Severity |
getSeverity()
Return the Severity of this message, possibly null . |
long |
getTimestamp()
Timestamp in long format of the message creation. |
int |
hashCode()
|
void |
renderMessage(JComponent component)
Renders this message on the given GUI component. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final DefaultMessage EMPTY_MESSAGE
Constructor Detail |
---|
public DefaultMessage(String text)
DefaultMessage
with the given text and a default
severity of Severity.INFO
.
text
- The message text.public DefaultMessage(String message, Severity severity)
DefaultMessage
with the given text and severity.
message
- The message text.severity
- The severity of the message. May be null.Method Detail |
---|
public long getTimestamp()
Message
getTimestamp
in interface Message
public String getMessage()
Message
getMessage
in interface Message
null
, but possibly an
empty string.public Severity getSeverity()
Message
Severity
of this message, possibly null
.
getSeverity
in interface Message
public void renderMessage(JComponent component)
JTextComponent
or JLabel
.
renderMessage
in interface Message
component
- visual component to decorate.
IllegalArgumentException
- if component
is not a JTextComponent
or a JLabel
.public Icon getIcon()
severity.<SEVERITY_LABEL>
.
AbstractGenericLabeledEnum.getLabel()
,
IconSource.getIcon(String)
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |