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 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[]static NullTreeCheckingModelbooleanisPathChecked(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
-
getInstance
-
addCheckingPath
Description copied from interface:TreeCheckingModeladd a path to the checking set.- Specified by:
addCheckingPathin interfaceTreeCheckingModel- Parameters:
path- the path to be added.
-
addCheckingPaths
Description copied from interface:TreeCheckingModeladd paths to the checking set.- Specified by:
addCheckingPathsin interfaceTreeCheckingModel- Parameters:
paths- the paths to be added.
-
addTreeCheckingListener
Description copied from interface:TreeCheckingModelAdds the specified listener to the list of those being notified upon changes in the the checking set.- Specified by:
addTreeCheckingListenerin interfaceTreeCheckingModel- Parameters:
tcl- the new listener to be added.
-
clearChecking
public void clearChecking()Description copied from interface:TreeCheckingModelClears the checking.- Specified by:
clearCheckingin interfaceTreeCheckingModel
-
getCheckingMode
- Specified by:
getCheckingModein interfaceTreeCheckingModel- Returns:
- Returns the CheckingMode.
-
getCheckingPaths
- Specified by:
getCheckingPathsin interfaceTreeCheckingModel- Returns:
- Returns the paths that are in the checking set.
-
getCheckingRoots
- Specified by:
getCheckingRootsin interfaceTreeCheckingModel- Returns:
- Returns the paths that are in the checking set and are the (upper) roots of checked trees.
-
getGreyingPaths
- Specified by:
getGreyingPathsin interfaceTreeCheckingModel- Returns:
- Returns the paths that are in the greying set.
-
isPathChecked
Description copied from interface:TreeCheckingModelReturns true if the item identified by the path is currently checked.- Specified by:
isPathCheckedin interfaceTreeCheckingModel- Parameters:
path- aTreePathidentifying a node- Returns:
- true if the node is checked
-
isPathEnabled
Description copied from interface:TreeCheckingModelReturns whether the specified path checking state can be toggled.- Specified by:
isPathEnabledin interfaceTreeCheckingModel
-
isPathGreyed
Description copied from interface:TreeCheckingModelReturns whether the specified path is greyed.- Specified by:
isPathGreyedin interfaceTreeCheckingModel
-
removeCheckingPath
Description copied from interface:TreeCheckingModelRemoves a path from the checking set.- Specified by:
removeCheckingPathin interfaceTreeCheckingModel- Parameters:
path- the path to be removed.
-
removeCheckingPaths
Description copied from interface:TreeCheckingModelRemove the specified paths from the checking set.- Specified by:
removeCheckingPathsin interfaceTreeCheckingModel- Parameters:
paths- the paths to be added.
-
removeTreeCheckingListener
Description copied from interface:TreeCheckingModelRemoves the specified listener from the list of those being notified upon changes in the checking set.- Specified by:
removeTreeCheckingListenerin interfaceTreeCheckingModel- Parameters:
tcl- the listener to remove.
-
setCheckingMode
Description copied from interface:TreeCheckingModelSets the specified checking mode.- Specified by:
setCheckingModein interfaceTreeCheckingModel- Parameters:
mode- the checking mode to set.
-
setCheckingPath
Description copied from interface:TreeCheckingModel(Re)sets the checking to the specified path.- Specified by:
setCheckingPathin interfaceTreeCheckingModel
-
setCheckingPaths
Description copied from interface:TreeCheckingModel(Re)sets the checking to the specified paths.- Specified by:
setCheckingPathsin interfaceTreeCheckingModel
-
setPathEnabled
Description copied from interface:TreeCheckingModelSets whether or not the specified path can be toggled.- Specified by:
setPathEnabledin interfaceTreeCheckingModel- Parameters:
path- the path to enable/disable
-
setPathsEnabled
Description copied from interface:TreeCheckingModelSets whether or not the specified paths can be toggled.- Specified by:
setPathsEnabledin interfaceTreeCheckingModel- Parameters:
paths- the paths to enable/disable
-
toggleCheckingPath
Description copied from interface:TreeCheckingModelToggles (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:
toggleCheckingPathin interfaceTreeCheckingModel
-