Packagetwaver.controls
Classpublic class Tree
InheritanceTree Inheritance mx.controls.Tree

TWaver Flex tree component is one of TWaver Flex graphical components that works with data box and TWaver Flex MVC framework. This tree extends from mx.controls.Tree and provides more features like visible filter, sorting etc.

Here is an example of using Table:

	 var box:DataBox = new DataBox();
	 var tree:Tree = new Tree(box);	
	 

Default MXML PropertydataProvider



Public Properties
 PropertyDefined By
  alarmFillColorFunction : Function
Get alarm fill color generator of this tree.
Tree
  branchFunction : Function
The function used to determine whether a tree node is a branch.
Tree
  checkableFunction : Function
Tree
  checkBoxBackgroundAlpha : Number
Tree
  checkBoxBackgroundColor : Number
Tree
  checkMode : String
Tree
  compareFunction : Function
Comparator of this view to compare the data order of this view.
Tree
  dataBox : DataBox
Get data box container from this view.
Tree
  iconFunction : Function
[override]
Tree
  iconsColorsFunction : Function
Get tree node icon rendering color generator.
Tree
  iconsComponentsFunction : Function
Get customized icons components generator.
Tree
  iconsNamesFunction : Function
Get tree node icons generator.
Tree
  innerColorFunction : Function
Get tree node inner color generator.
Tree
  isEnableTristateCheckBox : Boolean
Tree
  labelFunction : Function
[override]
Tree
  makeVisibleOnSelected : Boolean
Get the value that whether data should be scrolled to visible when it is selected.
Tree
  messageFillColorFunction : Function
Get the message fill color generator.
Tree
  messageFunction : Function
Get the message generator.
Tree
  messageWidthFunction : Function
Get tree node message width generator.
Tree
  outerColorFunction : Function
Get tree node outer color generator.
Tree
  rootData : IData
Get tree root data.
Tree
  rootTreeData : TreeData
[read-only] Get tree data of the root node.
Tree
  selectedIndices : Array
[override] [write-only]
Tree
  selectedItem : Object
[override] [write-only]
Tree
  selectionModel : SelectionModel
[read-only] Get the selection model of this view.
Tree
  shareSelectionModel : Boolean
Whether share selection model container of this view with other views connecting to the same data box.
Tree
  toolTipFunction : Function
Get tree node tooltip generator.
Tree
  uncheckableStyle : String
Tree
  visibleFunction : Function
Get the visible filter function for this view.
Tree
Public Methods
 MethodDefined By
  
Tree(dataBox:DataBox = null)
Constructor.
Tree
  
addInteractionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Tree
  
addPropertyChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add a property change listener into this view.
Tree
  
addSelectionChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add data selection change listener into this view.
Tree
  
callLater2(method:Function, args:Array = null):void
TWaver call later function.
Tree
  
collapse(data:IData, animate:Boolean = false):void
Close specified tree node.
Tree
  
collapseAll(data:IData = null):void
Closde all tree nodes from the specified tree branch location.
Tree
  
dispatchPropertyChangeEvent2(property:String, oldValue:Object, newValue:Object):Boolean
Dispatch a property change event to all property change listeners.
Tree
  
expandAll(data:IData = null):void
Expand all tree nodes from the specified tree branch location.
Tree
  
expandData(data:IData, animate:Boolean = false):void
Expand specified tree node.
Tree
  
forEachTreeData(callbackFunction:Function, treeData:TreeData = null):void
Iterate tree node by specified iterator function.
Tree
  
getAlarmFillColor(treeData:TreeData):Object
Get alarm fill coor of this tree node.
Tree
  
getCompareFunction(parent:IData):Function
Get the comparator function of this tree.
Tree
  
Get the index value of specified data object.
Tree
  
getIcon(treeData:TreeData):String
Get icon of this tree node.
Tree
  
getIconsColors(treeData:TreeData):Array
Get rendering colors for all icons display on the specified tree node.
Tree
  
Get all customized icons components for specified tree node.
Tree
  
