Class CellRendererAccel.Builder<B extends CellRendererAccel.Builder<B>>

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

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

      public B setAccelKey(int accelKey)
      The keyval of the accelerator.
      Parameters:
      accelKey - the value for the accel-key property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setAccelMode

      public B setAccelMode(CellRendererAccelMode accelMode)
      Determines if the edited accelerators are GTK accelerators. If they are, consumed modifiers are suppressed, only accelerators accepted by GTK are allowed, and the accelerators are rendered in the same way as they are in menus.
      Parameters:
      accelMode - the value for the accel-mode property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setAccelMods

      public B setAccelMods(Set<ModifierType> accelMods)
      The modifier mask of the accelerator.
      Parameters:
      accelMods - the value for the accel-mods property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setKeycode

      public B setKeycode(int keycode)
      The hardware keycode of the accelerator. Note that the hardware keycode is only relevant if the key does not have a keyval. Normally, the keyboard configuration should assign keyvals to all keys.
      Parameters:
      keycode - the value for the keycode property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setAccelMods

      public B setAccelMods(ModifierType... accelMods)
      The modifier mask of the accelerator.
      Parameters:
      accelMods - the value for the accel-mods property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onAccelCleared

      public B onAccelCleared(CellRendererAccel.AccelClearedCallback handler)
      Gets emitted when the user has removed the accelerator.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onAccelEdited

      public B onAccelEdited(CellRendererAccel.AccelEditedCallback handler)
      Gets emitted when the user has selected a new accelerator.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: