class org.aswing.event.TreeSelectionEvent extends InteractiveEvent
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.
@author paling
Class Fields
static var TREE_SELECTION_CHANGED:String
The TreeSelectionEvent.TREESELECTIONCHANGED
constant defines the value of the
type
property of the event object for a treeSelectionChanged
event.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
isProgrammatic() | True means this event is fired by
|
getPaths() | changed paths. |
getPath() | first path. |
isAddedPath() | is the first path element has been added to the selection. |
isAddedPathOfPath() | is path is added. |
isAddedPathOfIndex() | is path specified by index is added. |
getOldLeadSelectionPath() | previously the lead path. |
getNewLeadSelectionPath() | current lead path. |
cloneWithSource() | clone with source. |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget . |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
@eventType treeSelectionChanged
Instance Fields
![]() | Show inherited public instance fields | Hide inherited public instance fields
|
function new(source:Dynamic, programmatic:Bool, paths:Array<Dynamic>, areNew:Array<Dynamic>, oldLeadSelectionPath:TreePath, newLeadSelectionPath:TreePath): Void
Represents a change in the selection of a TreeSelectionModel. paths identifies the paths that have been either added or removed from the selection.
source | source of event |
paths | the paths that have changed in the selection |
function cloneWithSource(newSource:Dynamic): TreeSelectionEvent
Returns a copy of the receiver, but with the source being newSource.
function getPaths(): Array<Dynamic>
Returns the paths(TreePath[]) that have been added or removed from the selection.
function isAddedPath(): Bool
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. @see #isAddedPathOfPath() @see #isAddedPathOfIndex()
function isAddedPathOfIndex(index:Int): Bool
Returns true if the path identified by index
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
index < 0 || >= getPaths
.length.
function isAddedPathOfPath(path:TreePath): Bool
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.