Package com.jme3.input.android
Class AndroidGestureProcessor
java.lang.Object
com.jme3.input.android.AndroidGestureProcessor
- All Implemented Interfaces:
android.view.GestureDetector.OnDoubleTapListener
,android.view.GestureDetector.OnGestureListener
,android.view.ScaleGestureDetector.OnScaleGestureListener
public class AndroidGestureProcessor
extends Object
implements android.view.GestureDetector.OnGestureListener, android.view.GestureDetector.OnDoubleTapListener, android.view.ScaleGestureDetector.OnScaleGestureListener
AndroidGestureHandler uses Gesture type listeners to create jME TouchEvents
for gestures. This class is designed to handle the gestures supported
on Android rev 9 (Android 2.3). Extend this class to add functionality
added by Android after rev 9.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
onDoubleTap
(android.view.MotionEvent event) boolean
onDoubleTapEvent
(android.view.MotionEvent event) boolean
onDown
(android.view.MotionEvent event) boolean
onFling
(android.view.MotionEvent startEvent, android.view.MotionEvent endEvent, float velocityX, float velocityY) void
onLongPress
(android.view.MotionEvent event) boolean
onScale
(android.view.ScaleGestureDetector scaleGestureDetector) boolean
onScaleBegin
(android.view.ScaleGestureDetector scaleGestureDetector) void
onScaleEnd
(android.view.ScaleGestureDetector scaleGestureDetector) boolean
onScroll
(android.view.MotionEvent startEvent, android.view.MotionEvent endEvent, float distX, float distY) void
onShowPress
(android.view.MotionEvent event) boolean
onSingleTapConfirmed
(android.view.MotionEvent event) boolean
onSingleTapUp
(android.view.MotionEvent event)
-
Constructor Details
-
AndroidGestureProcessor
-
-
Method Details
-
onDown
public boolean onDown(android.view.MotionEvent event) - Specified by:
onDown
in interfaceandroid.view.GestureDetector.OnGestureListener
-
onSingleTapUp
public boolean onSingleTapUp(android.view.MotionEvent event) - Specified by:
onSingleTapUp
in interfaceandroid.view.GestureDetector.OnGestureListener
-
onShowPress
public void onShowPress(android.view.MotionEvent event) - Specified by:
onShowPress
in interfaceandroid.view.GestureDetector.OnGestureListener
-
onLongPress
public void onLongPress(android.view.MotionEvent event) - Specified by:
onLongPress
in interfaceandroid.view.GestureDetector.OnGestureListener
-
onScroll
public boolean onScroll(android.view.MotionEvent startEvent, android.view.MotionEvent endEvent, float distX, float distY) - Specified by:
onScroll
in interfaceandroid.view.GestureDetector.OnGestureListener
-
onFling
public boolean onFling(android.view.MotionEvent startEvent, android.view.MotionEvent endEvent, float velocityX, float velocityY) - Specified by:
onFling
in interfaceandroid.view.GestureDetector.OnGestureListener
-
onSingleTapConfirmed
public boolean onSingleTapConfirmed(android.view.MotionEvent event) - Specified by:
onSingleTapConfirmed
in interfaceandroid.view.GestureDetector.OnDoubleTapListener
-
onDoubleTap
public boolean onDoubleTap(android.view.MotionEvent event) - Specified by:
onDoubleTap
in interfaceandroid.view.GestureDetector.OnDoubleTapListener
-
onDoubleTapEvent
public boolean onDoubleTapEvent(android.view.MotionEvent event) - Specified by:
onDoubleTapEvent
in interfaceandroid.view.GestureDetector.OnDoubleTapListener
-
onScaleBegin
public boolean onScaleBegin(android.view.ScaleGestureDetector scaleGestureDetector) - Specified by:
onScaleBegin
in interfaceandroid.view.ScaleGestureDetector.OnScaleGestureListener
-
onScale
public boolean onScale(android.view.ScaleGestureDetector scaleGestureDetector) - Specified by:
onScale
in interfaceandroid.view.ScaleGestureDetector.OnScaleGestureListener
-
onScaleEnd
public void onScaleEnd(android.view.ScaleGestureDetector scaleGestureDetector) - Specified by:
onScaleEnd
in interfaceandroid.view.ScaleGestureDetector.OnScaleGestureListener
-