public class DefaultGridRenderer extends Object implements GridRenderer
| Modifier and Type | Class and Description |
|---|---|
protected class |
DefaultGridRenderer.DrawRowCommand
This command displays one row.
|
| Constructor and Description |
|---|
DefaultGridRenderer(EditableGrid grid)
Creates an instance of this class and initializes the grid cell factory.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
decorateCell(int row,
int column,
String style)
This method decorates the cell with styles.
|
void |
drawCell(Object data,
int row,
int column,
boolean active)
This method draws a particular cell.
|
void |
drawColumn(Object[] data,
int column,
boolean overwrite)
This method draws a column.
|
void |
drawContent(GridDataModel model)
This method renders grid content.
|
void |
drawHeaders(Object[] headers)
This method renders column headers.
|
void |
drawRow(Object[] data,
int row)
This method renders a particular row.
|
protected String |
formatDate(Date date)
This method formates the specified date.
|
protected String |
formatString(Object data)
This method formats the object and returns its textual representation
If the object is null the method gets an empty string.
|
protected GridCellFactory |
getCellFactory()
Getter for property 'cellFactory'.
|
EditableGrid |
getGrid()
Getter for property 'grid'.
|
protected String |
getListBoxText(com.google.gwt.user.client.ui.ListBox listBox)
This method returns a text for the inactive label.
|
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.
|
protected com.google.gwt.user.client.Element |
getTBodyElement()
This method returns a tbody element of the grid.
|
protected com.google.gwt.user.client.Element |
getTHeadElement()
This method retuns the thead element of the grid.
|
protected void |
setCellText(String text,
int row,
int column,
String style)
This method sets the cell value in textual format.
|
protected void |
setCellWidget(com.google.gwt.user.client.ui.Widget widget,
int row,
int column,
String style)
Sets the widget into the specified cell and decorates this cell with the specified style.
|
public DefaultGridRenderer(EditableGrid grid)
grid - is a target grid.public void drawHeaders(Object[] headers)
drawHeaders in interface GridRendererheaders - is a list of header values to be rendered.public void drawContent(GridDataModel model)
drawContent in interface GridRenderermodel - is a model to be applied.public void drawRow(Object[] data, int row)
drawRow in interface GridRendererdata - is a row data array.row - is a row number.public void drawCell(Object data, int row, int column, boolean active)
drawCell in interface GridRendererdata - 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 GridRendererrow - is a row number.public int getRowByModelRow(int modelRow)
getRowByModelRow in interface GridRenderermodelRow - is a model row number.public void drawColumn(Object[] data, int column, boolean overwrite)
drawColumn in interface GridRendererdata - is a column data to draw.column - is a column numberoverwrite - is a flag that means whether it's required to overwrite the column cells.public EditableGrid getGrid()
protected void setCellText(String text, int row, int column, String style)
text - is a text of the cell value.row - is a row number.column - is a column number.style - is a style name.protected void setCellWidget(com.google.gwt.user.client.ui.Widget widget,
int row,
int column,
String style)
widget - is a widget to set.row - is a row number.column - is a column number.style - is a cell style.protected void decorateCell(int row,
int column,
String style)
row - is a row number.column - is a column number.style - is a style name.protected String formatDate(Date date)
date - is a date to be formatted.protected String formatString(Object data)
data - is an object to be formatted.protected String getListBoxText(com.google.gwt.user.client.ui.ListBox listBox)
listBox - is a list box.protected GridCellFactory getCellFactory()
protected com.google.gwt.user.client.Element getTHeadElement()
protected com.google.gwt.user.client.Element getTBodyElement()
Copyright © 2008–2013. All rights reserved.