org.apache.wicket.extensions.markup.html.tree.table
Class AbstractPropertyColumn<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>
Type Parameters:
T - the type of the property that is rendered in this column
All Implemented Interfaces:
java.io.Serializable, IColumn, IClusterable
Direct Known Subclasses:
PropertyRenderableColumn, PropertyTreeColumn

public abstract class AbstractPropertyColumn<T>
extends AbstractColumn

Convenience class for building tree columns.

Author:
Matej Knopp
See Also:
Serialized Form

Constructor Summary
AbstractPropertyColumn(ColumnLocation location, java.lang.String header, java.lang.String propertyExpression)
          Creates the tree column.
 
Method Summary
 IConverter<T> getConverter()
          Returns the converter or null if no converter is specified.
 java.util.Locale getLocale()
          Returns the locale or null if no locale is specified.
 java.lang.String getNodeValue(javax.swing.tree.TreeNode node)
          Returns the string representation of the node.
protected  java.lang.String getPropertyExpression()
          Returns the property expression.
 void setConverter(IConverter<T> converter)
          By default the property is converted to string using toString method.
 void setLocale(java.util.Locale locale)
          Sets the locale to be used as parameter for custom converter (if one is specified).
 
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
 
Methods inherited from interface org.apache.wicket.extensions.markup.html.tree.table.IColumn
newCell, newCell
 

Constructor Detail

AbstractPropertyColumn

public AbstractPropertyColumn(ColumnLocation location,
                              java.lang.String header,
                              java.lang.String propertyExpression)
Creates the tree column.

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

getConverter

public IConverter<T> getConverter()
Returns the converter or null if no converter is specified.

Returns:
The converter or null

getLocale

public java.util.Locale getLocale()
Returns the locale or null if no locale is specified.

Returns:
The locale or null

setConverter

public void setConverter(IConverter<T> converter)
By default the property is converted to string using toString method. If you want to alter this behavior, you can specify a custom converter.

Parameters:
converter - any converter

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale to be used as parameter for custom converter (if one is specified). If no locale is set, session locale is used.

Parameters:
locale - Any locale

getPropertyExpression

protected java.lang.String getPropertyExpression()
Returns the property expression.

Returns:
The property expression

getNodeValue

public java.lang.String getNodeValue(javax.swing.tree.TreeNode node)
Returns the string representation of the node.

Parameters:
node - The node
Returns:
The string representation of the node


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