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 java..
TreeSelectionListener, javax.swing.tree.TreeSelectionModel
| Modifier and Type | Field and Description |
|---|---|
| protected boolean[] | areNew
For each path identifies if that path is in fact new. |
| protected TreePath | newLeadSelectionPath
leadSelectionPath after the paths changed, may be null. |
| protected TreePath | oldLeadSelectionPath
leadSelectionPath before the paths changed, may be null. |
| protected TreePath[] | paths
Paths this event represents. |
| Access | Constructor and Description |
|---|---|
| public | TreeSelectionEvent(Object
source of event source, TreePath[] the paths that have changed in the selection paths, boolean[] a areNew, TreePath boolean array indicating whether the paths in
paths are new to the selectionthe previous lead selection path oldLeadSelectionPath, TreePath the new lead selection path newLeadSelectionPath)Represents a change in the selection of a |
| public | TreeSelectionEvent(Object
source of event source, TreePath the path that has changed in the selection path, boolean whether or not the path is new to the selection, false
means path was removed from the selection. isNew, TreePath the previous lead selection path oldLeadSelectionPath, TreePath the new lead selection path newLeadSelectionPath)Represents a change in the selection of a |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: anObject which is a copy of this event with the source
being the newSource providedsource of event newSource)Returns a copy of the receiver, but with the source being newSource. |
| public TreePath | Returns: aTreePath containing the new lead selection pathReturns the current lead path. |
| public TreePath | Returns: aTreePath containing the old lead selection pathReturns the path that was previously the lead path. |
| public TreePath | Returns: the firstTreePath element represented by this eventReturns the first path element. |
| public TreePath[] | Returns: copy of the array ofTreePath objects for this event.Returns the paths that have been added or removed from the selection. |
| public boolean | Returns: true if getPath was added to the selection,
false otherwiseReturns whether the path identified by |
| public boolean | Returns: true if path was added to the selection,
false otherwisethe path to test path)Returns whether the specified path was added to the selection. |
| public boolean | Returns: true if the path was added to the selection,
false otherwisethe index of the path to test index)Returns whether the path at |
| areNew | back to summary |
|---|---|
| protected boolean[] areNew For each path identifies if that path is in fact new. | |
| newLeadSelectionPath | back to summary |
|---|---|
| protected TreePath newLeadSelectionPath leadSelectionPath after the paths changed, may be null. | |
| oldLeadSelectionPath | back to summary |
|---|---|
| protected TreePath oldLeadSelectionPath leadSelectionPath before the paths changed, may be null. | |
| paths | back to summary |
|---|---|
| protected TreePath[] paths Paths this event represents. | |
| TreeSelectionEvent | back to summary |
|---|---|
| public TreeSelectionEvent(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath) Represents a change in the selection of a
| |
| TreeSelectionEvent | back to summary |
|---|---|
| public TreeSelectionEvent(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath) Represents a change in the selection of a
| |
| cloneWithSource | back to summary |
|---|---|
| public Object cloneWithSource(Object newSource) Returns a copy of the receiver, but with the source being newSource. | |
| getNewLeadSelectionPath | back to summary |
|---|---|
| public TreePath getNewLeadSelectionPath() Returns the current lead path.
| |
| getOldLeadSelectionPath | back to summary |
|---|---|
| public TreePath getOldLeadSelectionPath() Returns the path that was previously the lead path.
| |
| getPath | back to summary |
|---|---|
| public TreePath getPath() Returns the first path element.
| |
| getPaths | back to summary |
|---|---|
| public TreePath[] getPaths() Returns the paths that have been added or removed from the selection.
| |
| isAddedPath | back to summary |
|---|---|
| public boolean isAddedPath() Returns whether the path identified by
| |
| isAddedPath | back to summary |
|---|---|
| public boolean isAddedPath(TreePath path) Returns whether the specified path was added to the selection.
A return value of
| |
| isAddedPath | back to summary |
|---|---|
| public boolean isAddedPath(int index) Returns whether the path at
| |