Package org.apache.pivot.wtk
Interface TableView.CellRenderer
-
- All Superinterfaces:
ConstrainedVisual
,Renderer
,Visual
- All Known Implementing Classes:
TableViewBooleanCellRenderer
,TableViewCellRenderer
,TableViewCheckboxCellRenderer
,TableViewDateCellRenderer
,TableViewFileSizeCellRenderer
,TableViewImageCellRenderer
,TableViewMultiCellRenderer
,TableViewNumberCellRenderer
,TableViewTextAreaCellRenderer
,TableViewTriStateCellRenderer
,TerraFileBrowserSkin.TableViewFileRenderer
,TerraVFSBrowserSkin.TableViewFileRenderer
- Enclosing class:
- TableView
public static interface TableView.CellRenderer extends Renderer
Renderer
interface to customize the appearance of a cell in a TableView.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
render(java.lang.Object row, int rowIndex, int columnIndex, TableView tableView, java.lang.String columnName, boolean selected, boolean highlighted, boolean disabled)
Prepares the renderer for layout or paint.java.lang.String
toString(java.lang.Object row, java.lang.String columnName)
Converts table view cell data to a string representation.-
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getBaseline, getPreferredHeight, getPreferredSize, getPreferredWidth, setSize, setSize
-
-
-
-
Method Detail
-
render
void render(java.lang.Object row, int rowIndex, int columnIndex, TableView tableView, java.lang.String columnName, boolean selected, boolean highlighted, boolean disabled)
Prepares the renderer for layout or paint.- Parameters:
row
- The row to render, ornull
if called to calculate preferred height for skins that assume a fixed renderer height.rowIndex
- The index of the row being rendered, or-1
ifvalue
isnull
.columnIndex
- The index of the column being rendered.tableView
- The host component.columnName
- The name of the column being rendered.selected
- Iftrue
, the row is selected.highlighted
- Iftrue
, the row is highlighted.disabled
- Iftrue
, the row is disabled.
-
toString
java.lang.String toString(java.lang.Object row, java.lang.String columnName)
Converts table view cell data to a string representation.- Parameters:
row
- The row object.columnName
- The name of the column.- Returns:
- The cell data's string representation, or
null
if the data does not have a string representation.Note that this method may be called often during keyboard navigation, so implementations should avoid unnecessary string allocations.
-
-