Class GestureSingle.Builder<B extends GestureSingle.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Direct Known Subclasses:
DragSource.Builder, GestureClick.Builder, GestureDrag.Builder, GestureLongPress.Builder, GestureStylus.Builder, GestureSwipe.Builder
Enclosing class:
GestureSingle

public static class GestureSingle.Builder<B extends GestureSingle.Builder<B>> extends Gesture.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public GestureSingle build()
      Finish building the GestureSingle object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to GestureSingle.
      Overrides:
      build in class Gesture.Builder<B extends GestureSingle.Builder<B>>
      Returns:
      a new instance of GestureSingle with the properties that were set in the Builder object.
    • setButton

      public B setButton(int button)
      Mouse button number to listen to, or 0 to listen for any button.
      Parameters:
      button - the value for the button property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setExclusive

      public B setExclusive(boolean exclusive)

      Whether the gesture is exclusive.

      Exclusive gestures only listen to pointer and pointer emulated events.

      Parameters:
      exclusive - the value for the exclusive property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTouchOnly

      public B setTouchOnly(boolean touchOnly)
      Whether the gesture handles only touch events.
      Parameters:
      touchOnly - the value for the touch-only property
      Returns:
      the Builder instance is returned, to allow method chaining