Packageorg.robotlegs.base
Classpublic class EventMap
InheritanceEventMap Inheritance Object
Implements IEventMap

An abstract IEventMap implementation



Public Properties
 PropertyDefined By
  dispatcherListeningEnabled : Boolean
EventMap
Protected Properties
 PropertyDefined By
  eventDispatcher : IEventDispatcher
The IEventDispatcher
EventMap
Public Methods
 MethodDefined By
  
EventMap(eventDispatcher:IEventDispatcher)
Creates a new EventMap object
EventMap
  
mapListener(dispatcher:IEventDispatcher, type:String, listener:Function, eventClass:Class = null, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void
The same as calling addEventListener directly on the IEventDispatcher, but keeps a list of listeners for easy (usually automatic) removal.
EventMap
  
unmapListener(dispatcher:IEventDispatcher, type:String, listener:Function, eventClass:Class = null, useCapture:Boolean = false):void
The same as calling removeEventListener directly on the IEventDispatcher, but updates our local list of listeners.
EventMap
  
Removes all listeners registered through mapListener
EventMap
Protected Methods
 MethodDefined By
  
routeEventToListener(event:Event, listener:Function, originalEventClass:Class):void
Event Handler
EventMap
Property Detail
dispatcherListeningEnabledproperty
dispatcherListeningEnabled:Boolean


Implementation
    public function get dispatcherListeningEnabled():Boolean
    public function set dispatcherListeningEnabled(value:Boolean):void
eventDispatcherproperty 
protected var eventDispatcher:IEventDispatcher

The IEventDispatcher

Constructor Detail
EventMap()Constructor
public function EventMap(eventDispatcher:IEventDispatcher)

Creates a new EventMap object

Parameters
eventDispatcher:IEventDispatcher — An IEventDispatcher to treat as a bus
Method Detail
mapListener()method
public function mapListener(dispatcher:IEventDispatcher, type:String, listener:Function, eventClass:Class = null, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void

The same as calling addEventListener directly on the IEventDispatcher, but keeps a list of listeners for easy (usually automatic) removal.

Parameters

dispatcher:IEventDispatcher — The IEventDispatcher to listen to
 
type:String — The Event type to listen for
 
listener:Function — The Event handler
 
eventClass:Class (default = null) — Optional Event class for a stronger mapping. Defaults to flash.events.Event.
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = true)

routeEventToListener()method 
protected function routeEventToListener(event:Event, listener:Function, originalEventClass:Class):void

Event Handler

Parameters

event:Event — The Event
 
listener:Function
 
originalEventClass:Class

unmapListener()method 
public function unmapListener(dispatcher:IEventDispatcher, type:String, listener:Function, eventClass:Class = null, useCapture:Boolean = false):void

The same as calling removeEventListener directly on the IEventDispatcher, but updates our local list of listeners.

Parameters

dispatcher:IEventDispatcher — The IEventDispatcher
 
type:String — The Event type
 
listener:Function — The Event handler
 
eventClass:Class (default = null) — Optional Event class for a stronger mapping. Defaults to flash.events.Event.
 
useCapture:Boolean (default = false)

unmapListeners()method 
public function unmapListeners():void

Removes all listeners registered through mapListener