| Package | away3d.graphs |
| Class | public class TreeIterator |
| Inheritance | TreeIterator flash.events.EventDispatcher |
| Implements | IIterator |
| Method | Defined By | ||
|---|---|---|---|
TreeIterator(rootNode:ITreeNode) | TreeIterator | ||
cancelAsyncTraversal():void | TreeIterator | ||
next():Object
Traverses through the tree externally and returns the first newly encountered node. | TreeIterator | ||
performMethod(method:Function):void
Traverses through the tree internally and applies the supplied function to each node
| TreeIterator | ||
performMethodAsync(method:Function, maxTimeOut:Number = 500):void
Traverses through the tree and applies the supplied function to each node in the tree asynchronously. | TreeIterator | ||
reset():Object
Resets the traversal for the tree. | TreeIterator | ||
| TreeIterator | () | Constructor |
| cancelAsyncTraversal | () | method |
public function cancelAsyncTraversal():void| next | () | method |
public function next():ObjectTraverses through the tree externally and returns the first newly encountered node. The order does not depend on camera position etc.
ReturnsObject — The next unvisited node in the tree.
|
| performMethod | () | method |
public function performMethod(method:Function):voidTraverses through the tree internally and applies the supplied function to each node
Parameters
method:Function — The function to be applied to each node. It must have the following signature: function someFunction(node : ITreeNode) : void.
|
| performMethodAsync | () | method |
public function performMethodAsync(method:Function, maxTimeOut:Number = 500):voidTraverses through the tree and applies the supplied function to each node in the tree asynchronously. The TreeIterator instance will dispatch IteratorEvent.ASYNC_ITERATION_COMPLETE when done.
Parameters
method:Function — The function to be applied to each node. It must have the following signature: function someFunction(node : ITreeNode) : void.
| |
maxTimeOut:Number (default = 500) — The maximum timeout in milliseconds.
|
| reset | () | method |
public function reset():ObjectResets the traversal for the tree.
ReturnsObject — The root node of the tree, where traversal begins
|