Class CellView.Builder<B extends CellView.Builder<B>>

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

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

      public B setCellArea(CellArea cellArea)

      The GtkCellArea rendering cells

      If no area is specified when creating the cell view with gtk_cell_view_new_with_context() a horizontally oriented GtkCellAreaBox will be used.

      since 3.0

      Parameters:
      cellArea - the value for the cell-area property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setCellAreaContext

      public B setCellAreaContext(CellAreaContext cellAreaContext)

      The GtkCellAreaContext used to compute the geometry of the cell view.

      A group of cell views can be assigned the same context in order to ensure the sizes and cell alignments match across all the views with the same context.

      GtkComboBox menus uses this to assign the same context to all cell views in the menu items for a single menu (each submenu creates its own context since the size of each submenu does not depend on parent or sibling menus).

      since 3.0

      Parameters:
      cellAreaContext - the value for the cell-area-context property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setDrawSensitive

      public B setDrawSensitive(boolean drawSensitive)

      Whether all cells should be draw as sensitive for this view regardless of the actual cell properties (used to make menus with submenus appear sensitive when the items in submenus might be insensitive).

      since 3.0

      Parameters:
      drawSensitive - the value for the draw-sensitive property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setFitModel

      public B setFitModel(boolean fitModel)

      Whether the view should request enough space to always fit the size of every row in the model (used by the combo box to ensure the combo box size doesn't change when different items are selected).

      since 3.0

      Parameters:
      fitModel - the value for the fit-model property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setModel

      public B setModel(TreeModel model)

      The model for cell view

      since 2.10

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