|
||||||||||
| 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.WicketColumnAdapter<M,I,S>
M - grid model object typeI - row/item model object typepublic class WicketColumnAdapter<M,I,S>
Adapter that allows using DataTable columns from wicket extensions in an
AbstractGrid.
Note that due to different internal structure of AbstractGrid and DataTable this
adapter might not work for every IColumn implementation. Basically if the implementation
relies on the parent instance given in ICellPopulator.populateItem(Item, String, IModel)
it will probably not work properly with this adapter, as the parent instance this adapter uses is
only temporary.
| Constructor Summary | |
|---|---|
WicketColumnAdapter(String columnId,
IColumn<I,S> column)
Constructor |
|
| Method Summary | ||
|---|---|---|
String |
getCellCssClass(IModel<I> rowModel,
int rowNum)
Returns the cell specified by rowModel. |
|
S |
getSortProperty()
Result of this method determines whether the column is sortable and in case it is, also determines the sort property. |
|
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. |
|
static
|
wrapColumns(IColumn<I,S>[] columns)
Returns the specified IColumn array as list of WicketColumnAdapters that can
be given to an AbstractGrid. |
|
static
|
wrapColumns(List<IColumn<I,S>> columns)
Returns the specified IColumn list as list of WicketColumnAdapters that can
be given to an AbstractGrid. |
|
| Methods inherited from class com.inmethod.grid.column.AbstractColumn |
|---|
cellClicked, detach, getColSpan, getGrid, getHeaderCssClass, getHeaderModel, getHeaderTooltipModel, getId, getInitialSize, getMaxSize, getMinSize, getSizeUnit, 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 WicketColumnAdapter(String columnId,
IColumn<I,S> column)
columnId - column identifier (must be unique within the grid)column - IColumn implementation| 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
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 S getSortProperty()
IGridSortState.
getSortProperty in interface IGridColumn<M,I,S>getSortProperty in class AbstractColumn<M,I,S>null if the column is not sortableIGridSortState.ISortStateColumn.getPropertyName()public static <T,M,I,S> List<IGridColumn<M,I,S>> wrapColumns(IColumn<I,S>[] columns)
IColumn array as list of WicketColumnAdapters that can
be given to an AbstractGrid. The column identifiers are generated.
columns - array of IColumns
IGridColumnspublic static <M,I,S> List<IGridColumn<M,I,S>> wrapColumns(List<IColumn<I,S>> columns)
IColumn list as list of WicketColumnAdapters that can
be given to an AbstractGrid. The column identifiers are generated.
columns - list of IColumns
IGridColumns
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||