Class ExpanderRow

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

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

A ListBoxRow used to reveal widgets.

expander-row

The AdwExpanderRow widget allows the user to reveal or hide widgets below it. It also allows the user to enable the expansion of the row, allowing to disable all that the row contains.

AdwExpanderRow as GtkBuildable

The AdwExpanderRow implementation of the Buildable interface supports adding a child as an suffix widget by specifying “suffix” as the “type” attribute of a element.

It also supports adding it as a prefix widget by specifying “prefix” as the “type” attribute of a element.

CSS nodes

AdwExpanderRow has a main CSS node with name row and the .expander style class. It has the .empty style class when it contains no children.

It contains the subnodes row.header for its main embedded row, list.nested for the list it can expand, and image.expander-row-arrow for its arrow.

Style classes

AdwExpanderRow can use the . style class to emphasize the row subtitle instead of the row title, which is useful for displaying read-only properties.

When used together with the .monospace style class, only the subtitle becomes monospace, not the title or any extra widgets.

  • Constructor Details

    • ExpanderRow

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

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

    • getType

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

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

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

      @Deprecated public void addAction(Widget widget)
      Deprecated.
      Use addSuffix(Widget) to add a suffix.
      Adds an action widget to self.
      Parameters:
      widget - a widget
    • addPrefix

      public void addPrefix(Widget widget)
      Adds a prefix widget to self.
      Parameters:
      widget - a widget
    • addRow

      public void addRow(Widget child)

      Adds a widget to self.

      The widget will appear in the expanding list below self.

      Parameters:
      child - a widget
    • addSuffix

      public void addSuffix(Widget widget)
      Adds an suffix widget to self.
      Parameters:
      widget - a widget
      Since:
      1.4
    • getEnableExpansion

      public boolean getEnableExpansion()
      Gets whether the expansion of this ExpanderRow is enabled.
      Returns:
      whether the expansion of this ExpanderRow is enabled.
    • getExpanded

      public boolean getExpanded()
      Gets whether this ExpanderRow is expanded.
      Returns:
      whether this ExpanderRow is expanded
    • getIconName

      @Deprecated public @Nullable String getIconName()
      Deprecated.
      Use addPrefix(Widget) to add an icon.
      Gets the icon name for self.
      Returns:
      the icon name for this ExpanderRow
    • getShowEnableSwitch

      public boolean getShowEnableSwitch()
      Gets whether the switch enabling the expansion of this ExpanderRow is visible.
      Returns:
      whether the switch enabling the expansion is visible
    • getSubtitle

      public String getSubtitle()
      Gets the subtitle for self.
      Returns:
      the subtitle for this ExpanderRow
    • getSubtitleLines

      public int getSubtitleLines()
      Gets the number of lines at the end of which the subtitle label will be ellipsized.
      Returns:
      the number of lines at the end of which the subtitle label will be ellipsized
      Since:
      1.3
    • getTitleLines

      public int getTitleLines()
      Gets the number of lines at the end of which the title label will be ellipsized.
      Returns:
      the number of lines at the end of which the title label will be ellipsized
      Since:
      1.3
    • remove

      public void remove(Widget child)
      Removes a child from self.
      Parameters:
      child - the child to be removed
    • setEnableExpansion

      public void setEnableExpansion(boolean enableExpansion)
      Sets whether the expansion of this ExpanderRow is enabled.
      Parameters:
      enableExpansion - whether to enable the expansion
    • setExpanded

      public void setExpanded(boolean expanded)
      Sets whether this ExpanderRow is expanded.
      Parameters:
      expanded - whether to expand the row
    • setIconName

      @Deprecated public void setIconName(@Nullable String iconName)
      Deprecated.
      Use addPrefix(Widget) to add an icon.
      Sets the icon name for self.
      Parameters:
      iconName - the icon name
    • setShowEnableSwitch

      public void setShowEnableSwitch(boolean showEnableSwitch)
      Sets whether the switch enabling the expansion of this ExpanderRow is visible.
      Parameters:
      showEnableSwitch - whether to show the switch enabling the expansion
    • setSubtitle

      public void setSubtitle(String subtitle)

      Sets the subtitle for self.

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

      Parameters:
      subtitle - the subtitle
    • setSubtitleLines

      public void setSubtitleLines(int subtitleLines)

      Sets the number of lines at the end of which the subtitle label will be ellipsized.

      If the value is 0, the number of lines won't be limited.

      Parameters:
      subtitleLines - the number of lines at the end of which the subtitle label will be ellipsized
      Since:
      1.3
    • setTitleLines

      public void setTitleLines(int titleLines)

      Sets the number of lines at the end of which the title label will be ellipsized.

      If the value is 0, the number of lines won't be limited.

      Parameters:
      titleLines - the number of lines at the end of which the title label will be ellipsized
      Since:
      1.3
    • builder

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