java.lang.Object
javax.swing.tree.DefaultTreeSelectionModel
javax.swing.JTree.EmptySelectionModel
- All Implemented Interfaces:
Serializable
,Cloneable
,TreeSelectionModel
- Enclosing class:
- JTree
protected static class JTree.EmptySelectionModel extends DefaultTreeSelectionModel
EmptySelectionModel
is a TreeSelectionModel
that does not allow anything to be selected.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans™
has been added to the java.beans
package.
Please see XMLEncoder
.
-
Field Summary
Fields Modifier and Type Field Description protected static JTree.EmptySelectionModel
sharedInstance
The single instance ofEmptySelectionModel
.Fields declared in class javax.swing.tree.DefaultTreeSelectionModel
changeSupport, leadIndex, leadPath, leadRow, listenerList, listSelectionModel, rowMapper, selection, SELECTION_MODE_PROPERTY, selectionMode
Fields declared in interface javax.swing.tree.TreeSelectionModel
CONTIGUOUS_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION, SINGLE_TREE_SELECTION
-
Constructor Summary
Constructors Modifier Constructor Description protected
EmptySelectionModel()
-
Method Summary
Modifier and Type Method Description void
addPropertyChangeListener(PropertyChangeListener listener)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.void
addSelectionPaths(TreePath[] paths)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.void
addTreeSelectionListener(TreeSelectionListener listener)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.void
removePropertyChangeListener(PropertyChangeListener listener)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.void
removeSelectionPaths(TreePath[] paths)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.void
removeTreeSelectionListener(TreeSelectionListener listener)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.void
setRowMapper(RowMapper mapper)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.void
setSelectionMode(int mode)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.void
setSelectionPaths(TreePath[] paths)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.static JTree.EmptySelectionModel
sharedInstance()
Returns the single instance ofEmptySelectionModel
.Methods declared in class javax.swing.tree.DefaultTreeSelectionModel
addSelectionPath, arePathsContiguous, canPathsBeAdded, canPathsBeRemoved, clearSelection, clone, fireValueChanged, getLeadSelectionPath, getLeadSelectionRow, getListeners, getMaxSelectionRow, getMinSelectionRow, getPropertyChangeListeners, getRowMapper, getSelectionCount, getSelectionMode, getSelectionPath, getSelectionPaths, getSelectionRows, getTreeSelectionListeners, insureRowContinuity, insureUniqueness, isPathSelected, isRowSelected, isSelectionEmpty, notifyPathChange, removeSelectionPath, resetRowSelection, setSelectionPath, toString, updateLeadIndex
-
Field Details
-
sharedInstance
The single instance ofEmptySelectionModel
.
-
-
Constructor Details
-
EmptySelectionModel
protected EmptySelectionModel()
-
-
Method Details
-
sharedInstance
Returns the single instance ofEmptySelectionModel
.- Returns:
- single instance of
EmptySelectionModel
-
setSelectionPaths
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.- Specified by:
setSelectionPaths
in interfaceTreeSelectionModel
- Overrides:
setSelectionPaths
in classDefaultTreeSelectionModel
- Parameters:
paths
- the paths to select; this is ignored
-
addSelectionPaths
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.- Specified by:
addSelectionPaths
in interfaceTreeSelectionModel
- Overrides:
addSelectionPaths
in classDefaultTreeSelectionModel
- Parameters:
paths
- the paths to add to the selection; this is ignored
-
removeSelectionPaths
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.- Specified by:
removeSelectionPaths
in interfaceTreeSelectionModel
- Overrides:
removeSelectionPaths
in classDefaultTreeSelectionModel
- Parameters:
paths
- the paths to remove; this is ignored
-
setSelectionMode
public void setSelectionMode(int mode)This is overriden to do nothing;EmptySelectionModel
does not allow a selection.- Specified by:
setSelectionMode
in interfaceTreeSelectionModel
- Overrides:
setSelectionMode
in classDefaultTreeSelectionModel
- Parameters:
mode
- the selection mode; this is ignored- Since:
- 1.7
-
setRowMapper
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.- Specified by:
setRowMapper
in interfaceTreeSelectionModel
- Overrides:
setRowMapper
in classDefaultTreeSelectionModel
- Parameters:
mapper
- theRowMapper
instance; this is ignored- Since:
- 1.7
-
addTreeSelectionListener
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.- Specified by:
addTreeSelectionListener
in interfaceTreeSelectionModel
- Overrides:
addTreeSelectionListener
in classDefaultTreeSelectionModel
- Parameters:
listener
- the listener to add; this is ignored- Since:
- 1.7
-
removeTreeSelectionListener
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.- Specified by:
removeTreeSelectionListener
in interfaceTreeSelectionModel
- Overrides:
removeTreeSelectionListener
in classDefaultTreeSelectionModel
- Parameters:
listener
- the listener to remove; this is ignored- Since:
- 1.7
-
addPropertyChangeListener
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.- Specified by:
addPropertyChangeListener
in interfaceTreeSelectionModel
- Overrides:
addPropertyChangeListener
in classDefaultTreeSelectionModel
- Parameters:
listener
- the listener to add; this is ignored- Since:
- 1.7
-
removePropertyChangeListener
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.- Specified by:
removePropertyChangeListener
in interfaceTreeSelectionModel
- Overrides:
removePropertyChangeListener
in classDefaultTreeSelectionModel
- Parameters:
listener
- the listener to remove; this is ignored- Since:
- 1.7
-