Module java.desktop

Class DefaultTreeSelectionModel

java.lang.Object
javax.swing.tree.DefaultTreeSelectionModel
All Implemented Interfaces:
Serializable, Cloneable, TreeSelectionModel
Direct Known Subclasses:
JTree.EmptySelectionModel

public class DefaultTreeSelectionModel extends Object implements Cloneable, Serializable, TreeSelectionModel
Default implementation of TreeSelectionModel. Listeners are notified whenever the paths in the selection change, not the rows. In order to be able to track row changes you may wish to become a listener for expansion events on the tree and test for changes from there.

resetRowSelection is called from any of the methods that update the selected paths. If you subclass any of these methods to filter what is allowed to be selected, be sure and message resetRowSelection if you do not message super. 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.

See Also: