Class SoLongTapGestureRecognizer
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.gestures.recognizers.SoGestureRecognizer
com.openinventor.inventor.gestures.recognizers.SoLongTapGestureRecognizer
Long tap gesture recognizer.
SoLongTapGestureRecognizer analyses touch events and recognizes a one finger long-tap (touch-and-hold) gesture. It returns an SoLongTapGestureEvent 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 (
,
invalid reference
SoWinTouchScreen, etc).invalid reference
SoQtTouchScreen - In order to get gesture events, the application must explicitly register gesture recognizers with the touch screen device's touch manager (
SoTouchManager).
- See Also:
-
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 -
Method Summary
Modifier and TypeMethodDescriptionGets the minimum duration of a long tap.intGets the radius of the limitation circle in which the finger has to stay throughout the gesture.voidSets the minimum duration of a long tap.voidsetSpatialRestriction(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
recognizeMethods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoLongTapGestureRecognizer
public SoLongTapGestureRecognizer()Constructor.
-
-
Method Details
-
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
Gets the minimum duration of a long tap. (Default is 1.5 seconds) -
setMinimumLongTapDuration
Sets the minimum duration of a long tap. (Default is 1.5 seconds)
-