Klasse ExpanderRow

Alle implementierten Schnittstellen:
PointerInterface

public class ExpanderRow extends PreferencesRow
A [class@Gtk.ListBoxRow] used to reveal widgets.

<picture>
<source srcset="expander-row-dark.png" media="(prefers-color-scheme: dark)">
<img src="expander-row.png" alt="expander-row">
</picture>

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 [iface@Gtk.Buildable] interface
supports adding a child as an suffix widget by specifying “suffix” as the
“type” attribute of a <child> element.

It also supports adding it as a prefix widget by specifying “prefix” as the
“type” attribute of a <child> 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-classes.html#property-rows)
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.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ExpanderRow.html

  • Konstruktordetails

    • ExpanderRow

      public ExpanderRow(PointerContainer pointer)
    • ExpanderRow

      public ExpanderRow()
      Creates a new `AdwExpanderRow`.
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • addAction

      @Deprecated public void addAction(@Nonnull Widget widget)
      Veraltet.
      Adds an action widget to @self.
      Parameter:
      widget - a widget
    • addPrefix

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

      public void addRow(@Nonnull Widget child)
      Adds a widget to @self.

      The widget will appear in the expanding list below @self.
      Parameter:
      child - a widget
    • addSuffix

      public void addSuffix(@Nonnull Widget widget)
      Adds an suffix widget to @self.
      Parameter:
      widget - a widget
    • getEnableExpansion

      public boolean getEnableExpansion()
      Gets whether the expansion of @self is enabled.
      Gibt zurück:
      whether the expansion of @self is enabled.
    • getExpanded

      public boolean getExpanded()
      Gets whether @self is expanded.
      Gibt zurück:
      whether @self is expanded
    • getIconName

      @Deprecated public Str getIconName()
      Veraltet.
      Gets the icon name for @self.
      Gibt zurück:
      the icon name for @self
    • getShowEnableSwitch

      public boolean getShowEnableSwitch()
      Gets whether the switch enabling the expansion of @self is visible.
      Gibt zurück:
      whether the switch enabling the expansion is visible
    • getSubtitle

      public Str getSubtitle()
      Gets the subtitle for @self.
      Gibt zurück:
      the subtitle for @self
    • getSubtitleLines

      public int getSubtitleLines()
      Gets the number of lines at the end of which the subtitle label will be
      ellipsized.
      Gibt zurück:
      the number of lines at the end of which the subtitle label will be ellipsized
    • getTitleLines

      public int getTitleLines()
      Gets the number of lines at the end of which the title label will be
      ellipsized.
      Gibt zurück:
      the number of lines at the end of which the title label will be ellipsized
    • remove

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

      public void setEnableExpansion(boolean enable_expansion)
      Sets whether the expansion of @self is enabled.
      Parameter:
      enable_expansion - whether to enable the expansion
    • setExpanded

      public void setExpanded(boolean expanded)
      Sets whether @self is expanded.
      Parameter:
      expanded - whether to expand the row
    • setIconName

      @Deprecated public void setIconName(@Nullable Str icon_name)
      Veraltet.
      Sets the icon name for @self.
      Parameter:
      icon_name - the icon name
    • setIconName

      @Deprecated public void setIconName(String icon_name)
      Veraltet.
      Sets the icon name for @self.
      Parameter:
      icon_name - the icon name
    • setShowEnableSwitch

      public void setShowEnableSwitch(boolean show_enable_switch)
      Sets whether the switch enabling the expansion of @self is visible.
      Parameter:
      show_enable_switch - whether to show the switch enabling the expansion
    • setSubtitle

      public void setSubtitle(@Nonnull Str subtitle)
      Sets the subtitle for @self.

      The subtitle is interpreted as Pango markup unless
      [property@PreferencesRow:use-markup] is set to `FALSE`.
      Parameter:
      subtitle - the subtitle
    • setSubtitle

      public void setSubtitle(String subtitle)
      Sets the subtitle for @self.

      The subtitle is interpreted as Pango markup unless
      [property@PreferencesRow:use-markup] is set to `FALSE`.
      Parameter:
      subtitle - the subtitle
    • setSubtitleLines

      public void setSubtitleLines(int subtitle_lines)
      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.
      Parameter:
      subtitle_lines - the number of lines at the end of which the subtitle label will be ellipsized
    • setTitleLines

      public void setTitleLines(int title_lines)
      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.
      Parameter:
      title_lines - the number of lines at the end of which the title label will be ellipsized
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Setzt außer Kraft:
      asAccessible in Klasse PreferencesRow
      Gibt zurück:
      Accessible
    • asActionable

      public Actionable asActionable()
      Implements interface Actionable. Call this to get access to interface functions.
      Setzt außer Kraft:
      asActionable in Klasse PreferencesRow
      Gibt zurück:
      Actionable
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Setzt außer Kraft:
      asBuildable in Klasse PreferencesRow
      Gibt zurück:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Setzt außer Kraft:
      asConstraintTarget in Klasse PreferencesRow
      Gibt zurück:
      ConstraintTarget
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()