Class AndroidGestureProcessor

  • All Implemented Interfaces:
    android.view.GestureDetector.OnDoubleTapListener, android.view.GestureDetector.OnGestureListener, android.view.ScaleGestureDetector.OnScaleGestureListener

    public class AndroidGestureProcessor
    extends java.lang.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.
    Author:
    iwgeric
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AndroidGestureProcessor

        public AndroidGestureProcessor​(AndroidTouchInput touchInput)
    • Method Detail

      • onDown

        public boolean onDown​(android.view.MotionEvent event)
        Specified by:
        onDown in interface android.view.GestureDetector.OnGestureListener
      • onSingleTapUp

        public boolean onSingleTapUp​(android.view.MotionEvent event)
        Specified by:
        onSingleTapUp in interface android.view.GestureDetector.OnGestureListener
      • onShowPress

        public void onShowPress​(android.view.MotionEvent event)
        Specified by:
        onShowPress in interface android.view.GestureDetector.OnGestureListener
      • onLongPress

        public void onLongPress​(android.view.MotionEvent event)
        Specified by:
        onLongPress in interface android.view.GestureDetector.OnGestureListener
      • onScroll

        public boolean onScroll​(android.view.MotionEvent startEvent,
                                android.view.MotionEvent endEvent,
                                float distX,
                                float distY)
        Specified by:
        onScroll in interface android.view.GestureDetector.OnGestureListener
      • onFling

        public boolean onFling​(android.view.MotionEvent startEvent,
                               android.view.MotionEvent endEvent,
                               float velocityX,
                               float velocityY)
        Specified by:
        onFling in interface android.view.GestureDetector.OnGestureListener
      • onSingleTapConfirmed

        public boolean onSingleTapConfirmed​(android.view.MotionEvent event)
        Specified by:
        onSingleTapConfirmed in interface android.view.GestureDetector.OnDoubleTapListener
      • onDoubleTap

        public boolean onDoubleTap​(android.view.MotionEvent event)
        Specified by:
        onDoubleTap in interface android.view.GestureDetector.OnDoubleTapListener
      • onDoubleTapEvent

        public boolean onDoubleTapEvent​(android.view.MotionEvent event)
        Specified by:
        onDoubleTapEvent in interface android.view.GestureDetector.OnDoubleTapListener
      • onScaleBegin

        public boolean onScaleBegin​(android.view.ScaleGestureDetector scaleGestureDetector)
        Specified by:
        onScaleBegin in interface android.view.ScaleGestureDetector.OnScaleGestureListener
      • onScale

        public boolean onScale​(android.view.ScaleGestureDetector scaleGestureDetector)
        Specified by:
        onScale in interface android.view.ScaleGestureDetector.OnScaleGestureListener
      • onScaleEnd

        public void onScaleEnd​(android.view.ScaleGestureDetector scaleGestureDetector)
        Specified by:
        onScaleEnd in interface android.view.ScaleGestureDetector.OnScaleGestureListener