Class GridCell

java.lang.Object
com.codename1.ui.table.GridCell

public final class GridCell extends Object

One cell of a DataGrid as a renderer or an editor sees it.

The grid hands the same object out for every cell it paints, so a cell is read where it is given and never kept.

  • Method Details

    • getGrid

      public DataGrid getGrid()
      The grid the cell is in.
    • getRow

      public int getRow()
      The view row: an index into what the grid shows, not into the model.
    • getColumn

      public GridColumn getColumn()
      The column the cell is in.
    • getValue

      public Object getValue()
      The value the cell shows; for a group row, the group's key in the grouped column, an aggregate in a column with one, and null elsewhere.
    • isRowSelected

      public boolean isRowSelected()
      Whether the cell's row is selected.
    • isLead

      public boolean isLead()
      Whether this is the cell the keyboard is on.
    • isGroupRow

      public boolean isGroupRow()
      Whether the cell is on a group row.
    • isEditable

      public boolean isEditable()
      Whether the cell may be edited.
    • getDepth

      public int getDepth()
      How deep the row is in a tree, or 1 for a row under a group.
    • getStyle

      public Style getStyle()
      The style the row is painted with: its colours, font and padding.