flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1369944 [2/2] - in /incubator/flex/trunk/mustella/tests/Formatters: ./ Properties/ SWFs/
Date Mon, 06 Aug 2012 19:37:40 GMT
Added: incubator/flex/trunk/mustella/tests/Formatters/Properties/Formatters_Properties_Phones.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Formatters/Properties/Formatters_Properties_Phones.mxml?rev=1369944&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Formatters/Properties/Formatters_Properties_Phones.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/Formatters/Properties/Formatters_Properties_Phones.mxml
Mon Aug  6 19:37:39 2012
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="Formatters/Properties/"  xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*" testSWF="Formatters_Main.mxml">
+
+    <!-- this set of lines form a template that must be in each unit test -->
+    <mx:Script>
+    <![CDATA[
+    public static function init(o:DisplayObject):void
+    {
+
+    }
+    ]]>
+    </mx:Script>
+    <mx:Metadata>
+    <![CDATA[
+        [Mixin]
+    ]]>
+    </mx:Metadata>
+    <!-- end of set of lines that must be in each unit test -->
+
+    <mx:Script>
+    <![CDATA[
+    import mx.controls.TextInput;
+    import mx.formatters.PhoneFormatter;
+    import mx.managers.SystemManager;
+    
+    public function FormatPhoneSimple():void{
+        application.ti.text= application.pf.format("9876543");
+    }
+    public function FormatPhoneNoAreaCode():void{
+        application.pf.areaCode=-1;
+        application.pf.areaCodeFormat="(###)";
+        application.pf.formatString="#### ####";
+        application.ti.text= application.pf.format("98765432");
+    }
+    public function FormatPhoneAreaCode():void{
+        application.pf.formatString="+## ##### #####";
+        application.ti.text= application.pf.format("919876543210");
+    }
+    ]]>
+    </mx:Script>
+    <testCases>
+        <TestCase testID="Formatters_Phone_Simple" description="Test the properties of
Number Formatters." keywords="[Simple, Phone, inline, Formatter]">
+            <setup>
+                <ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete"
waitTarget="ti"/>
+                <RunCode code="FormatPhoneSimple();" waitEvent="updateComplete" waitTarget="ti"/>
+                
+            </setup>
+            <body>
+                <AssertPropertyValue target="ti" propertyName="text" value="(345) 987-6543"
/>
+            </body>
+        </TestCase>
+        <TestCase testID="Formatters_Phone_NoAreaCode" description="Test the properties
of Number Formatters." keywords="[No, AreaCode, Phone, inline, Formatter]">
+            <setup>
+                <ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete"
waitTarget="ti"/>
+                <RunCode code="FormatPhoneNoAreaCode();" waitEvent="updateComplete" waitTarget="ti"/>
+                
+            </setup>
+            <body>
+                <AssertPropertyValue target="ti" propertyName="text" value="9876 5432"
/>
+            </body>
+        </TestCase>
+        <TestCase testID="Formatters_Phone_AreaCode" description="Test the properties
of Number Formatters." keywords="[ AreaCode, Phone, inline, Formatter]">
+            <setup>
+                <ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete"
waitTarget="ti"/>
+                <RunCode code="FormatPhoneAreaCode();" waitEvent="updateComplete" waitTarget="ti"/>
+                
+            </setup>
+            <body>
+                <AssertPropertyValue target="ti" propertyName="text" value="+91 98765
43210" />
+            </body>
+        </TestCase>
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/Formatters/Properties/Formatters_Properties_ZipCodes.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Formatters/Properties/Formatters_Properties_ZipCodes.mxml?rev=1369944&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Formatters/Properties/Formatters_Properties_ZipCodes.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/Formatters/Properties/Formatters_Properties_ZipCodes.mxml
Mon Aug  6 19:37:39 2012
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="Formatters/Properties/"  xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*" testSWF="Formatters_Main.mxml">
+
+    <!-- this set of lines form a template that must be in each unit test -->
+    <mx:Script>
+    <![CDATA[
+    public static function init(o:DisplayObject):void
+    {
+
+    }
+    ]]>
+    </mx:Script>
+    <mx:Metadata>
+    <![CDATA[
+        [Mixin]
+    ]]>
+    </mx:Metadata>
+    <!-- end of set of lines that must be in each unit test -->
+
+    <mx:Script>
+    <![CDATA[
+    import mx.controls.TextInput;
+    import mx.formatters.ZipCodeFormatter;
+    import mx.managers.SystemManager;
+    
+    public function FormatZipCodeSimple():void{
+        application.ti.text= application.zf.format("987654321");
+    }
+    public function FormatZipCode5_4():void{
+        application.zf.formatString="##### ####";
+        application.ti.text= application.zf.format("987654321");
+    }
+    public function FormatZipCode5():void{
+        application.zf.formatString="#####";
+        application.ti.text= application.zf.format("54321");
+    }
+    public function FormatZipCode_Can():void{
+        application.zf.formatString="### ###";
+        application.ti.text= application.zf.format("654321");
+    }
+
+    ]]>
+    </mx:Script>
+    <testCases>
+        <TestCase testID="Formatters_ZipCode_Simple" description="Test the properties
of Number Formatters." keywords="[Simple, ZipCode,formatString, #####-#### inline, Formatter]">
+            <setup>
+                <ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete"
waitTarget="ti"/>
+                <RunCode code="FormatZipCodeSimple();" waitEvent="updateComplete" waitTarget="ti"/>
+                
+            </setup>
+            <body>
+                <AssertPropertyValue target="ti" propertyName="text" value="98765-4321"
/>
+            </body>
+        </TestCase>
+        <TestCase testID="Formatters_ZipCode_FormatString_#####_####" description="Test
the properties of Number Formatters." keywords="[Simple, ZipCode,formatString, ##### ####
inline, Formatter]">
+            <setup>
+                <ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete"
waitTarget="ti"/>
+                <RunCode code="FormatZipCode5_4();" waitEvent="updateComplete" waitTarget="ti"/>
+                
+            </setup>
+            <body>
+                <AssertPropertyValue target="ti" propertyName="text" value="98765 4321"
/>
+            </body>
+        </TestCase>
+        <TestCase testID="Formatters_ZipCode_FormatString_#####" description="Test the
properties of Number Formatters." keywords="[Simple, ZipCode,formatString, ##### inline, Formatter]">
+            <setup>
+                <ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete"
waitTarget="ti"/>
+                <RunCode code="FormatZipCode5();" waitEvent="updateComplete" waitTarget="ti"/>
+                
+            </setup>
+            <body>
+                <AssertPropertyValue target="ti" propertyName="text" value="54321" />
+            </body>
+        </TestCase>
+        <TestCase testID="Formatters_ZipCode_FormatString_###_###" description="Test the
properties of Number Formatters." keywords="[Simple, ZipCode,formatString, ###_### inline,
Formatter]">
+            <setup>
+                <ResetComponent target="ti" className="mx.controls.TextInput" waitEvent="updateComplete"
waitTarget="ti"/>
+                <RunCode code="FormatZipCode_Can();" waitEvent="updateComplete" waitTarget="ti"/>
+                
+            </setup>
+            <body>
+                <AssertPropertyValue target="ti" propertyName="text" value="654 321" />
+            </body>
+        </TestCase>
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/Formatters/SWFs/CustomNf.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Formatters/SWFs/CustomNf.mxml?rev=1369944&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Formatters/SWFs/CustomNf.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Formatters/SWFs/CustomNf.mxml Mon Aug  6 19:37:39
2012
@@ -0,0 +1,14 @@
+<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" >
+	<mx:Script>
+	<![CDATA[
+	import mx.controls.TextInput;
+	import 	mx.formatters.NumberFormatter;
+	import mx.managers.SystemManager;
+	
+	]]>
+	</mx:Script>
+	
+	<mx:TextInput id="ti1" />
+	<mx:NumberFormatter id="myNf"/>	
+	<mx:TextInput id="ti2" />
+</mx:VBox>
\ No newline at end of file

Added: incubator/flex/trunk/mustella/tests/Formatters/SWFs/DateFormatter_Main.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Formatters/SWFs/DateFormatter_Main.mxml?rev=1369944&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Formatters/SWFs/DateFormatter_Main.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Formatters/SWFs/DateFormatter_Main.mxml Mon Aug  6
19:37:39 2012
@@ -0,0 +1,320 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="800" height="700" horizontalAlign="center">
+
+<!--
+	http://livedocs.adobe.com/flex/3/langref/mx/formatters/DateFormatter.html
+	http://bugs.adobe.com/jira/browse/SDK-13650
+	Fixed in SVN revision 2306
+
+-->
+
+	<mx:Script>
+		<![CDATA[
+
+            [Bindable]
+            public var numbersAry: Array = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19 ];
+
+	        public function testDateFormatter(choice:Number):void {
+	        	var aDate:Date;
+	        	var aDateString:String;
+
+			switch (choice)
+					{
+					  case 1:
+						aDate =  new Date(2000, 0, 1);
+						break;
+
+					  case 2:
+						aDate =  new Date(2008, 6, 4);
+						break;
+
+					  case 3:
+						aDate =  new Date(65, 2, 6, 9, 42, 16, 0);
+						break;
+
+					  case 4:
+					    //This code is to make this test time zone independant
+						var temp1:Date = new Date();
+						var temp2:Number = 1000 * (28800 - (temp1.getTimezoneOffset() *60));
+						var num:Number= -14159025000 - temp2;
+						aDate =  new Date(num);
+						break;
+
+					  case 5:
+						aDate =  new Date(1900, 0, 1);
+						break;
+
+					  case 6:
+						aDate =  new Date(1999, 11, 31);
+						break;
+
+					  case 7:
+						// wierd - change 935ms to 936ms, and the year rolls over +1
+						aDate =  new Date(30000000, 11, 31, 23, 59, 59, 935);
+						break;
+
+					  case 8:
+						aDate =  new Date(2012, 1, 29);
+						break;
+
+					  case 9:
+						aDate =  new Date(1970, 0, 1);
+						break;
+
+					  case 10:
+						aDate =  new Date(0);
+						break;
+
+					  case 11:
+						aDateString = "Mon Jul 21 1969 3:16 PM";
+						aDate =  new Date(aDateString);
+						break;
+
+					  case 12:
+						aDate =  new Date(1, 1, 1, 1, 1, 1, 1);
+						break;
+
+					  case 13:
+						aDate =  new Date(0, 0, 0, 0, 0, 0, 0);
+						break;
+
+					  case 14:
+						aDate =  new Date(12, 11, 10, 9, 8, 7, 432);
+						break;
+
+
+					  case 15:
+						aDateString = "2:57 PM";
+						aDate =  new Date(aDateString);
+						break;
+
+					  case 16: // Daylight Savings Time
+					    //much of the following code was added to make this time zone independant
+						aDateString = "Sun Sep 28 17:34:21 GMT-0500 2008";
+						aDate =  new Date(aDateString);
+						var temp2:Number = 1000 * (25200 - (aDate.getTimezoneOffset() * 60));
+						var num:Number= Date.parse(aDate) - temp2;
+						aDate =  new Date(num);
+						break;
+
+
+					  case 17: // Standard Time
+					    //much of the following code was added to make this time zone independant
+						aDateString = "Fri Nov 28 17:34:21 GMT-0500 2008";
+						aDate =  new Date(aDateString);
+						var temp2:Number = 1000 * (28800 - (aDate.getTimezoneOffset() * 60));
+						var num:Number= Date.parse(aDate) - temp2;
+						aDate =  new Date(num);
+						break;
+
+					  case 18:  // wrong day of week - Date() output corrects the day
+					    //much of the following code was added to make this time zone independant
+						aDateString = "Fri Sep 28 17:34:21 GMT-0500 2008";
+						aDate =  new Date(aDateString);
+						var temp2:Number = 1000 * (25200 - (aDate.getTimezoneOffset() * 60));
+						var num:Number= Date.parse(aDate) - temp2;
+						aDate =  new Date(num);
+						break;
+
+		  			  case 19: // Standard Time UTC
+					    //much of the following code was added to make this time zone independant
+					  	aDateString = "Fri Nov 28 17:34:21 UTC-0500 2008";
+						aDate =  new Date(aDateString);
+						var temp2:Number = 1000 * (28800 - (aDate.getTimezoneOffset() * 60));
+						var num:Number= Date.parse(aDate) - temp2;
+						aDate =  new Date(num);
+					  	break;
+
+					  case 20:
+						aDate =  new Date(2009,08,17,15,39,20,789);
+						break;
+
+					  default:
+						aDate =  new Date();
+				}
+
+
+				  	aDateString = aDate.toDateString();
+
+				  	/*
+				  	Utilize the various DateFormatters and masks, as well as Date.toString and dateObj.toDateString
+				  	-----------------------------------------------------------------------------------------------
+				  	*/
+
+				  	//default formatter - String input
+				  	dateFormatOutputDefaultStr.text = dtFormatter.format(aDateString);
+				  	//default formatter- Date Object input
+				  	dateFormatOutputDefaultObj.text = dtFormatter.format(aDate);
+
+				  	//full formatter- Date Object input
+				  	dateFormatOutputDefaultMaskFull.text = dtFormatterMaskFull.format(aDate);
+				  	//long formatter- Date Object input
+				  	dateFormatOutputDefaultMaskLong.text = dtFormatterMaskLong.format(aDate);
+				  	//medium formatter- Date Object input
+				  	dateFormatOutputDefaultMaskMedium.text = dtFormatterMaskMedium.format(aDate);
+				  	//time only formatter- Date Object input
+				  	dateFormatOutputDefaultMaskTime.text = dtFormatterMaskTime.format(aDate);
+
+					// millisec
+					dateFormatOutputDefaultMaskMillisec.text = dtFormatterMaskMillisec.format(aDate);
+
+				  	//deafult toDateString
+				  	dateStringOutput.text = aDateString;
+
+					// YY
+					datePartYY.text = dtFormatterDatePartYY.format(aDate);
+					// YYYY
+					datePartYYYY.text = dtFormatterDatePartYYYY.format(aDate);
+
+					// M
+					datePartM.text = dtFormatterDatePartM.format(aDate);
+					// MM
+					datePartMM.text = dtFormatterDatePartMM.format(aDate);
+					// MMM
+					datePartMMM.text = dtFormatterDatePartMMM.format(aDate);
+					// MMMM
+					datePartMMMM.text = dtFormatterDatePartMMMM.format(aDate);
+
+					// D
+					datePartD.text = dtFormatterDatePartD.format(aDate);
+					// DD
+					datePartDD.text = dtFormatterDatePartDD.format(aDate);
+
+					// E
+					datePartE.text = dtFormatterDatePartE.format(aDate);
+					// EEE
+					datePartEEE.text = dtFormatterDatePartEEE.format(aDate);
+					// EEEE
+					datePartEEEE.text = dtFormatterDatePartEEEE.format(aDate);
+
+					// A
+					datePartA.text = dtFormatterDatePartA.format(aDate);
+					// J
+					datePartJ.text = dtFormatterDatePartJ.format(aDate);
+					// H
+					datePartH.text = dtFormatterDatePartH.format(aDate);
+					// K
+					datePartK.text = dtFormatterDatePartK.format(aDate);
+					// L
+					datePartL.text = dtFormatterDatePartL.format(aDate);
+
+					// N
+					datePartN.text = dtFormatterDatePartN.format(aDate);
+					// NN
+					datePartNN.text = dtFormatterDatePartNN.format(aDate);
+					// S
+					datePartS.text = dtFormatterDatePartS.format(aDate);
+	        }
+		]]>
+	</mx:Script>
+
+	<!-- set up some standard format styles -->
+	<mx:DateFormatter id="dtFormatter"/>
+	<mx:DateFormatter id="dtFormatterMaskFull" formatString="EEEE, MMMM. D, YYYY at L:NN
A"/>
+	<mx:DateFormatter id="dtFormatterMaskLong" formatString="MMM. D, YYYY at L:NN A"/>
+	<mx:DateFormatter id="dtFormatterMaskMedium" formatString="MMM. D, YYYY"/>
+	<mx:DateFormatter id="dtFormatterMaskTime" formatString="L:NN A"/>
+	<mx:DateFormatter id="dtFormatterMaskMillisec" formatString="EEEE, MMMM DD, YYYY at HH:NN:SS:QQQ
A"/>
+
+	<!-- set up some anal date part formats-->
+	<mx:DateFormatter id="dtFormatterDatePartYY" formatString="YY"/>
+	<mx:DateFormatter id="dtFormatterDatePartYYYY" formatString="YYYY"/>
+	<mx:DateFormatter id="dtFormatterDatePartM" formatString="M"/>
+	<mx:DateFormatter id="dtFormatterDatePartMM" formatString="MM"/>
+	<mx:DateFormatter id="dtFormatterDatePartMMM" formatString="MMM"/>
+	<mx:DateFormatter id="dtFormatterDatePartMMMM" formatString="MMMM"/>
+	<mx:DateFormatter id="dtFormatterDatePartD" formatString="D"/>
+	<mx:DateFormatter id="dtFormatterDatePartDD" formatString="DD"/>
+	<mx:DateFormatter id="dtFormatterDatePartE" formatString="E"/>
+	<mx:DateFormatter id="dtFormatterDatePartEEE" formatString="EEE"/>
+	<mx:DateFormatter id="dtFormatterDatePartEEEE" formatString="EEEE"/>
+	<mx:DateFormatter id="dtFormatterDatePartA" formatString="A"/>
+	<mx:DateFormatter id="dtFormatterDatePartJ" formatString="J"/>
+	<mx:DateFormatter id="dtFormatterDatePartH" formatString="H"/>
+	<mx:DateFormatter id="dtFormatterDatePartK" formatString="K"/>
+	<mx:DateFormatter id="dtFormatterDatePartL" formatString="L"/>
+	<mx:DateFormatter id="dtFormatterDatePartN" formatString="N"/>
+	<mx:DateFormatter id="dtFormatterDatePartNN" formatString="NN"/>
+	<mx:DateFormatter id="dtFormatterDatePartS" formatString="S"/>
+
+	<mx:Label text="DateFormatter Tests" fontSize="16" fontWeight="bold"/>
+
+	<mx:HBox height="600" width="750">
+		<mx:Panel layout="vertical" title="Enter Choice" verticalGap="10" height="100%" width="200"
horizontalAlign="center" verticalAlign="top">
+			<mx:Label text=" "/>
+			<mx:HBox>
+				<mx:Label text="Pick:"/>
+				<mx:ComboBox id="choiceCB" dataProvider="{numbersAry}" width="60"
+		            	change="testDateFormatter(Number(choiceCB.selectedItem))"/>
+			</mx:HBox>
+
+			<mx:Label text=" "/>
+			<mx:Label text=" OR "/>
+			<mx:Label text=" "/>
+
+			<mx:HBox>
+				<mx:TextInput id="choiceTI" width="50"/>
+				<mx:Button buttonDown="testDateFormatter(Number(choiceTI.text))" label="Pick"/>
+			</mx:HBox>
+		</mx:Panel>
+
+		<mx:Panel layout="horizontal" title="Results" verticalGap="10" height="100%" width="100%"
horizontalAlign="center" verticalAlign="middle">
+			<mx:VBox horizontalAlign="center" verticalAlign="top" width="60%" paddingLeft="5">
+				<mx:Label text="Standard Date Masks"/>
+				<mx:TextInput id="dateFormatOutputDefaultStr" width="215"/>
+				<mx:TextInput id="dateFormatOutputDefaultObj"  width="215"/>
+
+				<mx:TextInput id="dateFormatOutputDefaultMaskFull"  width="215"/>
+				<mx:TextInput id="dateFormatOutputDefaultMaskLong"  width="215"/>
+				<mx:TextInput id="dateFormatOutputDefaultMaskMedium"  width="215"/>
+				<mx:TextInput id="dateFormatOutputDefaultMaskTime"  width="215"/>
+				<mx:TextInput id="dateFormatOutputDefaultMaskMillisec"  width="215"/>
+				
+
+				<mx:TextInput id="dateStringOutput" width="215"/>
+			</mx:VBox>
+
+			<mx:VBox horizontalAlign="center" width="40%" paddingTop="5" paddingBottom="5">
+				<mx:Label text="Small Date Parts"/>
+				<mx:TextInput id="datePartYY"/>
+				<mx:TextInput id="datePartYYYY"/>
+				<mx:TextInput id="datePartM"/>
+				<mx:TextInput id="datePartMM"/>
+				<mx:TextInput id="datePartMMM"/>
+				<mx:TextInput id="datePartMMMM"/>
+				<mx:TextInput id="datePartD"/>
+				<mx:TextInput id="datePartDD"/>
+				<mx:TextInput id="datePartE"/>
+				<mx:TextInput id="datePartEEE"/>
+				<mx:TextInput id="datePartEEEE"/>
+				<mx:TextInput id="datePartA"/>
+				<mx:TextInput id="datePartJ"/>
+				<mx:TextInput id="datePartH"/>
+				<mx:TextInput id="datePartK"/>
+				<mx:TextInput id="datePartL"/>
+				<mx:TextInput id="datePartN"/>
+				<mx:TextInput id="datePartNN"/>
+				<mx:TextInput id="datePartS"/>
+			</mx:VBox>
+		</mx:Panel>
+	</mx:HBox>
+
+</mx:Application>

Added: incubator/flex/trunk/mustella/tests/Formatters/SWFs/Formatters_Main.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Formatters/SWFs/Formatters_Main.mxml?rev=1369944&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Formatters/SWFs/Formatters_Main.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Formatters/SWFs/Formatters_Main.mxml Mon Aug  6 19:37:39
2012
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<mx:Application backgroundColor="0xFFFFFF"  height="375" width="500" xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:local="*" >
+
+	<mx:Script>
+	<![CDATA[
+		import mx.formatters.DateFormatter;
+		public function SetSelectedDate():void{
+			dc.selectedDate=new Date(2006,11,5);
+		}
+		
+	]]>
+	</mx:Script>
+	<mx:TextInput id="ti" />
+	<mx:Button id="btn" label="click" />
+	<mx:CurrencyFormatter id="cf" precision="3" rounding="up" decimalSeparatorTo="." thousandsSeparatorTo=","
useThousandsSeparator="true" useNegativeSign="true" currencySymbol="$" />
+	<mx:DateChooser id="dc" creationComplete="SetSelectedDate();"  />
+	<mx:DateFormatter id="df" formatString="EEEE, MMMM DD, YYYY at HH:NN:SS A" />
+	<mx:NumberFormatter id="nf" precision="3" rounding="up" decimalSeparatorTo="." thousandsSeparatorTo=","
useThousandsSeparator="true" useNegativeSign="true" />	
+	<mx:PhoneFormatter id="pf" formatString="###-####" areaCode="345" areaCodeFormat="(###)
" validPatternChars="+()#-. " />	
+	<local:CustomNf id="myCustomNf"/>
+	<mx:ZipCodeFormatter id="zf" formatString="#####-####" />	
+</mx:Application>



Mime
View raw message