((Apenas para componentes do Flex Data Visualization))
Pacotemx.collections
Classepublic class HierarchicalData
HerançaHierarchicalData Inheritance EventDispatcher Inheritance Object
Implementa IHierarchicalData
Subclasses GroupingCollection

Hierarchical data is data already in a structure of parent and child data items. The HierarchicalData class provides a default implementation for accessing and manipulating data for use in controls such as the AdvancedDataGrid control. To configure the AdvancedDataGrid control to display hierarchical data, you pass to the 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.

Veja também

mx.controls.AdvancedDataGrid


Propriedades Públicas
 PropriedadeDefinido por
  childrenField : String
Indicates the field name to be used to detect children objects in a data item.
HierarchicalData
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  source : Object
The source collection.
HierarchicalData
Métodos Públicos
 MétodoDefinido por
  
HierarchicalData(value:Object = null)
Constructor
HierarchicalData
 Inherited
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
 Inherited
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 depth of the node in the collection.
HierarchicalData
  
Returns the parent of a node.
HierarchicalData
  
Returns the root data item.
HierarchicalData
  
Returns true if the node has children.
HierarchicalData
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Eventos
 Evento Descrição Definido por
 Inherited Dispatched when Flash Player or the and AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited Dispatched when Flash Player loses operating system focus and is becoming inactive.EventDispatcher
Detalhes da propriedade
childrenFieldpropriedade
childrenField:String  [read-write]

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.


Implementação
    public function get childrenField():String
    public function set childrenField(value:String):void
sourcepropriedade 
source:Object  [read-write]

The source collection. The collection should implement the IList interface to facilitate operation like the addition and removal of items.


Implementação
    public function get source():Object
    public function set source(value:Object):void

Veja também

Detalhes do construtor
HierarchicalData()Construtor
public function HierarchicalData(value:Object = null)

Constructor

Parâmetros
value:Object (default = null) — The data used to populate the HierarchicalData instance.
Detalhes do método
canHaveChildren()método
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.

Parâmetros

node:Object — The Object that defines the node.

Retorna
Booleantrue if the node can contain children.
getChildren()método 
public function getChildren(node:Object):Object

Returns an Object representing the node's children.

Parâmetros

node:Object — The Object that defines the node. If null, return a collection of top-level nodes.

Retorna
Object — An Object containing the children nodes.
getData()método 
public function getData(node:Object):Object

Returns data from a node.

Parâmetros

node:Object — The node Object from which to get the data.

Retorna
Object — The requested data.
getNodeDepth()método 
public function getNodeDepth(node:Object):int

Returns the depth of the node in the collection.

Parâmetros

node:Object — The Object that defines the node.

Retorna
int — The depth of the node.
getParent()método 
public function getParent(node:Object):*

Returns the parent of a node. The parent of a top-level node is null.

Parâmetros

node:Object — The Object that defines the node.

Retorna
* — The parent node containing the node as child, null for a top-level node, and undefined if the parent cannot be determined.
getRoot()método 
public function getRoot():Object

Returns the root data item.

Retorna
Object — The Object containing the root data item.
hasChildren()método 
public function hasChildren(node:Object):Boolean

Returns true if the node has children.

Parâmetros

node:Object — The Object that defines the node.

Retorna
Booleantrue if the node has children.