Package eu.essilab.lablib.checkboxtree
Class NullTreeCheckingModel
java.lang.Object
eu.essilab.lablib.checkboxtree.NullTreeCheckingModel
- All Implemented Interfaces:
TreeCheckingModel
Convenience class representing an empty tree checking model (cf. the Null
Object pattern), whose paths are always enabled, unchecked and ungreyed. This
class is a singleton.
- Author:
- Lorenzo Bigagli
-
Nested Class Summary
Nested classes/interfaces inherited from interface eu.essilab.lablib.checkboxtree.TreeCheckingModel
TreeCheckingModel.CheckingMode
-
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[]
static NullTreeCheckingModel
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
-
getInstance
-
addCheckingPath
Description copied from interface:TreeCheckingModel
add a path to the checking set.- Specified by:
addCheckingPath
in interfaceTreeCheckingModel
- Parameters:
path
- the path to be added.
-
addCheckingPaths
Description copied from interface:TreeCheckingModel
add paths to the checking set.- Specified by:
addCheckingPaths
in interfaceTreeCheckingModel
- Parameters:
paths
- the paths to be added.
-
addTreeCheckingListener
Description copied from interface:TreeCheckingModel
Adds the specified listener to the list of those being notified upon changes in the the checking set.- Specified by:
addTreeCheckingListener
in interfaceTreeCheckingModel
- Parameters:
tcl
- the new listener to be added.
-
clearChecking
public void clearChecking()Description copied from interface:TreeCheckingModel
Clears the checking.- Specified by:
clearChecking
in interfaceTreeCheckingModel
-
getCheckingMode
- Specified by:
getCheckingMode
in interfaceTreeCheckingModel
- Returns:
- Returns the CheckingMode.
-
getCheckingPaths
- Specified by:
getCheckingPaths
in interfaceTreeCheckingModel
- Returns:
- Returns the paths that are in the checking set.
-
getCheckingRoots
- Specified by:
getCheckingRoots
in interfaceTreeCheckingModel
- Returns:
- Returns the paths that are in the checking set and are the (upper) roots of checked trees.
-
getGreyingPaths
- Specified by:
getGreyingPaths
in interfaceTreeCheckingModel
- Returns:
- Returns the paths that are in the greying set.
-
isPathChecked
Description copied from interface:TreeCheckingModel
Returns true if the item identified by the path is currently checked.- Specified by:
isPathChecked
in interfaceTreeCheckingModel
- Parameters:
path
- aTreePath
identifying a node- Returns:
- true if the node is checked
-
isPathEnabled
Description copied from interface:TreeCheckingModel
Returns whether the specified path checking state can be toggled.- Specified by:
isPathEnabled
in interfaceTreeCheckingModel
-
isPathGreyed
Description copied from interface:TreeCheckingModel
Returns whether the specified path is greyed.- Specified by:
isPathGreyed
in interfaceTreeCheckingModel
-
removeCheckingPath
Description copied from interface:TreeCheckingModel
Removes a path from the checking set.- Specified by:
removeCheckingPath
in interfaceTreeCheckingModel
- Parameters:
path
- the path to be removed.
-
removeCheckingPaths
Description copied from interface:TreeCheckingModel
Remove the specified paths from the checking set.- Specified by:
removeCheckingPaths
in interfaceTreeCheckingModel
- Parameters:
paths
- the paths to be added.
-
removeTreeCheckingListener
Description copied from interface:TreeCheckingModel
Removes the specified listener from the list of those being notified upon changes in the checking set.- Specified by:
removeTreeCheckingListener
in interfaceTreeCheckingModel
- Parameters:
tcl
- the listener to remove.
-
setCheckingMode
Description copied from interface:TreeCheckingModel
Sets the specified checking mode.- Specified by:
setCheckingMode
in interfaceTreeCheckingModel
- Parameters:
mode
- the checking mode to set.
-
setCheckingPath
Description copied from interface:TreeCheckingModel
(Re)sets the checking to the specified path.- Specified by:
setCheckingPath
in interfaceTreeCheckingModel
-
setCheckingPaths
Description copied from interface:TreeCheckingModel
(Re)sets the checking to the specified paths.- Specified by:
setCheckingPaths
in interfaceTreeCheckingModel
-
setPathEnabled
Description copied from interface:TreeCheckingModel
Sets whether or not the specified path can be toggled.- Specified by:
setPathEnabled
in interfaceTreeCheckingModel
- Parameters:
path
- the path to enable/disable
-
setPathsEnabled
Description copied from interface:TreeCheckingModel
Sets whether or not the specified paths can be toggled.- Specified by:
setPathsEnabled
in interfaceTreeCheckingModel
- Parameters:
paths
- the paths to enable/disable
-
toggleCheckingPath
Description copied from interface:TreeCheckingModel
Toggles (check/uncheck) the checking state of the specified path, if this is enabled, and possibly propagate the change, according to the checking mode.- Specified by:
toggleCheckingPath
in interfaceTreeCheckingModel
-