getIconsNames(treeData:TreeData):Array
Get all displayed icon names for specified tree node.
Tree
  
getInnerColor(treeData:TreeData):Object
Get inner color of this tree node.
Tree
  
getLabel(treeData:TreeData):String
Get label value for this tree node.
Tree
  
getMessage(treeData:TreeData):String
Get message content of this tree node.
Tree
  
getMessageFillColor(treeData:TreeData):Object
Get message fill color of this tree node.
Tree
  
getMessageWidth(treeData:TreeData):Object
Get message width of this tree node.
Tree
  
getOuterColor(treeData:TreeData):Object
Get outer line stroke color of this tree node.
Tree
  
getToolTip(treeData:TreeData):String
Get tooltip text for specified tree node.
Tree
  
Get tree data for specified tree node.
Tree
  
getTreeDataByContextMenuEvent(event:ContextMenuEvent):TreeData
Get tree data by ContextMenuEvent.
Tree
  
Get tree data at specified tree index.
Tree
  
Get tree data under the mouse.
Tree
  
getTristate(data:IData):String
Get tristate state for the given data.
Tree
  
invalidateTreeData(treeData:TreeData = null):void
Tree
  
isBranch(treeData:TreeData):Boolean
Check whether this tree node is a branch that displayed as a folder and can be opened.
Tree
  
isCheckable(data:IData):Boolean
Tree
  
isDataOpen(data:IData):Boolean
Check whether a tree node is opened now.
Tree
  
isDataVisible(data:IData):Boolean
Check whether specified tree node is visible now.
Tree
  
isOpen(data:IData):Boolean
Check whether specified tree node is opened.
Tree
  
isTreeDataVisible(treeData:TreeData):Boolean
Whether specified tree data is visible now.
Tree
  
isVisible(data:IData):Boolean
Check whether the given data should be visible on this view.
Tree
  
itemToDataTip(data:Object):String
[override]
Tree
  
itemToIcon(item:Object):Class
[override]
Tree
  
itemToLabel(data:Object):String
[override]
Tree
  
Call this to make all selected tree node are scrolled to visible.
Tree
  
makeVisible(data:IData):void
Call this to make the specified tree node scroll-to-visible.
Tree
  
Move all selected data to lower index.
Tree
  
Move all selected data to bottom index.
Tree
  
Move all selected data to top index.
Tree
  
Move all selected data to upper index.
Tree
  
removeInteractionListener(listener:Function):void
Tree
  
removePropertyChangeListener(listener:Function):void
Remove specified property change listener from this view.
Tree
  
Remove all selected data from view connected data box.
Tree
  
removeSelectionChangeListener(listener:Function):void
Remove data selection change listener from this view.
Tree
  
scrollToData(data:IData):void
Scroll to the specified tree node.
Tree
  
Select all visible data of this view.
Tree
  
updateCompareAndVisibility(treeData:TreeData = null):void
Update tree view according to the sorting comparator and visible filter so the tree will be sorted and filtered at once.
Tree
Protected Methods
 MethodDefined By
  
[override]
Tree
  
Called when data box is changed.
Tree
  
handleDataBoxPropertyChange(e:PropertyChangeEvent):void
Called when data box property changed.
Tree
  
handleDataPropertyChange(e:PropertyChangeEvent):void
Called when any data property changed.
Tree
  
Called when tree hierarchy is changed.
Tree
  
onPropertyChanged(property:String, oldValue:Object, newValue:Object):void
Called on property change.
Tree
  
Tree
  
onTreeDataClicked(e:ListEvent):void
Tree
  
onTreeDataCollapsed(e:TreeEvent):void
Tree
  
onTreeDataDoubleClicked(e:ListEvent):void
Tree
  
onTreeDataExpanded(e:TreeEvent):void
Tree
Public Constants
 ConstantDefined By
  CHECK_CHILDREN : String = checkChildren
[static]
Tree
  CHECK_DEFAULT : String = checkDefault
[static]
Tree
  CHECK_DESCENDANT : String = checkDescendant
[static]
Tree
  CHECK_DESCENDANT_ANCESTOR : String = checkDescendantAncestor
