Class SortListModel.Builder<B extends SortListModel.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
SortListModel<T extends GObject>

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

      public B setIncremental(boolean incremental)
      If the model should sort items incrementally.
      Parameters:
      incremental - the value for the incremental property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setModel

      public B setModel(ListModel model)
      The model being sorted.
      Parameters:
      model - the value for the model property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSectionSorter

      public B setSectionSorter(Sorter sectionSorter)
      The section sorter for this model, if one is set.
      Parameters:
      sectionSorter - the value for the section-sorter property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.12
    • setSorter

      public B setSorter(Sorter sorter)
      The sorter for this model.
      Parameters:
      sorter - the value for the sorter property
      Returns:
      the Builder instance is returned, to allow method chaining