Packagevegas.models.stacks
Classpublic class StackModelObject
InheritanceStackModelObject Inheritance CoreModelObject Inheritance CoreModel Inheritance CoreEventDispatcher Inheritance Object

This model use an internal Stack to register value objects.



Public Properties
 PropertyDefined By
 Inheritedchannel : String
[read-only] Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
 Inheritedid : *
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
 Inheritedsecurity : Boolean = true
This property defined if the setCurrentVO method can accept the same vo in argument as the current one.
CoreModelObject
Public Methods
 MethodDefined By
  
StackModelObject(global:Boolean = true, channel:String = null, id:* = null)
Creates a new StackModelObject instance.
StackModelObject
 Inherited
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
 Inherited
Returns and creates a new empty ModelObjectEvent.
CoreModelObject
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
 Inherited
Returns the current ValueObject selected in this model.
CoreModelObject
 Inherited
Returns the internal system.events.EventDispatcher reference.
CoreEventDispatcher
 Inherited
Returns the event name use in the setCurrentVO method before is changed.
CoreModelObject
 Inherited
Returns the event name use in the setVO method.
CoreModelObject
 Inherited
Returns the event name use in the clear method.
CoreModelObject
  
Returns the event name use in the {
StackModelObject
  
Returns the event name use in the {
StackModelObject
  
Returns the internal {
StackModelObject
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
  
[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
 Inherited
isGlobal():Boolean
Indicates if the dispatcher use a global event flow.
CoreEventDispatcher
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
  
Returns the iterator of this model.
StackModelObject
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
 Inherited
Notify a ModelObjectEvent before the current ValueObject selected in the model is changed.
CoreModelObject
 Inherited
Notify a ModelObjectEvent when a ValueObject change in the model.
CoreModelObject
 Inherited
Notify a ModelObjectEvent when the model is cleared.
CoreModelObject
  
Notify a {
StackModelObject
  
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
 Inherited
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
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
 Inherited
run(... arguments):void
Run the first process with this model.
CoreModel
 Inherited
Sets the current ValueObject selected in this model.
CoreModelObject
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setEventTypeBEFORE_CHANGE(type:String):void
Returns the event name use in the setCurrentVO method before is changed.
CoreModelObject
 Inherited
setEventTypeCHANGE(type:String):void
Returns the event name use in the setVO method.
CoreModelObject
 Inherited
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
 Inherited
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
  
setStack(s:Stack):void
Sets the internal Stack of this model.
StackModelObject
  
size():Number
Returns the number of ValueObject in this model.
StackModelObject
 Inherited
supports(value:*):Boolean
Returns true if the IValidator object validate the value.
CoreModelObject
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:*, useCapture:Boolean = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
 Inherited
validate(value:*):void
Evaluates the specified value and throw a TypeError object if the value is not valid.
CoreModelObject
 Inherited
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
Protected Methods
 MethodDefined By
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
Property Detail
POP_VOproperty
public static var POP_VO:String = onPopVO

Default event type when the pop method is invoked.

PUSH_VOproperty 
public static var PUSH_VO:String = onPushVO

Default event type when the push method is invoked.

Constructor Detail
StackModelObject()Constructor
public function StackModelObject(global:Boolean = true, channel:String = null, id:* = null)

Creates a new StackModelObject instance.

Parameters
global: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.
Method Detail
clear()method
override public function clear():void

Removes all value objects in the model.

getEventTypePOP()method 
public function getEventTypePOP():String

Returns the event name use in the {

Returns
String — the event name use in the {
getEventTypePUSH()method 
public function getEventTypePUSH():String

Returns the event name use in the {

Returns
String — the event name use in the {
getStack()method 
public function getStack():Stack

Returns the internal {

Returns
Stack — the internal {
initEventType()method 
override public function initEventType():void

This method is invoked in the constructor of the class to initialize all events.

initializeStack()method 
public function initializeStack():Stack

Initialize the internal Stack instance in the constructor of the class. You can overrides this method if you want change the default {

Returns
Stack
isEmpty()method 
public function isEmpty():Boolean

Returns {

Returns
Boolean — {
iterator()method 
public function iterator():Iterator

Returns the iterator of this model.

Returns
Iterator — the iterator of this model.
notifyPop()method 
public function notifyPop(vo:ValueObject):void

Notify a {

Parameters

vo:ValueObject

notifyPush()method 
public function notifyPush(vo:ValueObject):void

Notify a {

Parameters

vo:ValueObject

pop()method 
public function pop():ValueObject

Removes and returns the lastly pushed value object in the model.

Returns
ValueObject — the lastly pushed value object in the model.
push()method 
public function push(vo:ValueObject):void

Pushes the passed-in value object to this stack.

Parameters

vo:ValueObject — The ValueObject to push.


Throws
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):void

Sets 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.

Returns
Number — the number of ValueObject in this model.