public class Event extends java.util.EventObject implements IEvent
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
consumed
Flag if the event is already handled.
|
static EventType |
ID |
static java.lang.Object |
ID_ALL |
protected boolean |
veto
Flag if execution of the action that is announced by the event is
interrupted by one of the listeners.
|
| Constructor and Description |
|---|
Event(java.lang.Object source)
Create a new event object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
consume()
Indicate that this event does not need to be propagated any further as it
is already processed by some listener.
|
EventType |
getEventType()
A type for this event.
|
java.lang.String |
getName()
A name for this event.
|
boolean |
getRc() |
boolean |
isConsumed()
true if this event is already consumed by some listener. |
boolean |
isVetoed()
true if this event is already vetoed by some listener. |
void |
setRc(boolean value) |
void |
setVeto(boolean value) |
void |
veto()
Indicate that the behavior associated with this event should not be
performed by the source.
|
public static final java.lang.Object ID_ALL
public static final EventType ID
protected boolean consumed
protected boolean veto
public Event(java.lang.Object source)
source - The object that created the event.public void consume()
IEventpublic EventType getEventType()
IEventgetEventType in interface IEventpublic java.lang.String getName()
IEventpublic boolean getRc()
public boolean isConsumed()
IEventtrue if this event is already consumed by some listener.isConsumed in interface IEventtrue if this event is already consumed by some
listener.public boolean isVetoed()
IEventtrue if this event is already vetoed by some listener.public void setRc(boolean value)
public void setVeto(boolean value)