Class Sorter.Builder<B extends Sorter.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Direct Known Subclasses:
ColumnViewSorter.Builder, CustomSorter.Builder, MultiSorter.Builder, NumericSorter.Builder, StringSorter.Builder, TreeListRowSorter.Builder
Enclosing class:
Sorter

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

      public B onChanged(Sorter.ChangedCallback handler)

      Emitted whenever the sorter changed.

      Users of the sorter should then update the sort order again via gtk_sorter_compare().

      SortListModel handles this signal automatically.

      Depending on the change parameter, it may be possible to update the sort order without a full resorting. Refer to the Gtk.SorterChange documentation for details.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: