Package | feathers.data |
Class | public class ArrayChildrenHierarchicalCollectionDataDescriptor |
Inheritance | ArrayChildrenHierarchicalCollectionDataDescriptor Object |
Implements | IHierarchicalCollectionDataDescriptor |
Product Version : | Feathers 1.0.0 |
"children"
,
but it may be customized.
The basic structure of the data source takes the following form. The root must always be an Array.
[ { text: "Branch 1", children: [ { text: "Child 1-1" }, { text: "Child 1-2" } ] }, { text: "Branch 2", children: [ { text: "Child 2-1" }, { text: "Child 2-2" }, { text: "Child 2-3" } ] } ]
Property | Defined By | ||
---|---|---|---|
childrenField : String = "children"
The field used to access the Array of a branch's children. | ArrayChildrenHierarchicalCollectionDataDescriptor |
Method | Defined By | ||
---|---|---|---|
Constructor. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
addItemAt(data:Object, item:Object, index:int, ... rest):void
Adds an item to the data source, at the specified location. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
addItemAtLocation(data:Object, item:Object, location:Vector.<int>):void
Adds an item to the data source, at the specified location. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
getItemAt(data:Object, index:int, ... rest):Object
Returns the item at the specified location in the data source. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
getItemAtLocation(data:Object, location:Vector.<int>):Object
Returns the item at the specified location in the data source. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
getItemLocation(data:Object, item:Object, result:Vector.<int> = null, ... rest):Vector.<int>
Determines which location the item appears at within the data source. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
getLength(data:Object, ... rest):int
The number of items at the specified location in the data source. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
getLengthAtLocation(data:Object, location:Vector.<int> = null):int
The number of items at the specified location in the data source. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
isBranch(node:Object):Boolean
Determines if a node from the data source is a branch. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
removeAll(data:Object):void
Removes all items from the data source. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
removeItemAt(data:Object, index:int, ... rest):Object
Removes the item at the specified location from the data source and
returns it. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
removeItemAtLocation(data:Object, location:Vector.<int>):Object
Removes the item at the specified location from the data source and
returns it. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
setItemAt(data:Object, item:Object, index:int, ... rest):void
Replaces the item at the specified location with a new item. | ArrayChildrenHierarchicalCollectionDataDescriptor | ||
setItemAtLocation(data:Object, item:Object, location:Vector.<int>):void
Replaces the item at the specified location with a new item. | ArrayChildrenHierarchicalCollectionDataDescriptor |
childrenField | property |
public var childrenField:String = "children"
The field used to access the Array of a branch's children.
ArrayChildrenHierarchicalCollectionDataDescriptor | () | Constructor |
public function ArrayChildrenHierarchicalCollectionDataDescriptor()
Constructor.
addItemAt | () | method |
public function addItemAt(data:Object, item:Object, index:int, ... rest):void
Adds an item to the data source, at the specified location.
The rest arguments are the indices that make up the location.
Calling addItemAtLocation()
instead is recommended
because the Vector.<int>
location may be reused to
avoid excessive garbage collection from temporary objects created by
...rest
arguments.
Parameters
data:Object | |
item:Object | |
index:int | |
... rest |
addItemAtLocation | () | method |
public function addItemAtLocation(data:Object, item:Object, location:Vector.<int>):void
Adds an item to the data source, at the specified location.
Parameters
data:Object | |
item:Object | |
location:Vector.<int> |
getItemAt | () | method |
public function getItemAt(data:Object, index:int, ... rest):Object
Returns the item at the specified location in the data source.
The rest arguments are the indices that make up the location.
Calling getItemAtLocation()
instead is recommended
because the Vector.<int>
location may be reused to
avoid excessive garbage collection from temporary objects created by
...rest
arguments.
Parameters
data:Object | |
index:int | |
... rest |
Object |
getItemAtLocation | () | method |
public function getItemAtLocation(data:Object, location:Vector.<int>):Object
Returns the item at the specified location in the data source.
Parameters
data:Object | |
location:Vector.<int> |
Object |
getItemLocation | () | method |
public function getItemLocation(data:Object, item:Object, result:Vector.<int> = null, ... rest):Vector.<int>
Determines which location the item appears at within the data source.
If the item isn't in the data source, returns an empty Vector.<int>
.
The rest
arguments are optional indices to narrow
the search.
Parameters
data:Object | |
item:Object | |
result:Vector.<int> (default = null )
| |
... rest |
Vector.<int> |
getLength | () | method |
public function getLength(data:Object, ... rest):int
The number of items at the specified location in the data source.
The rest arguments are the indices that make up the location. If a location is omitted, the length returned will be for the root level of the collection.
Calling getLengthOfBranch()
instead is recommended
because the Vector.<int>
location may be reused to
avoid excessive garbage collection from temporary objects created by
...rest
arguments.
Parameters
data:Object | |
... rest |
int |
getLengthAtLocation | () | method |
public function getLengthAtLocation(data:Object, location:Vector.<int> = null):int
The number of items at the specified location in the data source.
Parameters
data:Object | |
location:Vector.<int> (default = null )
|
int |
isBranch | () | method |
public function isBranch(node:Object):Boolean
Determines if a node from the data source is a branch.
Parameters
node:Object |
Boolean |
removeAll | () | method |
public function removeAll(data:Object):void
Removes all items from the data source.
Parameters
data:Object |
removeItemAt | () | method |
public function removeItemAt(data:Object, index:int, ... rest):Object
Removes the item at the specified location from the data source and returns it.
The rest arguments are the indices that make up the location.
Parameters
data:Object | |
index:int | |
... rest |
Object |
removeItemAtLocation | () | method |
public function removeItemAtLocation(data:Object, location:Vector.<int>):Object
Removes the item at the specified location from the data source and returns it.
The rest arguments are the indices that make up the location.
Calling removeItemAtLocation()
instead is recommended
because the Vector.<int>
location may be reused to
avoid excessive garbage collection from temporary objects created by
...rest
arguments.
Parameters
data:Object | |
location:Vector.<int> |
Object |
setItemAt | () | method |
public function setItemAt(data:Object, item:Object, index:int, ... rest):void
Replaces the item at the specified location with a new item.
The rest arguments are the indices that make up the location.
Calling setItemAtLocation()
instead is recommended
because the Vector.<int>
location may be reused to
avoid excessive garbage collection from temporary objects created by
...rest
arguments.
Parameters
data:Object | |
item:Object | |
index:int | |
... rest |
setItemAtLocation | () | method |
public function setItemAtLocation(data:Object, item:Object, location:Vector.<int>):void
Replaces the item at the specified location with a new item.
The rest arguments are the indices that make up the location.
Parameters
data:Object | |
item:Object | |
location:Vector.<int> |