flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cframp...@apache.org
Subject svn commit: r1403834 - in /incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components: NumericStepper.as supportClasses/SliderBase.as
Date Tue, 30 Oct 2012 19:32:22 GMT
Author: cframpton
Date: Tue Oct 30 19:32:21 2012
New Revision: 1403834

URL: http://svn.apache.org/viewvc?rev=1403834&view=rev
Log:
Migrating all non-spark formatters in spark components to use spark formatters instead.  [SDK-29970]

Modified:
    incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/NumericStepper.as
    incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as

Modified: incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/NumericStepper.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/NumericStepper.as?rev=1403834&r1=1403833&r2=1403834&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/NumericStepper.as
(original)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/NumericStepper.as
Tue Oct 30 19:32:21 2012
@@ -25,14 +25,14 @@ import flash.display.InteractiveObject;
 import flash.events.Event;
 import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;
-import flash.globalization.LocaleID;
-import flash.globalization.NumberFormatter;
 
 import mx.core.IIMESupport;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
 import mx.managers.IFocusManagerComponent;
 
+import spark.formatters.NumberFormatter;
+
 use namespace mx_internal;
 
 //--------------------------------------
@@ -791,7 +791,10 @@ public class NumericStepper extends Spin
         else 
         {
             if (dataFormatter == null)
-                dataFormatter = new NumberFormatter(LocaleID.DEFAULT);
+            {
+                dataFormatter = new NumberFormatter();
+                addStyleClient(dataFormatter);
+            }
 
             inputValue = dataFormatter.parseNumber(textDisplay.text);
         }

Modified: incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as?rev=1403834&r1=1403833&r2=1403834&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
(original)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
Tue Oct 30 19:32:21 2012
@@ -34,7 +34,6 @@ import mx.core.IFactory;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
-import mx.formatters.NumberFormatter;
 import mx.managers.IFocusManagerComponent;
 
 import spark.effects.animation.Animation;
@@ -42,6 +41,7 @@ import spark.effects.animation.MotionPat
 import spark.effects.animation.SimpleMotionPath;
 import spark.effects.easing.Sine;
 import spark.events.TrackBaseEvent;
+import spark.formatters.NumberFormatter;
 
 use namespace mx_internal;
 
@@ -572,9 +572,13 @@ public class SliderBase extends TrackBas
         else
         {
             if (dataFormatter == null)
+            {
                 dataFormatter = new NumberFormatter();
+                addStyleClient(dataFormatter);
+            }
                 
-            dataFormatter.precision = dataTipPrecision;
+            dataFormatter.fractionalDigits = dataTipPrecision;
+            dataFormatter.trailingZeros = true;
             
             formattedValue = dataFormatter.format(value);   
         }
@@ -697,7 +701,11 @@ public class SliderBase extends TrackBas
         }
         
         if (dataTipInstance && showDataTip)
-        { 
+        {
+            // If showing the dataTip, we need to validate to
+            // make sure the thumb is in the right position.
+            //validateNow();
+            
             dataTipInstance.data = formatDataTipText(pendingValue);
             
             // Force the dataTip to render so that we have the correct size since



Mime
View raw message