JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.newt.event.GestureHandler Interface Reference

Generic gesture handler interface designed to allow pass-through filtering of InputEvents. More...

Inheritance diagram for com.jogamp.newt.event.GestureHandler:
Collaboration diagram for com.jogamp.newt.event.GestureHandler:

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")
 

Detailed Description

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.

Member Function Documentation

◆ clear()

void com.jogamp.newt.event.GestureHandler.clear ( boolean  clearStarted)

Clears state of handler, i.e.

resets all states incl. previous detected gesture.

Parameters
clearStartedif 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.

◆ getGestureEvent()

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.

◆ hasGesture()

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.

◆ isWithinGesture()

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.

◆ process()

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.

Member Data Documentation

◆ DEBUG

final boolean com.jogamp.newt.event.GestureHandler.DEBUG = Debug.debug("Window.MouseEvent")
static

Definition at line 46 of file GestureHandler.java.


The documentation for this interface was generated from the following file: