Packagecom.asfusion.mate.actions
Classpublic class ListenerInjector
InheritanceListenerInjector Inheritance AbstractAction
ImplementsIAction

Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.



Public Properties
 PropertyDefined by
  dispatcher : Object
Event Dispatcher to which we will register to listen to events.
ListenerInjector
  eventType : String
The type of event that we want to register to listen to.
ListenerInjector
  method : String
The listener function that processes the event.
ListenerInjector
  priority : int
The priority level of the event listener.
ListenerInjector
  targetId : String
This tag will run if any of the following statements is true: If the targetId is null.
ListenerInjector
  useCapture : Boolean
Determines whether the listener works in the capture phase or the target and bubbling phases.
ListenerInjector
  useWeakReference : Boolean
Determines whether the reference to the listener is strong or weak.
ListenerInjector
Protected Properties
 PropertyDefined by
 InheritedcurrentInstance : * = null
The currentInstance is the Object that this class will use and modify to do its work.
AbstractAction
 Inheriteddocument : Object
A reference to the document object associated with the IActionList that contains this action item.
AbstractAction
Public Methods
 MethodDefined by
 Inherited
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the AbstractAction is set up by using a tag.
AbstractAction
 Inherited
trigger(scope:IScope):void
This method gets called when the IActionList (ex: EventHandlers) is running.
AbstractAction
Protected Methods
 MethodDefined by
 Inherited
complete(scope:IScope):void
The last method that trigger calls.
AbstractAction
 Inherited
prepare(scope:IScope):void
The first method that trigger calls.
AbstractAction
  
run(scope:IScope):void
Where all the action occurs.
ListenerInjector
 Inherited
setProperties(scope:IScope):void
Where all the properties are set into the currentInstance.
AbstractAction
Property detail
dispatcherproperty
dispatcher:Object  [read-write]

Event Dispatcher to which we will register to listen to events. It can be an ISmartObject or an IEventDispatcher.

Implementation
    public function get dispatcher():Object
    public function set dispatcher(value:Object):void
eventTypeproperty 
eventType:String  [read-write]

The type of event that we want to register to listen to.

Implementation
    public function get eventType():String
    public function set eventType(value:String):void
methodproperty 
method:String  [read-write]

The listener function that processes the event. This function must accept an Event object as its only parameter and must return nothing

Implementation
    public function get method():String
    public function set method(value:String):void
priorityproperty 
priority:int  [read-write]

The priority level of the event listener. The priority is designated by a signed 32-bit integer. The higher the number, the higher the priority. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. The default priority is 0.

Implementation
    public function get priority():int
    public function set priority(value:int):void
targetIdproperty 
targetId:String  [read-write]

This tag will run if any of the following statements is true: If the targetId is null. If the id of the target matches the targetId. Note:Target is the instance of the target class.

The default value is null.

Implementation
    public function get targetId():String
    public function set targetId(value:String):void
useCaptureproperty 
useCapture:Boolean  [read-write]

Determines whether the listener works in the capture phase or the target and bubbling phases. If useCapture is set to true, the listener processes the event only during the capture phase and not in the target or bubbling phase. If useCapture is false, the listener processes the event only during the target or bubbling phase.

Implementation
    public function get useCapture():Boolean
    public function set useCapture(value:Boolean):void
useWeakReferenceproperty 
useWeakReference:Boolean  [read-write]

Determines whether the reference to the listener is strong or weak. A strong reference prevents your listener from being garbage-collected. A weak reference does not.

The default value is true.

Implementation
    public function get useWeakReference():Boolean
    public function set useWeakReference(value:Boolean):void
Method detail
run()method
protected override function run(scope:IScope):void

Where all the action occurs. At this moment, the currentInstance is already instantiated and all the properties are already set.

Parameters
scope:IScope