ActionScript® 3.0 — dokumentacja dla platformy Adobe® Flash®
Strona główna  |  Ukryj listę pakietów i klas |  Pakiety  |  Klasy  |  Nowości  |  Indeks  |  Dodatki  |  Dlaczego język angielski?
Filtry: Pobieranie danych z serwera...
Pobieranie danych z serwera...
spark.formatters.supportClasses 

NumberFormatterBase  - AS3 Flex

Pakietspark.formatters.supportClasses
Klasapublic class NumberFormatterBase
DziedziczenieNumberFormatterBase Inheritance GlobalizationBase Inheritance AdvancedStyleClient Inheritance EventDispatcher Inheritance Object
Podklasy CurrencyFormatter, NumberFormatter

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

The NumberFormatterBase class is a base class for the NumberFormatter and CurrencyFormatter classes.

Składnia MXMLexpandedUkryj składnię MXML

The <s:NumberFormatterBase> tag inherits all of the tag attributes of its superclass and adds the following tag attributes:

  <s:NumberFormatterBase 
    Properties
    decimalSeparator="locale and OS dependent"
    digitsType="locale and OS dependent"
    errorText="null"
    fractionalDigits="locale and OS dependent"
    groupingPattern="locale and OS dependent"
    groupingSeparator="locale and OS dependent"
    leadingZero="locale and OS dependent"
    negativeSymbol="locale and OS dependent"
    trailingZeros="locale and OS dependent"
    useGrouping="locale and OS dependent"
  />
  

Powiązane elementy interfejsu API



Właściwości publiczne
 WłaściwośćZdefiniowane przez
 InheritedactualLocaleIDName : String
[tylko do odczytu] The name of the actual locale ID used by this class object.
GlobalizationBase
 InheritedclassName : String
[tylko do odczytu] The name of the component class.
AdvancedStyleClient
 Inheritedconstructor : Object
Odwołanie do obiektu klasy lub funkcji konstruktora, dotyczące danej instancji obiektu.
Object
  decimalSeparator : String
The decimal separator character used for formatting or parsing numbers that have a decimal part.
NumberFormatterBase
  digitsType : uint
Defines the set of digit characters to be used when formatting numbers.
NumberFormatterBase
  errorText : String
Replacement string returned by the format() method when an error occurs.
NumberFormatterBase
  fractionalDigits : int
The maximum number of digits that can appear after the decimal separator.
NumberFormatterBase
  groupingPattern : String
Describes the placement of grouping separators within the formatted number string.
NumberFormatterBase
  groupingSeparator : String
The character or string used for the grouping separator.
NumberFormatterBase
 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
[przesłanianie] [tylko do odczytu] The status of the most recent operation that this class object performed.
NumberFormatterBase
  leadingZero : Boolean
Specifies whether a leading zero is included in a formatted number when there are no integer digits to the left of the decimal separator.
NumberFormatterBase
 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
  negativeSymbol : String
The negative symbol to be used when formatting negative values.
NumberFormatterBase
 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
[tylko do odczytu] 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
  trailingZeros : Boolean
Specifies whether trailing zeros are included in a formatted number.
NumberFormatterBase
  useGrouping : Boolean
Enables the use of the grouping separator when formatting numbers.
NumberFormatterBase
Metody publiczne
 MetodaZdefiniowane przez
  
Constructor.
NumberFormatterBase
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Rejestruje obiekt detektora zdarzeń w obiekcie EventDispatcher, dzięki czemu detektor będzie otrzymywał powiadomienia o zdarzeniu.
EventDispatcher
 Inherited
Deletes a style property from this component instance.
AdvancedStyleClient
 Inherited
Wywołuje zdarzenie, tj. kieruje je do przepływu zdarzeń.
EventDispatcher
 Inherited
Returns an Array of CSSStyleDeclaration objects for the type selector that applies to this component, or null if none exist.
AdvancedStyleClient
 Inherited
getStyle(styleProp:String):*
[przesłanianie] 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
Sprawdza, czy obiekt EventDispatcher zawiera jakiekolwiek detektory zarejestrowane dla konkretnego typu zdarzeń.
EventDispatcher
 Inherited
Wskazuje, czy dla obiektu zdefiniowano określoną właściwość.
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
Wskazuje, czy instancja klasy Object należy do łańcucha prototypów obiektu określonego jako parametr.
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
Wskazuje, czy określona właściwość istnieje i jest przeliczalna.
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
Usuwa detektor z obiektu EventDispatcher.
EventDispatcher
 Inherited
Ustawia dostępność właściwości dynamicznej używanej w pętlach.
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
Zwraca ciąg reprezentujący obiekt — sformatowany zgodnie z konwencjami właściwymi dla ustawień regionalnych.
Object
 Inherited
Zwraca ciąg reprezentujący określony obiekt.
Object
 Inherited
Zwraca pierwotną wartość dla określonego obiektu.
Object
 Inherited
