Package org.jmol.multitouch.sparshui
Class SinglePointGesture
- java.lang.Object
-
- org.jmol.multitouch.sparshui.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
-
-
Field Summary
Fields Modifier and Type Field Description private com.sparshui.server.TouchPoint
_birth
private int
_myId
private int
_nCurrent
private int
_nMoves
private static long
MAXIMUM_CLICK_TIME
-
Constructor Summary
Constructors Constructor Description SinglePointGesture()
-
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
-
-
-
Field Detail
-
MAXIMUM_CLICK_TIME
private static final long MAXIMUM_CLICK_TIME
- See Also:
- Constant Field Values
-
_nCurrent
private int _nCurrent
-
_nMoves
private int _nMoves
-
_myId
private int _myId
-
_birth
private com.sparshui.server.TouchPoint _birth
-
-
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 interfacecom.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 interfacecom.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 interfacecom.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)
-
-