javax.swing

Class JTree.EmptySelectionModel

protected static class JTree.EmptySelectionModel extends DefaultTreeSelectionModel

A TreeModel that does not allow anything to be selected.
Field Summary
protected static JTree.EmptySelectionModelsharedInstance
The shared instance of this model.
Constructor Summary
protected EmptySelectionModel()
Creates a new instance of EmptySelectionModel.
Method Summary
voidaddSelectionPaths(TreePath[] paths)
This catches attempts to add something to the selection.
voidremoveSelectionPaths(TreePath[] paths)
This catches attempts to remove something from the selection.
voidsetSelectionPaths(TreePath[] paths)
This catches attempts to set a selection and sets nothing instead.
static JTree.EmptySelectionModelsharedInstance()
Returns the shared instance of EmptySelectionModel.

Field Detail

sharedInstance

protected static final JTree.EmptySelectionModel sharedInstance
The shared instance of this model.

Constructor Detail

EmptySelectionModel

protected EmptySelectionModel()
Creates a new instance of EmptySelectionModel.

Method Detail

addSelectionPaths

public void addSelectionPaths(TreePath[] paths)
This catches attempts to add something to the selection.

Parameters: paths not used here

removeSelectionPaths

public void removeSelectionPaths(TreePath[] paths)
This catches attempts to remove something from the selection.

Parameters: paths not used here

setSelectionPaths

public void setSelectionPaths(TreePath[] paths)
This catches attempts to set a selection and sets nothing instead.

Parameters: paths not used here

sharedInstance

public static JTree.EmptySelectionModel sharedInstance()
Returns the shared instance of EmptySelectionModel.

Returns: the shared instance of EmptySelectionModel