Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
IHierarchicalData

Package | org.apache.flex.collections
Interface | public interface IHierarchicalData extends IEventDispatcher, flash.events.IEventDispatcher
Implementors | HierarchicalData

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The IHierarchicalData interface defines the interface used to represent hierarchical data as the data provider for a FlexJS component. Hierarchical data is data in a structure of parent and child data items.

Public Methods

| Method | Defined By
--- | --- | ---
|  | canHaveChildren(node:Object):Boolean Returns true if the node can contain children. | IHierarchicalData
|  | getChildren(node:Object):Object Returns an Object representing the node's children. | IHierarchicalData
|  | getData(node:Object):Object Returns data from a node. | IHierarchicalData
|  | getRoot():Object Returns the root data item. | IHierarchicalData
|  | hasChildren(node:Object):Boolean Returns true if the node has children. | IHierarchicalData

Method Detail

canHaveChildren | () | method

`public function canHaveChildren(node:Object):Boolean`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

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.

Returns

| `Boolean` — `true` if the node can contain children.

getChildren | () | method |

`public function getChildren(node:Object):Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

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.

Returns

| `Object` — An Object containing the children nodes.

getData | () | method |

`public function getData(node:Object):Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Returns data from a node.

Parameters

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

Returns

| `Object` — The requested data.

getRoot | () | method |

`public function getRoot():Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Returns the root data item.

Returns

| `Object` — The Object containing the root data item.

hasChildren | () | method |

`public function hasChildren(node:Object):Boolean`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Returns `true` if the node has children.

Parameters

| `node:Object` — The Object that defines the node.

Returns

| `Boolean` — `true` if the node has children.

Mon Sep 5 2016, 07:19 AM -07:00