public class DispatchEventHandler extends java.lang.Object implements EventHandler, EventGeneratorsHandler, ButtonEventHandler, CommandEventHandler, PointerEventHandler
Event) and data (event type specific).| Constructor and Description |
|---|
DispatchEventHandler()
Creates a dispatch event handler.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
handleButton(int event)
Handles button events.
|
boolean |
handleCommand(int event)
Handles command events.
|
boolean |
handleEvent(int event)
Handles an event.
|
boolean |
handleKeyboard(int event)
Handles keyboard events.
|
boolean |
handleKeypad(int event)
Handles keypad events.
|
boolean |
handlePointer(int event)
Handles pointer events.
|
boolean |
onButtonClicked(int event)
Handles button clicked event.
|
boolean |
onButtonDoubleClicked(int event)
Handles button double-clicked event.
|
boolean |
onButtonPressed(int event)
Handles button pressed event.
|
boolean |
onButtonReleased(int event)
Handles button released event.
|
boolean |
onButtonRepeated(int event)
Handles button repeated event.
|
boolean |
onCommand(int command)
Handles command event.
|
boolean |
onPointerClicked(Pointer pointer,
int pointerX,
int pointerY,
int event)
Handles pointer clicked event.
|
boolean |
onPointerDoubleClicked(Pointer pointer,
int pointerX,
int pointerY,
int event)
Handles pointer double-clicked event.
|
boolean |
onPointerDragged(Pointer pointer,
int pointerX,
int pointerY,
int event)
Handles pointer dragged event.
|
boolean |
onPointerEntered(Pointer pointer,
int pointerX,
int pointerY,
int event)
Handles pointer entered event.
|
boolean |
onPointerExited(Pointer pointer,
int pointerX,
int pointerY,
int event)
Handles pointer exited event.
|
boolean |
onPointerMoved(Pointer pointer,
int pointerX,
int pointerY,
int event)
Handles pointer moved event.
|
boolean |
onPointerPressed(Pointer pointer,
int pointerX,
int pointerY,
int event)
Handles pointer pressed event.
|
boolean |
onPointerReleased(Pointer pointer,
int pointerX,
int pointerY,
int event)
Handles pointer released event.
|
public DispatchEventHandler()
public boolean handleEvent(int event)
EventHandlerhandleEvent in interface EventHandlerevent - the event to handle.true if the event is consumed, false otherwise.Event,
DispatchHelperpublic boolean handleButton(int event)
handleButton in interface EventGeneratorsHandlerevent - the button event to handle.true if the event is consumed, false otherwise.DispatchHelper.dispatchButton(int, ButtonEventHandler)public boolean handleCommand(int event)
Calls onCommand(int) method passing the event data.
handleCommand in interface EventGeneratorsHandlerevent - the command event to handle.true if the event is consumed, false otherwise.public boolean handleKeyboard(int event)
EventGeneratorsHandlerhandleKeyboard in interface EventGeneratorsHandlerevent - the keyboard event to handle.true if the event is consumed, false otherwise.public boolean handleKeypad(int event)
EventGeneratorsHandlerhandleKeypad in interface EventGeneratorsHandlerevent - the keypad event to handle.true if the event is consumed, false otherwise.public boolean handlePointer(int event)
handlePointer in interface EventGeneratorsHandlerevent - the pointer event to handle.true if the event is consumed, false otherwise.DispatchHelper.dispatchPointer(int, PointerEventHandler)public boolean onButtonPressed(int event)
ButtonEventHandleronButtonPressed in interface ButtonEventHandlerevent - the button event to handle.true if the event is consumed, false otherwise.public boolean onButtonReleased(int event)
ButtonEventHandleronButtonReleased in interface ButtonEventHandlerevent - the button event to handle.true if the event is consumed, false otherwise.public boolean onButtonClicked(int event)
ButtonEventHandleronButtonClicked in interface ButtonEventHandlerevent - the button event to handle.true if the event is consumed, false otherwise.public boolean onButtonDoubleClicked(int event)
ButtonEventHandleronButtonDoubleClicked in interface ButtonEventHandlerevent - the button event to handle.true if the event is consumed, false otherwise.public boolean onButtonRepeated(int event)
ButtonEventHandleronButtonRepeated in interface ButtonEventHandlerevent - the button event to handle.true if the event is consumed, false otherwise.public boolean onCommand(int command)
CommandEventHandleronCommand in interface CommandEventHandlercommand - the command to handle.true if the event is consumed, false otherwise.public boolean onPointerPressed(Pointer pointer, int pointerX, int pointerY, int event)
PointerEventHandleronPointerPressed in interface PointerEventHandlerpointer - the pointer that generates the event.pointerX - the current x coordinate of the pointer.pointerY - the current y coordinate of the pointer.event - the pointer event to handle.true if the event is consumed, false otherwise.public boolean onPointerReleased(Pointer pointer, int pointerX, int pointerY, int event)
PointerEventHandleronPointerReleased in interface PointerEventHandlerpointer - the pointer that generates the event.pointerX - the current x coordinate of the pointer.pointerY - the current y coordinate of the pointer.event - the pointer event to handle.true if the event is consumed, false otherwise.public boolean onPointerMoved(Pointer pointer, int pointerX, int pointerY, int event)
PointerEventHandleronPointerMoved in interface PointerEventHandlerpointer - the pointer that generates the event.pointerX - the current x coordinate of the pointer.pointerY - the current y coordinate of the pointer.event - the pointer event to handle.true if the event is consumed, false otherwise.public boolean onPointerDragged(Pointer pointer, int pointerX, int pointerY, int event)
PointerEventHandleronPointerDragged in interface PointerEventHandlerpointer - the pointer that generates the event.pointerX - the current x coordinate of the pointer.pointerY - the current y coordinate of the pointer.event - the pointer event to handle.true if the event is consumed, false otherwise.public boolean onPointerEntered(Pointer pointer, int pointerX, int pointerY, int event)
PointerEventHandleronPointerEntered in interface PointerEventHandlerpointer - the pointer that generates the event.pointerX - the current x coordinate of the pointer.pointerY - the current y coordinate of the pointer.event - the pointer event to handle.true if the event is consumed, false otherwise.public boolean onPointerExited(Pointer pointer, int pointerX, int pointerY, int event)
PointerEventHandleronPointerExited in interface PointerEventHandlerpointer - the pointer that generates the event.pointerX - the current x coordinate of the pointer.pointerY - the current y coordinate of the pointer.event - the pointer event to handle.true if the event is consumed, false otherwise.public boolean onPointerClicked(Pointer pointer, int pointerX, int pointerY, int event)
PointerEventHandleronPointerClicked in interface PointerEventHandlerpointer - the pointer that generates the event.pointerX - the current x coordinate of the pointer.pointerY - the current y coordinate of the pointer.event - the pointer event to handle.true if the event is consumed, false otherwise.public boolean onPointerDoubleClicked(Pointer pointer, int pointerX, int pointerY, int event)
PointerEventHandleronPointerDoubleClicked in interface PointerEventHandlerpointer - the pointer that generates the event.pointerX - the current x coordinate of the pointer.pointerY - the current y coordinate of the pointer.event - the pointer event to handle.true if the event is consumed, false otherwise.