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 void
clear()
Clears the selected state, so that no TreePath is selected.void
clearAndSelect(TreePath path)
Set the selected path and remove all prior selections.boolean
isAncestorOfSelected(TreePath ancestorPath)
Checks if the given path is an ancestor of a selected node.boolean
isSelected(TreePath path)
Checks if the given path is selected.void
select(TreePath path)
Select the given path.void
select(TreePath path, boolean selected)
Set the selection state of the given pathString
toString()
void
unselect(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
-
-