| Package | vegas.models.queues |
| Class | public class QueueModelObject |
| Inheritance | QueueModelObject CoreModelObject CoreModel CoreEventDispatcher Object |
Queue to register value objects.
| Method | Defined By | ||
|---|---|---|---|
QueueModelObject(global:Boolean = true, channel:String = null, id:* = null)
Creates a new QueueModelObject instance. | QueueModelObject | ||
![]() | 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 | |
clear():void [override]
Removes all value objects in the model. | QueueModelObject | ||
![]() |
Returns and creates a new empty ModelObjectEvent. | CoreModelObject | |
dequeue():*
Dequeues the head value object in the model. | QueueModelObject | ||
![]() | dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow. | CoreEventDispatcher | |
enqueue(vo:ValueObject):Boolean
Enqueues a value object in the model. | QueueModelObject | ||
![]() |
Returns the current ValueObject selected in this model. | CoreModelObject | |
![]() |
Returns the internal system.events.EventDispatcher reference. | CoreEventDispatcher | |
![]() | 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 | |
getEventTypeDEQUEUE():String
Returns the event name use in the { | QueueModelObject | ||
getEventTypeENQUEUE():String
Returns the event name use in the { | QueueModelObject | ||
Returns the internal Queue reference of this model. | QueueModelObject | ||
![]() | 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. | QueueModelObject | ||
Initialize the internal Queue instance in the constructor of the class. | QueueModelObject | ||
isEmpty():Boolean
Returns { | QueueModelObject | ||
![]() | 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. | QueueModelObject | ||
![]() | lock():void
Locks the object. | CoreEventDispatcher | |
![]() | 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 | |
notifyDequeue(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is dequeue in the model. | QueueModelObject | ||
notifyEnqueue(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is enqueue in the model. | QueueModelObject | ||
![]() | 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 | |
![]() | run(... arguments):void
Run the first process with this model. | CoreModel | |
![]() | setCurrentVO(vo:ValueObject):void
Sets the current ValueObject selected in this model. | CoreModelObject | |
![]() | setEventDispatcher(dispatcher:EventDispatcher):void
Sets the internal EventDispatcher reference. | CoreEventDispatcher | |
![]() | 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 | |
setEventTypeDEQUEUE(type:String):void
Sets the event name use in the dequeue method. | QueueModelObject | ||
setEventTypeENQUEUE(type:String):void
Sets the event name use in the enqueue method. | QueueModelObject | ||
![]() | 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 | |
Sets the internal Queue of this model. | QueueModelObject | ||
size():Number
Returns the number of ValueObject in this model. | QueueModelObject | ||
![]() | supports(value:*):Boolean
Returns true if the IValidator object validate the value. | CoreModelObject | |
toArray():Array
Returns the Array representation of this object. | QueueModelObject | ||
![]() | 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 | |
| Constant | Defined By | ||
|---|---|---|---|
| DEQUEUE_VO : String = dequeueVO [static]
Default event type when the dequeue method is invoked. | QueueModelObject | ||
| ENQUEUE_VO : String = enqueueVO [static]
Default event type when the enqueue method is invoked. | QueueModelObject | ||
| QueueModelObject | () | Constructor |
public function QueueModelObject(global:Boolean = true, channel:String = null, id:* = null)Creates a new QueueModelObject instance.
Parametersglobal:Boolean (default = true) — the flag to use a global event flow or a local event flow (default true).
| |
channel:String (default = null) — the name of the global event flow if the global argument is true.
| |
id:* (default = null) — the id of this model.
|
| clear | () | method |
override public function clear():voidRemoves all value objects in the model.
| dequeue | () | method |
public function dequeue():*Dequeues the head value object in the model.
Returns* |
| enqueue | () | method |
public function enqueue(vo:ValueObject):BooleanEnqueues a value object in the model.
Parameters
vo:ValueObject |
Boolean |
| getEventTypeDEQUEUE | () | method |
public function getEventTypeDEQUEUE():StringReturns the event name use in the {
ReturnsString — the event name use in the { |
| getEventTypeENQUEUE | () | method |
public function getEventTypeENQUEUE():StringReturns the event name use in the {
ReturnsString — the event name use in the { |
| getQueue | () | method |
public function getQueue():QueueReturns the internal Queue reference of this model.
ReturnsQueue — the internal Queue reference of this model.
|
| initEventType | () | method |
override public function initEventType():voidThis method is invoked in the constructor of the class to initialize all events. Overrides this method.
| initializeQueue | () | method |
public function initializeQueue():QueueInitialize the internal Queue instance in the constructor of the class. You can overrides this method if you want change the default LinearQueue use in this model.
ReturnsQueue |
| isEmpty | () | method |
public function isEmpty():BooleanReturns {
ReturnsBoolean — { |
| iterator | () | method |
public function iterator():IteratorReturns the iterator of this model.
ReturnsIterator — the iterator of this model.
|
| notifyDequeue | () | method |
public function notifyDequeue(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is dequeue in the model.
Parameters
vo:ValueObject |
| notifyEnqueue | () | method |
public function notifyEnqueue(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is enqueue in the model.
Parameters
vo:ValueObject |
| setEventTypeDEQUEUE | () | method |
public function setEventTypeDEQUEUE(type:String):void
Sets the event name use in the dequeue method.
Parameters
type:String |
| setEventTypeENQUEUE | () | method |
public function setEventTypeENQUEUE(type:String):void
Sets the event name use in the enqueue method.
Parameters
type:String |
| setQueue | () | method |
public function setQueue(queue:Queue):voidSets the internal Queue of this model. By default the initializeQueue() method is used if the passed-in argument is null.
Parameters
queue:Queue |
| 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.
|
| DEQUEUE_VO | Constant |
public static const DEQUEUE_VO:String = dequeueVODefault event type when the dequeue method is invoked.
| ENQUEUE_VO | Constant |
public static const ENQUEUE_VO:String = enqueueVODefault event type when the enqueue method is invoked.