org.apache.wicket.extensions.markup.html.tree.table
Class AbstractRenderableColumn

java.lang.Object
  extended by org.apache.wicket.extensions.markup.html.tree.table.AbstractColumn
      extended by org.apache.wicket.extensions.markup.html.tree.table.AbstractRenderableColumn
All Implemented Interfaces:
java.io.Serializable, IColumn, IClusterable
Direct Known Subclasses:
PropertyRenderableColumn

public abstract class AbstractRenderableColumn
extends AbstractColumn

Convenience class for creating non-interactive lightweight (IRenderable based) columns.

Author:
Matej Knopp
See Also:
Serialized Form

Constructor Summary
AbstractRenderableColumn(ColumnLocation location, java.lang.String header)
          Creates the column
 
Method Summary
abstract  java.lang.String getNodeValue(javax.swing.tree.TreeNode node)
          Returns the string value for the provided node.
 boolean isContentAsTooltip()
          Returns whether the content should also be visible as tooltip of the cell.
 boolean isEscapeContent()
          Returns whether the special html characters of content will be escaped.
 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.
 void setContentAsTooltip(boolean contentAsTooltip)
          Sets whether the content should also be visible as tooltip (html title attribute) of the cell.
 void setEscapeContent(boolean escapeContent)
          Sets whether the special html characters of content should be escaped.
 
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

AbstractRenderableColumn

public AbstractRenderableColumn(ColumnLocation location,
                                java.lang.String header)
Creates the column

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

getNodeValue

public abstract java.lang.String getNodeValue(javax.swing.tree.TreeNode node)
Returns the string value for the provided node.

Parameters:
node - Determines the position in tree
Returns:
The

isContentAsTooltip

public boolean isContentAsTooltip()
Returns whether the content should also be visible as tooltip of the cell.

Returns:
whether the content should also be visible as tooltip

isEscapeContent

public boolean isEscapeContent()
Returns whether the special html characters of content will be escaped.

Returns:
Whether html characters should be escaped

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)

setContentAsTooltip

public void setContentAsTooltip(boolean contentAsTooltip)
Sets whether the content should also be visible as tooltip (html title attribute) of the cell.

Parameters:
contentAsTooltip - whether the content should also be visible as tooltip

setEscapeContent

public void setEscapeContent(boolean escapeContent)
Sets whether the special html characters of content should be escaped.

Parameters:
escapeContent - Whether to espcape html characters


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.