| Package | org.robotlegs.mvcs |
| Class | public class Mediator |
| Inheritance | Mediator MediatorBase Object |
IMediator implementation
| Property | Defined By | ||
|---|---|---|---|
| contextView : DisplayObjectContainer | Mediator | ||
| eventDispatcher : IEventDispatcher | Mediator | ||
| mediatorMap : IMediatorMap | Mediator | ||
| Property | Defined By | ||
|---|---|---|---|
| eventMap : IEventMap [read-only]
Local EventMap
| Mediator | ||
![]() | removed : Boolean
Internal
In the case of deffered instantiation, onRemove might get called before
onCreationComplete has fired. | MediatorBase | |
![]() | UIComponentClass : Class [static]
Flex framework work-around part #1
| MediatorBase | |
![]() | viewComponent : Object
Internal
This Mediator's View Component - used by the RobotLegs MVCS framework internally. | MediatorBase | |
| Method | Defined By | ||
|---|---|---|---|
Mediator() | Mediator | ||
![]() | getViewComponent():Object
The IMediator's view component
| MediatorBase | |
![]() | 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 | |
![]() | onRemove():void
Should be invoked by the IMediator itself when it is ready to for cleanup
Override and place your cleanup code here
| MediatorBase | |
![]() | preRegister():void
Should be invoked by the IMediatorMap during IMediator registration
| MediatorBase | |
preRemove():void [override]
Invoked when the IMediator has been removed by the IMediatorMap
| Mediator | ||
![]() | setViewComponent(viewComponent:Object):void
The IMediator's view component
| MediatorBase | |
| Method | Defined 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 | ||
![]() | 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 | ||
![]() | onCreationComplete(e:Event):void
Flex framework work-around part #4
FlexEvent.CREATION_COMPLETE handler for this Mediator's View Component
| MediatorBase | |
| contextView | property |
public var contextView:DisplayObjectContainer| eventDispatcher | property |
eventDispatcher:IEventDispatcher
public function get eventDispatcher():IEventDispatcher public function set eventDispatcher(value:IEventDispatcher):void| eventMap | property |
eventMap:IEventMap [read-only] Local EventMap
protected function get eventMap():IEventMap| mediatorMap | property |
public var mediatorMap:IMediatorMap| Mediator | () | Constructor |
public function Mediator()| 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):BooleanDispatch helper method
Parameters
event:Event — The Event to dispatch on the IContext's IEventDispatcher
|
Boolean |
| preRemove | () | method |
override public function preRemove():void
Invoked when the IMediator has been removed by the IMediatorMap