Class PreferencesGroup.Builder<B extends PreferencesGroup.Builder<B>>

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

public static class PreferencesGroup.Builder<B extends PreferencesGroup.Builder<B>> extends Widget.Builder<B> implements Accessible.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 PreferencesGroup build()
      Finish building the PreferencesGroup object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to PreferencesGroup.
      Overrides:
      build in class Widget.Builder<B extends PreferencesGroup.Builder<B>>
      Returns:
      a new instance of PreferencesGroup with the properties that were set in the Builder object.
    • setDescription

      public B setDescription(String description)
      The description for this group of preferences.
      Parameters:
      description - the value for the description property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setHeaderSuffix

      public B setHeaderSuffix(Widget headerSuffix)

      The header suffix widget.

      Displayed above the list, next to the title and description.

      Suffixes are commonly used to show a button or a spinner for the whole group.

      Parameters:
      headerSuffix - the value for the header-suffix property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.1
    • setSeparateRows

      public B setSeparateRows(boolean separateRows)

      Whether to separate rows.

      Equivalent to using the .boxed-list-separate style class on a ListBox instead of .boxed-list.

      Parameters:
      separateRows - the value for the separate-rows property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.6
    • setTitle

      public B setTitle(String title)
      The title for this group of preferences.
      Parameters:
      title - the value for the title property
      Returns:
      the Builder instance is returned, to allow method chaining