Class ShortcutsShortcut.Builder<B extends ShortcutsShortcut.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
Enclosing class:
ShortcutsShortcut

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

      @Deprecated public B setAccelSizeGroup(SizeGroup accelSizeGroup)
      Deprecated.
      This widget will be removed in GTK 5

      The size group for the accelerator portion of this shortcut.

      This is used internally by GTK, and must not be modified by applications.

      Parameters:
      accelSizeGroup - the value for the accel-size-group property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setAccelerator

      @Deprecated public B setAccelerator(String accelerator)
      Deprecated.
      This widget will be removed in GTK 5

      The accelerator(s) represented by this object.

      This property is used if Gtk.ShortcutsShortcut:shortcut-type is set to ShortcutType.ACCELERATOR.

      The syntax of this property is (an extension of) the syntax understood by Gtk.acceleratorParse(String, Out, Out). Multiple accelerators can be specified by separating them with a space, but keep in mind that the available width is limited.

      It is also possible to specify ranges of shortcuts, using ... between the keys. Sequences of keys can be specified using a + or & between the keys.

      Examples:

      • A single shortcut: <ctl><alt>delete
      • Two alternative shortcuts: <shift>a Home
      • A range of shortcuts: <alt>1...<alt>9
      • Several keys pressed together: Control_L&Control_R
      • A sequence of shortcuts or keys: <ctl>c+<ctl>x

      Use "+" instead of "&" when the keys may (or have to be) pressed sequentially (e.g use "t+t" for 'press the t key twice').

      Note that <, > and & need to be escaped as &lt;, &gt; and &amp; when used in .ui files.

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

      @Deprecated public B setActionName(String actionName)
      Deprecated.
      This widget will be removed in GTK 5

      A detailed action name.

      If this is set for a shortcut of type ShortcutType.ACCELERATOR, then GTK will use the accelerators that are associated with the action via Application.setAccelsForAction(String, String[]), and setting Gtk.ShortcutsShortcut:accelerator is not necessary.

      Parameters:
      actionName - the value for the action-name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setDirection

      @Deprecated public B setDirection(TextDirection direction)
      Deprecated.
      This widget will be removed in GTK 5

      The text direction for which this shortcut is active.

      If the shortcut is used regardless of the text direction, set this property to TextDirection.NONE.

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

      @Deprecated public B setIcon(Icon icon)
      Deprecated.
      This widget will be removed in GTK 5

      An icon to represent the shortcut or gesture.

      This property is used if Gtk.ShortcutsShortcut:shortcut-type is set to ShortcutType.GESTURE.

      For the other predefined gesture types, GTK provides an icon on its own.

      Parameters:
      icon - the value for the icon property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setIconSet

      @Deprecated public B setIconSet(boolean iconSet)
      Deprecated.
      This widget will be removed in GTK 5
      true if an icon has been set.
      Parameters:
      iconSet - the value for the icon-set property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setShortcutType

      @Deprecated public B setShortcutType(ShortcutType shortcutType)
      Deprecated.
      This widget will be removed in GTK 5
      The type of shortcut that is represented.
      Parameters:
      shortcutType - the value for the shortcut-type property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSubtitle

      @Deprecated public B setSubtitle(String subtitle)
      Deprecated.
      This widget will be removed in GTK 5

      The subtitle for the shortcut or gesture.

      This is typically used for gestures and should be a short, one-line text that describes the gesture itself. For the predefined gesture types, GTK provides a subtitle on its own.

      Parameters:
      subtitle - the value for the subtitle property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSubtitleSet

      @Deprecated public B setSubtitleSet(boolean subtitleSet)
      Deprecated.
      This widget will be removed in GTK 5
      true if a subtitle has been set.
      Parameters:
      subtitleSet - the value for the subtitle-set property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTitle

      @Deprecated public B setTitle(String title)
      Deprecated.
      This widget will be removed in GTK 5

      The textual description for the shortcut or gesture represented by this object.

      This should be a short string that can fit in a single line.

      Parameters:
      title - the value for the title property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTitleSizeGroup

      @Deprecated public B setTitleSizeGroup(SizeGroup titleSizeGroup)
      Deprecated.
      This widget will be removed in GTK 5

      The size group for the textual portion of this shortcut.

      This is used internally by GTK, and must not be modified by applications.

      Parameters:
      titleSizeGroup - the value for the title-size-group property
      Returns:
      the Builder instance is returned, to allow method chaining