Class ShortcutsItem.Builder<B extends ShortcutsItem.Builder<B>>

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

public static class ShortcutsItem.Builder<B extends ShortcutsItem.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
1.8
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

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

      public B setAccelerator(String accelerator)

      The shortcut accelerator.

      Accelerator must be in the format ShortcutLabel accepts.

      Parameters:
      accelerator - the value for the accelerator property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.8
    • setActionName

      public B setActionName(String actionName)
      Fully qualified action name to get the accelerator from.
      Parameters:
      actionName - the value for the action-name property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.8
    • setDirection

      public B setDirection(TextDirection direction)

      The shortcut direction.

      If set to Gtk.TextDirection.LTR or Gtk.TextDirection.rtl, the shortcut will only be displayed for this direction.

      Parameters:
      direction - the value for the direction property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.8
    • setSubtitle

      public B setSubtitle(String subtitle)
      The subtitle of the shortcut.
      Parameters:
      subtitle - the value for the subtitle property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.8
    • setTitle

      public B setTitle(String title)
      The title of the shortcut.
      Parameters:
      title - the value for the title property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.8