Packageorg.swizframework.utils.commands
Classpublic class CommandMap
InheritanceCommandMap Inheritance Object
Implements ISwizAware

Class used to map events to the commands they should trigger.



Public Properties
 PropertyDefined By
  swiz : ISwiz
[write-only] Setter to satisfy ISwizAware interface contract.
CommandMap
Protected Properties
 PropertyDefined By
  map : Dictionary
Dictionary to hold mappings.
CommandMap
  _swiz : ISwiz
Backing variable for swiz setter.
CommandMap
Protected Methods
 MethodDefined By
  
handleCommandEvent(event:Event):void
Handler method triggered when a mapped event is caught.
CommandMap
  
mapCommand(eventType:String, commandClass:Class, eventClass:Class = null, oneTime:Boolean = false):void
Method that performs actual event to command mapping.
CommandMap
  
Abstract method that sub classes should override and populate with calls to mapCommand().
CommandMap
Property Detail
_swizproperty
protected var _swiz:ISwiz

Backing variable for swiz setter.

mapproperty 
protected var map:Dictionary

Dictionary to hold mappings.

swizproperty 
swiz:ISwiz  [write-only]

Setter to satisfy ISwizAware interface contract.


Implementation
    public function set swiz(value:ISwiz):void

See also

Method Detail
handleCommandEvent()method
protected function handleCommandEvent(event:Event):void

Handler method triggered when a mapped event is caught.

Parameters

event:Event

mapCommand()method 
protected function mapCommand(eventType:String, commandClass:Class, eventClass:Class = null, oneTime:Boolean = false):void

Method that performs actual event to command mapping.

Parameters

eventType:String
 
commandClass:Class
 
eventClass:Class (default = null)
 
oneTime:Boolean (default = false)

mapCommands()method 
protected function mapCommands():void

Abstract method that sub classes should override and populate with calls to mapCommand(). Mapping commands here (and letting it be called for you) ensures all the necessary pieces have been provided before attempting to create any mappings.