| Package | vegas.models.stacks |
| Class | public class StackModelObject |
| Inheritance | StackModelObject CoreModelObject CoreModel CoreEventDispatcher Object |
Stack to register value objects.
| Property | Defined By | ||
|---|---|---|---|
![]() | channel : String [read-only]
Indicates the channel of this dispatcher if this instance is global. | CoreEventDispatcher | |
![]() | id : *
Returns the id of this IModelObject. | CoreModel | |
| POP_VO : String = onPopVO [static]
Default event type when the pop method is invoked. | StackModelObject | ||
| PUSH_VO : String = onPushVO [static]
Default event type when the push method is invoked. | StackModelObject | ||
![]() | security : Boolean = true
This property defined if the setCurrentVO method can accept the same vo in argument as the current one. | CoreModelObject | |
| Method | Defined By | ||
|---|---|---|---|
StackModelObject(global:Boolean = true, channel:String = null, id:* = null)
Creates a new StackModelObject instance. | StackModelObject | ||
![]() | 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. | StackModelObject | ||
![]() |
Returns and creates a new empty ModelObjectEvent. | CoreModelObject | |
![]() | dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow. | CoreEventDispatcher | |
![]() |
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 | |
getEventTypePOP():String
Returns the event name use in the { | StackModelObject | ||
getEventTypePUSH():String
Returns the event name use in the { | StackModelObject | ||
Returns the internal { | StackModelObject | ||
![]() | 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. | StackModelObject | ||
Initialize the internal Stack instance in the constructor of the class. | StackModelObject | ||
isEmpty():Boolean
Returns { | StackModelObject | ||
![]() | 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. | StackModelObject | ||
![]() | 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 | |
notifyPop(vo:ValueObject):void
Notify a { | StackModelObject | ||
notifyPush(vo:ValueObject):void
Notify a { | StackModelObject | ||
Removes and returns the lastly pushed value object in the model. | StackModelObject | ||
push(vo:ValueObject):void
Pushes the passed-in value object to this stack. | StackModelObject | ||
![]() | 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 | |
setEventTypePOP(type:String):void
Sets the event name use in the pop method. | StackModelObject | ||
setEventTypePUSH(type:String):void
Sets the event name use in the push method. | StackModelObject | ||
![]() | 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 Stack of this model. | StackModelObject | ||
size():Number
Returns the number of ValueObject in this model. | StackModelObject | ||
![]() | supports(value:*):Boolean
Returns true if the IValidator object validate the value. | CoreModelObject | |
![]() | 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 | |
| POP_VO | property |
public static var POP_VO:String = onPopVODefault event type when the pop method is invoked.
| PUSH_VO | property |
public static var PUSH_VO:String = onPushVODefault event type when the push method is invoked.
| StackModelObject | () | Constructor |
public function StackModelObject(global:Boolean = true, channel:String = null, id:* = null)Creates a new StackModelObject 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.
| getEventTypePOP | () | method |
public function getEventTypePOP():StringReturns the event name use in the {
ReturnsString — the event name use in the { |
| getEventTypePUSH | () | method |
public function getEventTypePUSH():StringReturns the event name use in the {
ReturnsString — the event name use in the { |
| getStack | () | method |
| initEventType | () | method |
override public function initEventType():voidThis method is invoked in the constructor of the class to initialize all events.
| initializeStack | () | method |
public function initializeStack():StackInitialize the internal Stack instance in the constructor of the class. You can overrides this method if you want change the default {
ReturnsStack |
| isEmpty | () | method |
public function isEmpty():BooleanReturns {
ReturnsBoolean — { |
| iterator | () | method |
public function iterator():IteratorReturns the iterator of this model.
ReturnsIterator — the iterator of this model.
|
| notifyPop | () | method |
| notifyPush | () | method |
| pop | () | method |
public function pop():ValueObjectRemoves and returns the lastly pushed value object in the model.
ReturnsValueObject — the lastly pushed value object in the model.
|
| push | () | method |
public function push(vo:ValueObject):voidPushes the passed-in value object to this stack.
Parameters
vo:ValueObject — The ValueObject to push.
|
ArgumentError — If the ValueObject is 'null' or 'undefined'.
|
| setEventTypePOP | () | method |
public function setEventTypePOP(type:String):void
Sets the event name use in the pop method.
Parameters
type:String |
| setEventTypePUSH | () | method |
public function setEventTypePUSH(type:String):void
Sets the event name use in the push method.
Parameters
type:String |
| setStack | () | method |
public function setStack(s:Stack):voidSets the internal Stack of this model. By default the initializeStack() method is used if the passed-in argument is null.
Parameters
s:Stack |
| size | () | method |
public function size():Number
Returns the number of ValueObject in this model.
Number — the number of ValueObject in this model.
|