Class PreferencesRow

All Implemented Interfaces:
Accessible, Actionable, Buildable, ConstraintTarget, Proxy
Direct Known Subclasses:
ActionRow, ButtonRow, EntryRow, ExpanderRow

@Generated("org.javagi.JavaGI") public class PreferencesRow extends ListBoxRow implements Accessible, Actionable, Buildable, ConstraintTarget

A ListBoxRow used to present preferences.

The AdwPreferencesRow widget has a title that PreferencesDialog will use to let the user look for a preference. It doesn't present the title in any way and lets you present the preference as you please.

ActionRow and its derivatives are convenient to use as preference rows as they take care of presenting the preference's title while letting you compose the inputs of the preference around it.

  • Constructor Details

    • PreferencesRow

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

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

    • getType

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

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

      protected PreferencesRow 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 ListBoxRow
      Returns:
      the instance as if it were its parent type
    • getTitle

      public String getTitle()
      Gets the title of the preference represented by self.
      Returns:
      the title
    • getTitleSelectable

      public boolean getTitleSelectable()
      Gets whether the user can copy the title from the label
      Returns:
      whether the user can copy the title from the label
      Since:
      1.1
    • getUseMarkup

      public boolean getUseMarkup()
      Gets whether to use Pango markup for the title label.
      Returns:
      whether to use markup
      Since:
      1.2
    • 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
    • setTitle

      public void setTitle(String title)

      Sets the title of the preference represented by self.

      The title is interpreted as Pango markup unless PreferencesRow:use-markup is set to FALSE.

      Parameters:
      title - the title
    • setTitleSelectable

      public void setTitleSelectable(boolean titleSelectable)

      Sets whether the user can copy the title from the label

      See also Gtk.Label:selectable.

      Parameters:
      titleSelectable - TRUE if the user can copy the title from the label
      Since:
      1.1
    • setUseMarkup

      public void setUseMarkup(boolean useMarkup)

      Sets whether to use Pango markup for the title label.

      Subclasses may also use it for other labels, such as subtitle.

      See also Pango#parseMarkup.

      Parameters:
      useMarkup - whether to use markup
      Since:
      1.2
    • 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 PreferencesRow.Builder<? extends PreferencesRow.Builder> builder()
      A PreferencesRow.Builder object constructs a PreferencesRow with the specified properties. Use the various set...() methods to set properties, and finish construction with PreferencesRow.Builder.build().
      Returns:
      the builder object