Class 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 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
    ,
    invalid reference
    SoQtTouchScreen
    , etc).
  • In order to get gesture events, the application must explicitly register gesture recognizers with the touch screen device's touch manager (SoTouchManager).

See Also:
  • 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

      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)