Packageorg.robotlegs.base
Classpublic class MediatorBase
InheritanceMediatorBase Inheritance Object
Implements IMediator
Subclasses Mediator

An abstract IMediator implementation



Protected Properties
 PropertyDefined By
  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
Public Methods
 MethodDefined By
  
Creates a new Mediator object
MediatorBase
  
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
  
Should be invoked by the IMediatorMap during IMediator registration
MediatorBase
  
preRemove():void
Invoked when the IMediator has been removed by the IMediatorMap
MediatorBase
  
setViewComponent(viewComponent:Object):void
The IMediator's view component
MediatorBase
Protected Methods
 MethodDefined By
  
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
  
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
  flexAvailable : Boolean
[static] Flex framework work-around part #2
MediatorBase
Property Detail
removedproperty
protected var removed:Boolean

Internal

In the case of deffered instantiation, onRemove might get called before onCreationComplete has fired. This here Bool helps us track that scenario.

UIComponentClassproperty 
protected static var UIComponentClass:Class

Flex framework work-around part #1

viewComponentproperty 
protected var viewComponent:Object

Internal

This Mediator's View Component - used by the RobotLegs MVCS framework internally. You should declare a dependency on a concrete view component in your implementation instead of working with this property

Constructor Detail
MediatorBase()Constructor
public function MediatorBase()

Creates a new Mediator object

Method Detail
checkFlex()method
protected static function checkFlex():Boolean

Flex framework work-around part #3

Checks for availability of the Flex framework by trying to get the class for UIComponent.

Returns
Boolean
getViewComponent()method 
public function getViewComponent():Object

The IMediator's view component

Returns
Object — The view component
onCreationComplete()method 
protected function onCreationComplete(e:Event):void

Flex framework work-around part #4

FlexEvent.CREATION_COMPLETE handler for this Mediator's View Component

Parameters

e:Event — The Flex FlexEvent event

onRegister()method 
public function onRegister():void

Should be invoked by the IMediator itself when it is ready to be interacted with

Override and place your initialization code here

onRemove()method 
public function onRemove():void

Should be invoked by the IMediator itself when it is ready to for cleanup

Override and place your cleanup code here

preRegister()method 
public function preRegister():void

Should be invoked by the IMediatorMap during IMediator registration

preRemove()method 
public function preRemove():void

Invoked when the IMediator has been removed by the IMediatorMap

setViewComponent()method 
public function setViewComponent(viewComponent:Object):void

The IMediator's view component

Parameters

viewComponent:Object — view component

Constant Detail
flexAvailableConstant
protected static const flexAvailable:Boolean

Flex framework work-around part #2