Packageorg.aswing.event
Classpublic class TreeSelectionEvent
InheritanceTreeSelectionEvent Inheritance InteractiveEvent Inheritance AWEvent Inheritance flash.events.Event

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.



Public Methods
 MethodDefined by
  
TreeSelectionEvent(source:Object, programmatic:Boolean, paths:Array, areNew:Array, oldLeadSelectionPath:TreePath, newLeadSelectionPath:TreePath)
Represents a change in the selection of a TreeSelectionModel.
TreeSelectionEvent
  
clone():Event
TreeSelectionEvent
  
Returns a copy of the receiver, but with the source being newSource.
TreeSelectionEvent
  
Returns the current lead path.
TreeSelectionEvent
  
Returns the path that was previously the lead path.
TreeSelectionEvent
  
Returns the first path element.
TreeSelectionEvent
  
getPaths():Array
Returns the paths(TreePath[]) that have been added or removed from the selection.
TreeSelectionEvent
  
Returns the source.
TreeSelectionEvent
  
isAddedPath():Boolean
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.
TreeSelectionEvent
  
isAddedPathOfIndex(index:Number):Boolean
Returns true if the path identified by index was added to the selection.
TreeSelectionEvent
  
Returns true if the path identified by path was added to the selection.
TreeSelectionEvent
 Inherited
isProgrammatic():Boolean
Returns the programmatic property.
InteractiveEvent
Public Constants
 ConstantDefined by
 InheritedACT : String = "act"
[static] The AWEvent.ACT constant defines the value of the type property of the event object for a act event.
AWEvent
 InheritedFOCUS_GAINED : String = "focusGained"
[static] The AWEvent.FOCUS_GAINED constant defines the value of the type property of the event object for a focusGained event.
AWEvent
 InheritedFOCUS_LOST : String = "focusLost"
[static] The AWEvent.FOCUS_LOST constant defines the value of the type property of the event object for a focusLost event.
AWEvent
 InheritedHIDDEN : String = "hidden"
[static] The AWEvent.HIDDEN constant defines the value of the type property of the event object for a hidden event.
AWEvent
 InheritedPAINT : String = "paint"
[static] The AWEvent.PAINT constant defines the value of the type property of the event object for a paint event.
AWEvent
 InheritedSCROLL_CHANGED : String = "scrollChanged"
[static] The InteractiveEvent.SCROLL_CHANGED constant defines the value of the type property of the event object for a scrollChanged event.
InteractiveEvent
 InheritedSELECTION_CHANGED : String = "selectionChanged"
[static] The InteractiveEvent.SELECTION_CHANGED constant defines the value of the type property of the event object for a selectionChanged event.
InteractiveEvent
 InheritedSHOWN : String = "shown"
[static] The AWEvent.SHOWN constant defines the value of the type property of the event object for a shown event.
AWEvent
 InheritedSTATE_CHANGED : String = "stateChanged"
[static] The InteractiveEvent.STATE_CHANGED constant defines the value of the type property of the event object for a stateChanged event.
InteractiveEvent
 InheritedTEXT_CHANGED : String = "textChanged"
[static] The InteractiveEvent.TEXT_CHANGED constant defines the value of the type property of the event object for a textChanged event.
InteractiveEvent
  TREE_SELECTION_CHANGED : String = "treeSelectionChanged"
[static] The TreeSelectionEvent.TREE_SELECTION_CHANGED constant defines the value of the type property of the event object for a treeSelectionChanged event.
TreeSelectionEvent
Constructor detail
TreeSelectionEvent()constructor
public function TreeSelectionEvent(source:Object, programmatic:Boolean, paths:Array, areNew:Array, oldLeadSelectionPath:TreePath, newLeadSelectionPath:TreePath)

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:Object — source of event
 
programmatic:Boolean — the paths that have changed in the selection
 
paths:Array
 
areNew:Array
 
oldLeadSelectionPath:TreePath
 
newLeadSelectionPath:TreePath
Method detail
clone()method
public override function clone():Event

Returns
Event
cloneWithSource()method 
public function cloneWithSource(newSource:Object):TreeSelectionEvent

Returns a copy of the receiver, but with the source being newSource.

Parameters
newSource:Object

Returns
TreeSelectionEvent
getNewLeadSelectionPath()method 
public function getNewLeadSelectionPath():TreePath

Returns the current lead path.

Returns
TreePath
getOldLeadSelectionPath()method 
public function getOldLeadSelectionPath():TreePath

Returns the path that was previously the lead path.

Returns
TreePath
getPath()method 
public function getPath():TreePath

Returns the first path element.

Returns
TreePath
getPaths()method 
public function getPaths():Array

Returns the paths(TreePath[]) that have been added or removed from the selection.

Returns
Array
getSource()method 
public function getSource():*

Returns the source.

Returns
*
isAddedPath()method 
public function isAddedPath():Boolean

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.

Returns
Boolean

See also

isAddedPathOfIndex()method 
public function isAddedPathOfIndex(index:Number):Boolean

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.

Parameters
index:Number

Returns
Boolean
isAddedPathOfPath()method 
public function isAddedPathOfPath(path:TreePath):Boolean

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.

Parameters
path:TreePath

Returns
Boolean
Constant detail
TREE_SELECTION_CHANGEDconstant
public static const TREE_SELECTION_CHANGED:String = "treeSelectionChanged"

The TreeSelectionEvent.TREE_SELECTION_CHANGED 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:

PropertyValue
bubblesfalse
cancelablefalse
isProgrammatic()True means this event is fired by the programmatic reason, false means user mouse/keyboard interaction reason.
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.
currentTargetThe 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.
targetThe 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.