charvax.swing.event
Class TreeSelectionEvent
java.util.EventObject
charvax.swing.event.TreeSelectionEvent
public class TreeSelectionEvent
extends java.util.EventObject
An event that characterizes a change in the current selection.
TreeSelectionListeners will generally query the source of the event
directly to find out the status of each potentially changed path.
TreePath | getPath() - Returns the path that has been added to or removed from the selection.
|
boolean | isAddedPath() - Returns true if the path element has been added to the
selection.
|
TreeSelectionEvent
public TreeSelectionEvent(Object source_,
TreePath path_,
boolean isNew_,
TreePath oldLeadSelectionPath_,
TreePath newLeadSelectionPath_)
Represents a change in the selection of a TreeSelectionModel.
source_
- the object that initiated this event (usually a
DefaultTreeSelectionModel).path_
- - the path that has changed in the selection.isNew_
- - whether or not the path is new to the selection;
false means path was removed from the selection.oldLeadSelectionPath_
- - not used.newLeadSelectionPath_
- - not used.
getPath
public TreePath getPath()
Returns the path that has been added to or removed from the selection.
isAddedPath
public boolean isAddedPath()
Returns true if the path element has been added to the
selection. A return value of false means the path has been
removed from the selection.