InputEvents.
To avoid negative impact on event processing, implementation shall restrict computation as much as possible and only within it's appropriate gesture states.
To allow custom user events, other than the normal InputEvents,
a user may return a GestureEvent in it's implementation.
| Modifier and Type | Class and Description |
|---|---|
| public static class | GestureHandler.
A custom gesture event |
| public static interface | GestureHandler.
Listener for |
| Modifier and Type | Field and Description |
|---|---|
| public static final boolean |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public InputEvent | getGestureEvent()
Returns the corresponding |
| public boolean | hasGesture()
Returns true if a previous |
| public boolean | isWithinGesture()
Returns true if within a gesture as detected by a previous |
| public boolean |
| DEBUG | back to summary |
|---|---|
| public static final boolean DEBUG | |
| clear | back to summary |
|---|---|
| public void clear(boolean clearStarted) Clears state of handler, i.e. resets all states incl. previous detected gesture.
| |
| getGestureEvent | back to summary |
|---|---|
| public InputEvent getGestureEvent() Returns the corresponding
Only implemented for gestures mapping to | |
| hasGesture | back to summary |
|---|---|
| public boolean hasGesture() Returns true if a previous | |
| isWithinGesture | back to summary |
|---|---|
| public boolean isWithinGesture() Returns true if within a gesture as detected by a previous | |
| process | back to summary |
|---|---|
| public boolean process(InputEvent e) Process the given If a gesture was already detected previously and has not been cleared, method does not process the event and returns true.
Besides validation of the event's details,
the handler may also validate the | |
| Modifier and Type | Field and Description |
|---|---|
| public static final short | EVENT_GESTURE_DETECTED
A gesture has been detected. |
| private final GestureHandler | |
| private final InputEvent |
| Access | Constructor and Description |
|---|---|
| public | GestureEvent(final Object source, final long when, final int modifiers, final GestureHandler handler, final InputEvent
TODO trigger)Creates a gesture event with default type |
| public | GestureEvent(final short
must lie within [400..599] event_type, final Object source, final long when, final int modifiers, final GestureHandler handler, final InputEvent TODO trigger)Creates a gesture event with custom event_type ! |
| Modifier and Type | Method and Description |
|---|---|
| public final GestureHandler | |
| public final InputEvent | |
| public String | toString()
Overrides com. |
| EVENT_GESTURE_DETECTED | back to summary |
|---|---|
| public static final short EVENT_GESTURE_DETECTED A gesture has been detected. | |
| handler | back to summary |
|---|---|
| private final GestureHandler handler | |
| ie | back to summary |
|---|---|
| private final InputEvent ie | |
| GestureEvent | back to summary |
|---|---|
| public GestureEvent(final Object source, final long when, final int modifiers, final GestureHandler handler, final InputEvent trigger) Creates a gesture event with default type
| |
| GestureEvent | back to summary |
|---|---|
| public GestureEvent(final short event_type, final Object source, final long when, final int modifiers, final GestureHandler handler, final InputEvent trigger) Creates a gesture event with custom event_type !
| |
| getHandler | back to summary |
|---|---|
| public final GestureHandler getHandler() Return the | |
| getTrigger | back to summary |
|---|---|
| public final InputEvent getTrigger() Triggering | |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Doc from java. Returns a String representation of this EventObject.
| |
GestureEvents.
GestureEvent
| Modifier and Type | Method and Description |
|---|---|
| public void |
| gestureDetected | back to summary |
|---|---|
| public void gestureDetected(GestureHandler.
| |