public class SimpleMessage extends Object implements MessageConsumer.Message
MessageConsumer.Message
which is used in situations where the message shall be
generated directly.Constructor and Description |
---|
SimpleMessage(String message,
Level level) |
Modifier and Type | Method and Description |
---|---|
JComponent |
createDetailsView()
Create a visual representation of the message.
|
Icon |
getIcon()
Get the icon (if any) to be associated with the message.
|
String |
getID()
Get the message's ID.
|
Level |
getLevel() |
String |
getMessage()
Get the - usually one-line - message to be shown initially.
|
int |
getPriority()
Get the message priority.
|
Throwable |
getThrowable() |
String |
getType()
Get the message type.
|
boolean |
hasDetails()
Return whether the message has associated details.
|
void |
setID(String id) |
void |
setLevel(Level level) |
void |
setMessage(String message) |
void |
setThrowable(Throwable throwable) |
public Icon getIcon()
MessageConsumer.Message
getIcon
in interface MessageConsumer.Message
public String getMessage()
MessageConsumer.Message
getMessage
in interface MessageConsumer.Message
public JComponent createDetailsView()
MessageConsumer.Message
createDetailsView
in interface MessageConsumer.Message
public boolean hasDetails()
MessageConsumer.Message
true
for a message,
the message is obliged to create a visual representation for the message
upon MessageConsumer.Message.createDetailsView()
.hasDetails
in interface MessageConsumer.Message
public int getPriority()
MessageConsumer.Message
getPriority
in interface MessageConsumer.Message
public String getType()
MessageConsumer.Message
getType
in interface MessageConsumer.Message
public String getID()
MessageConsumer.Message
MessageConsumer.Message.getMessage()
) vary slightly. If a
message doesn't have an ID, it is ok to return null
or the
same string as MessageConsumer.Message.getMessage()
.getID
in interface MessageConsumer.Message
public void setID(String id)
public Level getLevel()
public void setLevel(Level level)
public Throwable getThrowable()
public void setThrowable(Throwable throwable)
public void setMessage(String message)
Copyright © 2024 levigo holding gmbh. All rights reserved.