Class GridCell
java.lang.Object
com.codename1.ui.table.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.
-
Method Summary
Modifier and TypeMethodDescriptionThe column the cell is in.intgetDepth()How deep the row is in a tree, or 1 for a row under a group.getGrid()The grid the cell is in.intgetRow()The view row: an index into what the grid shows, not into the model.getStyle()The style the row is painted with: its colours, font and padding.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.booleanWhether the cell may be edited.booleanWhether the cell is on a group row.booleanisLead()Whether this is the cell the keyboard is on.booleanWhether the cell's row is selected.
-
Method Details
-
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
The column the cell is in. -
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
The style the row is painted with: its colours, font and padding.
-