Class SinglePointGesture

  • All Implemented Interfaces:
    com.sparshui.gestures.Gesture

    public class SinglePointGesture
    extends java.lang.Object
    implements com.sparshui.gestures.Gesture
    SINGLE_POINT_GESTURE only passes single-touch gestures. allows detection of click and double-click
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean checkClick​(com.sparshui.server.TouchPoint tpNew, java.util.List<com.sparshui.common.Event> retEvents, boolean isDeath)  
      int getGestureType()
      Get the integer value of this gesture type.
      java.lang.String getName()
      Get the name of this gesture.
      java.util.List<com.sparshui.common.Event> processChange​(java.util.List<com.sparshui.server.TouchPoint> touchPoints, com.sparshui.server.TouchPoint changedTouchPoint)
      incorporates double-click gesture
      • Methods inherited from class java.lang.Object

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

      • _nCurrent

        private int _nCurrent
      • _nMoves

        private int _nMoves
      • _myId

        private int _myId
      • _birth

        private com.sparshui.server.TouchPoint _birth
    • Constructor Detail

      • SinglePointGesture

        public SinglePointGesture()
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: com.sparshui.gestures.Gesture
        Get the name of this gesture.
        Specified by:
        getName in interface com.sparshui.gestures.Gesture
        Returns:
        The name of this gesture.
      • getGestureType

        public int getGestureType()
        Description copied from interface: com.sparshui.gestures.Gesture
        Get the integer value of this gesture type. Gesture values are defined in GestureType.java.
        Specified by:
        getGestureType in interface com.sparshui.gestures.Gesture
        Returns:
        The gesture type.
      • processChange

        public java.util.List<com.sparshui.common.Event> processChange​(java.util.List<com.sparshui.server.TouchPoint> touchPoints,
                                                                       com.sparshui.server.TouchPoint changedTouchPoint)
        incorporates double-click gesture
        Specified by:
        processChange in interface com.sparshui.gestures.Gesture
        Parameters:
        touchPoints -
        changedTouchPoint -
        Returns:
        Vector of Events
      • checkClick

        private boolean checkClick​(com.sparshui.server.TouchPoint tpNew,
                                   java.util.List<com.sparshui.common.Event> retEvents,
                                   boolean isDeath)