Class CellView

All Implemented Interfaces:
Accessible, Buildable, CellLayout, ConstraintTarget, Orientable, Proxy

@Generated("org.javagi.JavaGI") @Deprecated public class CellView extends Widget implements Accessible, Buildable, CellLayout, ConstraintTarget, Orientable
Deprecated.
List views use widgets to display their contents. You can use Box instead

A widget displaying a single row of a GtkTreeModel

A GtkCellView displays a single row of a GtkTreeModel using a GtkCellArea and GtkCellAreaContext. A GtkCellAreaContext can be provided to the GtkCellView at construction time in order to keep the cellview in context of a group of cell views, this ensures that the renderers displayed will be properly aligned with each other (like the aligned cells in the menus of GtkComboBox).

GtkCellView is GtkOrientable in order to decide in which orientation the underlying GtkCellAreaContext should be allocated. Taking the GtkComboBox menu as an example, cellviews should be oriented horizontally if the menus are listed top-to-bottom and thus all share the same width but may have separate individual heights (left-to-right menus should be allocated vertically since they all share the same height but may have variable widths).

CSS nodes

GtkCellView has a single CSS node with name cellview.

  • Constructor Details

    • CellView

      public CellView(MemorySegment address)
      Deprecated.
      Create a CellView instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • CellView

      public CellView()
      Deprecated.
      Create a new CellView.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Deprecated.
      Get the GType of the CellView class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      Deprecated.
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected CellView asParent()
      Deprecated.
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Widget
      Returns:
      the instance as if it were its parent type
    • withContext

      @Deprecated public static CellView withContext(CellArea area, CellAreaContext context)
      Deprecated.

      Creates a new GtkCellView widget with a specific GtkCellArea to layout cells and a specific GtkCellAreaContext.

      Specifying the same context for a handful of cells lets the underlying area synchronize the geometry for those cells, in this way alignments with cellviews for other rows are possible.

      Parameters:
      area - the GtkCellArea to layout cells
      context - the GtkCellAreaContext in which to calculate cell geometry
      Returns:
      A newly created GtkCellView widget.
    • withMarkup

      @Deprecated public static CellView withMarkup(String markup)
      Deprecated.
      Creates a new GtkCellView widget, adds a GtkCellRendererText to it, and makes it show markup. The text can be marked up with the Pango text markup language.
      Parameters:
      markup - the text to display in the cell view
      Returns:
      A newly created GtkCellView widget.
    • withText

      @Deprecated public static CellView withText(String text)
      Deprecated.
      Creates a new GtkCellView widget, adds a GtkCellRendererText to it, and makes it show text.
      Parameters:
      text - the text to display in the cell view
      Returns:
      A newly created GtkCellView widget.
    • withTexture

      @Deprecated public static CellView withTexture(Texture texture)
      Deprecated.
      Creates a new GtkCellView widget, adds a GtkCellRendererPixbuf to it, and makes it show texture.
      Parameters:
      texture - the image to display in the cell view
      Returns:
      A newly created GtkCellView widget.
    • getDisplayedRow

      @Deprecated public @Nullable TreePath getDisplayedRow()
      Deprecated.
      Returns a GtkTreePath referring to the currently displayed row. If no row is currently displayed, null is returned.
      Returns:
      the currently displayed row
    • getDrawSensitive

      @Deprecated public boolean getDrawSensitive()
      Deprecated.
      Gets whether this CellView is configured to draw all of its cells in a sensitive state.
      Returns:
      whether this CellView draws all of its cells in a sensitive state
    • getFitModel

      @Deprecated public boolean getFitModel()
      Deprecated.
      Gets whether this CellView is configured to request space to fit the entire GtkTreeModel.
      Returns:
      whether this CellView requests space to fit the entire GtkTreeModel.
    • getModel

      @Deprecated public @Nullable TreeModel getModel()
      Deprecated.
      Returns the model for cellView. If no model is used null is returned.
      Returns:
      a GtkTreeModel used
    • setDisplayedRow

      @Deprecated public void setDisplayedRow(@Nullable TreePath path)
      Deprecated.
      Sets the row of the model that is currently displayed by the GtkCellView. If the path is unset, then the contents of the cellview “stick” at their last value; this is not normally a desired result, but may be a needed intermediate state if say, the model for the GtkCellView becomes temporarily empty.
      Parameters:
      path - a GtkTreePath or null to unset.
    • setDrawSensitive

      @Deprecated public void setDrawSensitive(boolean drawSensitive)
      Deprecated.
      Sets whether this CellView should draw all of its cells in a sensitive state, this is used by GtkComboBox menus to ensure that rows with insensitive cells that contain children appear sensitive in the parent menu item.
      Parameters:
      drawSensitive - whether to draw all cells in a sensitive state.
    • setFitModel

      @Deprecated public void setFitModel(boolean fitModel)
      Deprecated.

      Sets whether this CellView should request space to fit the entire GtkTreeModel.

      This is used by GtkComboBox to ensure that the cell view displayed on the combo box’s button always gets enough space and does not resize when selection changes.

      Parameters:
      fitModel - whether this CellView should request space for the whole model.
    • setModel

      @Deprecated public void setModel(@Nullable TreeModel model)
      Deprecated.
      Sets the model for cellView. If this CellView already has a model set, it will remove it before setting the new model. If model is null, then it will unset the old model.
      Parameters:
      model - a GtkTreeModel
    • builder

      public static CellView.Builder<? extends CellView.Builder> builder()
      Deprecated.
      A CellView.Builder object constructs a CellView with the specified properties. Use the various set...() methods to set properties, and finish construction with CellView.Builder.build().
      Returns:
      the builder object