Class ExpanderRow.Builder<B extends ExpanderRow.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, Actionable.Builder<B>, BuilderInterface
Enclosing class:
ExpanderRow

public static class ExpanderRow.Builder<B extends ExpanderRow.Builder<B>> extends PreferencesRow.Builder<B> implements Accessible.Builder<B>, Actionable.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public ExpanderRow build()
      Finish building the ExpanderRow object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to ExpanderRow.
      Overrides:
      build in class PreferencesRow.Builder<B extends ExpanderRow.Builder<B>>
      Returns:
      a new instance of ExpanderRow with the properties that were set in the Builder object.
    • setEnableExpansion

      public B setEnableExpansion(boolean enableExpansion)
      Whether expansion is enabled.
      Parameters:
      enableExpansion - the value for the enable-expansion property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setExpanded

      public B setExpanded(boolean expanded)
      Whether the row is expanded.
      Parameters:
      expanded - the value for the expanded property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setIconName

      @Deprecated public B setIconName(String iconName)
      Deprecated.
      Use ExpanderRow.addPrefix(Widget) to add an icon.
      The icon name for this row.
      Parameters:
      iconName - the value for the icon-name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setShowEnableSwitch

      public B setShowEnableSwitch(boolean showEnableSwitch)
      Whether the switch enabling the expansion is visible.
      Parameters:
      showEnableSwitch - the value for the show-enable-switch property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSubtitle

      public B setSubtitle(String subtitle)

      The subtitle for this row.

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

      Parameters:
      subtitle - the value for the subtitle property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSubtitleLines

      public B setSubtitleLines(int subtitleLines)

      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 value for the subtitle-lines property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setTitleLines

      public B setTitleLines(int titleLines)

      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 value for the title-lines property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3