Package eu.essilab.lablib.checkboxtree
Interface TreeCheckingModel
- All Known Implementing Classes:
DefaultTreeCheckingModel,NullTreeCheckingModel
public interface TreeCheckingModel
The interface of a model for checking/unchecking the nodes of a CheckboxTree.
Alterations of a node state may propagate to descendants/ancestors, according
to the behaviour of the checking model. See CheckingMode for the available
behaviours.
- Author:
- bigagli, boldrini
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe checking behaviors supported by this class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCheckingPath(TreePath path) add a path to the checking set.voidaddCheckingPaths(TreePath[] paths) add paths to the checking set.voidAdds the specified listener to the list of those being notified upon changes in the the checking set.voidClears the checking.TreePath[]TreePath[]TreePath[]booleanisPathChecked(TreePath path) Returns true if the item identified by the path is currently checked.booleanisPathEnabled(TreePath path) Returns whether the specified path checking state can be toggled.booleanisPathGreyed(TreePath path) Returns whether the specified path is greyed.voidremoveCheckingPath(TreePath path) Removes a path from the checking set.voidremoveCheckingPaths(TreePath[] paths) Remove the specified paths from the checking set.voidRemoves the specified listener from the list of those being notified upon changes in the checking set.voidSets the specified checking mode.voidsetCheckingPath(TreePath path) (Re)sets the checking to the specified path.voidsetCheckingPaths(TreePath[] paths) (Re)sets the checking to the specified paths.voidsetPathEnabled(TreePath path, boolean enable) Sets whether or not the specified path can be toggled.voidsetPathsEnabled(TreePath[] paths, boolean enable) Sets whether or not the specified paths can be toggled.voidtoggleCheckingPath(TreePath pathForRow) Toggles (check/uncheck) the checking state of the specified path, if this is enabled, and possibly propagate the change, according to the checking mode.
-
Method Details
-
addCheckingPath
add a path to the checking set.- Parameters:
path- the path to be added.
-
addCheckingPaths
add paths to the checking set.- Parameters:
paths- the paths to be added.
-
addTreeCheckingListener
Adds the specified listener to the list of those being notified upon changes in the the checking set.- Parameters:
tcl- the new listener to be added.
-
clearChecking
void clearChecking()Clears the checking. -
getCheckingMode
TreeCheckingModel.CheckingMode getCheckingMode()- Returns:
- Returns the CheckingMode.
-
getCheckingPaths
TreePath[] getCheckingPaths()- Returns:
- Returns the paths that are in the checking set.
-
getCheckingRoots
TreePath[] getCheckingRoots()- Returns:
- Returns the paths that are in the checking set and are the (upper) roots of checked trees.
-
getGreyingPaths
TreePath[] getGreyingPaths()- Returns:
- Returns the paths that are in the greying set.
-
isPathChecked
Returns true if the item identified by the path is currently checked.- Parameters:
path- aTreePathidentifying a node- Returns:
- true if the node is checked
-
isPathEnabled
Returns whether the specified path checking state can be toggled. -
isPathGreyed
Returns whether the specified path is greyed. -
removeCheckingPath
Removes a path from the checking set.- Parameters:
path- the path to be removed.
-
removeCheckingPaths
Remove the specified paths from the checking set.- Parameters:
paths- the paths to be added.
-
removeTreeCheckingListener
Removes the specified listener from the list of those being notified upon changes in the checking set.- Parameters:
tcl- the listener to remove.
-
setCheckingMode
Sets the specified checking mode.- Parameters:
mode- the checking mode to set.
-
setCheckingPath
(Re)sets the checking to the specified path. -
setCheckingPaths
(Re)sets the checking to the specified paths. -
setPathEnabled
Sets whether or not the specified path can be toggled.- Parameters:
path- the path to enable/disable
-
setPathsEnabled
Sets whether or not the specified paths can be toggled.- Parameters:
paths- the paths to enable/disable
-
toggleCheckingPath
Toggles (check/uncheck) the checking state of the specified path, if this is enabled, and possibly propagate the change, according to the checking mode.
-