Class PreferencesDialog

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, ShortcutManager, Proxy

@Generated("org.javagi.JavaGI") public class PreferencesDialog extends Dialog implements Accessible, Buildable, ConstraintTarget, ShortcutManager

A dialog showing application's preferences.

preferences-dialog

The AdwPreferencesDialog widget presents an application's preferences gathered into pages and groups. The preferences are searchable by the user.

Actions

AdwPrefencesDialog defines the navigation.pop action, it doesn't take any parameters and pops the current subpage from the navigation stack, equivalent to calling popSubpage().

CSS nodes

AdwPreferencesDialog has a main CSS node with the name dialog and the style class .preferences.

Since:
1.5
  • Constructor Details

    • PreferencesDialog

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

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

    • getType

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

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

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

      public void add(PreferencesPage page)
      Adds a preferences page to self.
      Parameters:
      page - the page to add
      Since:
      1.5
    • addToast

      public void addToast(Toast toast)

      Displays toast.

      See ToastOverlay.addToast(Toast).

      Parameters:
      toast - a toast
      Since:
      1.5
    • getSearchEnabled

      public boolean getSearchEnabled()
      Gets whether search is enabled for self.
      Returns:
      whether search is enabled for self.
      Since:
      1.5
    • getVisiblePage

      public @Nullable PreferencesPage getVisiblePage()
      Gets the currently visible page of self.
      Returns:
      the visible page
      Since:
      1.5
    • getVisiblePageName

      public @Nullable String getVisiblePageName()
      Gets the name of currently visible page of self.
      Returns:
      the name of the visible page
      Since:
      1.5
    • popSubpage

      public boolean popSubpage()
      Pop the visible page from the subpage stack of self.
      Returns:
      TRUE if a page has been popped
      Since:
      1.5
    • pushSubpage

      public void pushSubpage(NavigationPage page)

      Pushes page onto the subpage stack of self.

      The page will be automatically removed when popped.

      Parameters:
      page - the subpage
      Since:
      1.5
    • remove

      public void remove(PreferencesPage page)
      Removes a page from self.
      Parameters:
      page - the page to remove
      Since:
      1.5
    • setSearchEnabled

      public void setSearchEnabled(boolean searchEnabled)
      Sets whether search is enabled for self.
      Parameters:
      searchEnabled - whether search is enabled
      Since:
      1.5
    • setVisiblePage

      public void setVisiblePage(PreferencesPage page)
      Makes page the visible page of self.
      Parameters:
      page - a page of this PreferencesDialog
      Since:
      1.5
    • setVisiblePageName

      public void setVisiblePageName(String name)

      Makes the page with the given name visible.

      See PreferencesDialog:visible-page.

      Parameters:
      name - the name of the page to make visible
      Since:
      1.5
    • builder

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