| Package | org.springextensions.actionscript.localization |
| Class | public class LocalizationStageProcessor |
| Inheritance | LocalizationStageProcessor org.as3commons.stageprocessing.impl.AbstractStageObjectProcessor |
IStageProcessor that can assign resource values based on the value of specified property on a stage component.
| Property | Defined By | ||
|---|---|---|---|
| bundleName : String
The name of the resource bundle that contains all te resource values. | LocalizationStageProcessor | ||
| propertyName : String | LocalizationStageProcessor | ||
| resourceManager : IResourceManager
The IResourceManager instance used to retrieve resource values from. | LocalizationStageProcessor | ||
| resourceSuffixes : Vector.<String>
An Vector.<String> 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
| 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 [override] | LocalizationStageProcessor | ||
process(object:DisplayObject):DisplayObject [override]
| LocalizationStageProcessor | ||
| Method | Defined By | ||
|---|---|---|---|
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
| 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 | ||
| 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:StringThe name of the resource bundle that contains all te resource values.
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.
| propertyName | property |
propertyName:String public function get propertyName():String public function set propertyName(value:String):void| resourceManager | property |
resourceManager:IResourceManager
The IResourceManager instance used to retrieve resource values from.
public function get resourceManager():IResourceManager public function set resourceManager(value:IResourceManager):void| resourceSuffixes | property |
resourceSuffixes:Vector.<String>
An Vector.<String> 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():Vector.<String> public function set resourceSuffixes(value:Vector.<String>):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
Parameters
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):void
Parameters
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 |
override public function dispose():void| initLocalizationStageProcessor | () | method |
protected function initLocalizationStageProcessor():void| process | () | method |
override public function process(object:DisplayObject):DisplayObject
Parameters
object:DisplayObject |
DisplayObject —
|
| 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.
Parameters
event:Event — An Event.ADDED event
|