Class Drag.Builder<B extends Drag.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
Drag

public static class Drag.Builder<B extends Drag.Builder<B>> extends GObject.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 Drag build()
      Finish building the Drag object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to Drag.
      Overrides:
      build in class GObject.Builder<B extends Drag.Builder<B>>
      Returns:
      a new instance of Drag with the properties that were set in the Builder object.
    • setActions

      public B setActions(Set<DragAction> actions)
      The possible actions of this drag.
      Parameters:
      actions - the value for the actions property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setContent

      public B setContent(ContentProvider content)
      The GdkContentProvider.
      Parameters:
      content - the value for the content property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setDevice

      public B setDevice(Device device)
      The GdkDevice that is performing the drag.
      Parameters:
      device - the value for the device property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setFormats

      public B setFormats(ContentFormats formats)
      The possible formats that the drag can provide its data in.
      Parameters:
      formats - the value for the formats property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSelectedAction

      public B setSelectedAction(Set<DragAction> selectedAction)
      The currently selected action of the drag.
      Parameters:
      selectedAction - the value for the selected-action property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSurface

      public B setSurface(Surface surface)
      The surface where the drag originates.
      Parameters:
      surface - the value for the surface property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setActions

      public B setActions(DragAction... actions)
      The possible actions of this drag.
      Parameters:
      actions - the value for the actions property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSelectedAction

      public B setSelectedAction(DragAction... selectedAction)
      The currently selected action of the drag.
      Parameters:
      selectedAction - the value for the selected-action property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onCancel

      public B onCancel(Drag.CancelCallback handler)
      Emitted when the drag operation is cancelled.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onDndFinished

      public B onDndFinished(Drag.DndFinishedCallback handler)

      Emitted when the destination side has finished reading all data.

      The drag object can now free all miscellaneous data.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onDropPerformed

      public B onDropPerformed(Drag.DropPerformedCallback handler)
      Emitted when the drop operation is performed on an accepting client.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: