The ZipCodeFormatter is another built-in Flex Formatter. The ZipCodeFormatter can take only one parameter and you can use that parameter to format the zip code in one of the following formats:
Read the rest of this entry »
Archive for the ‘Formatters’ tag
Example of Using the ZipCodeFormatter Class in Flex
Example of Using the PhoneFormatter Class in Flex
The PhoneFormatter is another built-in flex formatter. With this formatter you can format a number into different phone number formats. The syntax for the PhoneFormatter:
Read the rest of this entry »
Example of Using the NumberFormatter Class in Flex
The NumberFormatter is another built-in formatter that is very similar to the CurrencyFormatter. The syntax for the NumberFormatter:
Read the rest of this entry »
Example of Using the DateFormatter Class in Flex
The DateFormatter is a very simple formatter. To use it you just have to specify the formatString property, apply the format and you are done.
<mx:DateFormatter formatString="Y|M|D|A|E|H|J|K|L|N|S"/>
Here are some short explanations of what the characters in formatString represent:
Read the rest of this entry »
Example of Using the CurrencyFormatter Class in Flex
The CurrencyFormatter class formats a number as a currency value. When using the CurrencyFormatter in Flex you can specify the currency symbol, you can align the currency symbol the right or to the left of the amount, you can use a negative sign or not etc:
Read the rest of this entry »
Flex Formatters
Flex Formatters are Flex components that are used to format data into strings. Adobe Flex come with a number of built in formatters: the currency formatter, the date formatter, the number formatter, the phone number formatter, and the ZIP code formatter.
All the built in formatters are subclasses of the Formatter class (mx.formatters.Formatter). To trigger the formatter you will use the format() method that takes a value as a parameter and returns the formatter string.
Read the rest of this entry »