Class PreferencesPage

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

@Generated("org.javagi.JavaGI") public class PreferencesPage extends Widget implements Accessible, Buildable, ConstraintTarget

A page from PreferencesDialog.

preferences-page

The AdwPreferencesPage widget gathers preferences groups into a single page of a preferences window.

CSS nodes

AdwPreferencesPage has a single CSS node with name preferencespage.

Accessibility

AdwPreferencesPage uses the Gtk.AccessibleRole.group role.

  • Constructor Details

    • PreferencesPage

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

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

    • getType

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

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

      protected PreferencesPage 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 Widget
      Returns:
      the instance as if it were its parent type
    • add

      public void add(PreferencesGroup group)
      Adds a preferences group to self.
      Parameters:
      group - the group to add
    • getBanner

      public @Nullable Banner getBanner()
      Gets the banner displayed at the top of the page.
      Returns:
      the banner for this PreferencesPage
      Since:
      1.7
    • getDescription

      public String getDescription()
      Gets the description of self.
      Returns:
      the description of self.
      Since:
      1.4
    • getDescriptionCentered

      public boolean getDescriptionCentered()
      Gets whether the description is centered.
      Returns:
      whether the description is centered.
      Since:
      1.6
    • getGroup

      public @Nullable PreferencesGroup getGroup(int index)

      Gets the group at index.

      Can return NULL if index is larger than the number of groups in the page.

      Parameters:
      index - a group index
      Returns:
      the group at index
      Since:
      1.8
    • getIconName

      public @Nullable String getIconName()
      Gets the icon name for self.
      Returns:
      the icon name for this PreferencesPage
    • getName

      public @Nullable String getName()
      Gets the name of self.
      Overrides:
      getName in class Widget
      Returns:
      the name of this PreferencesPage
    • getTitle

      public String getTitle()
      Gets the title of self.
      Returns:
      the title of self.
    • getUseUnderline

      public boolean getUseUnderline()
      Gets whether an embedded underline in the title indicates a mnemonic.
      Returns:
      whether an embedded underline in the title indicates a mnemonic
    • insert

      public void insert(PreferencesGroup group, int index)

      Inserts a preferences group to this PreferencesPage at index.

      If index is negative or larger than the number of groups, appends the group, same as add(PreferencesGroup).

      Parameters:
      group - the group to add
      index - the index to insert group a
      Since:
      1.8
    • remove

      public void remove(PreferencesGroup group)
      Removes a group from self.
      Parameters:
      group - the group to remove
    • scrollToTop

      public void scrollToTop()
      Scrolls the scrolled window of this PreferencesPage to the top.
      Since:
      1.3
    • setBanner

      public void setBanner(@Nullable Banner banner)
      Sets the banner displayed at the top of the page.
      Parameters:
      banner - the banner to display at the top of the page
      Since:
      1.7
    • setDescription

      public void setDescription(String description)

      Sets the description of self.

      The description is displayed at the top of the page.

      Parameters:
      description - the description
      Since:
      1.4
    • setDescriptionCentered

      public void setDescriptionCentered(boolean centered)
      Sets whether the description should be centered.
      Parameters:
      centered - If the description should be centered
      Since:
      1.6
    • setIconName

      public void setIconName(@Nullable String iconName)
      Sets the icon name for self.
      Parameters:
      iconName - the icon name
    • setName

      public void setName(@Nullable String name)
      Sets the name of self.
      Overrides:
      setName in class Widget
      Parameters:
      name - the name
    • setTitle

      public void setTitle(String title)
      Sets the title of self.
      Parameters:
      title - the title
    • setUseUnderline

      public void setUseUnderline(boolean useUnderline)
      Sets whether an embedded underline in the title indicates a mnemonic.
      Parameters:
      useUnderline - TRUE if underlines in the text indicate mnemonics
    • builder

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