ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
spark.globalization.supportClasses 

GlobalizationBase  - AS3 Flex

Packagespark.globalization.supportClasses
Classpublic class GlobalizationBase
InheritanceGlobalizationBase Inheritance AdvancedStyleClient Inheritance EventDispatcher Inheritance Object
Subclasses CollatorBase, DateTimeFormatter, GlobalizationValidatorBase, NumberFormatterBase, StringTools

Language Version: ActionScript 3.0
Product Version: Flex 4.5
Runtime Versions: Flash Player 10.1, AIR 2.5

This is a base class used for wrapper classes that make use of the flash.globalization classes for language and region specific formatting of dates, times, number, and currency amounts, string comparison and case conversion.

Related API Elements



Public Properties
 PropertyDefined By
  actualLocaleIDName : String
[read-only] The name of the actual locale ID used by this class object.
GlobalizationBase
 InheritedclassName : String
[read-only] The name of the component class.
AdvancedStyleClient
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedid : String
The identity of the component.
AdvancedStyleClient
 InheritedinheritingStyles : Object
An object containing the inheritable styles for this non-visual style client instance.
AdvancedStyleClient
  lastOperationStatus : String
[read-only] The status of the most recent operation that this class object performed.
GlobalizationBase
 InheritedmoduleFactory : IFlexModuleFactory
A module factory is used as context for finding the style manager that controls the styles for this non-visual style client instance.
AdvancedStyleClient
 InheritednonInheritingStyles : Object
The beginning of this component's chain of non-inheriting styles.
AdvancedStyleClient
 InheritedstyleDeclaration : CSSStyleDeclaration
The style declaration that holds the inline styles declared by this object.
AdvancedStyleClient
 InheritedstyleManager : IStyleManager2
[read-only] Returns the StyleManager instance used by this component.
AdvancedStyleClient
 InheritedstyleName : Object
The source of this object's style values.
AdvancedStyleClient
 InheritedstyleParent : IAdvancedStyleClient
A component's parent is used to evaluate descendant selectors.
AdvancedStyleClient
Public Methods
 MethodDefined By
  
Constructor.
GlobalizationBase
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
 Inherited
Deletes a style property from this component instance.
AdvancedStyleClient
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Returns an Array of CSSStyleDeclaration objects for the type selector that applies to this component, or null if none exist.
AdvancedStyleClient
  
getStyle(styleProp:String):*
[override] Gets a style property that has been set anywhere in this component's style lookup chain.
GlobalizationBase
 Inherited
Returns true if currentCSSState is not null.
AdvancedStyleClient
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
The initialized method is called when this class or a class that extends this class is used in an MXML declaration.
AdvancedStyleClient
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Returns true if cssState matches currentCSSState.
AdvancedStyleClient
 Inherited
Determines whether this instance is the same as, or is a subclass of, the given type.
AdvancedStyleClient
 Inherited
Propagates style changes to the children of this style client instance.
AdvancedStyleClient
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets up the internal style cache values so that the getStyle() method functions.
AdvancedStyleClient
 Inherited
Registers the EffectManager as one of the event listeners for each effect event.
AdvancedStyleClient
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
setStyle(styleProp:String, newValue:*):void
Sets a style property on this component instance.
AdvancedStyleClient
 Inherited
Detects changes to style properties.
AdvancedStyleClient
 Inherited
Flex calls the stylesInitialized() method when the styles for a component are first initialized.
AdvancedStyleClient
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
  The change event is generated whenever the locale style is changed or another property is set that would cause the format of a number to change or cause updates to the other values available through this class.GlobalizationBase
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
Styles

Styles are either common or associated with a specific theme. If the style is common, it can be used with any theme. If a style is associated with a specific theme, it can only be used if your application uses that theme.

Common Styles
 Style Description Defined By
  
locale
Type: String CSS Inheritance: Yes
Language Version: ActionScript 3.0  Product Version: Flex 4.5  Runtime Versions: Flash10.1, AIR 2.5

The locale identifier that specifies the language, region, script and optionally other related tags and keys. The syntax of this identifier must follow the syntax defined by the Unicode Technical Standard #35 (e.g. en-US, de-DE, zh-Hans-CN)

Learn more

GlobalizationBase
Property Detail

actualLocaleIDName

property
actualLocaleIDName:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4.5
Runtime Versions: Flash Player 10.1, AIR 2.5

The name of the actual locale ID used by this class object. This is the locale that is used to access the formatting data and functionality from the operating system.

If the locale that was set by the locale style is not available, then the value of the actualLocaleIDName is different from the value of the locale style. It indicates the fallback locale that is being used. If the locale style was set to LocaleID.DEFAULT the name of the locale specified by the user's operating system is used.

This property can be used as the source for data binding. When this property is modified, it dispatches the change event.



Implementation
    public function get actualLocaleIDName():String

lastOperationStatus

property 
lastOperationStatus:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4.5
Runtime Versions: Flash Player 10.1, AIR 2.5

The status of the most recent operation that this class object performed. The lastOperationStatus is set whenever the constructor or a method of this class is called, or when a property is set. For the possible values see the description under each method.

This property can be used as the source for data binding. When this property is modified, it dispatches the change event.



Implementation
    public function get lastOperationStatus():String

Related API Elements

Constructor Detail

GlobalizationBase

()Constructor
public function GlobalizationBase()

Language Version: ActionScript 3.0
Product Version: Flex 4.5
Runtime Versions: Flash Player 10.1, AIR 2.5

Constructor.

Method Detail

getStyle

()method
override public function getStyle(styleProp:String):*

Language Version: ActionScript 3.0
Product Version: Flex 4.5
Runtime Versions: Flash Player 10.1, AIR 2.5

Gets a style property that has been set anywhere in this component's style lookup chain.

This same method is used to get any kind of style property, so the value returned can be a Boolean, String, Number, int, uint (for an RGB color), Class (for a skin), or any kind of object. Therefore the return type is simply specified as *.

If you are getting a particular style property, you know its type and often want to store the result in a variable of that type. No casting from * to that type is necessary.

var backgroundColor:uint = getStyle("backgroundColor");

If the style property has not been set anywhere in the style lookup chain, the value returned by getStyle() is undefined. Note that undefined is a special value that is not the same as false, "", NaN, 0, or null. No valid style value is ever undefined. You can use the method IStyleManager2.isValidStyleValue() to test whether the value was set.

Parameters

styleProp:String — Name of the style property.

Returns
* — Style value.
Event Detail

change

Event
Event Object Type: flash.events.Event
property Event.type = flash.events.Event.CHANGE

Language Version: ActionScript 3.0
Product Version: Flex 4.5
Runtime Versions: Flash Player 10.1, AIR 2.5

The change event is generated whenever the locale style is changed or another property is set that would cause the format of a number to change or cause updates to the other values available through this class.

The Event.CHANGE constant defines the value of the type property of a change event object.

This event has the following properties:

PropertyValue
bubblestrue
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe object that has had its value modified. The target is not always the object in the display list that registered the event listener. Use the currentTarget property to access the object in the display list that is currently processing the event.