| Package | com.degrafa.core.collections |
| Class | public class DegrafaCollection |
| Inheritance | DegrafaCollection DegrafaObject |
| Subclasses | DisplayObjectCollection, FillCollection, GeometryCollection, GradientStopsCollection, GraphicPointCollection, GraphicPointEXCollection, GraphicsCollection, GraphicSkinCollection, SegmentsCollection, StrokeCollection, TransformCollection |
Default MXML Propertyitems
| Property | Defined by | ||
|---|---|---|---|
![]() | document : Object
The MXML document that created this object.
| DegrafaObject | |
![]() | enableEvents : Boolean
Enable events for this object.
| DegrafaObject | |
| enableTypeChecking : Boolean
Allows internal type checking to be turned off.
| DegrafaCollection | ||
![]() | hasEventManager : Boolean
Tests to see if a EventDispatcher instance has been created for this object.
| DegrafaObject | |
![]() | id : String
The identifier used by document to refer to this object.
| DegrafaObject | |
| items : Array
An array of items being stored in this collection.
| DegrafaCollection | ||
![]() | name : String
The name that refers to this object.
| DegrafaObject | |
![]() | suppressEventProcessing : Boolean
Temporarily suppress event processing for this object.
| DegrafaObject | |
| Method | Defined by | ||
|---|---|---|---|
|
DegrafaCollection(type:Class, array:Array = null, suppressEvents:Boolean = false, enableTypeChecking:Boolean = true)
Constructor.
| DegrafaCollection | ||
![]() |
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.
| DegrafaObject | |
|
addListener(value:*):void
Addes a property change event listener to the passed object.
| DegrafaCollection | ||
|
addListeners():void
Addes a property change event listener to each item in the collection.
| DegrafaCollection | ||
|
concat(... args):Array
Concatenates the elements specified in the parameters with the elements in an array and creates a new array.
| DegrafaCollection | ||
![]() |
dispatchEvent(evt:Event):Boolean
Dispatches an event into the event flow.
| DegrafaObject | |
![]() |
dispatchPropertyChange(bubbles:Boolean = false, property:Object = null, oldValue:Object = null, newValue:Object = null, source:Object = null):Boolean
Dispatches an property change event into the event flow.
| DegrafaObject | |
|
every(callback:Function, thisObject:* = null):Boolean
Executes a test function on each item in the array until an item is reached that returns false for the specified function.
| DegrafaCollection | ||
|
filter(callback:Function, thisObject:* = null):Array
Executes a test function on each item in the array and constructs a new array for all items that return true for the specified function.
| DegrafaCollection | ||
|
forEach(callback:Function, thisObject:* = null):void
Executes a function on each item in the array.
| DegrafaCollection | ||
![]() |
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| DegrafaObject | |
|
indexOf(searchElement:*, fromIndex:int = 0):int
Searches for an item in an array by using strict equality (===) and returns the index position of the item.
| DegrafaCollection | ||
![]() |
initChange(property:String, oldValue:Object, newValue:Object, source:Object):void
Helper function for dispatching property changes
| DegrafaObject | |
![]() |
initialized(document:Object, id:String):void
Called after the implementing object has been created and all component properties specified on the MXML tag have been initialized.
| DegrafaObject | |
|
join(sep:*):String
Converts the elements in an array to strings, inserts the specified separator between the elements, concatenates them, and returns the resulting string.
| DegrafaCollection | ||
|
lastIndexOf(searchElement:*, fromIndex:int = 0x7fffffff):int
Searches for an item in an array, working backward from the last item, and returns the index position of the matching item using strict equality (===).
| DegrafaCollection | ||
|
map(callback:Function, thisObject:* = null):Array
Executes a function on each item in an array, and constructs a new array of items corresponding to the results of the function on each item in the original array.
| DegrafaCollection | ||
|
pop():*
Removes the last element from an array and returns the value of that element.
| DegrafaCollection | ||
|
propertyChangeHandler(event:PropertyChangeEvent):void
Property change event handler for this collection.
| DegrafaCollection | ||
|
push(... args):uint
Adds one or more elements to the end of an array and returns the new length of the array.
| DegrafaCollection | ||
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| DegrafaObject | |
|
removeListener(value:*):void
Removes the property change event listener from the passed object.
| DegrafaCollection | ||
|
removeListeners():void
Removes the property change event listener from each item in the collection.
| DegrafaCollection | ||
|
reverse():Array
Reverses the array in place.
| DegrafaCollection | ||
|
shift():*
Removes the first element from an array and returns that element.
| DegrafaCollection | ||
|
slice(startIndex:int = 0, endIndex:int = 16777215):Array
Returns a new array that consists of a range of elements from the original array, without modifying the original array.
| DegrafaCollection | ||
|
some(callback:Function, thisObject:* = null):Boolean
Executes a test function on each item in the array until an item is reached that returns true.
| DegrafaCollection | ||
|
sort(... args):Array
Sorts the elements in an array.
| DegrafaCollection | ||
|
sortOn(fieldName:Object, options:Object = null):Array
Sorts the elements in an array according to one or more fields in the array.
| DegrafaCollection | ||
|
splice(startIndex:int, deleteCount:uint, ... values):Array
Adds elements to and removes elements from an array.
| DegrafaCollection | ||
|
unshift(... args):uint
Adds one or more elements to the beginning of an array and returns the new length of the array.
| DegrafaCollection | ||
![]() |
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
| DegrafaObject | |
| Method | Defined by | ||
|---|---|---|---|
|
_addItem(value:*):*
Adds a new item to the collection.
| DegrafaCollection | ||
|
_addItemAt(value:*, index:Number):*
Add a item at the given index.
| DegrafaCollection | ||
|
_getItemAt(index:Number):*
Return a item at the given index.
| DegrafaCollection | ||
|
_getItemIndex(value:*):int
Return the index for the item in the collection.
| DegrafaCollection | ||
|
_removeItem(value:*):*
Removes a item from the collection.
| DegrafaCollection | ||
|
_removeItemAt(index:Number):*
Removes a item from the collection.
| DegrafaCollection | ||
|
_setItemIndex(value:*, newIndex:Number):Boolean
Change the position of an item in the collection
| DegrafaCollection | ||
| enableTypeChecking | property |
enableTypeChecking:Boolean [read-write]Allows internal type checking to be turned off.
Implementation public function get enableTypeChecking():Boolean
public function set enableTypeChecking(value:Boolean):void
| items | property |
items:Array [read-write]An array of items being stored in this collection.
Implementation public function get items():Array
public function set items(value:Array):void
| DegrafaCollection | () | constructor |
public function DegrafaCollection(type:Class, array:Array = null, suppressEvents:Boolean = false, enableTypeChecking:Boolean = true)Constructor.
The Degrafa collection constructor accepts 4 optional arguments that specify it's type, an array of values of the expected type to be added and 2 event operation flags.
Parameterstype:Class — An class value specifing the types of objects being stored here.
|
|
array:Array (default = null) — An array of objects that are of the specified type.
|
|
suppressEvents:Boolean (default = false) — A boolean value indicating if events should not be
dispatched for this collection.
|
|
enableTypeChecking:Boolean (default = true) — A boolean value indicating if type checking should be performed.
|
| _addItem | () | method |
protected function _addItem(value:*):*Adds a new item to the collection.
Parametersvalue:* — The item to add.
|
* — The item added.
|
| _addItemAt | () | method |
protected function _addItemAt(value:*, index:Number):*Add a item at the given index.
Parametersvalue:* — The item to add to the collection.
|
|
index:Number — The index at which to add the item.
|
* — The item added.
|
| _getItemAt | () | method |
protected function _getItemAt(index:Number):*Return a item at the given index.
Parametersindex:Number — The item index to return.
|
* — The item requested.
|
| _getItemIndex | () | method |
protected function _getItemIndex(value:*):intReturn the index for the item in the collection.
Parametersvalue:* — The item to find.
|
int — The index location of the item.
|
| _removeItem | () | method |
protected function _removeItem(value:*):*Removes a item from the collection.
Parametersvalue:* — The item to remove.
|
* — The item removed.
|
| _removeItemAt | () | method |
protected function _removeItemAt(index:Number):*Removes a item from the collection.
Parametersindex:Number — The item index to remove.
|
* — The removed item.
|
| _setItemIndex | () | method |
protected function _setItemIndex(value:*, newIndex:Number):BooleanChange the position of an item in the collection
Parametersvalue:* — The items new index.
|
|
newIndex:Number — The item to be repositioned.
|
Boolean — Returns true is the item was repositioned.
|
| addListener | () | method |
public function addListener(value:*):voidAddes a property change event listener to the passed object.
Parametersvalue:* |
| addListeners | () | method |
public function addListeners():voidAddes a property change event listener to each item in the collection.
| concat | () | method |
public function concat(... args):ArrayConcatenates the elements specified in the parameters with the elements in an array and creates a new array.
Parameters... args |
Array |
See also
| every | () | method |
public function every(callback:Function, thisObject:* = null):BooleanExecutes a test function on each item in the array until an item is reached that returns false for the specified function.
Parameterscallback:Function |
|
thisObject:* (default = null) |
Boolean |
See also
| filter | () | method |
public function filter(callback:Function, thisObject:* = null):ArrayExecutes a test function on each item in the array and constructs a new array for all items that return true for the specified function.
Parameterscallback:Function |
|
thisObject:* (default = null) |
Array |
See also
| forEach | () | method |
public function forEach(callback:Function, thisObject:* = null):voidExecutes a function on each item in the array.
Parameterscallback:Function |
|
thisObject:* (default = null) |
See also
| indexOf | () | method |
public function indexOf(searchElement:*, fromIndex:int = 0):intSearches for an item in an array by using strict equality (===) and returns the index position of the item.
ParameterssearchElement:* |
|
fromIndex:int (default = 0) |
int |
See also
| join | () | method |
public function join(sep:*):StringConverts the elements in an array to strings, inserts the specified separator between the elements, concatenates them, and returns the resulting string.
Parameterssep:* |
String |
See also
| lastIndexOf | () | method |
public function lastIndexOf(searchElement:*, fromIndex:int = 0x7fffffff):intSearches for an item in an array, working backward from the last item, and returns the index position of the matching item using strict equality (===).
ParameterssearchElement:* |
|
fromIndex:int (default = 0x7fffffff) |
int |
See also
| map | () | method |
public function map(callback:Function, thisObject:* = null):ArrayExecutes a function on each item in an array, and constructs a new array of items corresponding to the results of the function on each item in the original array.
Parameterscallback:Function |
|
thisObject:* (default = null) |
Array |
See also
| pop | () | method |
public function pop():*Removes the last element from an array and returns the value of that element.
Returns* |
See also
| propertyChangeHandler | () | method |
public function propertyChangeHandler(event:PropertyChangeEvent):voidProperty change event handler for this collection.
Parametersevent:PropertyChangeEvent |
| push | () | method |
public function push(... args):uintAdds one or more elements to the end of an array and returns the new length of the array.
Parameters... args |
uint |
See also
| removeListener | () | method |
public function removeListener(value:*):voidRemoves the property change event listener from the passed object.
Parametersvalue:* |
| removeListeners | () | method |
public function removeListeners():voidRemoves the property change event listener from each item in the collection.
| reverse | () | method |
public function reverse():ArrayReverses the array in place.
ReturnsArray |
See also
| shift | () | method |
public function shift():*Removes the first element from an array and returns that element.
Returns* |
See also
| slice | () | method |
public function slice(startIndex:int = 0, endIndex:int = 16777215):ArrayReturns a new array that consists of a range of elements from the original array, without modifying the original array.
ParametersstartIndex:int (default = 0) |
|
endIndex:int (default = 16777215) |
Array |
See also
| some | () | method |
public function some(callback:Function, thisObject:* = null):BooleanExecutes a test function on each item in the array until an item is reached that returns true.
Parameterscallback:Function |
|
thisObject:* (default = null) |
Boolean |
See also
| sort | () | method |
public function sort(... args):ArraySorts the elements in an array.
Parameters... args |
Array |
See also
| sortOn | () | method |
public function sortOn(fieldName:Object, options:Object = null):ArraySorts the elements in an array according to one or more fields in the array.
ParametersfieldName:Object |
|
options:Object (default = null) |
Array |
See also
| splice | () | method |
public function splice(startIndex:int, deleteCount:uint, ... values):ArrayAdds elements to and removes elements from an array.
ParametersstartIndex:int |
|
deleteCount:uint |
|
... values |
Array |
See also
| unshift | () | method |
public function unshift(... args):uintAdds one or more elements to the beginning of an array and returns the new length of the array.
Parameters... args |
uint |
See also