Class ShortcutController.Builder<B extends ShortcutController.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
ShortcutController<T extends GObject>

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

      public B setMnemonicModifiers(Set<ModifierType> mnemonicModifiers)
      The modifiers that need to be pressed to allow mnemonics activation.
      Parameters:
      mnemonicModifiers - the value for the mnemonic-modifiers property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setModel

      public B setModel(ListModel model)
      A list model to take shortcuts from.
      Parameters:
      model - the value for the model property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setScope

      public B setScope(ShortcutScope scope)
      What scope the shortcuts will be handled in.
      Parameters:
      scope - the value for the scope property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setMnemonicModifiers

      public B setMnemonicModifiers(ModifierType... mnemonicModifiers)
      The modifiers that need to be pressed to allow mnemonics activation.
      Parameters:
      mnemonicModifiers - the value for the mnemonic-modifiers property
      Returns:
      the Builder instance is returned, to allow method chaining