[static]
Tree
  UNCHECKABLE_STYLE_DISABLE : String = uncheckableStyleDisable
[static]
Tree
  UNCHECKABLE_STYLE_NONE : String = uncheckableStyleNone
[static]
Tree
Property Detail
alarmFillColorFunctionproperty
alarmFillColorFunction:Function

Get alarm fill color generator of this tree. This generator returns the alarm fill color of this tree. Default generator returns the highest alarm severity's color.


Implementation
    public function get alarmFillColorFunction():Function
    public function set alarmFillColorFunction(value:Function):void
branchFunctionproperty 
branchFunction:Function

The function used to determine whether a tree node is a branch. A branch refer to the tree nodes can be opened and closed. Normally a branch tree node is a tree node has one or more children nodes.


Implementation
    public function get branchFunction():Function
    public function set branchFunction(value:Function):void
checkableFunctionproperty 
checkableFunction:Function


Implementation
    public function get checkableFunction():Function
    public function set checkableFunction(value:Function):void
checkBoxBackgroundAlphaproperty 
checkBoxBackgroundAlpha:Number


Implementation
    public function get checkBoxBackgroundAlpha():Number
    public function set checkBoxBackgroundAlpha(value:Number):void
checkBoxBackgroundColorproperty 
checkBoxBackgroundColor:Number


Implementation
    public function get checkBoxBackgroundColor():Number
    public function set checkBoxBackgroundColor(value:Number):void
checkModeproperty 
checkMode:String


Implementation
    public function get checkMode():String
    public function set checkMode(value:String):void
compareFunctionproperty 
compareFunction:Function

Comparator of this view to compare the data order of this view.


Implementation
    public function get compareFunction():Function
    public function set compareFunction(value:Function):void
dataBoxproperty 
dataBox:DataBox

Get data box container from this view.


Implementation
    public function get dataBox():DataBox
    public function set dataBox(value:DataBox):void
iconFunctionproperty 
iconFunction:Function[override]


Implementation
    public function get iconFunction():Function
    public function set iconFunction(value:Function):void
iconsColorsFunctionproperty 
iconsColorsFunction:Function

Get tree node icon rendering color generator. This generator returns rendering color for each icon that displays on each tree node.


Implementation
    public function get iconsColorsFunction():Function
    public function set iconsColorsFunction(value:Function):void
iconsComponentsFunctionproperty 
iconsComponentsFunction:Function

Get customized icons components generator. This generator returns all icon names that will be displayed on each tree node, Array of UIComponent.


Implementation
    public function get iconsComponentsFunction():Function
    public function set iconsComponentsFunction(value:Function):void
iconsNamesFunctionproperty 
iconsNamesFunction:Function

Get tree node icons generator. This generator returns all icon names that will be displayed on each tree node.


Implementation
    public function get iconsNamesFunction():Function
    public function set iconsNamesFunction(value:Function):void
innerColorFunctionproperty 
innerColorFunction:Function

Get tree node inner color generator. This generator returns inner color for each tree node.


Implementation
    public function get innerColorFunction():Function
    public function set innerColorFunction(value:Function):void
isEnableTristateCheckBoxproperty 
isEnableTristateCheckBox:Boolean


Implementation
    public function get isEnableTristateCheckBox():Boolean
    public function set isEnableTristateCheckBox(value:Boolean):void
labelFunctionproperty 
labelFunction:Function[override]


Implementation
    public function get labelFunction():Function
    public function set labelFunction(value:Function):void
makeVisibleOnSelectedproperty 
makeVisibleOnSelected:Boolean

Get the value that whether data should be scrolled to visible when it is selected.


Implementation
    public function get makeVisibleOnSelected():Boolean
    public function set makeVisibleOnSelected(value:Boolean):void
messageFillColorFunctionproperty 
messageFillColorFunction:Function

Get the message fill color generator. This generator returns message fill color for each tree node message.


Implementation
    public function get messageFillColorFunction():Function
    public function set messageFillColorFunction(value:Function):void
