|
||||||||||
| 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.AbstractLightWeightColumn<M,I,S>
M - grid model object typeI - row/item model object typepublic abstract class AbstractLightWeightColumn<M,I,S>
Convenience implementation of IGridColumn. This class should be used as base for
lightweight columns.
Contains getters and setters for most properties and takes care of the header component. The only
method necessary to implement is newCell(IModel).
EditablePropertyColumn,
Serialized Form| Constructor Summary | |
|---|---|
AbstractLightWeightColumn(String columnId,
IModel<String> headerModel)
Creates instance with specified column id and header model |
|
AbstractLightWeightColumn(String columnId,
IModel<String> headerModel,
S sortProperty)
Creates instance with specified column id, header model and sort property. |
|
| Method Summary | |
|---|---|
boolean |
isLightWeight(IModel<I> rowModel)
Returns whether this column is uses a component for cell in given row (not lightweight) or an IRenderable implementation. |
abstract IRenderable<I> |
newCell(IModel<I> rowModel)
Creates a new IRenderable instance that is used to render to render the output of
cell for given row. |
Component |
newCell(WebMarkupContainer parent,
String componentId,
IModel<I> rowModel)
Creates a new cell component. |
| Methods inherited from class com.inmethod.grid.column.AbstractColumn |
|---|
cellClicked, detach, getCellCssClass, getColSpan, getGrid, getHeaderCssClass, getHeaderModel, getHeaderTooltipModel, getId, getInitialSize, getMaxSize, getMinSize, getSizeUnit, getSortProperty, getWrapText, isReorderable, isResizable, newHeader, 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 AbstractLightWeightColumn(String columnId,
IModel<String> headerModel,
S sortProperty)
columnId - column identifier - must be unique within the gridheaderModel - model for column titlesortProperty - optional string that will be returned by ISortState to indicate that the
column is being sorted
public AbstractLightWeightColumn(String columnId,
IModel<String> headerModel)
columnId - column identifier - must be unique within the gridheaderModel - model for column title| Method Detail |
|---|
public boolean isLightWeight(IModel<I> rowModel)
IRenderable implementation. Generally, if the cell is non-interactive (label only),
it's better to use an IRenderable implementation, as it has zero memory footprint
isLightWeight in interface IGridColumn<M,I,S>isLightWeight in class AbstractColumn<M,I,S>rowModel - model for given row
true if the cell is lightweight, false otherwisepublic abstract IRenderable<I> newCell(IModel<I> rowModel)
IRenderable instance that is used to render to render the output of
cell for given row. This method is called for rows that are lightweight (
IGridColumn.isLightWeight(IModel) returns true ).
newCell in interface IGridColumn<M,I,S>newCell in class AbstractColumn<M,I,S>rowModel - model for given row
IRenderable instance
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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||