public abstract class Event<H extends EventHandler>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Event.Type<H> |
Modifier and Type | Field and Description |
---|---|
boolean |
consumed
Set to true to break the event propagation up to the parents
|
java.lang.Object |
target
The target of the event.
|
int |
timeStamp
The event's timestamp.
|
int |
type
The type of event.
|
Constructor and Description |
---|
Event()
Constructs a new event with the current time stamp
|
Event(int type,
java.lang.Object target,
int timeStamp)
Constructs a new event based in the given parameters.
|
Modifier and Type | Method and Description |
---|---|
static void |
clearQueue(int type)
Clears the event queue.
|
abstract void |
dispatch(H listener) |
static int |
getNextAvailableEventId()
Register a new event with the system.
|
static boolean |
isAvailable()
Returns true if there is an event available in the VM event queue.
|
java.lang.String |
toString() |
void |
touch()
Updates the timeStamp parameter with the current time
|
public int type
public java.lang.Object target
public int timeStamp
Vm.getTimeStamp()
public boolean consumed
public Event(int type, java.lang.Object target, int timeStamp)
public Event()
public void touch()
public static int getNextAvailableEventId()
public static boolean isAvailable()
public java.lang.String toString()
toString
in class java.lang.Object
public static void clearQueue(int type)
type
- The Event type to be ignored, or 0 to ignore all types.public abstract void dispatch(H listener)