Packageorg.robotlegs.mvcs
Classpublic class Mediator
InheritanceMediator Inheritance MediatorBase Inheritance Object

Abstract MVCS IMediator implementation



Public Properties
 PropertyDefined By
  contextView : DisplayObjectContainer
Mediator
  eventDispatcher : IEventDispatcher
Mediator
  mediatorMap : IMediatorMap
Mediator
Protected Properties
 PropertyDefined By
  eventMap : IEventMap
[read-only] Local EventMap
Mediator
 Inheritedremoved : Boolean
Internal In the case of deffered instantiation, onRemove might get called before onCreationComplete has fired.
MediatorBase
 InheritedUIComponentClass : Class
[static] Flex framework work-around part #1
MediatorBase
 InheritedviewComponent : Object
Internal This Mediator's View Component - used by the RobotLegs MVCS framework internally.
MediatorBase
Public Methods
 MethodDefined By
  
Mediator
 Inherited
The IMediator's view component
MediatorBase
 Inherited
onRegister():void
Should be invoked by the IMediator itself when it is ready to be interacted with Override and place your initialization code here
MediatorBase
 Inherited
onRemove():void
Should be invoked by the IMediator itself when it is ready to for cleanup Override and place your cleanup code here
MediatorBase
 Inherited
Should be invoked by the IMediatorMap during IMediator registration
MediatorBase
  
preRemove():void
[override] Invoked when the IMediator has been removed by the IMediatorMap
Mediator
 Inherited
setViewComponent(viewComponent:Object):void
The IMediator's view component
MediatorBase
Protected Methods
 MethodDefined By
  
addContextListener(type:String, listener:Function, eventClass:Class = null, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void
Syntactical sugar for mapping a listener to an IEventDispatcher
Mediator
  
addViewListener(type:String, listener:Function, eventClass:Class = null, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void
Syntactical sugar for mapping a listener to the viewComponent
Mediator
 Inherited
checkFlex():Boolean
[static] Flex framework work-around part #3 Checks for availability of the Flex framework by trying to get the class for UIComponent.
MediatorBase
  
dispatch(event:Event):Boolean
Dispatch helper method
Mediator
 Inherited
onCreationComplete(e:Event):void
Flex framework work-around part #4 FlexEvent.CREATION_COMPLETE handler for this Mediator's View Component
MediatorBase
Protected Constants
 ConstantDefined By
 InheritedflexAvailable : Boolean
[static] Flex framework work-around part #2
MediatorBase
Property Detail
contextViewproperty
public var contextView:DisplayObjectContainer

eventDispatcherproperty 
eventDispatcher:IEventDispatcher


Implementation
    public function get eventDispatcher():IEventDispatcher
    public function set eventDispatcher(value:IEventDispatcher):void
eventMapproperty 
eventMap:IEventMap  [read-only]

Local EventMap


Implementation
    protected function get eventMap():IEventMap
mediatorMapproperty 
public var mediatorMap:IMediatorMap

Constructor Detail
Mediator()Constructor
public function Mediator()



Method Detail
addContextListener()method
protected function addContextListener(type:String, listener:Function, eventClass:Class = null, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void

Syntactical sugar for mapping a listener to an IEventDispatcher

Parameters

type:String
 
listener:Function
 
eventClass:Class (default = null)
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = true)

addViewListener()method 
protected function addViewListener(type:String, listener:Function, eventClass:Class = null, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void

Syntactical sugar for mapping a listener to the viewComponent

Parameters

type:String
 
listener:Function
 
eventClass:Class (default = null)
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = true)

dispatch()method 
protected function dispatch(event:Event):Boolean

Dispatch helper method

Parameters

event:Event — The Event to dispatch on the IContext's IEventDispatcher

Returns
Boolean
preRemove()method 
override public function preRemove():void

Invoked when the IMediator has been removed by the IMediatorMap