Package ej.mwt.event
Class DesktopEventGenerator
- java.lang.Object
-
- ej.microui.event.EventGenerator
-
- ej.mwt.event.DesktopEventGenerator
-
public class DesktopEventGenerator extends ej.microui.event.EventGenerator
This event generator is used by theevent dispatcher
of the desktop in order to send additional events to the widgets.
-
-
Field Summary
Fields Modifier and Type Field Description static int
EVENT_TYPE
The DESKTOP event type.
-
Constructor Summary
Constructors Constructor Description DesktopEventGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
buildEvent(int action)
Builds an event for the given action.static int
getAction(int event)
Returns the action held by the given desktop event.int
getEventType()
Gets the event type associated with the event generatorvoid
send(int action)
Sends a desktop event for the given action to the event handler of this event generator.
-
-
-
Field Detail
-
EVENT_TYPE
public static final int EVENT_TYPE
The DESKTOP event type.- See Also:
- Constant Field Values
-
-
Method Detail
-
getEventType
public int getEventType()
Description copied from class:ej.microui.event.EventGenerator
Gets the event type associated with the event generator- Specified by:
getEventType
in classej.microui.event.EventGenerator
- Returns:
- the event type
-
buildEvent
public int buildEvent(int action)
Builds an event for the given action.- Parameters:
action
- the event action.- Returns:
- the event.
-
send
public void send(int action)
Sends a desktop event for the given action to the event handler of this event generator.This method is useful when other input mechanisms wish to simulate button actions.
- Parameters:
action
- the event action.
-
getAction
public static int getAction(int event)
Returns the action held by the given desktop event.- Parameters:
event
- the desktop event.- Returns:
- the action held by the given desktop event.
-
-