All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.event.TreeSelectionEvent
java.lang.Object
|
+----java.util.EventObject
|
+----com.sun.java.swing.event.TreeSelectionEvent
- public class TreeSelectionEvent
- extends EventObject
- implements Cloneable
An event that characterizes a change in the current
selection. The change is based on any number of paths.
TreeSelectionListeners will generally query the source of
the event for the new selected status of each potentially
changed row.
- See Also:
- TreeSelectionModel
-
areNew
- For each path identifies if that is path is in fact new.
-
paths
- Paths this event represents.
-
TreeSelectionEvent(Object, TreePath, boolean)
- Represents a change in the selection of a TreeSelectionModel.
-
TreeSelectionEvent(Object, TreePath[], boolean[])
- Represents a change in the selection of a TreeSelectionModel.
-
cloneWithSource(Object)
- Returns a copy of the receiver, but with the source being newSource.
-
getPath()
- Returns the first path element.
-
getPaths()
- Returns the paths that have been added or removed from the
selection.
-
isAddedPath()
- Returns true if the first path element has been added to the
selection, a return value of false means the first path has been
removed from the selection.
-
isAddedPath(TreePath)
- Returns true if the path identified by path was added to the
selection.
paths
protected TreePath paths[]
- Paths this event represents.
areNew
protected boolean areNew[]
- For each path identifies if that is path is in fact new.
TreeSelectionEvent
public TreeSelectionEvent(Object source,
TreePath paths[],
boolean areNew[])
- Represents a change in the selection of a TreeSelectionModel.
paths identifies the paths that have been either added or
removed from the selection.
- Parameters:
- source - source of event
- paths - the paths that have changed in the selection
TreeSelectionEvent
public TreeSelectionEvent(Object source,
TreePath path,
boolean isNew)
- Represents a change in the selection of a TreeSelectionModel.
path identifies the path that have been either added or
removed from the selection.
- Parameters:
- source - source of event
- 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.
getPaths
public TreePath[] getPaths()
- Returns the paths that have been added or removed from the
selection.
getPath
public TreePath getPath()
- Returns the first path element.
isAddedPath
public boolean isAddedPath()
- Returns true if the first path element has been added to the
selection, a return value of false means the first path has been
removed from the selection.
isAddedPath
public boolean isAddedPath(TreePath path)
- Returns true if the path identified by path was added to the
selection. A return value of false means the path was in the
selection but is no longer in the selection. This will raise if
path is not one of the paths identified by this event.
cloneWithSource
public Object cloneWithSource(Object newSource)
- Returns a copy of the receiver, but with the source being newSource.
All Packages Class Hierarchy This Package Previous Next Index