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

Package | org.apache.flex.collections
Class | public class FlattenedList
Inheritance | FlattenedList ArrayList EventDispatcher flash.events.EventDispatcher

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The FlattenedList class takes a HierarchicalData object and "flattens" it using all of the open members.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | hdata : HierarchicalData | FlattenedList
|  | id : String An id property for MXML documents. | ArrayList
|  | length : int [read-only] The number of items. | ArrayList
|  | openNodes : Array | FlattenedList
|  | source : Array The array of raw data needing conversion. | ArrayList
|  | strand : IStrand [write-only] | ArrayList

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | FlattenedList(hdata:HierarchicalData) Constructor. | FlattenedList
|  | addItem(item:Object):void Adds an item to the end of the array. | ArrayList
|  | addItemAt(item:Object, index:int):void Inserts an item to a specific location within the array. | ArrayList
|  | closeNode(node:Object):void Closes the given node. | FlattenedList
|  | getDepth(node:Object):int Returns the depth of the node with the root being zero. | FlattenedList
|  | getItemAt(index:int):Object Fetches an item from the collection | ArrayList
|  | getItemIndex(item:Object):int Fetches an item from the collection given an index. | ArrayList
|  | hasChildren(node:Object):Boolean Returns true if the node has children nodes. | FlattenedList
|  | isOpen(node:Object):Boolean Returns true if the node is currently open. | FlattenedList
|  | itemUpdated(item:Object):void Signals that an item in the array has been updated. | ArrayList
|  | itemUpdatedAt(index:int):void Signals that an item in the array has been updated. | ArrayList
|  | openNode(node:Object):void Opens the given node. | FlattenedList
|  | removeAll():void Removes all of the items from the array. | ArrayList
|  | removeItem(item:Object):Boolean Removed an item from the array and returns it. | ArrayList
|  | removeItemAt(index:int):Object Removes an item from a specific location within the array and returns it. | ArrayList
|  | reset():void Resets the list so that only the top root node is open. | FlattenedList
|  | setItemAt(item:Object, index:int):Object Replaces the item at the given index with a new item and returns the old item. | ArrayList
|  | toArray():Array Returns a copy of the source array. | ArrayList

Events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | collectionChanged | Dispatched when the collection's underlying source array is changed. | ArrayList
|  | itemAdded | Dispatched when the collection has added an item. | ArrayList
|  | itemRemoved | Dispatched when the collection has removed an item. | ArrayList
|  | itemUpdated | Dispatched when the collection has updated an item. | ArrayList

Property Detail

hdata | property

`public var hdata:HierarchicalData`

openNodes | property |

`public var openNodes:Array`

Constructor Detail

FlattenedList | () | Constructor

`public function FlattenedList(hdata:HierarchicalData)`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Constructor.

Parameters

| `hdata:HierarchicalData`

Method Detail

closeNode | () | method

`public function closeNode(node:Object):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Closes the given node. The array data now contains fewer elements.

Parameters

| `node:Object`

getDepth | () | method |

`public function getDepth(node:Object):int`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Returns the depth of the node with the root being zero.

Parameters

| `node:Object`

Returns

| `int`

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 nodes.

Parameters

| `node:Object`

Returns

| `Boolean`

isOpen | () | method |

`public function isOpen(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 is currently open.

Parameters

| `node:Object`

Returns

| `Boolean`

openNode | () | method |

`public function openNode(node:Object):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Opens the given node. The array data now contains more elements.

Parameters

| `node:Object`

reset | () | method |

`public function reset():void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Resets the list so that only the top root node is open.

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