Sprawdza, czy detektor zdarzeń określonego typu jest zarejestrowany w tym obiekcie EventDispatcher lub jego elementach macierzystych.
EventDispatcher
Zdarzenia
 Zdarzenie Podsumowanie Zdefiniowane przez
 Inherited[zdarzenie broadcast] Wywoływane, gdy program Flash Player lub aplikacja środowiska wykonawczego AIR uzyskuje fokus w systemie operacyjnym i przechodzi w stan aktywny.EventDispatcher
 InheritedThe 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[zdarzenie broadcast] Wywoływane, gdy program Flash Player lub aplikacja AIR traci fokus w systemie operacyjnym i przechodzi w stan nieaktywny.EventDispatcher
Style

Wyróżnia się style wspólne i powiązane z konkretnymi motywami. Styl wspólny może być używany z dowolnym motywem. Styl powiązany z konkretnym motywem może być używany pod warunkiem, że w aplikacji jest używany właśnie ten motyw.

Style wspólne
 Styl Opis Zdefiniowane przez
 InheritedTyp: String Dziedziczenie CSS: Tak
Wersja języka: ActionScript 3.0  Wersja produktu: Flex 4.5  Wersje środowiska wykonawczego: Flash10.1, AIR 2.5

The locale identifier that specifies the language, region, script and optionally other related tags and keys.
GlobalizationBase
Szczegół właściwości

decimalSeparator

właściwość
decimalSeparator:String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

The decimal separator character used for formatting or parsing numbers that have a decimal part.

The default value is dependent on the locale and operating system.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie change .



Implementacja
    public function get decimalSeparator():String
    public function set decimalSeparator(value:String):void

Zgłasza
TypeError — if this property is assigned a null value.

Powiązane elementy interfejsu API

digitsType

właściwość 
digitsType:uint

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

Defines the set of digit characters to be used when formatting numbers.

Different languages and regions use different sets of characters to represent the digits 0 through 9. This property defines the set of digits to be used.

The value of this property represents the Unicode value for the zero digit of a decimal digit set. The valid values for this property are defined in the NationalDigitsType class.

The default value is dependent on the locale and operating system.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie change .



Implementacja
    public function get digitsType():uint
    public function set digitsType(value:uint):void

Powiązane elementy interfejsu API

errorText

właściwość 
errorText:String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

Replacement string returned by the format() method when an error occurs.

If errorText is non-null and an error occurs while formatting a number or currency amount, the format method will return the string assigned to this property.

For example:
      var nf:NumberFormatter = new NumberFormatter();
      nf.setStyle("locale", "en-US");
      nf.errorText = "###"
      trace(nf.format("abc"));  // ###
      

Wartością domyślną jest null.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie change .



Implementacja
    public function get errorText():String
    public function set errorText(value:String):void

Powiązane elementy interfejsu API

fractionalDigits

właściwość 
fractionalDigits:int

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

The maximum number of digits that can appear after the decimal separator.

Numbers are rounded to the number of digits specified by this property. The rounding scheme varies depending on the application user's operating system.

When the trailingZeros property is set to true, the fractional portion of the number (after the decimal separator) is padded with trailing zeros until its length matches the value of this fractionalDigits property.

The default value is dependent on the locale and operating system.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie change .



Implementacja
    public function get fractionalDigits():int
    public function set fractionalDigits(value:int):void

Powiązane elementy interfejsu API

groupingPattern

właściwość 
groupingPattern:String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

Describes the placement of grouping separators within the formatted number string.

When the useGrouping property is set to true, the groupingPattern property is used to define the placement and pattern used for the grouping separator.

The grouping pattern is defined as a string containing numbers separated by semicolons and optionally may end with an asterisk. For example: "3;2;*". Each number in the string represents the number of digits in a group. The grouping separator is placed before each group of digits. An asterisk at the end of the string indicates that groups with that number of digits should be repeated for the rest of the formatted string. If there is no asterisk then there are no additional groups or separators for the rest of the formatted string.

The first number in the string corresponds to the first group of digits to the left of the decimal separator. Subsequent numbers define the number of digits in subsequent groups to the left. Thus the string "3;2;*" indicates that a grouping separator is placed after the first group of 3 digits, followed by groups of 2 digits. For example: 98,76,54,321

The following table shows examples of formatting the number 123456789.12 with various grouping patterns. The grouping separator is a comma and the decimal separator is a period.

Grouping PatternSample Format
3;*123,456,789.12
3;2;*12,34,56,789.12
3123456,789.12

Only a limited number of grouping sizes can be defined. On some operating systems, grouping patterns can only contain two numbers plus an asterisk. Other operating systems can support up to four numbers and an asterisk. For patterns without an asterisk, some operating systems only support one number while others support up to three numbers. If the maximum number of grouping pattern elements is exceeded, then additional elements are ignored and the lastOperationStatus property is set to indicate that a fall back value is being used.

The default value is dependent on the locale and operating system.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie change .



Implementacja
    public function get groupingPattern():String
    public function set groupingPattern(value:String):void

Zgłasza
TypeError — if this property is assigned a null value.

Powiązane elementy interfejsu API

groupingSeparator

właściwość 
groupingSeparator:String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

The character or string used for the grouping separator.

The value of this property is used as the grouping separator when formatting numbers with the useGrouping property set to true. This property is initially set based on the locale that is selected when the formatter object is constructed.

The default value is dependent on the locale and operating system.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie change .



Implementacja
    public function get groupingSeparator():String
    public function set groupingSeparator(value:String):void

Zgłasza
TypeError — if this property is assigned a null value.

Powiązane elementy interfejsu API

lastOperationStatus

właściwość 
lastOperationStatus:String  [tylko do odczytu] [przesłanianie]

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, 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.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie change .



Implementacja
    override public function get lastOperationStatus():String

leadingZero

właściwość 
leadingZero:Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

Specifies whether a leading zero is included in a formatted number when there are no integer digits to the left of the decimal separator.

When this property is set to true a leading zero is included to the left of the decimal separator when formatting numeric values between -1.0 and 1.0. When this property is set to false, a leading zero is not included.

For example, if the number is 0.321 and this property is set true, then the leading zero is included in the formatted string. If the property is set to false, the leading zero is not included. In that case the string would just include the decimal separator followed by the decimal digits, such as .321.

The following table shows examples of how numbers are formatted based on the values of this property and the related fractionalDigits and trailingZeros properties.

trailingZerosleadingZerofractionalDigits0.120
truetrue30.1200.000
falsetrue30.120
truefalse3.120.000
falsefalse3.120

The default value is dependent on the locale and operating system.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie change .



Implementacja
    public function get leadingZero():Boolean
    public function set leadingZero(value:Boolean):void

Zgłasza
TypeError — if this property is assigned a null value.

Powiązane elementy interfejsu API

negativeSymbol

właściwość 
negativeSymbol:String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

The negative symbol to be used when formatting negative values.

This symbol is used with the negative number format when formatting a number that is less than zero. It is not used in negative number formats that do not include a negative sign (e.g. when negative numbers are enclosed in parentheses).

This property is set to a default value for the actual locale selected when this formatter is constructed. It can be set with a value to override the default setting.

The default value is dependent on the locale and operating system.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie change .



Implementacja
    public function get negativeSymbol():String
    public function set negativeSymbol(value:String):void

Powiązane elementy interfejsu API

trailingZeros

właściwość 
trailingZeros:Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

Specifies whether trailing zeros are included in a formatted number.

When this property is set to true, trailing zeros are included in the fractional part of the formatted number up to the limit specified by the fractionalDigits property. When this property is set to false then no trailing zeros are shown.

For example, if the numeric value is 123.4, and this property is set true, and the fractionalDigits property is set to 3, the formatted string would show trailing zeros, such as 123.400 . If this property is false, trailing zeros are not included, and the string shows just the decimal separator followed by the non-zero decimal digits, such as 123.4.

The following table shows examples of how numeric values are formatted based on the values of this property and the related fractionalDigits and leadingZero properties.

trailingZerosleadingZerofractionalDigits0.120
truetrue30.1200.000
falsetrue30.120
truefalse3.120.000
falsefalse3.120

The default value is dependent on the locale and operating system.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie change .



Implementacja
    public function get trailingZeros():Boolean
    public function set trailingZeros(value:Boolean):void

Zgłasza
TypeError — if this property is assigned a null value.

Powiązane elementy interfejsu API

useGrouping

właściwość 
useGrouping:Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

Enables the use of the grouping separator when formatting numbers.

When the useGrouping property is set to true, digits are grouped and delimited by the grouping separator character. For example: 123,456,789.22

When the useGrouping property is set to false, digits are not grouped or separated. For example: 123456789.22

The symbol to be used as a grouping separator is defined by the groupingSeparator property. The number of digits between grouping separators is defined by the groupingPattern property.

The default value is dependent on the locale and operating system.

Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie change .



Implementacja
    public function get useGrouping():Boolean
    public function set useGrouping(value:Boolean):void

Powiązane elementy interfejsu API

Konstruktor Szczegół

NumberFormatterBase

()Konstruktor
public function NumberFormatterBase()

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 10, AIR 2.5

Constructor.





[ X ]Dlaczego język angielski?
Treść dokumentacji języka ActionScript 3.0 wyświetlana w języku angielskim

Niektóre części dokumentacji języka ActionScript 3.0 nie są przetłumaczone na poszczególne języki. Gdy element nie jest przetłumaczony na dany język, jest wyświetlany tekst angielski. Na przykład opis klasy ga.controls.HelpBox nie jest przetłumaczony na żaden dodatkowy język. Z tego powodu polska wersja dokumentacji zawiera opis klasy ga.controls.HelpBox w języku angielskim.