- 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
EmptySelectionModelis aTreeSelectionModelthat 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.beanspackage. Please seeXMLEncoder.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static JTree.EmptySelectionModelsharedInstanceThe 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 protectedEmptySelectionModel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(PropertyChangeListener listener)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.voidaddSelectionPaths(TreePath[] paths)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.voidaddTreeSelectionListener(TreeSelectionListener listener)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.voidremovePropertyChangeListener(PropertyChangeListener listener)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.voidremoveSelectionPaths(TreePath[] paths)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.voidremoveTreeSelectionListener(TreeSelectionListener listener)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.voidsetRowMapper(RowMapper mapper)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.voidsetSelectionMode(int mode)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.voidsetSelectionPaths(TreePath[] paths)This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.static JTree.EmptySelectionModelsharedInstance()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 Detail
-
sharedInstance
protected static final JTree.EmptySelectionModel sharedInstance
The single instance ofEmptySelectionModel.
-
-
Method Detail
-
sharedInstance
public static JTree.EmptySelectionModel sharedInstance()
Returns the single instance ofEmptySelectionModel.- Returns:
- single instance of
EmptySelectionModel
-
setSelectionPaths
public void setSelectionPaths(TreePath[] paths)
This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.- Specified by:
setSelectionPathsin interfaceTreeSelectionModel- Overrides:
setSelectionPathsin classDefaultTreeSelectionModel- Parameters:
paths- the paths to select; this is ignored
-
addSelectionPaths
public void addSelectionPaths(TreePath[] paths)
This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.- Specified by:
addSelectionPathsin interfaceTreeSelectionModel- Overrides:
addSelectionPathsin classDefaultTreeSelectionModel- Parameters:
paths- the paths to add to the selection; this is ignored
-
removeSelectionPaths
public void removeSelectionPaths(TreePath[] paths)
This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.- Specified by:
removeSelectionPathsin interfaceTreeSelectionModel- Overrides:
removeSelectionPathsin classDefaultTreeSelectionModel- Parameters:
paths- the paths to remove; this is ignored
-
setSelectionMode
public void setSelectionMode(int mode)
This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.- Specified by:
setSelectionModein interfaceTreeSelectionModel- Overrides:
setSelectionModein classDefaultTreeSelectionModel- Parameters:
mode- the selection mode; this is ignored- Since:
- 1.7
-
setRowMapper
public void setRowMapper(RowMapper mapper)
This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.- Specified by:
setRowMapperin interfaceTreeSelectionModel- Overrides:
setRowMapperin classDefaultTreeSelectionModel- Parameters:
mapper- theRowMapperinstance; this is ignored- Since:
- 1.7
-
addTreeSelectionListener
public void addTreeSelectionListener(TreeSelectionListener listener)
This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.- Specified by:
addTreeSelectionListenerin interfaceTreeSelectionModel- Overrides:
addTreeSelectionListenerin classDefaultTreeSelectionModel- Parameters:
listener- the listener to add; this is ignored- Since:
- 1.7
-
removeTreeSelectionListener
public void removeTreeSelectionListener(TreeSelectionListener listener)
This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.- Specified by:
removeTreeSelectionListenerin interfaceTreeSelectionModel- Overrides:
removeTreeSelectionListenerin classDefaultTreeSelectionModel- Parameters:
listener- the listener to remove; this is ignored- Since:
- 1.7
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.- Specified by:
addPropertyChangeListenerin interfaceTreeSelectionModel- Overrides:
addPropertyChangeListenerin classDefaultTreeSelectionModel- Parameters:
listener- the listener to add; this is ignored- Since:
- 1.7
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
This is overriden to do nothing;EmptySelectionModeldoes not allow a selection.- Specified by:
removePropertyChangeListenerin interfaceTreeSelectionModel- Overrides:
removePropertyChangeListenerin classDefaultTreeSelectionModel- Parameters:
listener- the listener to remove; this is ignored- Since:
- 1.7
-
-