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
Modifier and TypeInterfaceDescriptionstatic enum
The checking behaviors supported by this class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCheckingPath
(TreePath path) add a path to the checking set.void
addCheckingPaths
(TreePath[] paths) add paths to the checking set.void
Adds the specified listener to the list of those being notified upon changes in the the checking set.void
Clears the checking.TreePath[]
TreePath[]
TreePath[]
boolean
isPathChecked
(TreePath path) Returns true if the item identified by the path is currently checked.boolean
isPathEnabled
(TreePath path) Returns whether the specified path checking state can be toggled.boolean
isPathGreyed
(TreePath path) Returns whether the specified path is greyed.void
removeCheckingPath
(TreePath path) Removes a path from the checking set.void
removeCheckingPaths
(TreePath[] paths) Remove the specified paths from the checking set.void
Removes the specified listener from the list of those being notified upon changes in the checking set.void
Sets the specified checking mode.void
setCheckingPath
(TreePath path) (Re)sets the checking to the specified path.void
setCheckingPaths
(TreePath[] paths) (Re)sets the checking to the specified paths.void
setPathEnabled
(TreePath path, boolean enable) Sets whether or not the specified path can be toggled.void
setPathsEnabled
(TreePath[] paths, boolean enable) Sets whether or not the specified paths can be toggled.void
toggleCheckingPath
(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
- aTreePath
identifying 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.
-