|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.inmethod.grid.column.AbstractColumn<M,I,S>
com.inmethod.grid.column.CheckBoxColumn<M,I,S>
M - grid model object typeI - row/item model object typepublic class CheckBoxColumn<M,I,S>
Column that allows a row in grid to be selected. The column cell contains a checkbox which selects and deselects the row. When row selection state is changed, the entire row is updated using Ajax.
If the grid is in single selection mode, the column header will remain empty. If the column is in
multi selection mode, the column header will contain a checkbox which selects all displayed rows
(i.e. the rows on current page for DataGrid and visible rows in TreeGrid). When
the header checkbox is deselected, it deselects all rows (on all pages). This is to ensure that
when user deselects one page, no invisible rows are left selected.
| Constructor Summary | |
|---|---|
CheckBoxColumn(String columnId)
Creates a new checkbox column. |
|
| Method Summary | |
|---|---|
String |
getCellCssClass(IModel<I> rowModel,
int rowNum)
Returns the cell specified by rowModel. |
String |
getHeaderCssClass()
Returns the CSS class for this column header. |
protected IModel<String> |
getRowTooltipModel(IModel<I> itemModel)
Overriding this method allows to specify a tooltip for checkbox in each row. |
protected boolean |
isCheckBoxEnabled(IModel<I> model)
|
protected boolean |
isCheckBoxVisible(IModel<I> model)
|
Component |
newCell(WebMarkupContainer parent,
String componentId,
IModel<I> rowModel)
Creates a new cell component. |
Component |
newHeader(String componentId)
Creates a new component for column header. |
| Methods inherited from class com.inmethod.grid.column.AbstractColumn |
|---|
cellClicked, detach, getColSpan, getGrid, getHeaderModel, getHeaderTooltipModel, getId, getInitialSize, getMaxSize, getMinSize, getSizeUnit, getSortProperty, getWrapText, isLightWeight, isReorderable, isResizable, newCell, setGrid, setHeaderTooltipModel, setInitialSize, setMaxSize, setMinSize, setReorderable, setResizable, setSizeUnit, setWrapText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CheckBoxColumn(String columnId)
columnId - column id (must be unique within the grid)| Method Detail |
|---|
public Component newCell(WebMarkupContainer parent,
String componentId,
IModel<I> rowModel)
IGridColumn.isLightWeight(IModel) returns false ).
newCell in interface IGridColumn<M,I,S>newCell in class AbstractColumn<M,I,S>parent - Parent component. This is passed in only for convenience, the method
implementation is not supposed to add the newly created component to the
parent.componentId - required id of newly created componentsrowModel - model for given row
public Component newHeader(String componentId)
newHeader in interface IGridColumn<M,I,S>newHeader in class AbstractColumn<M,I,S>componentId - required id that the component must have
protected boolean isCheckBoxEnabled(IModel<I> model)
protected boolean isCheckBoxVisible(IModel<I> model)
public String getCellCssClass(IModel<I> rowModel,
int rowNum)
getCellCssClass in interface IGridColumn<M,I,S>getCellCssClass in class AbstractColumn<M,I,S>rowModel - model for given rowrowNum - index of row for DataGrid, -1 for TreeGrid
nullpublic String getHeaderCssClass()
AbstractColumn
getHeaderCssClass in interface IGridColumn<M,I,S>getHeaderCssClass in class AbstractColumn<M,I,S>nullprotected IModel<String> getRowTooltipModel(IModel<I> itemModel)
itemModel - model for item in given row
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||