Packagepegas.transitions
Classpublic class TransitionController
InheritanceTransitionController Inheritance CoreEventDispatcher Inheritance CoreObject

The TransitionController register all the ITransition of the application.



Public Properties
 PropertyDefined by
 Inheritedchannel : String
Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
 InheritedisGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
Public Methods
 MethodDefined by
  
TransitionController(bGlobal:Boolean = false, sChannel:String = null)
Creates a new TransitionController instance.
TransitionController
 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
  
contains(id:String):Boolean
Returns true if the id passed in argument is registered in the TransitionController.
TransitionController
  
containsTransition(transition:ITransition):Boolean
Returns true if the Transition passed in argument is registered in the TransitionController.
TransitionController
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
 Inherited
Returns the internal EventDispatcher reference.
CoreEventDispatcher
  
[static] Returns the singleton instance of TransitionController class.
TransitionController
 Inherited
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
 Inherited
Returns the internal ILogger reference of this ILogable object.
CoreObject
  
Returns a ITransition reference register in the TransitionController with the specified id passed in argument.
TransitionController
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
 Inherited
hashCode():uint
Returns a hashcode value for the object.
CoreObject
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
  
insert(transition:ITransition):void
Adds a new entry into the TransitionController.
TransitionController
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
 Inherited
registerEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
CoreEventDispatcher
  
remove(transition:*):*
Removes an entry into the TransitionController.
TransitionController
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
  
run(id:String):void
Run the specified Transition.
TransitionController
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher.
CoreEventDispatcher
 Inherited
setLogger(log:ILogger = null):void
Sets the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
CoreEventDispatcher
 Inherited
toString():String
Returns the string representation of this instance.
CoreObject
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
 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
Constructor detail
TransitionController()constructor
public function TransitionController(bGlobal:Boolean = false, sChannel:String = null)

Creates a new TransitionController instance.

Example :

   var controller:TransitionController = new TransitionController() ;
   
Parameters
bGlobal:Boolean (default = false) — the flag to use a global event flow or a local event flow.
 
sChannel:String (default = null) — the name of the global event flow if the bGlobal argument is true.
Method detail
contains()method
public function contains(id:String):Boolean

Returns true if the id passed in argument is registered in the TransitionController.

Parameters
id:String — the id of the ITransition object mapped in the TransitionController.

Returns
Booleantrue if the id passed in argument is registered in the TransitionController.
containsTransition()method 
public function containsTransition(transition:ITransition):Boolean

Returns true if the Transition passed in argument is registered in the TransitionController.

Parameters
transition:ITransition — the Transition reference to search in the TransitionController.

Returns
Booleantrue if the Transition passed in argument is registered in the TransitionController.
getInstance()method 
public static function getInstance():TransitionController

Returns the singleton instance of TransitionController class.

Returns
TransitionController — singleton instance of TransitionController class.
getTransition()method 
public function getTransition(id:*):ITransition

Returns a ITransition reference register in the TransitionController with the specified id passed in argument.

Parameters
id:* — id the id of the ITransition object mapped in the TransitionController.

Returns
ITransition — the ITransition object mapped in the TransitionController.
insert()method 
public function insert(transition:ITransition):void

Adds a new entry into the TransitionController.

Parameters
transition:ITransition — the ITransition to register in the TransitionController.

Throws
— if the argument is 'null' or 'undefined'.
 
— if the ITransition object ID is empty.
remove()method 
public function remove(transition:*):*

Removes an entry into the TransitionController.

Parameters
transition:* — the id of the ITransition object mapped in the TransitionController or a ITransition object to remove.

Returns
* — The removed ITransition object or null if the ITransition don't exist in the controller.
run()method 
public function run(id:String):void

Run the specified Transition.

Parameters
id:String — the id of the Transition to be run.

Throws
— if the id passed in argument isn't register in this TransitionCntroller
 
— if the id passed in argument is 'null' or 'undefined'.