messageFunctionproperty 
messageFunction:Function

Get the message generator. This generator returns message contents for each tree node.


Implementation
    public function get messageFunction():Function
    public function set messageFunction(value:Function):void
messageWidthFunctionproperty 
messageWidthFunction:Function

Get tree node message width generator. This generator returns width value of message bounds for each tree node.


Implementation
    public function get messageWidthFunction():Function
    public function set messageWidthFunction(value:Function):void
outerColorFunctionproperty 
outerColorFunction:Function

Get tree node outer color generator. This generator returns outer line color for each tree node. Default implementation will return the propagated alarm severity's color.


Implementation
    public function get outerColorFunction():Function
    public function set outerColorFunction(value:Function):void
rootDataproperty 
rootData:IData

Get tree root data.


Implementation
    public function get rootData():IData
    public function set rootData(value:IData):void
rootTreeDataproperty 
rootTreeData:TreeData  [read-only]

Get tree data of the root node.


Implementation
    public function get rootTreeData():TreeData
selectedIndicesproperty 
selectedIndices:Array  [write-only] [override]


Implementation
    public function set selectedIndices(value:Array):void
selectedItemproperty 
selectedItem:Object  [write-only] [override]


Implementation
    public function set selectedItem(value:Object):void
selectionModelproperty 
selectionModel:SelectionModel  [read-only]

Get the selection model of this view.


Implementation
    public function get selectionModel():SelectionModel

See also

shareSelectionModelproperty 
shareSelectionModel:Boolean

Whether share selection model container of this view with other views connecting to the same data box. If share, then this view will not maintain an own selection model container, instead, using the data box's selection model. If not, then this view will maintain an own selection model container, then every view has own selection model even they connecting a same data box.


Implementation
    public function get shareSelectionModel():Boolean
    public function set shareSelectionModel(value:Boolean):void
toolTipFunctionproperty 
toolTipFunction:Function

Get tree node tooltip generator. This generator returns tooltip text value for each tree node.


Implementation
    public function get toolTipFunction():Function
    public function set toolTipFunction(value:Function):void
uncheckableStyleproperty 
uncheckableStyle:String


Implementation
    public function get uncheckableStyle():String
    public function set uncheckableStyle(value:String):void
visibleFunctionproperty 
visibleFunction:Function

Get the visible filter function for this view. This will used to determine whether a data should be visible on this view.


Implementation
    public function get visibleFunction():Function
    public function set visibleFunction(value:Function):void
Constructor Detail
Tree()Constructor
public function Tree(dataBox:DataBox = null)

Constructor. Create a tree and connect to the specified data box.

Parameters
dataBox:DataBox (default = null) — the data box providing data for this tree.
Method Detail
addInteractionListener()method
public function addInteractionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void

Parameters

listener:Function
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)

addPropertyChangeListener()method 
public function addPropertyChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void

Add a property change listener into this view. It will be notified when property changed.

Parameters

listener:Function — the listener to be installed.
 
priority:int (default = 0) — the listening priority
 
useWeakReference:Boolean (default = false) — whether use weak feference

addSelectionChangeListener()method 
public function addSelectionChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void

Add data selection change listener into this view. The listener will be notified when the selection of any data is changed.

Parameters

listener:Function — the listener to be added.
 
priority:int (default = 0) — the listening priority
 
useWeakReference:Boolean (default = false) — whether use weak reference

callLater2()method 
public function callLater2(method:Function, args:Array = null):void

TWaver call later function. Wait in queue and call the specified function later with specified arguments.

Parameters

method:Function — the method will be called later.
 
args:Array (default = null) — the arguments that will be used when method is called.

collapse()method 
public function collapse(data:IData, animate:Boolean = false):void

Close specified tree node.

Parameters

data:IData — the tree node to be closed.
 
animate:Boolean (default = false) — true if close in animated effect, false otherwise.

collapseAll()method 
public function collapseAll(data:IData = null):void

Closde all tree nodes from the specified tree branch location. All children tree nodes will be closed. If null specified, then it will close tree node from root node.

