Package totalcross.ui.event
Class Event
- java.lang.Object
-
- totalcross.ui.event.Event
-
- Direct Known Subclasses:
AnimationEvent,ControlEvent,GridEvent,KeyEvent,ListContainerEvent,MediaClipEvent,MultiTouchEvent,PenEvent,PushNotificationEvent,ScanEvent,TimerEvent,UIRobotEvent
public class Event extends java.lang.ObjectEvent is the base class for all events.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidclearQueue(int type)Clears the event queue.static intgetNextAvailableEventId()Register a new event with the system.static booleanisAvailable()Returns true if there is an event available in the VM event queue.java.lang.StringtoString()voidtouch()Updates the timeStamp parameter with the current time
-
-
-
Field Detail
-
type
public int type
The type of event.
-
target
public java.lang.Object target
The target of the event. For user-interface events, this is the control the event is associated with.
-
timeStamp
public int timeStamp
The event's timestamp.- See Also:
Vm.getTimeStamp()
-
consumed
public boolean consumed
Set to true to break the event propagation up to the parents
-
-
Method Detail
-
touch
public void touch()
Updates the timeStamp parameter with the current time
-
getNextAvailableEventId
public static int getNextAvailableEventId()
Register a new event with the system. Use it to avoid conflict of events created by multiple Applications.
-
isAvailable
public static boolean isAvailable()
Returns true if there is an event available in the VM event queue.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
clearQueue
public static void clearQueue(int type)
Clears the event queue.- Parameters:
type- The Event type to be ignored, or 0 to ignore all types.- Since:
- TotalCross 1.2
-
-