org.apache.myfaces.custom.tree2

Class TreeStateBase

Implemented Interfaces:
Serializable, TreeState

public class TreeStateBase
extends java.lang.Object
implements TreeState

Method Summary

void
collapsePath(String[] nodePath)
Collapse the complete path specified.
void
expandPath(String[] nodePath)
Expand the complete path specified.
boolean
isNodeExpanded(String nodeId)
Indicates whether or not the specified TreeNode is expanded.
boolean
isTransient()
Getter for transient property.
void
setTransient(boolean trans)
Setter for transient property
void
toggleExpanded(String nodeId)
Toggle the expanded state of the specified TreeNode.

Method Details

collapsePath

public void collapsePath(String[] nodePath)
Collapse the complete path specified. If any node in the path is already collapsed, that node should be left as it is.
Specified by:
collapsePath in interface TreeState
Parameters:
nodePath - The path to be collapsed.

expandPath

public void expandPath(String[] nodePath)
Expand the complete path specified. If any node in the path is already expanded, that node should be left as it is.
Specified by:
expandPath in interface TreeState
Parameters:
nodePath - The path to be expanded.

isNodeExpanded

public boolean isNodeExpanded(String nodeId)
Specified by:
isNodeExpanded in interface TreeState
Parameters:
nodeId - The id of the node in question.
Returns:
If the node is expanded.

isTransient

public boolean isTransient()
Getter for transient property.
Specified by:
isTransient in interface TreeState
Returns:
boolean

setTransient

public void setTransient(boolean trans)
Setter for transient property
Specified by:
setTransient in interface TreeState
Parameters:
trans - boolean

toggleExpanded

public void toggleExpanded(String nodeId)
Specified by:
toggleExpanded in interface TreeState
Parameters:
nodeId - The id of the node whose expanded state should be toggled.