|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
Generic gesture handler interface designed to allow pass-through filtering of InputEvents.
More...
Classes | |
| class | GestureEvent |
| A custom gesture event. More... | |
| interface | GestureListener |
Listener for GestureEvents. More... | |
Public Member Functions | |
| void | clear (boolean clearStarted) |
| Clears state of handler, i.e. More... | |
| boolean | hasGesture () |
Returns true if a previous process(InputEvent) command produced a gesture, which has not been cleared. More... | |
| InputEvent | getGestureEvent () |
Returns the corresponding InputEvent for the gesture as detected by a previous process(InputEvent), which has not been cleared. More... | |
| boolean | isWithinGesture () |
Returns true if within a gesture as detected by a previous process(InputEvent) command, which has not been cleared. More... | |
| boolean | process (InputEvent e) |
Process the given InputEvent and returns true if it produced the gesture. More... | |
Static Public Attributes | |
| static final boolean | DEBUG = Debug.debug("Window.MouseEvent") |
Generic gesture handler interface designed to allow pass-through filtering of 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.
Definition at line 45 of file GestureHandler.java.
| void com.jogamp.newt.event.GestureHandler.clear | ( | boolean | clearStarted | ) |
Clears state of handler, i.e.
resets all states incl. previous detected gesture.
| clearStarted | if true, also clears started state, otherwise stay within gesture - if appropriate. Staying within a gesture allows fluent continuous gesture sequence, e.g. for scrolling. |
Implemented in com.jogamp.newt.event.DoubleTapScrollGesture, and com.jogamp.newt.event.PinchToZoomGesture.
| InputEvent com.jogamp.newt.event.GestureHandler.getGestureEvent | ( | ) |
Returns the corresponding InputEvent for the gesture as detected by a previous process(InputEvent), which has not been cleared.
Otherwise returns null.
Only implemented for gestures mapping to InputEvents.
Implemented in com.jogamp.newt.event.DoubleTapScrollGesture, and com.jogamp.newt.event.PinchToZoomGesture.
| boolean com.jogamp.newt.event.GestureHandler.hasGesture | ( | ) |
Returns true if a previous process(InputEvent) command produced a gesture, which has not been cleared.
Otherwise returns false.
Implemented in com.jogamp.newt.event.DoubleTapScrollGesture, and com.jogamp.newt.event.PinchToZoomGesture.
| boolean com.jogamp.newt.event.GestureHandler.isWithinGesture | ( | ) |
Returns true if within a gesture as detected by a previous process(InputEvent) command, which has not been cleared.
Otherwise returns false.
Implemented in com.jogamp.newt.event.DoubleTapScrollGesture, and com.jogamp.newt.event.PinchToZoomGesture.
| boolean com.jogamp.newt.event.GestureHandler.process | ( | InputEvent | e | ) |
Process the given InputEvent and returns true if it produced the gesture.
Otherwise returns false.
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 InputEvent.InputClass and/or InputEvent.InputType.
Implemented in com.jogamp.newt.event.DoubleTapScrollGesture, and com.jogamp.newt.event.PinchToZoomGesture.
|
static |
Definition at line 46 of file GestureHandler.java.