|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.ui.util.TreeViewerCheckStateHandler
public class TreeViewerCheckStateHandler
Manages check states of checked tree viewers. When an item is checked, the check state manager goes up the hierarchy and updates the check state of the ancestors. (checked if all children are checked, grayed if some, but not all children are checked) Similarly, it goes down the hierarchy marking all children as checked.
If items should be checked programmatically, this should happen through the methods of this class to be able to update the ancestor and child elements. Since programmatically triggered changes on the check state of an element do not trigger events, the check state manager cannot cope with this on its own.
Constructor Summary | |
---|---|
TreeViewerCheckStateHandler(CheckboxTreeViewer treeViewer)
Constructs a new instance managing the given tree viewer. |
Method Summary | |
---|---|
void |
checkElement(Object element)
Checks the given element, updating its ancestors and children in the process. |
void |
checkElements(Collection<?> elements)
Checks the given elements, updating theirs ancestors and children in the process. |
void |
uncheckElement(Object element)
Unchecks the given element, updating its ancestors and children in the process. |
void |
uncheckElements(Collection<?> elements)
Unchecks the given elements, updating theirs ancestors and children in the process. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeViewerCheckStateHandler(CheckboxTreeViewer treeViewer)
treeViewer
- the tree viewer to be managed.Method Detail |
---|
public void checkElement(Object element)
element
- the element to be checked.public void checkElements(Collection<?> elements)
elements
- the elements to be checked.public void uncheckElement(Object element)
element
- the element to be unchecked.public void uncheckElements(Collection<?> elements)
elements
- the elements to be unchecked.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |