public class WWEvent
extends java.util.EventObject
EventObject
by adding the capability to consume the event by calling consume()
. Consuming a
WWEvent prevents is from being processed in the default manner by the source that originated the event. If the event
cannot be consumed, calling consume()
has no effect, though isConsumed()
returns whether or not
consume()
has been called.Modifier and Type | Field and Description |
---|---|
protected boolean |
consumed
Denotes whether or not the event has been consumed.
|
Constructor and Description |
---|
WWEvent(java.lang.Object source)
Creates a new WWEvent with the object that originated the event.
|
Modifier and Type | Method and Description |
---|---|
void |
consume()
Consumes the event so it will not be processed in the default manner by the source which originated it.
|
boolean |
isConsumed()
Returns whether or not the event has been consumed.
|
protected boolean consumed
false
.public WWEvent(java.lang.Object source)
source
- the object that originated the event.java.lang.IllegalArgumentException
- if the source is null
.public void consume()
public boolean isConsumed()
true
if consume()
has been called,
though this has no effect.true
if the event has been consumed, and false
otherwise.