Class ButtonRow

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

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

A ListBoxRow that looks like a button.

button-rows

The AdwButtonRow widget has a title and two icons: before and after the title.

It is convenient for presenting actions like "Delete" at the end of a boxed list.

AdwButtonRow is always activatable.

CSS nodes

AdwButtonRow has a main CSS node with name row and the style class .button.

It contains the subnode box for its main horizontal box, which contains the nodes: image.icon.start for the start icon, label.title for the title, and image.icon.end for the end icon.

Style classes

The .suggested-action style class makes AdwButtonRow use accent color for its background. It should be used very sparingly to denote important buttons.

button-row-suggested-action

The .destructive-action style makes the row use destructive colors. It can be used to draw attention to the potentially damaging consequences of using it. This style acts as a warning to the user.

button-row-destructive-action
Since:
1.6
  • Constructor Details

    • ButtonRow

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

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

    • getType

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

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

      protected ButtonRow 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
    • getEndIconName

      public @Nullable String getEndIconName()
      Gets the end icon name for self.
      Returns:
      the end icon name for this ButtonRow
      Since:
      1.6
    • getStartIconName

      public @Nullable String getStartIconName()
      Gets the start icon name for self.
      Returns:
      the start icon name for this ButtonRow
      Since:
      1.6
    • setEndIconName

      public void setEndIconName(@Nullable String iconName)
      Sets the end icon name for self.
      Parameters:
      iconName - the end icon name
      Since:
      1.6
    • setStartIconName

      public void setStartIconName(@Nullable String iconName)
      Sets the start icon name for self.
      Parameters:
      iconName - the start icon name
      Since:
      1.6
    • onActivated

      This signal is emitted after the row has been activated.
      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      Since:
      1.6
      See Also:
    • emitActivated

      public void emitActivated()
      Emits the "activated" signal. See onActivated(ButtonRow.ActivatedCallback).
    • builder

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