| Package | org.springextensions.actionscript.localization |
| SVN browsing | LocalizationStageProcessor.as |
| Fisheye | LocalizationStageProcessor.as |
| Class | public class LocalizationStageProcessor |
| Inheritance | LocalizationStageProcessor AbstractStageProcessor |
IStageProcessor that can assign resource values based on the value of specified property on a stage component.
See also
Documentation reference: the localizationstageprocessor class
Sample project: localization (source)
External reference: http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Runtime_Localization
| Property | Defined by | ||
|---|---|---|---|
| bundleName : String
The name of the resource bundle that contains all te resource values.
| LocalizationStageProcessor | ||
![]() | document : Object
The MXML document associated with the current
IStageProcessor. | AbstractStageProcessor | |
![]() | isDisposed : Boolean | AbstractStageProcessor | |
![]() | objectSelector : IObjectSelector
The specified
IObjectSelector instance. | AbstractStageProcessor | |
| resourceManager : IResourceManager
The
IResourceManager instance used to retrieve resource values from. | LocalizationStageProcessor | ||
| resourceSuffixes : Array An For example, a button with id 'myButton': | LocalizationStageProcessor | ||
| Property | Defined by | ||
|---|---|---|---|
| componentCache : Dictionary
A Dictionary instance used to keep track of the stage components that have already been
processed by the current
LocalizationStageProcessor. | LocalizationStageProcessor | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new
LocalizationStageProcessor instance. | LocalizationStageProcessor | ||
|
dispose():void
| LocalizationStageProcessor | ||
|
process(object:Object):Object
| LocalizationStageProcessor | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
abstractStageProcessorInit(self:AbstractStageProcessor):void
| AbstractStageProcessor | |
|
assignResourceString(object:Object, propertyName:String, resourceSuffix:String):void
Combines the If the specified | LocalizationStageProcessor | ||
|
assignResourceStrings(object:Object, propertyName:String):void
| LocalizationStageProcessor | ||
|
connectListeners():void
Adds the
reassignResourceStrings method as an Event.CHANGE listener. | LocalizationStageProcessor | ||
|
disconnectListeners():void
Removes the
reassignResourceStrings method as an Event.CHANGE listener. | LocalizationStageProcessor | ||
|
resourceManagerChange_handler(event:Event):void
Handles the
Event.CHANGE on the resourceManager, when invoked it re-assigns all the resource
values to each stage component that has been processed. | LocalizationStageProcessor | ||
| bundleName | property |
bundleName:String [read-write]The name of the resource bundle that contains all te resource values.
Implementation public function get bundleName():String
public function set bundleName(value:String):void
| componentCache | property |
protected var componentCache:Dictionary
A Dictionary instance used to keep track of the stage components that have already been
processed by the current LocalizationStageProcessor. This Dictionary
instance is created with the weakKeys constructor argument set to true
and will therefore not cause any memory leaks should any of the components be removed
from the stage permanently.
| resourceManager | property |
resourceManager:IResourceManager [read-write]
The IResourceManager instance used to retrieve resource values from.
public function get resourceManager():IResourceManager
public function set resourceManager(value:IResourceManager):void
| resourceSuffixes | property |
resourceSuffixes:Array [read-write]
An Array of suffixes that correspond to property names on the stage component.
For example, a button with id 'myButton':
<Button id="myButton"/>
Can have its label property assigned automatically if a resourceName exists with this name:
myButton_label=Click this button
The default value is ['text','label','toolTip','prompt','dataProvider','title','headerText'].
public function get resourceSuffixes():Array
public function set resourceSuffixes(value:Array):void
| LocalizationStageProcessor | () | constructor |
public function LocalizationStageProcessor()
Creates a new LocalizationStageProcessor instance.
| assignResourceString | () | method |
protected function assignResourceString(object:Object, propertyName:String, resourceSuffix:String):void
Combines the propertyName and resourceSuffix into a resource name with the form propertyName + _ + resourceSuffix.
If the specified object has a property with the name specified by the resourceSuffix value, if a necessary resource value exists it is assigned
to the property
object:Object — The stage component that will be processed
|
|
propertyName:String — The property name of the specified stage component whose value will be used as a base name for the resource values.
|
|
resourceSuffix:String — The suffix that together with the property name value forms the resourcename
|
| assignResourceStrings | () | method |
protected function assignResourceStrings(object:Object, propertyName:String):voidParameters
object:Object — The stage component that will be processed
|
|
propertyName:String — The property name of the specified stage component whose value will be used as a base name for the resource values.
|
| connectListeners | () | method |
protected function connectListeners():void
Adds the reassignResourceStrings method as an Event.CHANGE listener.
| disconnectListeners | () | method |
protected function disconnectListeners():void
Removes the reassignResourceStrings method as an Event.CHANGE listener.
| dispose | () | method |
public override function dispose():void
| process | () | method |
public override function process(object:Object):ObjectParameters
object:Object |
Object |
| resourceManagerChange_handler | () | method |
protected function resourceManagerChange_handler(event:Event):void
Handles the Event.CHANGE on the resourceManager, when invoked it re-assigns all the resource
values to each stage component that has been processed.
event:Event — An Event.ADDED event
|