Parameters

data:IData (default = null) — the tree branch to be closed from.

commitProperties()method 
override protected function commitProperties():void

dispatchPropertyChangeEvent2()method 
public function dispatchPropertyChangeEvent2(property:String, oldValue:Object, newValue:Object):Boolean

Dispatch a property change event to all property change listeners. The "2" in the end of this method name is to avoid override the default same method defined in Flex 3.

Parameters

property:String — the property name to be dispatched.
 
oldValue:Object — old value before the change
 
newValue:Object — new value after the change

Returns
Boolean — true if dispatched successfully, false otherwise.
expandAll()method 
public function expandAll(data:IData = null):void

Expand all tree nodes from the specified tree branch location. All children tree nodes will be opened. If null specified, then it will expand from tree root node.

Parameters

data:IData (default = null) — the tree branch to be expanded from.

expandData()method 
public function expandData(data:IData, animate:Boolean = false):void

Expand specified tree node.

Parameters

data:IData — the tree node to be expanded.
 
animate:Boolean (default = false) — true if expand in animated effect, false otherwise.

forEachTreeData()method 
public function forEachTreeData(callbackFunction:Function, treeData:TreeData = null):void

Iterate tree node by specified iterator function.

Parameters

callbackFunction:Function — the iterator function
 
treeData:TreeData (default = null) — the tree node that the iteration start from.


Example
following codes show you how to iterate a tree:
		 tree.forEachTreeData(function(treeData:TreeData):void{
		 	var data:IData = treeData.data;
		 	if(data == null){
		 		trace("root");
		 	}else{
		 		trace(data);
		 	}
		 });
		 
getAlarmFillColor()method 
public function getAlarmFillColor(treeData:TreeData):Object

Get alarm fill coor of this tree node.

Parameters

treeData:TreeData — a tree node.

Returns
Object — the alarm fill color of this tree node.
getCompareFunction()method 
public function getCompareFunction(parent:IData):Function

Get the comparator function of this tree. This used to compare tree node order and sort the tree.

Parameters

parent:IData — the comparator located.

Returns
Function — the comparator of the specified tree node.
getDataIndex()method 
public function getDataIndex(data:IData):int

Get the index value of specified data object.

Parameters

data:IData — a tree node

Returns
int — the index of the tree node.
getIcon()method 
public function getIcon(treeData:TreeData):String

Get icon of this tree node.

Parameters

treeData:TreeData — a tree node

Returns
String — icon of this tree node.
getIconsColors()method 
public function getIconsColors(treeData:TreeData):Array

Get rendering colors for all icons display on the specified tree node.

Parameters

treeData:TreeData — the tree node to be checked.

Returns
Array — array contains all rendering colors for the icons that display on this tree node.
getIconsComponents()method 
public function getIconsComponents(treeData:TreeData):Array

Get all customized icons components for specified tree node.

Parameters

treeData:TreeData — the tree node need to check.

Returns
Array — all customized icons components display on this tree node, Array of UIComponent.
getIconsNames()method 
public function getIconsNames(treeData:TreeData):Array

Get all displayed icon names for specified tree node.

Parameters

treeData:TreeData — the tree node need to check.

Returns
Array — all icon names displays on this tree node.
getInnerColor()method 
public function getInnerColor(treeData:TreeData):Object

Get inner color of this tree node.

Parameters

treeData:TreeData — a tree node

Returns
Object — inner color of this tree node.
getLabel()method 
public function getLabel(treeData:TreeData):String

Get label value for this tree node.

Parameters

treeData:TreeData — a tree node

Returns
String — label value of this tree node.
getMessage()method 
public function getMessage(treeData:TreeData):String

Get message content of this tree node.

Parameters

treeData:TreeData — a tree node

Returns
String — the message content of this tree node.
getMessageFillColor()method 
public function getMessageFillColor(treeData:TreeData):Object

Get message fill color of this tree node.

Parameters

treeData:TreeData — a tree node

Returns
Object — fill color of the message of this this tree node.
getMessageWidth()method 
public function getMessageWidth(treeData:TreeData):Object

