Class SoLongTapGestureRecognizer
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.gestures.recognizers.SoGestureRecognizer
-
- com.openinventor.inventor.gestures.recognizers.SoLongTapGestureRecognizer
-
public class SoLongTapGestureRecognizer extends SoGestureRecognizer
Long tap gesture recognizer.SoLongTapGestureRecognizer
analyses touch events and recognizes a one finger long-tap (touch-and-hold) gesture. It returns anSoLongTapGestureEvent
with the long tap duration if this gesture is recognized. The finger has to stay in a limitation area from the down event to the up event and must stay down for a minimum period of time. This recognizer only generates an END event.Note:
- In order to get touch events for the gesture recognizer(s) to recognize, the application must explicitly register a touch screen device (
SoWinTouchScreen
,SoQtTouchScreen
, etc). - In order to get gesture events, the application must explicitly register gesture recognizers with the touch screen device's touch manager (
SoTouchManager
).
- In order to get touch events for the gesture recognizer(s) to recognize, the application must explicitly register a touch screen device (
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoLongTapGestureRecognizer()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SbTime
getMinimumLongTapDuration()
Gets the minimum duration of a long tap.int
getSpatialRestriction()
Gets the radius of the limitation circle in which the finger has to stay throughout the gesture.void
setMinimumLongTapDuration(SbTime t)
Sets the minimum duration of a long tap.void
setSpatialRestriction(int c)
Sets the radius of the limitation circle in which the finger has to stay throughout the gesture.-
Methods inherited from class com.openinventor.inventor.gestures.recognizers.SoGestureRecognizer
recognize
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
getSpatialRestriction
public int getSpatialRestriction()
Gets the radius of the limitation circle in which the finger has to stay throughout the gesture. (Default is 60 pixels).
-
setSpatialRestriction
public void setSpatialRestriction(int c)
Sets the radius of the limitation circle in which the finger has to stay throughout the gesture. (Default is 60 pixels)
-
getMinimumLongTapDuration
public SbTime getMinimumLongTapDuration()
Gets the minimum duration of a long tap. (Default is 1.5 seconds)
-
setMinimumLongTapDuration
public void setMinimumLongTapDuration(SbTime t)
Sets the minimum duration of a long tap. (Default is 1.5 seconds)
-
-