Packagenl.flexperiments.tree
Classpublic class Node
InheritanceNode Inheritance mx.containers.VBox

The Node class is the base class for each node. Basically it consists of 2 Boxes, The first one is the titleBox, which holds the itemrenderer, the second one is the childrenBox, which holds all the children. The Node class handles drag-drop events, the opening and closing of nodes.

See also

nl.flexperiments.tree.FlpTree


Public Properties
 PropertyDefined by
  data : Object
[write-only]
Node
  enabled : Boolean
Node
  filterFunction : Function
Node
  level : int
Node
  open : Boolean
Node
  parentNode : Node
[read-only] [read-only] Gets the parent of the node
Node
  selected : Boolean
Node
  tree : FlpTree
Node
Public Methods
 MethodDefined by
  
Node(parent:Node = null, tree:FlpTree = null, level:int = -1)
The constructor method.
Node
  
getChildNodes():Array
Returns the children as node (this is not the same as accessing the children property of the data object);
Node
  
refreshTree():void
Node
Protected Methods
 MethodDefined by
  
__dragBoxEnterHandler(event:DragEvent):void
Gets called when dragging over the childrenBox
Node
  
__dragEnterHandler(event:DragEvent):void
This method is called when the user drags a node over (the renderer of) this node
Node
  
Node
  
dispose():void
Node
Events
 EventSummaryDefined by
   Dispatched when a node is refreshed, usually when a child is added or removed Listen to this event to determine whether you should display the 'open/close' folder icon Node
Property detail
dataproperty
data:Object  [write-only]Implementation
    public function set data(value:Object):void
enabledproperty 
enabled:Boolean  [read-write]Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
filterFunctionproperty 
filterFunction:Function  [read-write]Implementation
    public function get filterFunction():Function
    public function set filterFunction(value:Function):void
levelproperty 
level:int  [read-write]Implementation
    public function get level():int
    public function set level(value:int):void
openproperty 
open:Boolean  [read-write]Implementation
    public function get open():Boolean
    public function set open(value:Boolean):void
parentNodeproperty 
parentNode:Node  [read-only]

[read-only] Gets the parent of the node

Implementation
    public function get parentNode():Node
selectedproperty 
selected:Boolean  [read-write]Implementation
    public function get selected():Boolean
    public function set selected(value:Boolean):void
treeproperty 
tree:FlpTree  [read-write]Implementation
    public function get tree():FlpTree
    public function set tree(value:FlpTree):void
Constructor detail
Node()constructor
public function Node(parent:Node = null, tree:FlpTree = null, level:int = -1)

The constructor method.

Parameters
parent:Node (default = null) — Specifies the parent node, null if it's the root node which is added internally
 
tree:FlpTree (default = null) — An instance of the tree
 
level:int (default = -1)
Method detail
__dragBoxEnterHandler()method
protected function __dragBoxEnterHandler(event:DragEvent):void

Gets called when dragging over the childrenBox

Parameters
event:DragEvent
__dragEnterHandler()method 
protected function __dragEnterHandler(event:DragEvent):void

This method is called when the user drags a node over (the renderer of) this node

Parameters
event:DragEvent
createChildren()method 
protected override function createChildren():void
dispose()method 
protected function dispose():void
getChildNodes()method 
public function getChildNodes():Array

Returns the children as node (this is not the same as accessing the children property of the data object);

Returns
Array
refreshTree()method 
public function refreshTree():void
Event detail
nodeRefreshedevent 
Event object type: flash.events.Event

Dispatched when a node is refreshed, usually when a child is added or removed Listen to this event to determine whether you should display the 'open/close' folder icon