public class TreeGridRenderer extends DefaultGridRenderer
TreeGrid
uses this implementation by default.Modifier and Type | Class and Description |
---|---|
protected class |
TreeGridRenderer.DrawTreeRowCommand
This is a draw command that is used to draw one or more tree rows.
|
DefaultGridRenderer.DrawRowCommand
Constructor and Description |
---|
TreeGridRenderer(EditableGrid grid)
Creates an instance of this class and initializes the grid cell factory.
|
Modifier and Type | Method and Description |
---|---|
void |
drawCell(Object data,
int row,
int column,
boolean active)
This method draws a particular cell.
|
void |
drawContent(GridDataModel gridModel)
This method renders grid content.
|
protected boolean |
drawPager(TreeCell cell)
This method renders a pager associated with the parent row.
|
protected int |
drawRow(TreeGridRow row,
int rowNumber)
This method draws tree grid rows recusrsively.
|
protected void |
drawSubtree(TreeCell parent)
Draws a subtree that belongs to the specified parent.
|
protected Stack<TreeGridRow> |
getCurrentRows()
Getter for property 'currentRows'.
|
int |
getModelRow(int row)
This method converts grid row number to model row number.
|
int |
getRowByModelRow(int modelRow)
Gets a grid row number on the displayed page by a model row number.
|
int |
getRowByModelRow(TreeGridRow parent,
int modelRow)
This method gets a row number in the grid for the specified model row number.
|
protected Map<Integer,TreeGridRow> |
getRowMapping()
Getter for property 'rowMapping'.
|
protected void |
remapIndexes(int startRow,
int step)
This method remaps indexes in the rows mapping.
|
protected int |
removeSubtree(TreeCell parent)
Removes a subtree that belongs to the specified parent.
|
decorateCell, drawColumn, drawHeaders, drawRow, formatDate, formatString, getCellFactory, getGrid, getListBoxText, getTBodyElement, getTHeadElement, setCellText, setCellWidget
public TreeGridRenderer(EditableGrid grid)
grid
- is a target grid.public void drawContent(GridDataModel gridModel)
drawContent
in interface GridRenderer
drawContent
in class DefaultGridRenderer
gridModel
- is a model to be applied.public void drawCell(Object data, int row, int column, boolean active)
drawCell
in interface GridRenderer
drawCell
in class DefaultGridRenderer
data
- is a cell data.row
- is a row number.column
- is a column number.active
- is a falg that indicates that the cell must be active.public int getModelRow(int row)
getModelRow
in interface GridRenderer
getModelRow
in class DefaultGridRenderer
row
- is a row number.public int getRowByModelRow(int modelRow)
getRowByModelRow
in interface GridRenderer
getRowByModelRow
in class DefaultGridRenderer
modelRow
- is a model row number.public int getRowByModelRow(TreeGridRow parent, int modelRow)
parent
- is a parent row.modelRow
- is a model row number (in the subtree).protected int drawRow(TreeGridRow row, int rowNumber)
row
- is a row to be rendered.rowNumber
- is a row number (index) in the grid.protected boolean drawPager(TreeCell cell)
cell
- is a parent expandable cell.true
if the pager has been displayed.protected void drawSubtree(TreeCell parent)
parent
- is a parent cell.protected void remapIndexes(int startRow, int step)
startRow
- is a grid row number to start remaping from.step
- is a row number increasing / decreasing step.protected int removeSubtree(TreeCell parent)
parent
- is a parent cell.protected Stack<TreeGridRow> getCurrentRows()
protected Map<Integer,TreeGridRow> getRowMapping()
Copyright © 2008–2013. All rights reserved.