org.apache.beehive.netui.tags.tree
Interface ITreeRootElement

All Superinterfaces:
INameable
All Known Implementing Classes:
TreeRootElement

public interface ITreeRootElement
extends INameable

This interface provides additional behavior on the root node in a tree. There are certain optimizations that may be done if state is tracked in the root. In addition, there are a number of features that are only applied to the root such as images. Finally, when the tree is run on the client, there are additonal features required of the root. This is a pretty simple interface to implement. Mostly the there are only properties that are stored for the additional state. The only method that is complicated is the changeSelected method.


Method Summary
 void changeSelected(String selectNode, ServletRequest request)
          Change the node that is selected.
 InheritableState getInheritableState()
          Property that returns the InheritableState that was set on the Tree.
 String getRootNodeCollapsedImage()
           
 String getRootNodeExpandedImage()
           
 TreeElement getSelectedNode()
          Return the currently selected TreeElement.
 TreeRenderState getTreeRenderState()
          return the TreeRenderState for this tree.
 void setInheritableState(InheritableState state)
          Property that sets the InheritableState that is set on the Tree tag.
 void setRootNodeCollapsedImage(String rootNodeCollapsedImage)
           
 void setRootNodeExpandedImage(String rootNodeExpandedImage)
           
 void setTreeRenderState(TreeRenderState trs)
          Set the TreeRenderState
 
Methods inherited from interface INameable
getObjectName, setObjectName
 

Method Detail

changeSelected

void changeSelected(String selectNode,
                    ServletRequest request)
Change the node that is selected. This is an optimization were the root node can track which node is currently selected so it can unselect that node instead of searching the whole tree to find the selected node. There is a helper method TreeHelpers.changeSelected that can be used for delegation. This requires the root, the currently selected node, and will return the newly selected node.

Parameters:
selectNode - a String value name of the new node selected
request - the ServletRequest.

getSelectedNode

TreeElement getSelectedNode()
Return the currently selected TreeElement. This method will return null if no element is currently selected.

Returns:
the currently selected node.

getTreeRenderState

TreeRenderState getTreeRenderState()
return the TreeRenderState for this tree.

Returns:

setTreeRenderState

void setTreeRenderState(TreeRenderState trs)
Set the TreeRenderState

Parameters:
trs -

getInheritableState

InheritableState getInheritableState()
Property that returns the InheritableState that was set on the Tree.

Returns:

setInheritableState

void setInheritableState(InheritableState state)
Property that sets the InheritableState that is set on the Tree tag.

Parameters:
state -

getRootNodeExpandedImage

String getRootNodeExpandedImage()
Returns:

setRootNodeExpandedImage

void setRootNodeExpandedImage(String rootNodeExpandedImage)
Parameters:
rootNodeExpandedImage -

getRootNodeCollapsedImage

String getRootNodeCollapsedImage()
Returns:

setRootNodeCollapsedImage

void setRootNodeCollapsedImage(String rootNodeCollapsedImage)
Parameters:
rootNodeCollapsedImage -