Get message width of this tree node.

Parameters

treeData:TreeData — a tree node.

Returns
Object — width value of this tree node.
getOuterColor()method 
public function getOuterColor(treeData:TreeData):Object

Get outer line stroke color of this tree node.

Parameters

treeData:TreeData — a tree node

Returns
Object — the outer color of this tree node
getToolTip()method 
public function getToolTip(treeData:TreeData):String

Get tooltip text for specified tree node.

Parameters

treeData:TreeData — a tree node

Returns
String — tooltip text of this tree node.
getTreeData()method 
public function getTreeData(data:IData):TreeData

Get tree data for specified tree node.

Parameters

data:IData — the data of this tree node.

Returns
TreeData — the tree data of this tree node.
getTreeDataByContextMenuEvent()method 
public function getTreeDataByContextMenuEvent(event:ContextMenuEvent):TreeData

Get tree data by ContextMenuEvent.

Parameters

event:ContextMenuEvent — A ContextMenuEvent.

Returns
TreeData — the tree data under the mouse.
getTreeDataByIndex()method 
public function getTreeDataByIndex(index:int):TreeData

Get tree data at specified tree index.

Parameters

index:int — the index of this tree.

Returns
TreeData — the tree data of the specified index location.
getTreeDataByMouseEvent()method 
public function getTreeDataByMouseEvent(event:MouseEvent):TreeData

Get tree data under the mouse.

Parameters

event:MouseEvent — A MouseEvent that contains the position of the mouse and the object it is over.

Returns
TreeData — the tree data under the mouse.
getTristate()method 
public function getTristate(data:IData):String

Get tristate state for the given data. The legal values are:

Parameters

data:IData — the data to be check

Returns
String — tristate state.
handleDataBoxChange()method 
protected function handleDataBoxChange(e:DataBoxChangeEvent):void

Called when data box is changed.

Parameters

e:DataBoxChangeEvent — the data box change event.

handleDataBoxPropertyChange()method 
protected function handleDataBoxPropertyChange(e:PropertyChangeEvent):void

Called when data box property changed.

Parameters

e:PropertyChangeEvent — data box property changed.

handleDataPropertyChange()method 
protected function handleDataPropertyChange(e:PropertyChangeEvent):void

Called when any data property changed.

Parameters

e:PropertyChangeEvent — the property change event.

handleHierarchyChange()method 
protected function handleHierarchyChange(e:HierarchyChangeEvent):void

Called when tree hierarchy is changed.

Parameters

e:HierarchyChangeEvent — the hierarchy changed event.

invalidateTreeData()method 
public function invalidateTreeData(treeData:TreeData = null):void

Parameters

treeData:TreeData (default = null)

isBranch()method 
public function isBranch(treeData:TreeData):Boolean

Check whether this tree node is a branch that displayed as a folder and can be opened.

Parameters

treeData:TreeData — a tree node.

Returns
Boolean — true if this node is a branch, false otherwise.
isCheckable()method 
public function isCheckable(data:IData):Boolean

Parameters

data:IData

Returns
Boolean
isDataOpen()method 
public function isDataOpen(data:IData):Boolean

Check whether a tree node is opened now.

Parameters

data:IData — a tree node.

Returns
Boolean — true if this tree node is opened now, false otherwise.
isDataVisible()method 
public function isDataVisible(data:IData):Boolean

Check whether specified tree node is visible now.

Parameters

data:IData — a tree node to be checked.

Returns
Boolean — true if this tree node is visible, false otherwise.
isOpen()method 
public function isOpen(data:IData):Boolean

Check whether specified tree node is opened.

Parameters

data:IData — the tree node related TWaver data.

Returns
Boolean — true if opened, false otherwise.
isTreeDataVisible()method 
public function isTreeDataVisible(treeData:TreeData):Boolean

Whether specified tree data is visible now.

Parameters

treeData:TreeData — the tree data of a tree node.

Returns
Boolean — true if this tree node is visible, false otherwise.
isVisible()method 
public function isVisible(data:IData):Boolean

