Class ColumnView.Builder<B extends ColumnView.Builder<B>>

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

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

      public B setEnableRubberband(boolean enableRubberband)
      Allow rubberband selection.
      Parameters:
      enableRubberband - the value for the enable-rubberband property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setHeaderFactory

      public B setHeaderFactory(ListItemFactory headerFactory)

      Factory for creating header widgets.

      The factory must be for configuring ListHeader objects.

      Parameters:
      headerFactory - the value for the header-factory property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.12
    • setModel

      public B setModel(SelectionModel model)
      Model for the items displayed.
      Parameters:
      model - the value for the model property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setReorderable

      public B setReorderable(boolean reorderable)
      Whether columns are reorderable.
      Parameters:
      reorderable - the value for the reorderable property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setRowFactory

      public B setRowFactory(ListItemFactory rowFactory)

      The factory used for configuring rows.

      The factory must be for configuring ColumnViewRow objects.

      Parameters:
      rowFactory - the value for the row-factory property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.12
    • setShowColumnSeparators

      public B setShowColumnSeparators(boolean showColumnSeparators)
      Show separators between columns.
      Parameters:
      showColumnSeparators - the value for the show-column-separators property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setShowRowSeparators

      public B setShowRowSeparators(boolean showRowSeparators)
      Show separators between rows.
      Parameters:
      showRowSeparators - the value for the show-row-separators property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSingleClickActivate

      public B setSingleClickActivate(boolean singleClickActivate)
      Activate rows on single click and select them on hover.
      Parameters:
      singleClickActivate - the value for the single-click-activate property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTabBehavior

      public B setTabBehavior(ListTabBehavior tabBehavior)
      Behavior of the Tab key
      Parameters:
      tabBehavior - the value for the tab-behavior property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.12
    • onActivate

      public B onActivate(ColumnView.ActivateCallback handler)

      Emitted when a row has been activated by the user, usually via activating the GtkListBase|list.activate-item action.

      This allows for a convenient way to handle activation in a columnview. See ListItem.setActivatable(boolean) for details on how to use this signal.

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