class TreeCollection<T>
package feathers.data
extends EventDispatcher
implements IHierarchicalCollection<TreeNode<T>>
Wraps an Array
data source with a common API for use with UI controls that
support hierarchical data, such as TreeView
or TreeGridView
.
Events:
openfl.events.Event.CHANGE | Dispatched when the collection changes. |
---|---|
feathers.events.HierarchicalCollectionEvent.ADD_ITEM | Dispatched when an item is added to the collection. |
feathers.events.HierarchicalCollectionEvent.REMOVE_ITEM | Dispatched when an item is removed from the collection. |
feathers.events.HierarchicalCollectionEvent.REPLACE_ITEM | Dispatched when an item is replaced in the collection. |
feathers.events.HierarchicalCollectionEvent.REMOVE_ALL | Dispatched when all items are removed from the collection. |
feathers.events.HierarchicalCollectionEvent.RESET | Dispatched when the source of the collection is changed. |
feathers.events.HierarchicalCollectionEvent.UPDATE_ITEM | Dispatched
when |
feathers.events.HierarchicalCollectionEvent.UPDATE_ALL | Dispatched
when |
feathers.events.HierarchicalCollectionEvent.FILTER_CHANGE | Dispatched
when |
feathers.events.HierarchicalCollectionEvent.SORT_CHANGE | Dispatched
when |
1.0.0
.See also:
Constructor
new(?array:Array<TreeNode<T>>)
Creates a new TreeCollection
object with the given arguments.
1.0.0
.Variables
array:Array<TreeNode<T>>
The Array<TreeNode>
data source for this collection.
The following example replaces the data source with a new array:
collection.array = [];
1.0.0
.