Package | mx.collections |
Class | public class HierarchicalData |
Inheritance | HierarchicalData ![]() ![]() |
Implements | IHierarchicalData |
Subclasses | GroupingCollection |
dataProvider
property an instance of the HierarchicalData class.
This implementation handles E4X, XML, and Object nodes in similar but different
ways. See each method description for details on how the method
accesses values in nodes of various types.
See also
Property | Defined By | ||
---|---|---|---|
childrenField : String
Indicates the field name to be used to detect children objects in
a data item. | HierarchicalData | ||
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | |
![]() | prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | |
source : Object
The source collection. | HierarchicalData |
Method | Defined By | ||
---|---|---|---|
HierarchicalData(value:Object = null)
Constructor. | HierarchicalData | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | |
Returns true if the node can contain children. | HierarchicalData | ||
![]() |
Dispatches an event into the event flow. | EventDispatcher | |
Returns an Object representing the node's children. | HierarchicalData | ||
Returns data from a node. | HierarchicalData | ||
Returns the root data item. | HierarchicalData | ||
Returns true if the node has children. | HierarchicalData | ||
![]() |
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | |
![]() |
Indicates whether an object has a specified property defined. | Object | |
![]() |
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | |
![]() |
Indicates whether the specified property exists and is enumerable. | Object | |
![]() |
Removes a listener from the EventDispatcher object. | EventDispatcher | |
![]() |
Sets the availability of a dynamic property for loop operations. | Object | |
![]() |
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | |
![]() |
Returns the string representation of the specified object. | Object | |
![]() |
Returns the primitive value of the specified object. | Object | |
![]() |
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
childrenField | property |
childrenField:String
Indicates the field name to be used to detect children objects in
a data item.
By default, all subnodes are considered as children for
XML data, and the children
property is used for the Object data type.
This is helpful in adapting to a data format that uses custom data fields
to represent children.
public function get childrenField():String
public function set childrenField(value:String):void
source | property |
source:Object
The source collection. The collection should implement the IList interface to facilitate operation like the addition and removal of items.
public function get source():Object
public function set source(value:Object):void
See also
HierarchicalData | () | Constructor |
public function HierarchicalData(value:Object = null)
Constructor.
Parametersvalue:Object (default = null ) — The data used to populate the HierarchicalData instance.
|
canHaveChildren | () | method |
public function canHaveChildren(node:Object):Boolean
Returns true
if the node can contain children.
Nodes do not have to contain children for the method
to return true
.
This method is useful in determining whether other
nodes can be appended as children to the specified node.
Parameters
node:Object — The Object that defines the node.
|
Boolean — true if the node can contain children.
|
getChildren | () | method |
public function getChildren(node:Object):Object
Returns an Object representing the node's children.
Parameters
node:Object — The Object that defines the node.
If null , return a collection of top-level nodes.
|
Object — An Object containing the children nodes.
|
getData | () | method |
public function getData(node:Object):Object
Returns data from a node.
Parameters
node:Object — The node Object from which to get the data.
|
Object — The requested data.
|
getRoot | () | method |
public function getRoot():Object
Returns the root data item.
ReturnsObject — The Object containing the root data item.
|
hasChildren | () | method |
public function hasChildren(node:Object):Boolean
Returns true
if the node has children.
Parameters
node:Object — The Object that defines the node.
|
Boolean — true if the node has children.
|