Package org.apache.myfaces.tobago.model
Class SelectedState
- java.lang.Object
-
- org.apache.myfaces.tobago.model.SelectedState
-
- All Implemented Interfaces:
Serializable
public class SelectedState extends Object implements Serializable
Manages the selected tree paths of a tree.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SelectedState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears the selected state, so that no TreePath is selected.voidclearAndSelect(TreePath path)Set the selected path and remove all prior selections.booleanisAncestorOfSelected(TreePath ancestorPath)Checks if the given path is an ancestor of a selected node.booleanisSelected(TreePath path)Checks if the given path is selected.voidselect(TreePath path)Select the given path.voidselect(TreePath path, boolean selected)Set the selection state of the given pathStringtoString()voidunselect(TreePath path)Unselect the given path.
-
-
-
Method Detail
-
isSelected
public boolean isSelected(TreePath path)
Checks if the given path is selected.
-
isAncestorOfSelected
public boolean isAncestorOfSelected(TreePath ancestorPath)
Checks if the given path is an ancestor of a selected node.
-
select
public void select(TreePath path)
Select the given path.
-
unselect
public void unselect(TreePath path)
Unselect the given path.
-
clearAndSelect
public void clearAndSelect(TreePath path)
Set the selected path and remove all prior selections. This is useful for "single selection" mode.
-
clear
public void clear()
Clears the selected state, so that no TreePath is selected.
-
select
public void select(TreePath path, boolean selected)
Set the selection state of the given path
-
-