M - grid model object typeI - row/item model object typepublic class CheckBoxColumn<M,I,S> extends AbstractColumn<M,I,S>
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 and Description |
|---|
CheckBoxColumn(String columnId)
Creates a new checkbox column.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCellCssClass(org.apache.wicket.model.IModel<I> rowModel,
int rowNum)
Returns the cell specified by rowModel.
|
String |
getHeaderCssClass()
Returns the CSS class for this column header.
|
protected org.apache.wicket.model.IModel<String> |
getRowTooltipModel(org.apache.wicket.model.IModel<I> itemModel)
Overriding this method allows to specify a tooltip for checkbox in each row.
|
protected boolean |
isCheckBoxEnabled(org.apache.wicket.model.IModel<I> model) |
protected boolean |
isCheckBoxVisible(org.apache.wicket.model.IModel<I> model) |
org.apache.wicket.Component |
newCell(org.apache.wicket.markup.html.WebMarkupContainer parent,
String componentId,
org.apache.wicket.model.IModel<I> rowModel)
Creates a new cell component.
|
org.apache.wicket.Component |
newHeader(String componentId)
Creates a new component for column header.
|
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, setWrapTextpublic CheckBoxColumn(String columnId)
columnId - column id (must be unique within the grid)public org.apache.wicket.Component newCell(org.apache.wicket.markup.html.WebMarkupContainer parent,
String componentId,
org.apache.wicket.model.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 rowpublic org.apache.wicket.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 haveprotected boolean isCheckBoxEnabled(org.apache.wicket.model.IModel<I> model)
protected boolean isCheckBoxVisible(org.apache.wicket.model.IModel<I> model)
public String getCellCssClass(org.apache.wicket.model.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 TreeGridnullpublic String getHeaderCssClass()
AbstractColumngetHeaderCssClass in interface IGridColumn<M,I,S>getHeaderCssClass in class AbstractColumn<M,I,S>nullCopyright © 2015. All rights reserved.