| Package | org.springextensions.actionscript.stage |
| SVN browsing | FlexStageProcessorRegistry.as |
| Fisheye | FlexStageProcessorRegistry.as |
| Class | public class FlexStageProcessorRegistry |
| Implements | IStageProcessorRegistry |
A singleton implementation of the IStageProcessorRegistry that can be shared amongst FlexXMLApplicationContext
instances that perform stage processing.
Sample project: stagewiring (source)
| Property | Defined by | ||
|---|---|---|---|
| enabled : Boolean
Determines if the current
IStageProcessorRegistry is enabled. | FlexStageProcessorRegistry | ||
| initialized : Boolean [read-only]
True if the current
IStageProcessorRegistry has been initialized. | FlexStageProcessorRegistry | ||
| modulePolicy : ModulePolicy
Determines how the
FlexStageProcessorRegistry handles Modules that are added to the stage. | FlexStageProcessorRegistry | ||
| numRegistrations : uint [read-only]
The number of
IObjectSelector registrations. | FlexStageProcessorRegistry | ||
| Property | Defined by | ||
|---|---|---|---|
| stageProcessorRegistrations : Array
An
Array of StageProcessorRegistrations instances. | FlexStageProcessorRegistry | ||
| Method | Defined by | ||
|---|---|---|---|
|
FlexStageProcessorRegistry(singletonToken:Object)
Creates a new
FlexStageProcessorRegistry. | FlexStageProcessorRegistry | ||
|
clear():void
Clears the all processor and context registrations in the current
IStageProcessorRegistry
| FlexStageProcessorRegistry | ||
|
getAllObjectSelectors():Array
Retrieves a list of all the
IObjectSelectors that have been registered with the current IStageProcessorRegistry. | FlexStageProcessorRegistry | ||
|
getAllStageProcessors():Array
Retrieves a list of all the
IStageProcessors that have been registered with the current IStageProcessorRegistry. | FlexStageProcessorRegistry | ||
|
[static]
Returns a singleton instance for the current
FlexStageProcessorRegistry. | FlexStageProcessorRegistry | ||
|
Retrieves the
IObjectSelector instance that is associated with the specified IStageProcessor instance. | FlexStageProcessorRegistry | ||
|
getStageProcessorByName(name:String):Array
Retrieves a list of all the
IStageProcessors with the specified name. | FlexStageProcessorRegistry | ||
|
getStageProcessorsByDocument(document:Object):Array
| FlexStageProcessorRegistry | ||
|
getStageProcessorsByType(type:Class):Array
Retrieves a list of all the
IStageProcessors of the specified Class. | FlexStageProcessorRegistry | ||
|
initialize():void
Performs initialization of the
IStageProcessorRegistry. | FlexStageProcessorRegistry | ||
|
processDisplayObject(displayObject:DisplayObject):void
Detects whether an object added to the stage is a candidate for processing through
the list of
StageProcessorRegistration instances, if any IObjectSelector
approves of the object its associated IStageProcessor's process() method is invoked. | FlexStageProcessorRegistry | ||
|
processStage(startComponent:DisplayObject = null):void
Recursively loops through the stage displaylist and processes every object therein.
| FlexStageProcessorRegistry | ||
|
registerContext(parentDocument:Object, applicationContext:IApplicationContext):void
Registers the specified
IApplicationContext with the current IStageProcessorRegistry by associating
it with the specified parentDocument. | FlexStageProcessorRegistry | ||
|
registerStageProcessor(name:String, stageProcessor:IStageProcessor, objectSelector:IObjectSelector):void
Adds the specified
IStageProcessor instance to the collection. | FlexStageProcessorRegistry | ||
|
registerWindow(window:IEventDispatcher):void
| FlexStageProcessorRegistry | ||
|
removeStageProcesser(processor:IStageProcessor):void
| FlexStageProcessorRegistry | ||
|
unregisterContext(parentDocument:Object, applicationContext:IApplicationContext):void
Unregisters the specified
IApplicationContext with the current IStageProcessorRegistry by removing its association
it with the specified parentDocument. | FlexStageProcessorRegistry | ||
|
unregisterStageProcessor(name:String, document:Object):void
Removes the
IStageProcessor with the specified name. | FlexStageProcessorRegistry | ||
|
unregisterWindow(window:IEventDispatcher):void
| FlexStageProcessorRegistry | ||
| Method | Defined by | ||
|---|---|---|---|
|
added_handler(event:Event):void
If
enabled is true this event handler passes the event.target to the
processStageComponent() method. | FlexStageProcessorRegistry | ||
|
flexStageProcessorRegistryInit(singletonToken:Object):void
| FlexStageProcessorRegistry | ||
|
getRoot(component:UIComponent):Object
Retrieves the root component of the given UIComponent.
| FlexStageProcessorRegistry | ||
|
processDisplayObjectRecursively(displayObject:DisplayObject):void
Sends the specified
DisplayObject instance to the processStageComponent() method,
then loops through its children and recursively sends those to the processStageComponent() method. | FlexStageProcessorRegistry | ||
|
processDisplayObjectWithStageProcessorRegistration(displayObject:DisplayObject, stageProcessorRegistration:StageProcessorRegistration):void
First searches for all the
IStageProcessors with a document property that match the specified stageComponent.parentDocument property
and lets these IStageProcessors process the stageComponent. | FlexStageProcessorRegistry | ||
| Constant | Defined by | ||
|---|---|---|---|
| MX_WINDOW_CLASS : String = "mx.core::Window" [static]
| FlexStageProcessorRegistry | ||
| SPARK_WINDOW_CLASS : String = "spark.components::Window" [static]
| FlexStageProcessorRegistry | ||
| enabled | property |
enabled:Boolean [read-write]
Determines if the current IStageProcessorRegistry is enabled.
public function get enabled():Boolean
public function set enabled(value:Boolean):void
| initialized | property |
initialized:Boolean [read-only]
True if the current IStageProcessorRegistry has been initialized.
public function get initialized():Boolean
| modulePolicy | property |
public var modulePolicy:ModulePolicy
Determines how the FlexStageProcessorRegistry handles Modules that are added to the stage.
| numRegistrations | property |
numRegistrations:uint [read-only]
The number of IObjectSelector registrations.
public function get numRegistrations():uint
| stageProcessorRegistrations | property |
protected var stageProcessorRegistrations:Array
An Array of StageProcessorRegistrations instances.
See also
| FlexStageProcessorRegistry | () | constructor |
public function FlexStageProcessorRegistry(singletonToken:Object)
Creates a new FlexStageProcessorRegistry. Do not call this constructor directly, invoke getInstance() instead.
singletonToken:Object |
| added_handler | () | method |
protected function added_handler(event:Event):void
If enabled is true this event handler passes the event.target to the
processStageComponent() method.
event:Event — The Event.ADDED instance.
|
| clear | () | method |
public function clear():void
Clears the all processor and context registrations in the current IStageProcessorRegistry
| flexStageProcessorRegistryInit | () | method |
protected function flexStageProcessorRegistryInit(singletonToken:Object):voidParameters
singletonToken:Object |
| getAllObjectSelectors | () | method |
public function getAllObjectSelectors():Array
Retrieves a list of all the IObjectSelectors that have been registered with the current IStageProcessorRegistry.
Array — An Array of IObjectSelectors.
|
| getAllStageProcessors | () | method |
public function getAllStageProcessors():Array
Retrieves a list of all the IStageProcessors that have been registered with the current IStageProcessorRegistry.
Array — An Array of IStageProcessors.
|
| getInstance | () | method |
public static function getInstance():FlexStageProcessorRegistry
Returns a singleton instance for the current FlexStageProcessorRegistry. Use this method to receive
an instance of FlexStageProcessorRegistry instead of calling the constructor directly.
FlexStageProcessorRegistry |
| getObjectSelectorForStageProcessor | () | method |
public function getObjectSelectorForStageProcessor(stageProcessor:IStageProcessor):IObjectSelector
Retrieves the IObjectSelector instance that is associated with the specified IStageProcessor instance.
stageProcessor:IStageProcessor — The specified IStageProcessor.
|
IObjectSelector —
The IObjectSelector instance that is associated with the specified IStageProcessor, or null if none was found.
|
| getRoot | () | method |
protected function getRoot(component:UIComponent):ObjectRetrieves the root component of the given UIComponent. The root will either be the Application, Module or (native) Window the component lives in.
Parameterscomponent:UIComponent |
Object |
| getStageProcessorByName | () | method |
public function getStageProcessorByName(name:String):Array
Retrieves a list of all the IStageProcessors with the specified name.
name:String — The specified name
|
Array — An Array of IStageProcessors, or null if none was found.
|
| getStageProcessorsByDocument | () | method |
public function getStageProcessorsByDocument(document:Object):ArrayParameters
document:Object |
Array |
| getStageProcessorsByType | () | method |
public function getStageProcessorsByType(type:Class):Array
Retrieves a list of all the IStageProcessors of the specified Class.
type:Class — the specified Class.
|
Array — An Array of IStageProcessors.
|
| initialize | () | method |
public function initialize():void
Performs initialization of the IStageProcessorRegistry.
| processDisplayObject | () | method |
public function processDisplayObject(displayObject:DisplayObject):void
Detects whether an object added to the stage is a candidate for processing through
the list of StageProcessorRegistration instances, if any IObjectSelector
approves of the object its associated IStageProcessor's process() method is invoked.
displayObject:DisplayObject — a reference to the object that was added to the stage
|
See also
| processDisplayObjectRecursively | () | method |
protected function processDisplayObjectRecursively(displayObject:DisplayObject):void
Sends the specified DisplayObject instance to the processStageComponent() method,
then loops through its children and recursively sends those to the processStageComponent() method.
displayObject:DisplayObject — The specified DisplayObject instance
|
| processDisplayObjectWithStageProcessorRegistration | () | method |
protected function processDisplayObjectWithStageProcessorRegistration(displayObject:DisplayObject, stageProcessorRegistration:StageProcessorRegistration):void
First searches for all the IStageProcessors with a document property that match the specified stageComponent.parentDocument property
and lets these IStageProcessors process the stageComponent. If no matching IStageProcessors are found a list of
IStageProcessors is retrieved that have a document property whose value matches the current Application.
displayObject:DisplayObject — The UIComponent instance that needs to be processed.
|
|
stageProcessorRegistration:StageProcessorRegistration — The StageProcessorRegistration instance that is searched for appropriate IStageProcessor instances.
|
| processStage | () | method |
public function processStage(startComponent:DisplayObject = null):voidRecursively loops through the stage displaylist and processes every object therein.
ParametersstartComponent:DisplayObject (default = null) — Optionally a start component can be specified that will be used as the root for recursion.
|
| registerContext | () | method |
public function registerContext(parentDocument:Object, applicationContext:IApplicationContext):void
Registers the specified IApplicationContext with the current IStageProcessorRegistry by associating
it with the specified parentDocument.
parentDocument:Object — The specified parentDocument, if this is not a Module the specified IApplicationContext will be associated with the current Application.
|
|
applicationContext:IApplicationContext — The specified IApplicationContext.
|
| registerStageProcessor | () | method |
public function registerStageProcessor(name:String, stageProcessor:IStageProcessor, objectSelector:IObjectSelector):void
Adds the specified IStageProcessor instance to the collection.
name:String — The name of the IStageProcessor, if an instance by that name and with the same document property already exists in the collection it will be replaced.
|
|
stageProcessor:IStageProcessor — The specified IStageProcessor instance.
|
|
objectSelector:IObjectSelector |
| registerWindow | () | method |
public function registerWindow(window:IEventDispatcher):voidParameters
window:IEventDispatcher |
| removeStageProcesser | () | method |
public function removeStageProcesser(processor:IStageProcessor):voidParameters
processor:IStageProcessor |
| unregisterContext | () | method |
public function unregisterContext(parentDocument:Object, applicationContext:IApplicationContext):void
Unregisters the specified IApplicationContext with the current IStageProcessorRegistry by removing its association
it with the specified parentDocument.
parentDocument:Object — The specified parentDocument.
|
|
applicationContext:IApplicationContext — The specified IApplicationContext.
|
| unregisterStageProcessor | () | method |
public function unregisterStageProcessor(name:String, document:Object):void
Removes the IStageProcessor with the specified name.
name:String — The name of the IStageProcessor that will be removed
|
|
document:Object |
| unregisterWindow | () | method |
public function unregisterWindow(window:IEventDispatcher):voidParameters
window:IEventDispatcher |
| MX_WINDOW_CLASS | constant |
public static const MX_WINDOW_CLASS:String = "mx.core::Window"
| SPARK_WINDOW_CLASS | constant |
public static const SPARK_WINDOW_CLASS:String = "spark.components::Window"