org.apache.wicket.extensions.markup.html.tree.table
Class PropertyTreeColumn<T>

java.lang.Object
  extended by org.apache.wicket.extensions.markup.html.tree.table.AbstractColumn
      extended by org.apache.wicket.extensions.markup.html.tree.table.AbstractPropertyColumn<T>
          extended by org.apache.wicket.extensions.markup.html.tree.table.PropertyTreeColumn<T>
Type Parameters:
T - the type of the property that is rendered in this column
All Implemented Interfaces:
java.io.Serializable, IColumn, IClusterable

public class PropertyTreeColumn<T>
extends AbstractPropertyColumn<T>

Convenience class for building tree columns, i.e. columns that contain the actual tree.

Author:
Matej Knopp
See Also:
Serialized Form

Constructor Summary
PropertyTreeColumn(ColumnLocation location, java.lang.String header, java.lang.String propertyExpression)
          Creates new column.
 
Method Summary
 Component newCell(MarkupContainer parent, java.lang.String id, javax.swing.tree.TreeNode node, int level)
          This method is used to populate the cell for given node in case when IColumn.newCell(TreeNode, int) returned null.
 IRenderable newCell(javax.swing.tree.TreeNode node, int level)
          Creates the IRenderable instance for given node.
 
Methods inherited from class org.apache.wicket.extensions.markup.html.tree.table.AbstractPropertyColumn
getConverter, getLocale, getNodeValue, getPropertyExpression, setConverter, setLocale
 
Methods inherited from class org.apache.wicket.extensions.markup.html.tree.table.AbstractColumn
getLocation, getSpan, getTreeTable, isVisible, newHeader, setTreeTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyTreeColumn

public PropertyTreeColumn(ColumnLocation location,
                          java.lang.String header,
                          java.lang.String propertyExpression)
Creates new column. Checks if the column is not aligned in middle. In case it is, throws an exception.

Parameters:
location - Specifies how the column should be aligned and what his size should be
header - Header caption
propertyExpression - Expression for property access
Method Detail

newCell

public Component newCell(MarkupContainer parent,
                         java.lang.String id,
                         javax.swing.tree.TreeNode node,
                         int level)
Description copied from interface: IColumn
This method is used to populate the cell for given node in case when IColumn.newCell(TreeNode, int) returned null.

Parameters:
parent - The parent to which the cell must be added. Can also be used to find the TreeTable instance (using parent.findParent(TreeTable.cass))
id - The component id
node - TreeNode for the cell
level - Convenience parameter that indicates how deep the node is in hierarchy
Returns:
The populated cell component
See Also:
IColumn.newCell(MarkupContainer, String, TreeNode, int)

newCell

public IRenderable newCell(javax.swing.tree.TreeNode node,
                           int level)
Description copied from interface: IColumn
Creates the IRenderable instance for given node. IRenderable can be used as lightweight alternative to regular Component for cells, that don't require user interaction (just display data).

If this method returns null, IColumn.newCell(MarkupContainer, String, TreeNode, int) is used to popuplate the cell.

Parameters:
node - TreeNode for the cell
level - Convenience parameter that indicates how deep the node is in hierarchy
Returns:
The cell renderer
See Also:
IColumn.newCell(TreeNode, int)


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.