Package com.inmethod.grid.column.tree
Class AbstractTreeColumn<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>
java.lang.Object
com.inmethod.grid.column.AbstractColumn<T,I,S>
com.inmethod.grid.treegrid.BaseTreeColumn<T,I,S>
com.inmethod.grid.column.tree.AbstractTreeColumn<T,I,S>
- Type Parameters:
T- tree model object typeI- node model object type
- All Implemented Interfaces:
IGridColumn<T,,I, S> Serializable,IDetachable,IClusterable
- Direct Known Subclasses:
PropertyTreeColumn
public abstract class AbstractTreeColumn<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>
extends BaseTreeColumn<T,I,S>
Base class for
TreeGrid column that contains the actual tree.- Author:
- Matej Knopp
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractTreeColumn(String columnId, IModel<String> headerModel) Creates instance with specified column id and header modelAbstractTreeColumn(String columnId, IModel<String> headerModel, S sortProperty) Creates instance with specified column id, header model and sort property. -
Method Summary
Modifier and TypeMethodDescriptionprotected IconReturns the icon for givenTreeNode.final ComponentnewCell(WebMarkupContainer parent, String componentId, IModel<I> rowModel) Creates a new cell component.final IRenderable<I>Creates a newIRenderableinstance that is used to render to render the output of cell for given row.protected abstract ComponentnewNodeComponent(String id, IModel<I> model) Creates the node component.Methods inherited from class com.inmethod.grid.treegrid.BaseTreeColumn
getTreeGrid, setGridMethods inherited from class com.inmethod.grid.column.AbstractColumn
cellClicked, detach, getCellCssClass, getColSpan, getGrid, getHeaderCssClass, getHeaderModel, getHeaderTooltipModel, getId, getInitialSize, getMaxSize, getMinSize, getSizeUnit, getSortProperty, getWrapText, isLightWeight, isReorderable, isResizable, newHeader, setHeaderTooltipModel, setInitialSize, setMaxSize, setMinSize, setReorderable, setResizable, setSizeUnit, setWrapText
-
Constructor Details
-
AbstractTreeColumn
Creates instance with specified column id, header model and sort property.- Parameters:
columnId- column identifier - must be unique within the gridheaderModel- model for column titlesortProperty- optional string that will be returned byISortStateto indicate that the column is being sorted
-
AbstractTreeColumn
Creates instance with specified column id and header model- Parameters:
columnId- column identifier - must be unique within the gridheaderModel- model for column title
-
-
Method Details
-
getIcon
Returns the icon for givenTreeNode.- Specified by:
getIconin classBaseTreeColumn<T extends TreeModel & Serializable,I extends TreeNode & Serializable, S> - Parameters:
model- model used to access theTreeNode- Returns:
- icon instance or
nullif no icon should be displayed
-
newNodeComponent
Creates the node component.- Specified by:
newNodeComponentin classBaseTreeColumn<T extends TreeModel & Serializable,I extends TreeNode & Serializable, S> - Parameters:
id- component idmodel- model used to access theTreeNode- Returns:
- newly created component instance
-
newCell
Creates a new cell component. This method is called for rows that are not lightweight (IGridColumn.isLightWeight(IModel)returns false ).- Specified by:
newCellin interfaceIGridColumn<T extends TreeModel & Serializable,I extends TreeNode & Serializable, S> - Overrides:
newCellin classBaseTreeColumn<T extends TreeModel & Serializable,I extends TreeNode & Serializable, S> - Parameters:
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- Returns:
- new cell component
-
newCell
Creates a newIRenderableinstance 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)returnstrue).- Specified by:
newCellin interfaceIGridColumn<T extends TreeModel & Serializable,I extends TreeNode & Serializable, S> - Overrides:
newCellin classAbstractColumn<T extends TreeModel & Serializable,I extends TreeNode & Serializable, S> - Parameters:
rowModel- model for given row- Returns:
IRenderableinstance
-