Class Shortcut.Builder<B extends Shortcut.Builder<B>>

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

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

      public B setAction(ShortcutAction action)
      The action that gets activated by this shortcut.
      Parameters:
      action - the value for the action property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setArguments

      public B setArguments(Variant arguments)
      Arguments passed to activation.
      Parameters:
      arguments - the value for the arguments property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTrigger

      public B setTrigger(ShortcutTrigger trigger)
      The trigger that triggers this shortcut.
      Parameters:
      trigger - the value for the trigger property
      Returns:
      the Builder instance is returned, to allow method chaining