|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.tobago.model.ExpandedState
public class ExpandedState
Manages the expanded state of an tree.
Constructor Summary | |
---|---|
ExpandedState(int defaultExpandedLevels)
Creates a new state object to store which nodes of a tree are expanded and collapsed in a view. |
Method Summary | |
---|---|
void |
collapse(int level)
Collapses all nodes that level are higher or equals the parameter level. |
void |
collapse(TreeNode node)
Collapses a single node. |
void |
collapse(TreePath path)
Collapses a single node. |
void |
collapseAll()
Collapses a nodes of the tree. |
void |
collapseAllButRoot()
Collapses a nodes of the tree. |
void |
expand(int level)
Expands all nodes that level are lower or equals the parameter level. |
void |
expand(TreeNode node)
Expands a single node. |
void |
expand(TreePath path)
Expands a single node. |
void |
expandAll()
Expands a nodes of the tree. |
Set<TreePath> |
getCollapsedSet()
|
Set<TreePath> |
getExpandedSet()
|
boolean |
isExpanded(TreeNode node)
Checks if a node is expanded. |
boolean |
isExpanded(TreePath path)
Checks if a node is expanded. |
void |
reset()
Resets the state to the defaults. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExpandedState(int defaultExpandedLevels)
defaultExpandedLevels
- All nodes up to this level are expanded by default.Method Detail |
---|
public boolean isExpanded(TreeNode node)
node
- The node to check.
public boolean isExpanded(TreePath path)
path
- The path of the node to check.
public void expand(TreeNode node)
node
- The node to expand.public void expand(TreePath path)
path
- The path of the node to expand.public void expand(int level)
level
- The level to expand.public void expandAll()
public void collapse(TreeNode node)
node
- The node to collapse.public void collapse(TreePath path)
path
- The path of the node to collapse.public void collapse(int level)
level
- The level to expand.public void collapseAll()
public void collapseAllButRoot()
public void reset()
public Set<TreePath> getExpandedSet()
public Set<TreePath> getCollapsedSet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |