Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
GlobalizationBase

Package | spark.globalization.supportClasses
Class | public class GlobalizationBase
Inheritance | GlobalizationBase AdvancedStyleClient flash.events.EventDispatcher
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.

See also

spark.formatters.CurrencyFormatter
spark.formatters.DateTimeFormatter
spark.formatters.NumberFormatter
spark.globalization.MatchingCollator
spark.globalization.SortingCollator
spark.globalization.StringTools

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | actualLocaleIDName : String [read-only] The name of the actual locale ID used by this class object. | GlobalizationBase
|  | className : String [read-only] The name of the component class. | AdvancedStyleClient
|  | id : String The identity of the component. | AdvancedStyleClient
|  | inheritingStyles : 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
|  | moduleFactory : 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
|  | nonInheritingStyles : Object The beginning of this component's chain of non-inheriting styles. | AdvancedStyleClient
|  | styleDeclaration : CSSStyleDeclaration The style declaration that holds the inline styles declared by this object. | AdvancedStyleClient
|  | styleManager : IStyleManager2 [read-only] Returns the StyleManager instance used by this component. | AdvancedStyleClient
|  | styleName : Object The source of this object's style values. | AdvancedStyleClient
|  | styleParent : IAdvancedStyleClient A component's parent is used to evaluate descendant selectors. | AdvancedStyleClient

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | GlobalizationBase() Constructor. | GlobalizationBase
|  | clearStyle(styleProp:String):void Deletes a style property from this component instance. | AdvancedStyleClient
|  | getClassStyleDeclarations():Array 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
|  | hasCSSState():Boolean Returns true if currentCSSState is not null. | AdvancedStyleClient
|  | initialized(document:Object, id:String):void The initialized method is called when this class or a class that extends this class is used in an MXML declaration. | AdvancedStyleClient
|  | matchesCSSState(cssState:String):Boolean Returns true if cssState matches currentCSSState. | AdvancedStyleClient
|  | matchesCSSType(cssType:String):Boolean Determines whether this instance is the same as, or is a subclass of, the given type. | AdvancedStyleClient
|  | notifyStyleChangeInChildren(styleProp:String, recursive:Boolean):void Propagates style changes to the children of this style client instance. | AdvancedStyleClient
|  | regenerateStyleCache(recursive:Boolean):void Sets up the internal style cache values so that the getStyle() method functions. | AdvancedStyleClient
|  | registerEffects(effects:Array):void Registers the EffectManager as one of the event listeners for each effect event. | AdvancedStyleClient
|  | setStyle(styleProp:String, newValue:*):void Sets a style property on this component instance. | AdvancedStyleClient
|  | styleChanged(styleProp:String):void Detects changes to style properties. | AdvancedStyleClient
|  | stylesInitialized():void Flex calls the stylesInitialized() method when the styles for a component are first initialized. | AdvancedStyleClient

Protected Methods
Show Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined By
--- | --- | ---
|  | setDeferredStyles():void | AdvancedStyleClient

Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | change | 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

Styles

| Style | Description | Defined By
--- | --- | --- | ---
|  | locale | Type: String CSS Inheritance: yes 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) See also http://www.unicode.org/reports/tr35/ | 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.

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.

Implementation
`public function get lastOperationStatus():String`

See also

flash.globalization.LastOperationStatus
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`
Event.type property = `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.

Wed Nov 15 2017, 09:50 AM +01:00