Class ShortcutsSection<T extends GObject>

All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>, SequencedCollection<T>, ListModel<T>, Buildable, Proxy, ListModelJavaList<T>

@Generated("org.javagi.JavaGI") public final class ShortcutsSection<T extends GObject> extends GObject implements ListModel<T>, Buildable

An object representing a section in ShortcutsDialog.

It contains ShortcutsItem objects, use add(ShortcutsItem) to add them.

AdwShortcutsSection implements the ListModel interface and allows to access the added shortcut items through it.

AdwShortcutsSection as GtkBuildable

AdwShortcutsSection allows adding AdwShortcutsItem objects as children.

Since:
1.8
  • Constructor Details

    • ShortcutsSection

      public ShortcutsSection(MemorySegment address)
      Create a ShortcutsSection instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • ShortcutsSection

      public ShortcutsSection(@Nullable String title)
      Creates a new AdwShortcutsSection with title as its title if provided.
      Parameters:
      title - the section title
      Since:
      1.8
    • ShortcutsSection

      public ShortcutsSection()
      Create a new ShortcutsSection.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the ShortcutsSection class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected ShortcutsSection asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • add

      public void add(ShortcutsItem item)
      Adds item to self.
      Parameters:
      item - the item to add
      Since:
      1.8
    • getTitle

      public @Nullable String getTitle()
      Gets the title of self.
      Returns:
      the title
      Since:
      1.8
    • setTitle

      public void setTitle(@Nullable String title)
      Sets the title of self.
      Parameters:
      title - the title to use
      Since:
      1.8
    • builder

      public static ShortcutsSection.Builder<? extends ShortcutsSection.Builder> builder()
      A ShortcutsSection.Builder object constructs a ShortcutsSection with the specified properties. Use the various set...() methods to set properties, and finish construction with ShortcutsSection.Builder.build().
      Returns:
      the builder object