JTree.EmptySelectionModel (Java SE 15 & JDK 15) (original) (raw)
All Implemented Interfaces:
[Serializable](../../../java.base/java/io/Serializable.html "interface in java.io")
, [Cloneable](../../../java.base/java/lang/Cloneable.html "interface in java.lang")
, [TreeSelectionModel](tree/TreeSelectionModel.html "interface in javax.swing.tree")
Enclosing class:
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
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 of EmptySelectionModel. |
Methods declared in class javax.swing.tree.DefaultTreeSelectionModel
[addSelectionPath](tree/DefaultTreeSelectionModel.html#addSelectionPath%28javax.swing.tree.TreePath%29), [arePathsContiguous](tree/DefaultTreeSelectionModel.html#arePathsContiguous%28javax.swing.tree.TreePath%5B%5D%29), [canPathsBeAdded](tree/DefaultTreeSelectionModel.html#canPathsBeAdded%28javax.swing.tree.TreePath%5B%5D%29), [canPathsBeRemoved](tree/DefaultTreeSelectionModel.html#canPathsBeRemoved%28javax.swing.tree.TreePath%5B%5D%29), [clearSelection](tree/DefaultTreeSelectionModel.html#clearSelection%28%29), [clone](tree/DefaultTreeSelectionModel.html#clone%28%29), [fireValueChanged](tree/DefaultTreeSelectionModel.html#fireValueChanged%28javax.swing.event.TreeSelectionEvent%29), [getLeadSelectionPath](tree/DefaultTreeSelectionModel.html#getLeadSelectionPath%28%29), [getLeadSelectionRow](tree/DefaultTreeSelectionModel.html#getLeadSelectionRow%28%29), [getListeners](tree/DefaultTreeSelectionModel.html#getListeners%28java.lang.Class%29), [getMaxSelectionRow](tree/DefaultTreeSelectionModel.html#getMaxSelectionRow%28%29), [getMinSelectionRow](tree/DefaultTreeSelectionModel.html#getMinSelectionRow%28%29), [getPropertyChangeListeners](tree/DefaultTreeSelectionModel.html#getPropertyChangeListeners%28%29), [getRowMapper](tree/DefaultTreeSelectionModel.html#getRowMapper%28%29), [getSelectionCount](tree/DefaultTreeSelectionModel.html#getSelectionCount%28%29), [getSelectionMode](tree/DefaultTreeSelectionModel.html#getSelectionMode%28%29), [getSelectionPath](tree/DefaultTreeSelectionModel.html#getSelectionPath%28%29), [getSelectionPaths](tree/DefaultTreeSelectionModel.html#getSelectionPaths%28%29), [getSelectionRows](tree/DefaultTreeSelectionModel.html#getSelectionRows%28%29), [getTreeSelectionListeners](tree/DefaultTreeSelectionModel.html#getTreeSelectionListeners%28%29), [insureRowContinuity](tree/DefaultTreeSelectionModel.html#insureRowContinuity%28%29), [insureUniqueness](tree/DefaultTreeSelectionModel.html#insureUniqueness%28%29), [isPathSelected](tree/DefaultTreeSelectionModel.html#isPathSelected%28javax.swing.tree.TreePath%29), [isRowSelected](tree/DefaultTreeSelectionModel.html#isRowSelected%28int%29), [isSelectionEmpty](tree/DefaultTreeSelectionModel.html#isSelectionEmpty%28%29), [notifyPathChange](tree/DefaultTreeSelectionModel.html#notifyPathChange%28java.util.Vector,javax.swing.tree.TreePath%29), [removeSelectionPath](tree/DefaultTreeSelectionModel.html#removeSelectionPath%28javax.swing.tree.TreePath%29), [resetRowSelection](tree/DefaultTreeSelectionModel.html#resetRowSelection%28%29), [setSelectionPath](tree/DefaultTreeSelectionModel.html#setSelectionPath%28javax.swing.tree.TreePath%29), [toString](tree/DefaultTreeSelectionModel.html#toString%28%29), [updateLeadIndex](tree/DefaultTreeSelectionModel.html#updateLeadIndex%28%29)
Field Details
sharedInstance
The single instance of
EmptySelectionModel
.Constructor Details
EmptySelectionModel
protected EmptySelectionModel()
Method Details
sharedInstance
Returns the single instance of
EmptySelectionModel
.
Returns:
single instance ofEmptySelectionModel
setSelectionPaths
public void setSelectionPaths(TreePath[] paths)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.
Specified by:
[setSelectionPaths](tree/TreeSelectionModel.html#setSelectionPaths%28javax.swing.tree.TreePath%5B%5D%29)
in interface[TreeSelectionModel](tree/TreeSelectionModel.html "interface in javax.swing.tree")
Overrides:
[setSelectionPaths](tree/DefaultTreeSelectionModel.html#setSelectionPaths%28javax.swing.tree.TreePath%5B%5D%29)
in class[DefaultTreeSelectionModel](tree/DefaultTreeSelectionModel.html "class in javax.swing.tree")
Parameters:
paths
- the paths to select; this is ignoredaddSelectionPaths
public void addSelectionPaths(TreePath[] paths)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.
Specified by:
[addSelectionPaths](tree/TreeSelectionModel.html#addSelectionPaths%28javax.swing.tree.TreePath%5B%5D%29)
in interface[TreeSelectionModel](tree/TreeSelectionModel.html "interface in javax.swing.tree")
Overrides:
[addSelectionPaths](tree/DefaultTreeSelectionModel.html#addSelectionPaths%28javax.swing.tree.TreePath%5B%5D%29)
in class[DefaultTreeSelectionModel](tree/DefaultTreeSelectionModel.html "class in javax.swing.tree")
Parameters:
paths
- the paths to add to the selection; this is ignoredremoveSelectionPaths
public void removeSelectionPaths(TreePath[] paths)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.
Specified by:
[removeSelectionPaths](tree/TreeSelectionModel.html#removeSelectionPaths%28javax.swing.tree.TreePath%5B%5D%29)
in interface[TreeSelectionModel](tree/TreeSelectionModel.html "interface in javax.swing.tree")
Overrides:
[removeSelectionPaths](tree/DefaultTreeSelectionModel.html#removeSelectionPaths%28javax.swing.tree.TreePath%5B%5D%29)
in class[DefaultTreeSelectionModel](tree/DefaultTreeSelectionModel.html "class in javax.swing.tree")
Parameters:
paths
- the paths to remove; this is ignoredsetSelectionMode
public void setSelectionMode(int mode)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.
Specified by:
[setSelectionMode](tree/TreeSelectionModel.html#setSelectionMode%28int%29)
in interface[TreeSelectionModel](tree/TreeSelectionModel.html "interface in javax.swing.tree")
Overrides:
[setSelectionMode](tree/DefaultTreeSelectionModel.html#setSelectionMode%28int%29)
in class[DefaultTreeSelectionModel](tree/DefaultTreeSelectionModel.html "class in javax.swing.tree")
Parameters:
mode
- the selection mode; this is ignored
Since:
1.7setRowMapper
public void setRowMapper(RowMapper mapper)
This is overriden to do nothing;EmptySelectionModel
does not allow a selection.
Specified by:
[setRowMapper](tree/TreeSelectionModel.html#setRowMapper%28javax.swing.tree.RowMapper%29)
in interface[TreeSelectionModel](tree/TreeSelectionModel.html "interface in javax.swing.tree")
Overrides:
[setRowMapper](tree/DefaultTreeSelectionModel.html#setRowMapper%28javax.swing.tree.RowMapper%29)
in class[DefaultTreeSelectionModel](tree/DefaultTreeSelectionModel.html "class in javax.swing.tree")
Parameters:
mapper
- theRowMapper
instance; this is ignored
Since:
1.7addTreeSelectionListener
This is overriden to do nothing;
EmptySelectionModel
does not allow a selection.
Specified by:
[addTreeSelectionListener](tree/TreeSelectionModel.html#addTreeSelectionListener%28javax.swing.event.TreeSelectionListener%29)
in interface[TreeSelectionModel](tree/TreeSelectionModel.html "interface in javax.swing.tree")
Overrides:
[addTreeSelectionListener](tree/DefaultTreeSelectionModel.html#addTreeSelectionListener%28javax.swing.event.TreeSelectionListener%29)
in class[DefaultTreeSelectionModel](tree/DefaultTreeSelectionModel.html "class in javax.swing.tree")
Parameters:
listener
- the listener to add; this is ignored
Since:
1.7removeTreeSelectionListener
This is overriden to do nothing;
EmptySelectionModel
does not allow a selection.
Specified by:
[removeTreeSelectionListener](tree/TreeSelectionModel.html#removeTreeSelectionListener%28javax.swing.event.TreeSelectionListener%29)
in interface[TreeSelectionModel](tree/TreeSelectionModel.html "interface in javax.swing.tree")
Overrides:
[removeTreeSelectionListener](tree/DefaultTreeSelectionModel.html#removeTreeSelectionListener%28javax.swing.event.TreeSelectionListener%29)
in class[DefaultTreeSelectionModel](tree/DefaultTreeSelectionModel.html "class in javax.swing.tree")
Parameters:
listener
- the listener to remove; this is ignored
Since:
1.7addPropertyChangeListener
This is overriden to do nothing;
EmptySelectionModel
does not allow a selection.
Specified by:
[addPropertyChangeListener](tree/TreeSelectionModel.html#addPropertyChangeListener%28java.beans.PropertyChangeListener%29)
in interface[TreeSelectionModel](tree/TreeSelectionModel.html "interface in javax.swing.tree")
Overrides:
[addPropertyChangeListener](tree/DefaultTreeSelectionModel.html#addPropertyChangeListener%28java.beans.PropertyChangeListener%29)
in class[DefaultTreeSelectionModel](tree/DefaultTreeSelectionModel.html "class in javax.swing.tree")
Parameters:
listener
- the listener to add; this is ignored
Since:
1.7removePropertyChangeListener
This is overriden to do nothing;
EmptySelectionModel
does not allow a selection.
Specified by:
[removePropertyChangeListener](tree/TreeSelectionModel.html#removePropertyChangeListener%28java.beans.PropertyChangeListener%29)
in interface[TreeSelectionModel](tree/TreeSelectionModel.html "interface in javax.swing.tree")
Overrides:
[removePropertyChangeListener](tree/DefaultTreeSelectionModel.html#removePropertyChangeListener%28java.beans.PropertyChangeListener%29)
in class[DefaultTreeSelectionModel](tree/DefaultTreeSelectionModel.html "class in javax.swing.tree")
Parameters:
listener
- the listener to remove; this is ignored
Since:
1.7