- 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 aTreeSelectionModel
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 JavaBeansTM has been added to the
java.beans
package. Please seeXMLEncoder
.
-
-
Field Summary
Fields Modifier and Type Field and Description protected static JTree.EmptySelectionModel
sharedInstance
The single instance ofEmptySelectionModel
.-
Fields inherited from class javax.swing.tree.DefaultTreeSelectionModel
changeSupport, leadIndex, leadPath, leadRow, listenerList, listSelectionModel, rowMapper, selection, SELECTION_MODE_PROPERTY, selectionMode
-
Fields inherited from interface javax.swing.tree.TreeSelectionModel
CONTIGUOUS_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION, SINGLE_TREE_SELECTION
-
-
Constructor Summary
Constructors Modifier Constructor and Description protected
JTree.EmptySelectionModel()
-
Method Summary
Methods Modifier and Type Method and 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 inherited from 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;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
public void addSelectionPaths(TreePath[] paths)
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
public void removeSelectionPaths(TreePath[] paths)
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
public void setRowMapper(RowMapper mapper)
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
public void addTreeSelectionListener(TreeSelectionListener listener)
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
public void removeTreeSelectionListener(TreeSelectionListener listener)
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
public void addPropertyChangeListener(PropertyChangeListener listener)
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
public void removePropertyChangeListener(PropertyChangeListener listener)
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
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/swing/jtree.emptyselectionmodel.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.