Check whether the given data should be visible on this view.

Parameters

data:IData — the data to be checked.

Returns
Boolean — true if specified data is visible, false otherwise.
itemToDataTip()method 
override public function itemToDataTip(data:Object):String

Parameters

data:Object

Returns
String
itemToIcon()method 
override public function itemToIcon(item:Object):Class

Parameters

item:Object

Returns
Class
itemToLabel()method 
override public function itemToLabel(data:Object):String

Parameters

data:Object

Returns
String
makeSelectionVisible()method 
public function makeSelectionVisible():void

Call this to make all selected tree node are scrolled to visible.

makeVisible()method 
public function makeVisible(data:IData):void

Call this to make the specified tree node scroll-to-visible.

Parameters

data:IData — the tree node need to make visible.

moveSelectionDown()method 
public function moveSelectionDown():void

Move all selected data to lower index.

moveSelectionToBottom()method 
public function moveSelectionToBottom():void

Move all selected data to bottom index.

moveSelectionToTop()method 
public function moveSelectionToTop():void

Move all selected data to top index.

moveSelectionUp()method 
public function moveSelectionUp():void

Move all selected data to upper index.

onPropertyChanged()method 
protected function onPropertyChanged(property:String, oldValue:Object, newValue:Object):void

Called on property change.

Parameters

property:String — the property name which is changed.
 
oldValue:Object — old value before change
 
newValue:Object — new value after change.

onSelectionChanged()method 
protected function onSelectionChanged(e:SelectionChangeEvent):void

Parameters

e:SelectionChangeEvent

onTreeDataClicked()method 
protected function onTreeDataClicked(e:ListEvent):void

Parameters

e:ListEvent

onTreeDataCollapsed()method 
protected function onTreeDataCollapsed(e:TreeEvent):void

Parameters

e:TreeEvent

onTreeDataDoubleClicked()method 
protected function onTreeDataDoubleClicked(e:ListEvent):void

Parameters

e:ListEvent

onTreeDataExpanded()method 
protected function onTreeDataExpanded(e:TreeEvent):void

Parameters

e:TreeEvent

removeInteractionListener()method 
public function removeInteractionListener(listener:Function):void

Parameters

listener:Function

removePropertyChangeListener()method 
public function removePropertyChangeListener(listener:Function):void

Remove specified property change listener from this view.

Parameters

listener:Function — the listener to be removed.

removeSelection()method 
public function removeSelection():ICollection

Remove all selected data from view connected data box.

Returns
ICollection — the all removed data as a collection.
removeSelectionChangeListener()method 
public function removeSelectionChangeListener(listener:Function):void

Remove data selection change listener from this view.

Parameters

listener:Function — the selection change listener to be removed.

scrollToData()method 
public function scrollToData(data:IData):void

Scroll to the specified tree node.

Parameters

data:IData — the tree node to be scrolled to.

selectAll()method 
public function selectAll():ICollection

Select all visible data of this view.

Returns
ICollection — a collection contains all selected data.
updateCompareAndVisibility()method 
public function updateCompareAndVisibility(treeData:TreeData = null):void

Update tree view according to the sorting comparator and visible filter so the tree will be sorted and filtered at once.

Parameters

treeData:TreeData (default = null) — the tree node where update start from.

Constant Detail
CHECK_CHILDRENConstant
public static const CHECK_CHILDREN:String = checkChildren

CHECK_DEFAULTConstant 
public static const CHECK_DEFAULT:String = checkDefault

CHECK_DESCENDANTConstant 
public static const CHECK_DESCENDANT:String = checkDescendant

CHECK_DESCENDANT_ANCESTORConstant 
public static const CHECK_DESCENDANT_ANCESTOR:String = checkDescendantAncestor

UNCHECKABLE_STYLE_DISABLEConstant 
public static const UNCHECKABLE_STYLE_DISABLE:String = uncheckableStyleDisable

UNCHECKABLE_STYLE_NONEConstant 
public static const UNCHECKABLE_STYLE_NONE:String = uncheckableStyleNone