{ "type": "class", | |
"qname": "mx.formatters.CurrencyFormatter", | |
"baseClassname": "mx.formatters.Formatter" | |
, | |
"description": "The CurrencyFormatter class formats a valid number as a currency value. It adjusts the decimal rounding and precision, the thousands separator, and the negative sign; it also adds a currency symbol. You place the currency symbol on either the left or the right side of the value with the <code>alignSymbol</code> property. The currency symbol can contain multiple characters, including blank spaces. <p>If an error occurs, an empty String is returned and a String that describes the error is saved to the <code>error</code> property. The <code>error</code> property can have one of the following values:</p> <ul> <li><code>"Invalid value"</code> means an invalid numeric value is passed to the <code>format()</code> method. The value should be a valid number in the form of a Number or a String.</li> <li><code>"Invalid format"</code> means one of the parameters contains an unusable setting.</li> </ul> <p>The <code><mx:CurrencyFormatter></code> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:</p> <pre>\\n <mx:CurrencyFormatter\\n alignSymbol="left|right"\\n currencySymbol="$"\\n decimalSeparatorFrom="."\\n decimalSeparatorTo="."\\n precision="-1"\\n rounding="none|up|down|nearest"\\n thousandsSeparatorFrom=","\\n thousandsSeparatorTo=","\\n useNegativeSign="true|false"\\n useThousandsSeparator="true|false"\\n />\\n </pre>", | |
"tags": [ | |
{ "tagName": "includeExample", | |
"values": ["examples/CurrencyFormatterExample.mxml"]}, | |
{ "tagName": "see", | |
"values": ["mx.formatters.NumberBase", "mx.formatters.NumberBaseRoundType"]}, | |
{ "tagName": "mxml", | |
"values": []}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"members": [ | |
{ "type": "method", | |
"qname": "mx.formatters.CurrencyFormatter", | |
"namespace": "", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Constructor.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "", | |
"params": []} | |
, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "alignSymbol", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Aligns currency symbol to the left side or the right side of the formatted number. Permitted values are <code>"left"</code> and <code>"right"</code>.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""left""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "currencySymbol", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Character to use as a currency symbol for a formatted number. You can use one or more characters to represent the currency symbol; for example, "$" or "YEN". You can also use empty spaces to add space between the currency character and the formatted number. When the number is a negative value, the currency symbol appears between the number and the minus sign or parentheses.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""$""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "decimalSeparatorFrom", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Decimal separator character to use when parsing an input string.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["".""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "decimalSeparatorTo", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Decimal separator character to use when outputting formatted decimal numbers.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["".""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Object", | |
"qname": "precision", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Number of decimal places to include in the output String. You can disable precision by setting it to <code>-1</code>. A value of <code>-1</code> means do not change the precision. For example, if the input value is 1.453 and <code>rounding</code> is set to <code>NumberBaseRoundType.NONE</code>, return 1.453. If <code>precision</code> is -1 and you set some form of rounding, return a value based on that rounding type.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["-1"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "rounding", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "How to round the number. In ActionScript, the value can be <code>NumberBaseRoundType.NONE</code>, <code>NumberBaseRoundType.UP</code>, <code>NumberBaseRoundType.DOWN</code>, or <code>NumberBaseRoundType.NEAREST</code>. In MXML, the value can be <code>"none"</code>, <code>"up"</code>, <code>"down"</code>, or <code>"nearest"</code>.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["NumberBaseRoundType.NONE"]}, | |
{ "tagName": "see", | |
"values": ["mx.formatters.NumberBaseRoundType"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "thousandsSeparatorFrom", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Character to use as the thousands separator in the input String.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["",""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "thousandsSeparatorTo", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Character to use as the thousands separator in the output string.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["",""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Object", | |
"qname": "useNegativeSign", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "If <code>true</code>, format a negative number by preceding it with a minus "-" sign. If <code>false</code>, format the number surrounded by parentheses, for example (400).", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["true"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Object", | |
"qname": "useThousandsSeparator", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "If <code>true</code>, split the number into thousands increments by using a separator character.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["true"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "method", | |
"qname": "format", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["override"], | |
"deprecated": {}, | |
"description": "Formats <code>value</code> as currency. If <code>value</code> cannot be formatted, return an empty String and write a description of the error to the <code>error</code> property.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["value Value to format."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["Formatted string. Empty if an error occurs."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "String", | |
"params": [{ "name": "value", "type": "Object"}]} | |
] | |
} |