| Package | vegas.models.collections |
| Class | public class CollectionModelObject |
| Inheritance | CollectionModelObject CoreModelObject CoreModel CoreEventDispatcher Object |
| Subclasses | SetModelObject |
Collection to register value objects.
| Method | Defined By | ||
|---|---|---|---|
CollectionModelObject(global:Boolean = true, channel:String = null, id:* = null)
Creates a new CollectionModelObject instance. | CollectionModelObject | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target. | CoreEventDispatcher | |
addVO(vo:ValueObject):Boolean
Inserts a value object in the model. | CollectionModelObject | ||
clear():void [override]
Removes all value objects in the model. | CollectionModelObject | ||
contains(vo:ValueObject):Boolean
Returns true if the model contains the specified ValueObject. | CollectionModelObject | ||
containsByProperty(propName:String, value:*):Boolean
Returns true if the model contains the specified attribute value. | CollectionModelObject | ||
![]() |
Returns and creates a new empty ModelObjectEvent. | CoreModelObject | |
![]() | dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow. | CoreEventDispatcher | |
Returns the internal Collection of this model. | CollectionModelObject | ||
![]() |
Returns the current ValueObject selected in this model. | CoreModelObject | |
![]() |
Returns the internal system.events.EventDispatcher reference. | CoreEventDispatcher | |
getEventTypeADD():String
Returns the event name use in the addVO method. | CollectionModelObject | ||
![]() | getEventTypeBEFORE_CHANGE():String
Returns the event name use in the setCurrentVO method before is changed. | CoreModelObject | |
![]() | getEventTypeCHANGE():String
Returns the event name use in the setVO method. | CoreModelObject | |
![]() | getEventTypeCLEAR():String
Returns the event name use in the clear method. | CoreModelObject | |
getEventTypeREMOVE():String
Returns the event name use in the removeVO method. | CollectionModelObject | ||
![]() | hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | CoreEventDispatcher | |
initEventType():void [override]
This method is invoked in the constructor of the class to initialize all events. | CollectionModelObject | ||
Initialize the internal Collection instance in the constructor of the class. | CollectionModelObject | ||
isEmpty():Boolean
Returns { | CollectionModelObject | ||
![]() | isGlobal():Boolean
Indicates if the dispatcher use a global event flow. | CoreEventDispatcher | |
![]() | isLocked():Boolean
Returns true if the object is locked. | CoreEventDispatcher | |
Returns the iterator of this model. | CollectionModelObject | ||
![]() | lock():void
Locks the object. | CoreEventDispatcher | |
notifyAdd(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is inserted in the model. | CollectionModelObject | ||
![]() | notifyBeforeChange(vo:ValueObject):void
Notify a ModelObjectEvent before the current ValueObject selected in the model is changed. | CoreModelObject | |
![]() | notifyChange(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject change in the model. | CoreModelObject | |
![]() | notifyClear():void
Notify a ModelObjectEvent when the model is cleared. | CoreModelObject | |
notifyRemove(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is removed in the model. | CollectionModelObject | ||
![]() | registerEventListener(type:String, listener:*, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target (Function or EventListener). | CoreEventDispatcher | |
![]() | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object. | CoreEventDispatcher | |
removeVO(vo:ValueObject):*
Removes a value object in the model. | CollectionModelObject | ||
![]() | run(... arguments):void
Run the first process with this model. | CoreModel | |
setCollection(co:Collection):void
Sets the internal Collection of this model. | CollectionModelObject | ||
![]() | setCurrentVO(vo:ValueObject):void
Sets the current ValueObject selected in this model. | CoreModelObject | |
![]() | setEventDispatcher(dispatcher:EventDispatcher):void
Sets the internal EventDispatcher reference. | CoreEventDispatcher | |
setEventTypeADD(type:String):void
Sets the event name use in the addVO method. | CollectionModelObject | ||
![]() | setEventTypeBEFORE_CHANGE(type:String):void
Returns the event name use in the setCurrentVO method before is changed. | CoreModelObject | |
![]() | setEventTypeCHANGE(type:String):void
Returns the event name use in the setVO method. | CoreModelObject | |
![]() | setEventTypeCLEAR(type:String):void
Returns the event name use in the clear method. | CoreModelObject | |
setEventTypeREMOVE(type:String):void
Sets the event name use in the removeVO method. | CollectionModelObject | ||
![]() | setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global system.events.EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher. | CoreEventDispatcher | |
size():Number
Returns the number of ValueObject in this model. | CollectionModelObject | ||
![]() | supports(value:*):Boolean
Returns true if the IValidator object validate the value. | CoreModelObject | |
toArray():Array
Returns the Array representation of this object. | CollectionModelObject | ||
![]() | unlock():void
Unlocks the display. | CoreEventDispatcher | |
![]() | unregisterEventListener(type:String, listener:*, useCapture:Boolean = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object. | CoreEventDispatcher | |
![]() | validate(value:*):void
Evaluates the specified value and throw a TypeError object if the value is not valid. | CoreModelObject | |
![]() | 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. | CoreEventDispatcher | |
| CollectionModelObject | () | Constructor |
public function CollectionModelObject(global:Boolean = true, channel:String = null, id:* = null)Creates a new CollectionModelObject instance.
Parametersglobal:Boolean (default = true) — the flag to use a global event flow or a local event flow (default true).
| |
channel:String (default = null) — (optional) the name of the global event flow if the global argument is true.
| |
id:* (default = null) — the id of this model.
|
| addVO | () | method |
public function addVO(vo:ValueObject):BooleanInserts a value object in the model.
Parameters
vo:ValueObject |
Boolean |
ArgumentError — if the argument of this method is 'null' or 'undefined'.
| |
TypeMismatchError — if the ValueObject passed in argument isn't valide.
|
| clear | () | method |
override public function clear():voidRemoves all value objects in the model.
| contains | () | method |
public function contains(vo:ValueObject):Boolean
Returns true if the model contains the specified ValueObject.
Parameters
vo:ValueObject |
Boolean — true if the model contains the specified ValueObject.
|
| containsByProperty | () | method |
public function containsByProperty(propName:String, value:*):Boolean
Returns true if the model contains the specified attribute value.
Parameters
propName:String | |
value:* |
Boolean — true if the model contains the specified id key in argument
|
| getCollection | () | method |
public function getCollection():CollectionReturns the internal Collection of this model.
ReturnsCollection — the internal Collection of this model.
|
| getEventTypeADD | () | method |
public function getEventTypeADD():String
Returns the event name use in the addVO method.
String — the event name use in the addVO method.
|
| getEventTypeREMOVE | () | method |
public function getEventTypeREMOVE():String
Returns the event name use in the removeVO method.
String — the event name use in the removeVO method.
|
| initEventType | () | method |
override public function initEventType():voidThis method is invoked in the constructor of the class to initialize all events. Overrides this method.
| initializeCollection | () | method |
public function initializeCollection():CollectionInitialize the internal Collection instance in the constructor of the class. You can overrides this method if you want change the default SimpleCollection use in this model.
ReturnsCollection |
| isEmpty | () | method |
public function isEmpty():BooleanReturns {
ReturnsBoolean — { |
| iterator | () | method |
public function iterator():IteratorReturns the iterator of this model.
ReturnsIterator — the iterator of this model.
|
| notifyAdd | () | method |
public function notifyAdd(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is inserted in the model.
Parameters
vo:ValueObject |
| notifyRemove | () | method |
public function notifyRemove(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is removed in the model.
Parameters
vo:ValueObject |
| removeVO | () | method |
public function removeVO(vo:ValueObject):*Removes a value object in the model.
Parameters
vo:ValueObject |
* |
ArgumentError — If the ValueObject passed in argument not must be 'null' or 'undefined'.
| |
ArgumentError — if the value object don't exist in the model.
|
| setCollection | () | method |
public function setCollection(co:Collection):voidSets the internal Collection of this model. By default the initializeCollection() method is used if the passed-in argument is null.
Parameters
co:Collection |
| setEventTypeADD | () | method |
public function setEventTypeADD(type:String):void
Sets the event name use in the addVO method.
Parameters
type:String |
| setEventTypeREMOVE | () | method |
public function setEventTypeREMOVE(type:String):void
Sets the event name use in the removeVO method.
Parameters
type:String |
| size | () | method |
public function size():Number
Returns the number of ValueObject in this model.
Number — the number of ValueObject in this model.
|
| toArray | () | method |
public function toArray():Array
Returns the Array representation of this object.
Array — the Array representation of this object.
|