Klasse ActionRow

Alle implementierten Schnittstellen:
PointerInterface
Bekannte direkte Unterklassen:
ComboRow, SpinRow, SwitchRow

public class ActionRow extends PreferencesRow
A [class@Gtk.ListBoxRow] used to present actions.

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

The `AdwActionRow` widget can have a title, a subtitle and an icon. The row
can receive additional widgets at its end, or prefix widgets at its start.

It is convenient to present a preference and its related actions.

`AdwActionRow` is unactivatable by default, giving it an activatable widget
will automatically make it activatable, but unsetting it won't change the
row's activatability.

## AdwActionRow as GtkBuildable

The `AdwActionRow` implementation of the [iface@Gtk.Buildable] interface
supports adding a child at its end by specifying “suffix” or omitting the
“type” attribute of a <child> element.

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

## CSS nodes

`AdwActionRow` has a main CSS node with name `row`.

It contains the subnode `box.header` for its main horizontal box, and
`box.title` for the vertical box containing the title and subtitle labels.

It contains subnodes `label.title` and `label.subtitle` representing
respectively the title label and subtitle label.

## Style classes

`AdwActionRow` can use the [`.property`](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.

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

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.ActionRow.html

  • Felddetails

  • Konstruktordetails

    • ActionRow

      public ActionRow(PointerContainer pointer)
    • ActionRow

      public ActionRow()
      Creates a new `AdwActionRow`.
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • addPrefix

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

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

      public Widget getActivatableWidget()
      Gets the widget activated when @self is activated.
      Gibt zurück:
      the activatable widget for @self
    • getIconName

      @Deprecated public Str getIconName()
      Veraltet.
      Gets the icon name for @self.
      Gibt zurück:
      the icon name for @self
    • 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
    • getSubtitleSelectable

      public boolean getSubtitleSelectable()
      Gets whether the user can copy the subtitle from the label
      Gibt zurück:
      whether the user can copy the subtitle from the label
    • 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 widget)
      Removes a child from @self.
      Parameter:
      widget - the child to be removed
    • setActivatableWidget

      public void setActivatableWidget(@Nullable Widget widget)
      Sets the widget to activate when @self is activated.

      The row can be activated either by clicking on it, calling
      [method@ActionRow.activate], or via mnemonics in the title.
      See the [property@PreferencesRow:use-underline] property to enable mnemonics.

      The target widget will be activated by emitting the
      [signal@Gtk.Widget::mnemonic-activate] signal on it.
      Parameter:
      widget - the target widget
    • 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
    • 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
    • setSubtitleSelectable

      public void setSubtitleSelectable(boolean subtitle_selectable)
      Sets whether the user can copy the subtitle from the label

      See also [property@Gtk.Label:selectable].
      Parameter:
      subtitle_selectable - `TRUE` if the user can copy the subtitle from the label
    • 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
    • onActivated

      public SignalHandler onActivated(ActionRow.OnActivated signal)
      Connect to signal "activated".
      See ActionRow.OnActivated.onActivated() for signal description.
      Field SIGNAL_ON_ACTIVATED contains original signal name and can be used as resource reference.
      Parameter:
      signal - callback function (lambda).
      Gibt zurück:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • 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()