Class KeyvalTrigger.Builder<B extends KeyvalTrigger.Builder<B>>

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

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

      public B setKeyval(int keyval)
      The key value for the trigger.
      Parameters:
      keyval - the value for the keyval property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setModifiers

      public B setModifiers(Set<ModifierType> modifiers)
      The key modifiers for the trigger.
      Parameters:
      modifiers - the value for the modifiers property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setModifiers

      public B setModifiers(ModifierType... modifiers)
      The key modifiers for the trigger.
      Parameters:
      modifiers - the value for the modifiers property
      Returns:
      the Builder instance is returned, to allow method chaining