
public class MessageEvent extends EventObject
MessageEventSource,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR
Event constant for error messages.
|
static int |
INFORMATION
Event constant for information messages.
|
static int |
NOTIFICATION
Event constant for notification messages.
|
static int |
WARNING
Event constant for warning messages.
|
source| Constructor and Description |
|---|
MessageEvent(Object source,
Message[] messages,
int type)
Creates a new
MessageEvent instance taking multiple messages. |
MessageEvent(Object source,
Message message,
int type)
Creates a new
MessageEvent instance taking a single message. |
| Modifier and Type | Method and Description |
|---|---|
Message[] |
getMessages()
Getter for property
messages. |
int |
getType()
Getter for property
type. |
String |
toString()
Returns a string representation of the object.
|
getSourcepublic static final int ERROR
public static final int INFORMATION
public static final int NOTIFICATION
public static final int WARNING
public MessageEvent(Object source, Message[] messages, int type)
MessageEvent instance taking multiple messages.source - the source of the new event.messages - the messages for the new event.type - constant indicating the type of the events' messages.NullPointerException - if messages is null.IllegalArgumentException - if source is null or
type is not equal to one of the constants INFORMATION,
NOTIFICATION, WARNING or ERROR or the length of
messages is zero.public MessageEvent(Object source, Message message, int type)
MessageEvent instance taking a single message.source - the source of the new event.message - the message for the new event.type - constant indicating the type of the events' messages.NullPointerException - if message is null.IllegalArgumentException - if source is null or
type is not equal to one of the constants INFORMATION,
NOTIFICATION, WARNING or ERROR.public final Message[] getMessages()
messages.public final int getType()
type.public String toString()
toString in class EventObjectCopyright © 2005-2012 jDTAUS. All Rights Reserved.