Package com.inmethod.grid.column.tree
Class PropertyTreeColumn<T extends TreeModel & Serializable,I extends TreeNode & Serializable,P,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>
-
- com.inmethod.grid.column.tree.PropertyTreeColumn<T,I,P,S>
-
- Type Parameters:
T
- tree model object typeI
- node model object typeP
- type of the property
- All Implemented Interfaces:
IGridColumn<T,I,S>
,Serializable
,IDetachable
,IClusterable
- Direct Known Subclasses:
EditablePropertyTreeColumn
public class PropertyTreeColumn<T extends TreeModel & Serializable,I extends TreeNode & Serializable,P,S> extends AbstractTreeColumn<T,I,S>
Simple tree column that displays a property ofTreeNode
instance specified by the property expression.- Author:
- Matej Knopp
- See Also:
AbstractTreeColumn
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PropertyTreeColumn(String columnId, IModel<String> headerModel, String propertyExpression)
Constructor.PropertyTreeColumn(String columnId, IModel<String> headerModel, String propertyExpression, S sortProperty)
Constructor.PropertyTreeColumn(IModel<String> headerModel, String propertyExpression)
Constructor.PropertyTreeColumn(IModel<String> headerModel, String propertyExpression, S sortProperty)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getPropertyExpression()
Returns the property expression.protected Component
newNodeComponent(String id, IModel<I> model)
Creates the node component.-
Methods inherited from class com.inmethod.grid.column.tree.AbstractTreeColumn
getIcon, newCell, newCell
-
Methods inherited from class com.inmethod.grid.treegrid.BaseTreeColumn
getTreeGrid, setGrid
-
Methods 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 Detail
-
PropertyTreeColumn
public PropertyTreeColumn(String columnId, IModel<String> headerModel, String propertyExpression, S sortProperty)
Constructor.- Parameters:
columnId
- column identified (must be unique within the grid)headerModel
- model for column headerpropertyExpression
- property expression used to get the displayed value for row objectsortProperty
- optional string that will be returned byISortState
to indicate that the column is being sorted
-
PropertyTreeColumn
public PropertyTreeColumn(String columnId, IModel<String> headerModel, String propertyExpression)
Constructor.- Parameters:
columnId
- column identified (must be unique within the grid)headerModel
- model for column headerpropertyExpression
- property expression used to get the displayed value for row object
-
PropertyTreeColumn
public PropertyTreeColumn(IModel<String> headerModel, String propertyExpression, S sortProperty)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.- Parameters:
headerModel
- model for column headerpropertyExpression
- property expression used to get the displayed value for row objectsortProperty
- optional string that will be returned byISortState
to indicate that the column is being sorted
-
PropertyTreeColumn
public PropertyTreeColumn(IModel<String> headerModel, String propertyExpression)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.- Parameters:
headerModel
- model for column headerpropertyExpression
- property expression used to get the displayed value for row object
-
-
Method Detail
-
newNodeComponent
protected Component newNodeComponent(String id, IModel<I> model)
Creates the node component.- Specified by:
newNodeComponent
in classAbstractTreeColumn<T extends TreeModel & Serializable,I extends TreeNode & Serializable,S>
- Parameters:
id
- component idmodel
- model used to access theTreeNode
- Returns:
- newly created component instance
-
getPropertyExpression
protected String getPropertyExpression()
Returns the property expression.- Returns:
- property expression.
-
-