<?xml version="1.0" encoding="utf-8"?> <!--- Spark Formatter Sample --> <s:Application xmlns:fx = "http://ns.adobe.com/mxml/2009" xmlns:s = "library://ns.adobe.com/flex/spark" xmlns:mx = "library://ns.adobe.com/flex/mx" locale = "{localeComboBox.selectedItem}" fontSize = "35" viewSourceURL="srcview/index.html"> <s:layout> <s:VerticalLayout verticalAlign="middle" horizontalAlign="center" /> </s:layout> <fx:Declarations> <s:CurrencyFormatter id="cf" /> <s:DateTimeFormatter id="df" /> <s:NumberFormatter id="nf" /> </fx:Declarations> <s:Form> <s:FormItem label="Locale "> <s:ComboBox id="localeComboBox" width="800" requireSelection="true"> <s:dataProvider> <s:ArrayList> <fx:String>ar_AE</fx:String> <fx:String>de_DE</fx:String> <fx:String>en_US</fx:String> <fx:String>ja_JP</fx:String> <fx:String>fr_FR</fx:String> <fx:String>it_IT</fx:String> <fx:String>ko_KR</fx:String> <fx:String>he_IL</fx:String> <fx:String>nl_NL</fx:String> <fx:String>ru_RU</fx:String> <fx:String>sk_SK</fx:String> <fx:String>zh_CN</fx:String> <fx:String>zh_TW</fx:String> </s:ArrayList> </s:dataProvider> </s:ComboBox> </s:FormItem> <s:FormItem label="Currency "> <s:TextInput width="800" text="{cf.format(currencyStepper.value)}" /> <s:NumericStepper id = "currencyStepper" width = "800" value = "{Math.random() * 100000000}" maximum = "100000000" stepSize = "0.1" /> </s:FormItem> <s:FormItem label="Date "> <s:TextInput width="800" text="{df.format(dateField.selectedDate)}" /> <mx:DateField id="dateField" width="800" selectedDate="{new Date()}" /> </s:FormItem> <s:FormItem label="Number "> <s:TextInput width="800" text="{nf.format(numberStepper.value)}" /> <s:NumericStepper id = "numberStepper" width = "800" value = "{Math.random() * 100000000}" maximum = "100000000" stepSize = "0.01" /> </s:FormItem> </s:Form> </s:Application>