Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class GridCell
- Object
- GridCell
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.
Methods
public DataGrid getGrid() | The grid the cell is in. |
public int getRow() | The view row: an index into what the grid shows, not into the model. |
public GridColumn getColumn() | The column the cell is in. |
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. |
public boolean isRowSelected() | Whether the cell’s row is selected. |
public boolean isLead() | Whether this is the cell the keyboard is on. |
public boolean isGroupRow() | Whether the cell is on a group row. |
public boolean isEditable() | Whether the cell may be edited. |
public int getDepth() | How deep the row is in a tree, or 1 for a row under a group. |
public Style getStyle() | The style the row is painted with: its colours, font and padding. |
Inherited methods
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.