Package org.oscim.gdx

Class GestureHandler

  • All Implemented Interfaces:
    com.badlogic.gdx.input.GestureDetector.GestureListener

    public class GestureHandler
    extends java.lang.Object
    implements com.badlogic.gdx.input.GestureDetector.GestureListener
    • Constructor Summary

      Constructors 
      Constructor Description
      GestureHandler​(org.oscim.map.Map map)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean fling​(float velocityX, float velocityY, int button)  
      boolean longPress​(float x, float y)  
      boolean pan​(float x, float y, float deltaX, float deltaY)  
      boolean panStop​(float x, float y, int pointer, int button)  
      boolean pinch​(com.badlogic.gdx.math.Vector2 initialPointer1, com.badlogic.gdx.math.Vector2 initialPointer2, com.badlogic.gdx.math.Vector2 pointer1, com.badlogic.gdx.math.Vector2 pointer2)  
      void pinchStop()  
      boolean tap​(float x, float y, int count, int button)  
      boolean touchDown​(float x, float y, int pointer, int button)  
      boolean zoom​(float initialDistance, float distance)  
      • Methods inherited from class java.lang.Object

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

      • mPrevPinchWidth

        protected double mPrevPinchWidth
      • PINCH_ZOOM_THRESHOLD

        protected static final double PINCH_ZOOM_THRESHOLD
        See Also:
        Constant Field Values
      • PINCH_ROTATE_THRESHOLD

        protected static final double PINCH_ROTATE_THRESHOLD
        See Also:
        Constant Field Values
      • PINCH_TILT_THRESHOLD

        protected static final float PINCH_TILT_THRESHOLD
        See Also:
        Constant Field Values
    • Constructor Detail

      • GestureHandler

        public GestureHandler​(org.oscim.map.Map map)
    • Method Detail

      • touchDown

        public boolean touchDown​(float x,
                                 float y,
                                 int pointer,
                                 int button)
        Specified by:
        touchDown in interface com.badlogic.gdx.input.GestureDetector.GestureListener
      • tap

        public boolean tap​(float x,
                           float y,
                           int count,
                           int button)
        Specified by:
        tap in interface com.badlogic.gdx.input.GestureDetector.GestureListener
      • longPress

        public boolean longPress​(float x,
                                 float y)
        Specified by:
        longPress in interface com.badlogic.gdx.input.GestureDetector.GestureListener
      • fling

        public boolean fling​(float velocityX,
                             float velocityY,
                             int button)
        Specified by:
        fling in interface com.badlogic.gdx.input.GestureDetector.GestureListener
      • pan

        public boolean pan​(float x,
                           float y,
                           float deltaX,
                           float deltaY)
        Specified by:
        pan in interface com.badlogic.gdx.input.GestureDetector.GestureListener
      • zoom

        public boolean zoom​(float initialDistance,
                            float distance)
        Specified by:
        zoom in interface com.badlogic.gdx.input.GestureDetector.GestureListener
      • pinch

        public boolean pinch​(com.badlogic.gdx.math.Vector2 initialPointer1,
                             com.badlogic.gdx.math.Vector2 initialPointer2,
                             com.badlogic.gdx.math.Vector2 pointer1,
                             com.badlogic.gdx.math.Vector2 pointer2)
        Specified by:
        pinch in interface com.badlogic.gdx.input.GestureDetector.GestureListener
      • panStop

        public boolean panStop​(float x,
                               float y,
                               int pointer,
                               int button)
        Specified by:
        panStop in interface com.badlogic.gdx.input.GestureDetector.GestureListener
      • pinchStop

        public void pinchStop()
        Specified by:
        pinchStop in interface com.badlogic.gdx.input.GestureDetector.GestureListener