Transferred from the Adobe Open Source Subversion Repository

Revision: 8481
Author:   smgilson@adobe.com
Date:     2009-07-09T17:28:31.741329Z

Log Message:
-----------
First of several checkins to update the namespace in ASDoc MXML syntax descriptions for Spark components

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1278823 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/DropDownList.as
+++ frameworks/projects/spark/src/spark/components/DropDownList.as
@@ -136,7 +136,7 @@
  *  attributes of its superclass and adds the following tag attributes:

  *
  *

- *  <DropDownList
+ *  <s:DropDownList
  *    Properties
  *    prompt=""
  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1263748 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package spark.components
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19231
Author:   jszeto@adobe.com
Date:     2010-12-09T19:25:51.943016Z

Log Message:
-----------
Mobile Skin Fixes

Merging in revisions 18989-19158 from hero_skin_sandbox.

The following component skins have been updated and 320 DPI skins added:

Button
CheckBox
RadioButton
TextInput
TextArea
ActionBar
HSlider

Updating MobileSkins test project

QE notes: baseline regen
Doc notes: none
Bugs: none
Reviewer: Jason San Jose, Tom Krakit
Tests run: full cyclone
Is noteworthy for integration: yes, updated skins!

Modified Paths:
--------------
129 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1265550 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as
@@ -23,6 +23,7 @@
 import spark.skins.mobile.supportClasses.TextSkinBase;
 import spark.skins.mobile160.assets.TextInput_border;
 import spark.skins.mobile240.assets.TextInput_border;
+import spark.skins.mobile320.assets.TextInput_border;

 use namespace mx_internal;

@@ -41,7 +42,7 @@
     //  Constructor
     //
     //--------------------------------------------------------------------------
-
+
     public function TextAreaSkin()
     {
         super();
@@ -50,36 +51,44 @@

         switch (authorDensity)
         {
+            case DeviceDensity.PPI_320:
+            {
+                borderClass = spark.skins.mobile320.assets.TextInput_border;
+                layoutCornerEllipseSize = 24;
+                layoutMeasuredWidth = 600;
+                layoutMeasuredHeight = 106;
+                layoutBorderSize = 2;
+
+                break;
+            }
             case DeviceDensity.PPI_240:
             {
                 borderClass = spark.skins.mobile240.assets.TextInput_border;
-                layoutCornerEllipseSize = 16;
+                layoutCornerEllipseSize = 12;
                 layoutMeasuredWidth = 440;
-                layoutMeasuredHeight = 55;
+                layoutMeasuredHeight = 70;
                 layoutBorderSize = 1;

                 break;
             }
             default:
             {
-                // TODO (jasonsj) 160ppi XD spec
-                // default PPI160
                 borderClass = spark.skins.mobile160.assets.TextInput_border;
-                layoutCornerEllipseSize = 16;
-                layoutMeasuredWidth = 440;
-                layoutMeasuredHeight = 55;
+                layoutCornerEllipseSize = 12;
+                layoutMeasuredWidth = 300;
+                layoutMeasuredHeight = 53;
                 layoutBorderSize = 1;

                 break;
             }
         }
     }
-
-	//--------------------------------------------------------------------------
-	//
-	//  Properties
-	//
-	//--------------------------------------------------------------------------
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------

     public var hostComponent:TextArea;

@@ -117,106 +126,97 @@
         //
         // You can set an explicit width and the height will adjust accordingly. The opposite
         // is not true: setting an explicit height will not adjust the width accordingly.
-
-		measuredWidth = layoutMeasuredWidth;
-
-		// now we need to measure textDisplay's height.  Unfortunately, this is tricky and
-		// is dependent on textDisplay's width
-
-		// if we have an estimated width, use it here.  Otherwise, we'll keep it
-		// the same width as it was before
-		if (!isNaN(estimatedWidth))
-			textDisplay.width = estimatedWidth - paddingTop - paddingBottom;
-
-		measuredHeight = Math.max(layoutMeasuredHeight, getElementPreferredHeight(textDisplay) + paddingTop + paddingBottom);
-    }
-
-	/**
-	 *  @private
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.0
-	 *  @productversion Flex 4.5
-	 */
-	override public function setEstimatedSize(estimatedWidth:Number = NaN,
-											  estimatedHeight:Number = NaN,
-											  invalidateSizeAllowed:Boolean = true):void
-	{
-		var oldcw:Number = this.estimatedWidth;
-		var oldch:Number = this.estimatedHeight;
-
-		super.setEstimatedSize(estimatedWidth, estimatedHeight, invalidateSizeAllowed);
-
-		var sameWidth:Boolean = isNaN(estimatedWidth) && isNaN(oldcw) || estimatedWidth == oldcw;
-		var sameHeight:Boolean = isNaN(estimatedHeight) && isNaN(oldch) || estimatedHeight == oldch;
-		if (!(sameHeight && sameWidth))
-		{
-			if (!isNaN(explicitWidth) &&
-				!isNaN(explicitHeight))
-				return;
-
-			if (invalidateSizeAllowed)
-				invalidateSize();
-		}
-	}
-
-	/**
-	 *  @private
-	 *  We override the setLayoutBoundsSize to determine whether to perform
-	 *  text reflow. This is a convenient place, as the layout passes NaN
-	 *  for a dimension not constrained to the parent.
-	 */
-	override public function setLayoutBoundsSize(width:Number,
-												 height:Number,
-												 postLayoutTransform:Boolean = true):void
-	{
-		var newEstimates:Boolean = false;
-		var cw:Number = estimatedWidth;
-		var ch:Number = estimatedHeight;
-		var oldcw:Number = cw;
-		var oldch:Number = ch;
-		// we got lied to, probably the constraints weren't accurate or
-		// couldn't be computed
-		if (!isNaN(width))
-		{
-			if (isNaN(estimatedWidth) || width != estimatedWidth)
-			{
-				cw = width;
-				newEstimates = true;
-			}
-		}
-		// we got lied to, probably the constraints weren't accurate or
-		// couldn't be computed
-		if (!isNaN(height))
-		{
-			if (isNaN(estimatedHeight) || height != estimatedHeight)
-			{
-				ch = height;
-				newEstimates = true;
-			}
-		}
-		if (newEstimates)
-		{
-			setEstimatedSize(cw, ch);
-
-			// re-measure with the new estimated size
-			UIComponentGlobals.layoutManager.validateClient(this, true);
-
-			// set estimated size back to what it was
-			setEstimatedSize(oldcw, oldch, false);
-		}
-
-		super.setLayoutBoundsSize(width, height, postLayoutTransform);
-	}
-
-    /**
-     *  @private
-     *  Default verticalAlign="top"
-     */
-    override mx_internal function getTextTop(unscaledHeight:Number, paddingTop:Number, paddingBottom:Number):Number
-    {
-        return paddingTop;
+
+        measuredWidth = layoutMeasuredWidth;
+
+        // now we need to measure textDisplay's height.  Unfortunately, this is tricky and
+        // is dependent on textDisplay's width
+
+        // if we have an estimated width, use it here.  Otherwise, we'll keep it
+        // the same width as it was before
+        if (!isNaN(estimatedWidth))
+            textDisplay.width = estimatedWidth - paddingTop - paddingBottom;
+
+        measuredHeight = Math.max(layoutMeasuredHeight, getElementPreferredHeight(textDisplay) + paddingTop + paddingBottom);
+    }
+
+    /**
+     *  @private
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    override public function setEstimatedSize(estimatedWidth:Number = NaN,
+                                              estimatedHeight:Number = NaN,
+                                              invalidateSizeAllowed:Boolean = true):void
+    {
+        var oldcw:Number = this.estimatedWidth;
+        var oldch:Number = this.estimatedHeight;
+
+        super.setEstimatedSize(estimatedWidth, estimatedHeight, invalidateSizeAllowed);
+
+        var sameWidth:Boolean = isNaN(estimatedWidth) && isNaN(oldcw) || estimatedWidth == oldcw;
+        var sameHeight:Boolean = isNaN(estimatedHeight) && isNaN(oldch) || estimatedHeight == oldch;
+        if (!(sameHeight && sameWidth))
+        {
+            if (!isNaN(explicitWidth) &&
+                !isNaN(explicitHeight))
+                return;
+
+            if (invalidateSizeAllowed)
+                invalidateSize();
+        }
+    }
+
+    /**
+     *  @private
+     *  We override the setLayoutBoundsSize to determine whether to perform
+     *  text reflow. This is a convenient place, as the layout passes NaN
+     *  for a dimension not constrained to the parent.
+     */
+    override public function setLayoutBoundsSize(width:Number,
+                                                 height:Number,
+                                                 postLayoutTransform:Boolean = true):void
+    {
+        var newEstimates:Boolean = false;
+        var cw:Number = estimatedWidth;
+        var ch:Number = estimatedHeight;
+        var oldcw:Number = cw;
+        var oldch:Number = ch;
+        // we got lied to, probably the constraints weren't accurate or
+        // couldn't be computed
+        if (!isNaN(width))
+        {
+            if (isNaN(estimatedWidth) || width != estimatedWidth)
+            {
+                cw = width;
+                newEstimates = true;
+            }
+        }
+        // we got lied to, probably the constraints weren't accurate or
+        // couldn't be computed
+        if (!isNaN(height))
+        {
+            if (isNaN(estimatedHeight) || height != estimatedHeight)
+            {
+                ch = height;
+                newEstimates = true;
+            }
+        }
+        if (newEstimates)
+        {
+            setEstimatedSize(cw, ch);
+
+            // re-measure with the new estimated size
+            UIComponentGlobals.layoutManager.validateClient(this, true);
+
+            // set estimated size back to what it was
+            setEstimatedSize(oldcw, oldch, false);
+        }
+
+        super.setLayoutBoundsSize(width, height, postLayoutTransform);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 18530
Author:   tkraikit@adobe.com
Date:     2010-11-10T21:48:06.575437Z

Log Message:
-----------
Reverting inadvertent incorrect indentation from checkin 18516.

QE notes: n/a
Doc notes: n/a
Bugs: n/a
Reviewer: Kevin Lin
Tests run: checkintests
Is noteworthy for integration: n/a

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/Range.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1282474 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/supportClasses/Range.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/Range.as
@@ -11,507 +11,507 @@

 package spark.components.supportClasses
 {
-
-    import mx.events.FlexEvent;
-
-    /**
-     *  The Range class holds a value and an allowed range for that
-     *  value, defined by minimum and maximum properties.
-     *  The value property
-     *  is always constrained to be between the current minimum and
-     *  maximum, and the minimum,
-     *  and maximum are always constrained
-     *  to be in the proper numerical order, such that
-     *  (minimum <= value <= maximum) is true.
-     *  If the value of the snapInterval property is not 0,
-     *  then the value property is also constrained to be a multiple of
-     *  snapInterval.
-     *
-     *
Range is a base class for various controls that require range
-     *  functionality, including TrackBase and Spinner.

+
+import mx.events.FlexEvent;
+
+/**
+ *  The Range class holds a value and an allowed range for that
+ *  value, defined by minimum and maximum properties.
+ *  The value property
+ *  is always constrained to be between the current minimum and
+ *  maximum, and the minimum,
+ *  and maximum are always constrained
+ *  to be in the proper numerical order, such that
+ *  (minimum <= value <= maximum) is true.
+ *  If the value of the snapInterval property is not 0,
+ *  then the value property is also constrained to be a multiple of
+ *  snapInterval.
+ *
+ *
Range is a base class for various controls that require range
+ *  functionality, including TrackBase and Spinner.

+ *
+ *  @mxml
+ *
+ *
The <s:Range> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <s:Range
+ *    Properties
+ *    maximum="100"
+ *    minimum="0"
+ *    snapInterval="1"
+ *    stepSize="1"
+ *    value="0"
+ *  />
+ *

+ *
+ *  @see spark.components.supportClasses.TrackBase
+ *  @see spark.components.Spinner
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class Range extends SkinnableComponent
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function Range():void
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //---------------------------------
+    // maximum
+    //---------------------------------
+
+    private var _maximum:Number = 100;
+
+    private var maxChanged:Boolean = false;
+
+    /**
+     *  The maximum valid value.
+     *
+     *
Changes to the value property are constrained
+     *  by commitProperties() to be less than or equal to
+     *  maximum with the nearestValidValue() method.

      *
-     *  @mxml
+     *  @default 100
+     *  @see #nearestValidValue
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get maximum():Number
+    {
+        return _maximum;
+    }
+
+    public function set maximum(value:Number):void
+    {
+        if (value == _maximum)
+            return;
+
+        _maximum = value;
+        maxChanged = true;
+
+        invalidateProperties();
+    }
+
+    //---------------------------------
+    // minimum
+    //---------------------------------
+
+    private var _minimum:Number = 0;
+
+    private var minChanged:Boolean = false;
+
+    /**
+     *  The minimum valid value.
+     *
+     *
Changes to the value property are constrained
+     *  by commitProperties() to be greater than or equal to
+     *  minimum with the nearestValidValue() method.

      *
-     *
The <s:Range> tag inherits all of the tag
-     *  attributes of its superclass and adds the following tag attributes:

+     *  @default 0
+     *  @see #nearestValidValue
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get minimum():Number
+    {
+        return _minimum;
+    }
+
+    public function set minimum(value:Number):void
+    {
+        if (value == _minimum)
+            return;
+
+        _minimum = value;
+        minChanged = true;
+
+        invalidateProperties();
+    }
+
+    //---------------------------------
+    // stepSize
+    //---------------------------------
+
+    private var _stepSize:Number = 1;
+
+    private var stepSizeChanged:Boolean = false;
+
+    [Inspectable(minValue="0.0")]
+
+    /**
+     *  The amount that the value property
+     *  changes when the changeValueByStep() method is called. It must
+     *  be a multiple of snapInterval, unless
+     *  snapInterval is 0.
+     *  If stepSize
+     *  is not a multiple, it is rounded to the nearest
+     *  multiple that is greater than or equal to snapInterval.
      *
-     *

-     *  <s:Range
-     *    Properties
-     *    maximum="100"
-     *    minimum="0"
-     *    snapInterval="1"
-     *    stepSize="1"
-     *    value="0"
-     *  />
-     *

-     *
-     *  @see spark.components.supportClasses.TrackBase
-     *  @see spark.components.Spinner
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public class Range extends SkinnableComponent
-    {
-        include "../../core/Version.as";
-
-        //--------------------------------------------------------------------------
-        //
-        //  Constructor
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  Constructor.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public function Range():void
+     *  @default 1
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get stepSize():Number
+    {
+        return _stepSize;
+    }
+
+    public function set stepSize(value:Number):void
+    {
+        if (value == _stepSize)
+            return;
+
+        _stepSize = value;
+        stepSizeChanged = true;
+
+        invalidateProperties();
+    }
+
+    //---------------------------------
+    // value
+    //---------------------------------
+
+    private var _value:Number = 0;
+    private var _changedValue:Number = 0;
+    private var valueChanged:Boolean = false;
+
+    [Bindable(event="valueCommit")]
+
+    /**
+     *  The current value for this range.
+     *
+     *
Changes to the value property are constrained
+     *  by commitProperties() to be greater than or equal to
+     *  the minimum property, less than or equal to the maximum property, and a
+     *  multiple of snapInterval with the nearestValidValue()
+     *  method.

+     *
+     *  @default 0
+     *  @see #setValue
+     *  @see #nearestValidValue
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get value():Number
+    {
+        return (valueChanged) ? _changedValue : _value;
+    }
+
+
+    /**
+     *  @private
+     *  Implementation note: we temporarily store the new value in
+     *  _changedValue and then update _value, by calling setValue()
+     *  in commitProperties().  Only one "valueCommit" event is
+     *  dispatched, even if this property has effectively changed
+     *  twice per nearestValidValue().
+     */
+    public function set value(newValue:Number):void
+    {
+        if (newValue == value)
+            return;
+        _changedValue = newValue;
+        valueChanged = true;
+        invalidateProperties();
+    }
+
+    //---------------------------------
+    // snapInterval
+    //---------------------------------
+
+    private var _snapInterval:Number = 1;
+
+    private var snapIntervalChanged:Boolean = false;
+    private var _explicitSnapInterval:Boolean = false;
+
+    [Inspectable(minValue="0.0")]
+
+    /**
+     *  The snapInterval property controls the valid values of the value property.
+     *
+     *  If nonzero, valid values are the sum of the minimum and integer multiples
+     *  of this property, for all sums that are less than or equal to the maximum.
+     *
+     *
For example, if minimum is 10, maximum is 20, and this property is 3, then the
+     *  valid values of this Range are 10, 13, 16, 19, and 20.

+     *
+     *
If the value of this property is zero, then valid values are only constrained
+     *  to be between minimum and maximum inclusive.

+     *
+     *
This property also constrains valid values for the stepSize property when set.
+     *  If this property is not explicitly set and stepSize is set,
+     *  then snapInterval defaults to stepSize.

+     *
+     *  @default 1
+     *  @see #nearestValidValue
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get snapInterval():Number
+    {
+        return _snapInterval;
+    }
+
+    public function set snapInterval(value:Number):void
+    {
+        // snapInterval defaults to stepSize if snapInterval is not
+        // explicitly set.
+        _explicitSnapInterval = true;
+
+        if (value == _snapInterval)
+            return;
+
+        // NaN effectively clears the snapInterval and resets it to 1.
+        if (isNaN(value))
         {
-            super();
+            _snapInterval = 1;
+            _explicitSnapInterval = false;
         }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Properties
-        //
-        //--------------------------------------------------------------------------
-
-        //---------------------------------
-        // maximum
-        //---------------------------------
-
-        private var _maximum:Number = 100;
-
-        private var maxChanged:Boolean = false;
-
-        /**
-         *  The maximum valid value.
-         *
-         *
Changes to the value property are constrained
-         *  by commitProperties() to be less than or equal to
-         *  maximum with the nearestValidValue() method.

-         *
-         *  @default 100
-         *  @see #nearestValidValue
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public function get maximum():Number
+        else
         {
-            return _maximum;
+            _snapInterval = value;
         }

-        public function set maximum(value:Number):void
+        snapIntervalChanged = true;
+        stepSizeChanged = true;
+
+        invalidateProperties();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        // Check min <= max
+        if (minimum > maximum)
         {
-            if (value == _maximum)
-                return;
-
-            _maximum = value;
-            maxChanged = true;
-
-            invalidateProperties();
+            if (!maxChanged)
+                _minimum = _maximum;
+            else
+                _maximum = _minimum;
         }

-        //---------------------------------
-        // minimum
-        //---------------------------------
-
-        private var _minimum:Number = 0;
-
-        private var minChanged:Boolean = false;
-
-        /**
-         *  The minimum valid value.
-         *
-         *
Changes to the value property are constrained
-         *  by commitProperties() to be greater than or equal to
-         *  minimum with the nearestValidValue() method.

-         *
-         *  @default 0
-         *  @see #nearestValidValue
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public function get minimum():Number
+        // determine which takes priority, stepSize or snapInterval, based
+        // on whether either or both have been set
+        if (stepSizeChanged || snapIntervalChanged)
         {
-            return _minimum;
-        }
-
-        public function set minimum(value:Number):void
-        {
-            if (value == _minimum)
-                return;
-
-            _minimum = value;
-            minChanged = true;
-
-            invalidateProperties();
-        }
-
-        //---------------------------------
-        // stepSize
-        //---------------------------------
-
-        private var _stepSize:Number = 1;
-
-        private var stepSizeChanged:Boolean = false;
-
-        [Inspectable(minValue="0.0")]
-
-        /**
-         *  The amount that the value property
-         *  changes when the changeValueByStep() method is called. It must
-         *  be a multiple of snapInterval, unless
-         *  snapInterval is 0.
-         *  If stepSize
-         *  is not a multiple, it is rounded to the nearest
-         *  multiple that is greater than or equal to snapInterval.
-         *
-         *  @default 1
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public function get stepSize():Number
-        {
-            return _stepSize;
-        }
-
-        public function set stepSize(value:Number):void
-        {
-            if (value == _stepSize)
-                return;
-
-            _stepSize = value;
-            stepSizeChanged = true;
-
-            invalidateProperties();
-        }
-
-        //---------------------------------
-        // value
-        //---------------------------------
-
-        private var _value:Number = 0;
-        private var _changedValue:Number = 0;
-        private var valueChanged:Boolean = false;
-
-        [Bindable(event="valueCommit")]
-
-        /**
-         *  The current value for this range.
-         *
-         *
Changes to the value property are constrained
-         *  by commitProperties() to be greater than or equal to
-         *  the minimum property, less than or equal to the maximum property, and a
-         *  multiple of snapInterval with the nearestValidValue()
-         *  method.

-         *
-         *  @default 0
-         *  @see #setValue
-         *  @see #nearestValidValue
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public function get value():Number
-        {
-            return (valueChanged) ? _changedValue : _value;
-        }
-
-
-        /**
-         *  @private
-         *  Implementation note: we temporarily store the new value in
-         *  _changedValue and then update _value, by calling setValue()
-         *  in commitProperties().  Only one "valueCommit" event is
-         *  dispatched, even if this property has effectively changed
-         *  twice per nearestValidValue().
-         */
-        public function set value(newValue:Number):void
-        {
-            if (newValue == value)
-                return;
-            _changedValue = newValue;
-            valueChanged = true;
-            invalidateProperties();
-        }
-
-        //---------------------------------
-        // snapInterval
-        //---------------------------------
-
-        private var _snapInterval:Number = 1;
-
-        private var snapIntervalChanged:Boolean = false;
-        private var _explicitSnapInterval:Boolean = false;
-
-        [Inspectable(minValue="0.0")]
-
-        /**
-         *  The snapInterval property controls the valid values of the value property.
-         *
-         *  If nonzero, valid values are the sum of the minimum and integer multiples
-         *  of this property, for all sums that are less than or equal to the maximum.
-         *
-         *
For example, if minimum is 10, maximum is 20, and this property is 3, then the
-         *  valid values of this Range are 10, 13, 16, 19, and 20.

-         *
-         *
If the value of this property is zero, then valid values are only constrained
-         *  to be between minimum and maximum inclusive.

-         *
-         *
This property also constrains valid values for the stepSize property when set.
-         *  If this property is not explicitly set and stepSize is set,
-         *  then snapInterval defaults to stepSize.

-         *
-         *  @default 1
-         *  @see #nearestValidValue
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public function get snapInterval():Number
-        {
-            return _snapInterval;
-        }
-
-        public function set snapInterval(value:Number):void
-        {
-            // snapInterval defaults to stepSize if snapInterval is not
-            // explicitly set.
-            _explicitSnapInterval = true;
-
-            if (value == _snapInterval)
-                return;
-
-            // NaN effectively clears the snapInterval and resets it to 1.
-            if (isNaN(value))
+            if (_explicitSnapInterval)
             {
-                _snapInterval = 1;
-                _explicitSnapInterval = false;
+                // If snapInterval was explicitly set, stepSize always conforms to match
+                _stepSize = nearestValidSize(_stepSize);
+                stepSizeChanged = true; // technically not necessary
             }
             else
             {
-                _snapInterval = value;
-            }
-
-            snapIntervalChanged = true;
-            stepSizeChanged = true;
-
-            invalidateProperties();
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Methods
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         */
-        override protected function commitProperties():void
-        {
-            super.commitProperties();
-
-            // Check min <= max
-            if (minimum > maximum)
-            {
-                if (!maxChanged)
-                    _minimum = _maximum;
-                else
-                    _maximum = _minimum;
-            }
-
-            // determine which takes priority, stepSize or snapInterval, based
-            // on whether either or both have been set
-            if (stepSizeChanged || snapIntervalChanged)
-            {
-                if (_explicitSnapInterval)
-                {
-                    // If snapInterval was explicitly set, stepSize always conforms to match
-                    _stepSize = nearestValidSize(_stepSize);
-                    stepSizeChanged = true; // technically not necessary
-                }
-                else
-                {
-                    // Otherwise, snapInterval defaults to stepSize
-                    _snapInterval = _stepSize;
-                    snapIntervalChanged = true; // technically not necessary
-                }
-            }
-
-            // if anything has changed, re-evaluate value
-            if (valueChanged || maxChanged || minChanged || stepSizeChanged || snapIntervalChanged)
-            {
-                var currentValue:Number = (valueChanged) ? _changedValue : _value;
-                valueChanged = false;
-                maxChanged = false;
-                minChanged = false;
-                stepSizeChanged = false;
-                snapIntervalChanged = false;
-                setValue(nearestValidValue(currentValue, snapInterval));
+                // Otherwise, snapInterval defaults to stepSize
+                _snapInterval = _stepSize;
+                snapIntervalChanged = true; // technically not necessary
             }
         }

-        /**
-         *  @private
-         *  Returns the integer multiple of snapInterval that's closest to size.
-         *
-         *
If snapInterval is 0, which means that values are only constrained
-         *  by the minimum and maximum properties, then size is returned unchanged.

-         *
-         *
This method is used by commitProperties() to validate the
-         *  stepSize.

-         *
-         *  @param size The input size.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        private function nearestValidSize(size:Number):Number
+        // if anything has changed, re-evaluate value
+        if (valueChanged || maxChanged || minChanged || stepSizeChanged || snapIntervalChanged)
         {
-            var interval:Number = snapInterval;
-            if (interval == 0)
-                return size;
-
-            var validSize:Number = Math.round(size / interval) * interval
-            return (Math.abs(validSize) < interval) ? interval : validSize;
+            var currentValue:Number = (valueChanged) ? _changedValue : _value;
+            valueChanged = false;
+            maxChanged = false;
+            minChanged = false;
+            stepSizeChanged = false;
+            snapIntervalChanged = false;
+            setValue(nearestValidValue(currentValue, snapInterval));
         }
-
-        /**
-         *  Returns the sum of the minimum with an integer multiple of interval that's
-         *  closest to value, unless value is closer to the maximum limit,
-         *  in which case the maximum is returned.
-         *
-         *
If interval is equal to 0, the value is clipped to the minimum and maximum
-         *  limits.

-         *
-         *
The valid values for a range are defined by the sum of the minimum property
-         *  with multiples of the interval and also defined to be less than or equal to the
-         *  maximum property.
-         *
-         *  The maximum need not be a multiple of snapInterval.

-         *
-         *
For example, if minimum is equal to 1, maximum is equal to 6,
-         *  and snapInterval is equal to 2, the valid
-         *  values for the Range are 1, 3, 5, 6.
-         *
-         *  Similarly, if minimum is equal to 2, maximum is equal to 9,
-         *  and snapInterval is equal to 1.5, the valid
-         *  values for the Range are 2, 3.5, 5, 6.5, 8, and 9.

-         *
-         *  @param value The input value.
-         *  @param interval The value of snapInterval or an integer multiple of snapInterval.
-         *  @return The valid value that's closest to the input.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        protected function nearestValidValue(value:Number, interval:Number):Number
+    }
+
+    /**
+     *  @private
+     *  Returns the integer multiple of snapInterval that's closest to size.
+     *
+     *
If snapInterval is 0, which means that values are only constrained
+     *  by the minimum and maximum properties, then size is returned unchanged.

+     *
+     *
This method is used by commitProperties() to validate the
+     *  stepSize.

+     *
+     *  @param size The input size.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    private function nearestValidSize(size:Number):Number
+    {
+        var interval:Number = snapInterval;
+        if (interval == 0)
+            return size;
+
+        var validSize:Number = Math.round(size / interval) * interval
+        return (Math.abs(validSize) < interval) ? interval : validSize;
+    }
+
+    /**
+     *  Returns the sum of the minimum with an integer multiple of interval that's
+     *  closest to value, unless value is closer to the maximum limit,
+     *  in which case the maximum is returned.
+     *
+     *
If interval is equal to 0, the value is clipped to the minimum and maximum
+     *  limits.

+     *
+     *
The valid values for a range are defined by the sum of the minimum property
+     *  with multiples of the interval and also defined to be less than or equal to the
+     *  maximum property.
+     *
+     *  The maximum need not be a multiple of snapInterval.

+     *
+     *
For example, if minimum is equal to 1, maximum is equal to 6,
+     *  and snapInterval is equal to 2, the valid
+     *  values for the Range are 1, 3, 5, 6.
+     *
+     *  Similarly, if minimum is equal to 2, maximum is equal to 9,
+     *  and snapInterval is equal to 1.5, the valid
+     *  values for the Range are 2, 3.5, 5, 6.5, 8, and 9.

+     *
+     *  @param value The input value.
+     *  @param interval The value of snapInterval or an integer multiple of snapInterval.
+     *  @return The valid value that's closest to the input.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    protected function nearestValidValue(value:Number, interval:Number):Number
+    {
+        if (interval == 0)
+            return Math.max(minimum, Math.min(maximum, value));
+
+        var maxValue:Number = maximum - minimum;
+        var scale:Number = 1;
+
+        value -= minimum;
+
+        // If interval isn't an integer, there's a possibility that the floating point
+        // approximation of value or value/interval will be slightly larger or smaller
+        // than the real value.  This can lead to errors in calculations like
+        // floor(value/interval)*interval, which one might expect to just equal value,
+        // when value is an exact multiple of interval.  Not so if value=0.58 and
+        // interval=0.01, in that case the calculation yields 0.57!  To avoid problems,
+        // we scale by the implicit precision of the interval and then round.  For
+        // example if interval=0.01, then we scale by 100.
+
+        if (interval != Math.round(interval))
         {
-            if (interval == 0)
-                return Math.max(minimum, Math.min(maximum, value));
-
-            var maxValue:Number = maximum - minimum;
-            var scale:Number = 1;
-
-            value -= minimum;
-
-            // If interval isn't an integer, there's a possibility that the floating point
-            // approximation of value or value/interval will be slightly larger or smaller
-            // than the real value.  This can lead to errors in calculations like
-            // floor(value/interval)*interval, which one might expect to just equal value,
-            // when value is an exact multiple of interval.  Not so if value=0.58 and
-            // interval=0.01, in that case the calculation yields 0.57!  To avoid problems,
-            // we scale by the implicit precision of the interval and then round.  For
-            // example if interval=0.01, then we scale by 100.
-
-            if (interval != Math.round(interval))
-            {
-                const parts:Array = (new String(1 + interval)).split(".");
-                scale = Math.pow(10, parts[1].length);
-                maxValue *= scale;
-                value = Math.round(value * scale);
-                interval = Math.round(interval * scale);
-            }
-
-            var lower:Number = Math.max(0, Math.floor(value / interval) * interval);
-            var upper:Number = Math.min(maxValue, Math.floor((value + interval) / interval) * interval);
-            var validValue:Number = ((value - lower) >= ((upper - lower) / 2)) ? upper : lower;
-
-            return (validValue / scale) + minimum;
-        }
-
-        /**
-         *  Sets the backing store for the value property and
-         *  dispatches a valueCommit event if the property changes.
-         *
-         *
All updates to the value property cause a call to this method.

-         *
-         *
This method assumes that the caller has already used the nearestValidValue() method
-         *  to constrain the value parameter

-         *
-         *  @param value The new value of the value property.
-         *  @see #nearestValidValue
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        protected function setValue(value:Number):void
-        {
-            if (_value == value)
-                return;
-            if (!isNaN(maximum) && !isNaN(minimum) && (maximum > minimum))
-                _value = Math.min(maximum, Math.max(minimum, value));
-            else
-                _value = value;
-            dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
-        }
-
-        /**
-         *  Increases or decreases value by stepSize.
-         *
-         *  @param increase If true, adds stepSize to value, otherwise, subtracts it.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public function changeValueByStep(increase:Boolean = true):void
-        {
-            if (stepSize == 0)
-                return;
-
-            var newValue:Number = (increase) ? value + stepSize : value - stepSize;
-            setValue(nearestValidValue(newValue, snapInterval));
-        }
-    }
-
+            const parts:Array = (new String(1 + interval)).split(".");
+            scale = Math.pow(10, parts[1].length);
+            maxValue *= scale;
+            value = Math.round(value * scale);
+            interval = Math.round(interval * scale);
+        }
+
+        var lower:Number = Math.max(0, Math.floor(value / interval) * interval);
+        var upper:Number = Math.min(maxValue, Math.floor((value + interval) / interval) * interval);
+        var validValue:Number = ((value - lower) >= ((upper - lower) / 2)) ? upper : lower;
+
+        return (validValue / scale) + minimum;
+    }
+
+    /**
+     *  Sets the backing store for the value property and
+     *  dispatches a valueCommit event if the property changes.
+     *
+     *
All updates to the value property cause a call to this method.

+     *
+     *
This method assumes that the caller has already used the nearestValidValue() method
+     *  to constrain the value parameter

+     *
+     *  @param value The new value of the value property.
+     *  @see #nearestValidValue
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    protected function setValue(value:Number):void
+    {
+        if (_value == value)
+            return;
+        if (!isNaN(maximum) && !isNaN(minimum) && (maximum > minimum))
+            _value = Math.min(maximum, Math.max(minimum, value));
+        else
+            _value = value;
+        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+    }
+
+    /**
+     *  Increases or decreases value by stepSize.
+     *
+     *  @param increase If true, adds stepSize to value, otherwise, subtracts it.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function changeValueByStep(increase:Boolean = true):void
+    {
+        if (stepSize == 0)
+            return;
+
+        var newValue:Number = (increase) ? value + stepSize : value - stepSize;
+        setValue(nearestValidValue(newValue, snapInterval));
+    }
+}
+
 }


http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLRequestMethod.html
The values of the constants in that class are actually uppercase.

git-svn-id: c197267f952b24206666de142881703007ca05d5@11463 b35dd754-fafc-0310-a699-88a17e54d16e

--- src/org/igniterealtime/xiff/core/XMPPBOSHConnection.as
+++ src/org/igniterealtime/xiff/core/XMPPBOSHConnection.as
@@ -1,20 +1,20 @@
 /*
  * Copyright (C) 2003-2009 Igniterealtime Community Contributors
- *
+ *
  *     Daniel Henninger
  *     Derrick Grigg <dgrigg@rogers.com>
  *     Juga Paazmaya <olavic@gmail.com>
  *     Nick Velloff <nick.velloff@gmail.com>
  *     Sean Treadway <seant@oncotype.dk>
  *     Sean Voisen <sean@voisen.org>
- *
- *
+ *
+ *
  * Licensed 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.
@@ -60,10 +60,11 @@

 		/**
 		 * Keys should match URLRequestMethod constants.
+		 * @see http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLRequestMethod.html
 		 */
 		private static const headers:Object = {
-			"post": [],
-			"get": [ 'Cache-Control',
+			"POST": [],
+			"GET": [ 'Cache-Control',
 					 'no-store',
 					 'Cache-Control',
 					 'no-cache',


FLEX-35321 LayoutManager.validateNow() doesn't use phased instantiation, so it wasn't the best idea to test it with that, at least the test where we fake a user request for the removal of the component in the next frame. Also added a test that tries to make sure that objects removed from stage and then readded are indeed validated and initialized.

--- frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
+++ frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
@@ -6,7 +6,8 @@
     import mx.core.mx_internal;
     import mx.events.FlexEvent;

-    import org.flexunit.asserts.assertFalse;
+    import org.flexunit.asserts.assertEquals;
+    import org.flexunit.asserts.assertNotNull;
     import org.flexunit.asserts.assertNull;
     import org.flexunit.async.Async;
     import org.fluint.uiImpersonation.UIImpersonator;
@@ -19,14 +20,15 @@
         private static const _finishNotifier:EventDispatcher = new EventDispatcher();

         private var _objectWhichIsRemovedOnSizeValidation:SomeComponent;
-        private var _creationCompleteCalled:Boolean;
+        private var _creationCompleteCalls:int;

         [Before]
         public function setUp():void
         {
-            _creationCompleteCalled = false;
+            _creationCompleteCalls = 0;
             _objectWhichIsRemovedOnSizeValidation = new SomeComponent();
-            UIImpersonator.addChild(_objectWhichIsRemovedOnSizeValidation);
+            _objectWhichIsRemovedOnSizeValidation.addEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplete);
+            UIImpersonator.addElement(_objectWhichIsRemovedOnSizeValidation);
         }

         [After]
@@ -41,14 +43,14 @@
         {
             //given
             UIComponentGlobals.mx_internal::layoutManager.usePhasedInstantiation = false;
-            _objectWhichIsRemovedOnSizeValidation.addEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplete);
+            _objectWhichIsRemovedOnSizeValidation.removeFromStageOnValidateProperties = true;

             //when
             _objectWhichIsRemovedOnSizeValidation.validateNow();

             //then
             assertNull("The object was actually not removed from stage. Huh?", _objectWhichIsRemovedOnSizeValidation.parent);
-            assertFalse("Yep, this is the bug. Why call initialized=true on an object that's not on stage?", _creationCompleteCalled);
+            assertEquals("Yep, this is the bug. Why call initialized=true on an object that's not on stage?", 0, _creationCompleteCalls);
         }

         [Test(async, timeout=500)]
@@ -56,24 +58,78 @@
         {
             //given
             UIComponentGlobals.mx_internal::layoutManager.usePhasedInstantiation = true;
-            _objectWhichIsRemovedOnSizeValidation.addEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplete);
+            _objectWhichIsRemovedOnSizeValidation.removeFromStageOnValidateProperties = false;

             //when
-            _objectWhichIsRemovedOnSizeValidation.validateNow();
-            _objectWhichIsRemovedOnSizeValidation.pretendUserAskedForComponentRemoval();
+            _objectWhichIsRemovedOnSizeValidation.invalidateDisplayList();
+            _objectWhichIsRemovedOnSizeValidation.invalidateProperties();
+            _objectWhichIsRemovedOnSizeValidation.invalidateSize();
+
+            //then wait 1 frame
+            noEnterFramesRemaining = 1;
+            UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
+            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, then_remove_from_stage_in_next_frame, 300);
+        }
+
+        private function then_remove_from_stage_in_next_frame(event:Event, passThroughData:Object):void
+        {
+            //when
+            _objectWhichIsRemovedOnSizeValidation.pretendUserAskedForComponentRemovalInNextFrame();

             //then wait 2 frames
             noEnterFramesRemaining = 2;
             UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
-            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, then_assert, 300);
+            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, then_assert_not_initialized, 300);
         }

-        private function then_assert(event:Event, passThroughData:Object):void
+        private function then_assert_not_initialized(event:Event, passThroughData:Object):void
         {
             //then
             assertNull("The object was actually not removed from stage. Huh?", _objectWhichIsRemovedOnSizeValidation.parent);
-            assertFalse("Yep, this is the bug. Why call initialized=true on an object that's not on stage?", _creationCompleteCalled);
+            assertEquals("Yep, this is the bug. Why call initialized=true on an object that's not on stage?", 0, _creationCompleteCalls);
         }
+
+
+        [Test(async, timeout=750)]
+        public function test_object_removed_from_stage_then_readded_is_initialized_once():void
+        {
+            //given
+            UIComponentGlobals.mx_internal::layoutManager.usePhasedInstantiation = true;
+            _objectWhichIsRemovedOnSizeValidation.removeFromStageOnValidateProperties = false;
+
+            //when
+            _objectWhichIsRemovedOnSizeValidation.validateNow();
+            _objectWhichIsRemovedOnSizeValidation.pretendUserAskedForComponentRemovalInNextFrame();
+
+            //then wait 1 frame
+            noEnterFramesRemaining = 1;
+            UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
+            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, then_readd_object, 200);
+        }
+
+        private function then_readd_object(event:Event, passThroughData:Object):void
+        {
+            //then
+            assertNull("The object was actually not removed from stage. Huh?", _objectWhichIsRemovedOnSizeValidation.parent);
+
+            //when
+            UIImpersonator.addElement(_objectWhichIsRemovedOnSizeValidation);
+
+            //then wait 4 frames, to make sure validation is done
+            noEnterFramesRemaining = 4;
+            UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
+            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, then_assert_one_initialization_only, 400);
+        }
+
+        private function then_assert_one_initialization_only(event:Event, passThroughData:Object):void
+        {
+            //then
+            assertNotNull("The object should be on stage...", _objectWhichIsRemovedOnSizeValidation.parent);
+            assertEquals("When validation is interrupted half-way it should be complete once the object is re-added to stage", 1, _creationCompleteCalls);
+        }
+
+
+

         private static function onEnterFrame(event:Event):void
         {
@@ -86,7 +142,7 @@

         private function onCreationComplete(event:FlexEvent):void
         {
-            _creationCompleteCalled = true;
+            _creationCompleteCalls++;
         }
     }
 }
@@ -99,12 +155,23 @@

 class SomeComponent extends UIComponent
 {
-    private var _timer:Timer = new Timer(1, 1);
+    private var _removeFromStageOnValidateProperties:Boolean = false;
+
+    override public function validateProperties():void
+    {
+        super.validateProperties();
+        if(_removeFromStageOnValidateProperties)
+            removeFromStage();
+    }

     override public function validateSize(recursive:Boolean = false):void
     {
         super.validateSize(recursive);
-        removeFromStage();
+    }
+
+    override public function validateDisplayList():void
+    {
+        super.validateDisplayList();
     }

     private function removeFromStage():void
@@ -118,8 +185,13 @@
         }
     }

-    public function pretendUserAskedForComponentRemoval():void
+    public function pretendUserAskedForComponentRemovalInNextFrame():void
     {
         callLater(removeFromStage);
     }
+
+    public function set removeFromStageOnValidateProperties(value:Boolean):void
+    {
+        _removeFromStageOnValidateProperties = value;
+    }
 }


fix currencyformatter

fix currencyformatter

--- frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/accessories/CurrencyFormatter.as
+++ frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/accessories/CurrencyFormatter.as
@@ -207,7 +207,7 @@
 			if (value == null) return "";

 			var num:Number = Number(value);
-            var source:String = num.toPrecision(fractionalDigits);
+            var source:String = num.toFixed(fractionalDigits);

 			return currencySymbol + source;
 		}


Replace tab with spaces.

Replace tab with spaces.


use creationCompletion event

use creationCompletion event

SVN-Revision: 3128

--- software/sasFlex/src/gov/nih/nci/cbiit/casas/components/FormulaEditor.as
+++ software/sasFlex/src/gov/nih/nci/cbiit/casas/components/FormulaEditor.as
@@ -6,19 +6,36 @@

 	import flash.display.MovieClip;
 	import flash.events.KeyboardEvent;
+	import flash.events.TimerEvent;
 	import flash.utils.Timer;

 	import learnmath.mathml.components.MathMLEditor;
 	import learnmath.mathml.formula.Constants;
 	import learnmath.windows.ConfigManager;
-
+	import learnmath.windows.apps.EditorApp;
+
+	import mx.containers.Canvas;
 	import mx.controls.Alert;
+	import mx.controls.listClasses.BaseListData;
+	import mx.controls.listClasses.IDropInListItemRenderer;
+	import mx.controls.listClasses.IListItemRenderer;
+	import mx.core.IDataRenderer;
+	import mx.core.IFlexModuleFactory;
+	import mx.core.IFontContextComponent;
 	import mx.core.IUIComponent;
-
-	import flash.events.TimerEvent;
-
-	public class FormulaEditor extends MathMLEditor
+	import mx.managers.IFocusManagerComponent;
+	import mx.events.FlexEvent;
+
+
+	public class FormulaEditor extends MathMLEditor
+		//extends Canvas implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer, IFontContextComponent, IFocusManagerComponent
 	{
+		private var _mathML:String = "";
+		var _editorHeight:Number = 500;
+//		private var _listData:BaseListData;
+		var _editorWidth:Number = 800;
+//		public var mainPannel:EditorApp;
+
 		public function FormulaEditor()
 		{
 			//duplicate MathMLEditor Constructor
@@ -29,38 +46,118 @@
 			ConfigManager.disableOpen=new Boolean(false);
 			ConfigManager.disableSave=new Boolean(false);
 			addEventListener(KeyboardEvent.KEY_DOWN, processKey);
-//			mainPannel.name= "NCI Center for Biomedical Informatics & Information Technology - Scientific Algorithm Service";
-//			mainPannel.draw();
-			return;
-		}
-
-//		override protected function createChildren():void
+			addEventListener(FlexEvent.CREATION_COMPLETE,onCreationComplete) ;
+			return;
+		}
+
+		private function onCreationComplete(event : FlexEvent):void
+		{
+//			this.removeAllCh ildren();
+//			this.invalidateDisplayList();
+//			createCustomButtons();
+			mainPannel.name= "NCI Center for Biomedical Informatics & Information Technology - Scientific Algorithm Service";
+			var p1:XML =new XML("<math><mrow><mtext>default</mtext><mo selected='true'>×</mo><mtext>0123456789</mtext></mrow>" + "</math>")
+			mainPannel.setMathML(p1);
+		}
+
+
+//		private function createCustomButtons() : void
 //		{
-//			Alert.show("before created by super", mainPannel+"");
 //			super.createChildren();
-//			Alert.show("created by super", mainPannel+"");
-//			mainPannel=null;
-//			while (this.numChildren>0)
+//			mainPannel = null;
+//			while (this.numChildren > 0)
 //			{
+//
 //				this.removeChildAt(0);
 //			}
-//			var _loc_1:*=new MovieClip();
-//			var editorW:Number=800;
-//			var editorH:Number=500;
-//
-//			mainPannel = new FormulaPanel(_loc_1, 0,0,editorW, editorH, returnFocus);
+//			var _loc_1:* = new MovieClip();
+//			mainPannel = new EditorApp(_loc_1, 0, 0, _editorWidth, _editorHeight, returnFocus);
 //			mainPannel.draw();
-//			mainPannel.setMathML("..xx");
-//			Alert.show(mainPannel+"", mainPannel.getMathML());
-//			var _loc_2:*=new UIComponent();
+//			mainPannel.setMathML(_mathML);
+//			var _loc_2:* = new UIComponent();
 //			addChild(_loc_2);
-//
-//			var _loc_3:*=new Timer(100,1);
-//			_loc_3.addEventListenr(TimerEvent.TIMER, redrawEditor);
+//			_loc_2.addChild(_loc_1);
+//			var _loc_3:* = new Timer(100, 1);
+//			_loc_3.addEventListener(TimerEvent.TIMER, redrawEditor);
 //			_loc_3.start();
 //			return;
-//		}
-
+//		}// end function
+/**
+		override protected function measure() : void
+		{
+			measuredHeight = editorHeight;
+			measuredMinHeight = editorHeight;
+			measuredWidth = editorWidth;
+			measuredMinWidth = editorWidth;
+			return;
+		}// end function
+
+		public function get fontContext() : IFlexModuleFactory
+		{
+			return moduleFactory;
+		}
+		public function set fontContext(moduleFactory:IFlexModuleFactory) : void
+		{
+			this.moduleFactory = moduleFactory;
+			return;
+		}// end function
+
+		public function get listData() : BaseListData
+		{
+			return _listData;
+		}// end function
+		public function set listData(value:BaseListData) : void
+		{
+			_listData = value;
+			return;
+		}// end function
+
+		public function get mathML() : String
+		{
+			_mathML = mainPannel.getMathML();
+			return _mathML;
+		}// end function
+
+		public function set mathML(mathML:String) : void
+		{
+			_mathML = mathML;
+			if (mainPannel != null)
+			{
+				mainPannel.setMathML(_mathML);
+			}
+			return;
+		}// end function
+
+		public function get editorHeight() : Number
+		{
+			return _editorHeight;
+		}// end function
+
+		public function get editorWidth() : Number
+		{
+			return _editorWidth;
+		}// end function
+
+		public function set editorWidth(w:Number) : void
+		{
+			this._editorWidth = w;
+			width = w;
+			invalidateProperties();
+			invalidateSize();
+			invalidateDisplayList();
+			return;
+		}// end function
+
+		public function set editorHeight(h:Number) : void
+		{
+			this._editorHeight = h;
+			height = h;
+			invalidateProperties();
+			invalidateSize();
+			invalidateDisplayList();
+			return;
+		}
+*/
 		//override private method
 		private function redrawEditor(event:TimerEvent):void
 		{
@@ -71,6 +168,46 @@
 			}
 			return;
 		}
+/**
+		public function saveImageOnServer(type:String, compression:int, callbackName:Function) : void
+		{
+			mainPannel.saveImageOnServer(type, compression, callbackName);
+			return;
+		}// end function
+		public function setConfiguration(key:String, value:String) : void
+		{
+			ConfigManager.setConfig(key, value);
+			return;
+		}// end function
+		public function viewImageInBrowser(type:String, compression:int) : void
+		{
+			mainPannel.viewImageInBrowser(type, compression);
+			return;
+		}// end function
+		public function processKey(event:KeyboardEvent) : void
+		{
+			if (mainPannel == null)
+			{
+				return;
+			}
+			mainPannel.processKey(event);
+			return;
+		}// end function
+
+		public function returnFocus() : void
+		{
+			if (focusManager != null)
+			{
+				focusManager.setFocus(this);
+			}
+			return;
+		}// end function
+
+		public function getBase64Image(type:String, precission:int = 100) : String
+		{
+			return mainPannel.getBase64Image(type, precission);
+		}// end function
+ */
 	}

 }


Fix wrong paths passed to adt for AIR app descriptor and .swf file when packaging for Adobe AIR

--- src/ASConfigC.as
+++ src/ASConfigC.as
@@ -135,9 +135,6 @@
 			{
 				//java is required to run the compiler
 				this.validateJava();
-				//validate the SDK after parsing the config because we need to know
-				//if we're building SWF or JS. JS has stricter SDK requirements.
-				this.validateSDK();

 				if(this._clean) {
 					this.cleanProject();
@@ -803,6 +800,21 @@
 				}
 				this._compilerArgs.push(this._mainFile);
 			}
+			if(TopLevelFields.ANIMATE_OPTIONS in configData)
+			{
+				var animateOptionsJSON:Object = configData[TopLevelFields.ANIMATE_OPTIONS];
+				if(AnimateOptions.FILE in animateOptionsJSON)
+				{
+					this._animateFile = animateOptionsJSON[AnimateOptions.FILE];
+					if(!path.isAbsolute(this._animateFile))
+					{
+						this._animateFile = path.resolve(process.cwd(), this._animateFile);
+					}
+				}
+			}
+			// before parsing AIR options, we need to figure out where the output
+			// directory is, based on the SDK type and compiler options
+			this.validateSDK();
 			if(TopLevelFields.AIR_OPTIONS in configData)
 			{
 				this._configRequiresAIR = true;
@@ -825,18 +837,6 @@
 					compilerOptionsJSON = configData[TopLevelFields.COMPILER_OPTIONS];
 				}
 				readHTMLTemplateOptions(compilerOptionsJSON);
-			}
-			if(TopLevelFields.ANIMATE_OPTIONS in configData)
-			{
-				var animateOptionsJSON:Object = configData[TopLevelFields.ANIMATE_OPTIONS];
-				if(AnimateOptions.FILE in animateOptionsJSON)
-				{
-					this._animateFile = animateOptionsJSON[AnimateOptions.FILE];
-					if(!path.isAbsolute(this._animateFile))
-					{
-						this._animateFile = path.resolve(process.cwd(), this._animateFile);
-					}
-				}
 			}
 		}

@@ -1175,6 +1175,10 @@

 		private function validateSDK():void
 		{
+			if (this._animateFile)
+			{
+				return;
+			}
 			//the --sdk argument wasn't passed in, try to find an SDK
 			if(!this._sdkHome)
 			{


Transferred from the Adobe Open Source Subversion Repository

Revision: 12469
Author:   jimurphy@adobe.com
Date:     2009-12-03T22:04:16.560316Z

Log Message:
-----------
fix offsets for FB.  Convert line ending from lf to crlf in svn for the proects directory only.  When checking project files in, be sure to save you files this way.  Another update to make sure happens is set the svn properties svn:eol-style = native and svn:mime-type = text/plain (these have been updated on theses files as well)

QE notes: make sure the proper class is selected
Doc notes: no
Bugs: http://bugs.adobe.com/jira/browse/SDK-24498
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
133 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1284203 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateColorInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateColorInstance.as
@@ -123,4 +123,4 @@
         super.play();
     }
 }
-}+}


fix typo

fix typo

--- src/org/mangui/hls/HLS.as
+++ src/org/mangui/hls/HLS.as
@@ -149,7 +149,7 @@
             _streamBuffer.nextLevel = level;
         };

-        /*  set quality level for last loaded fragment (-1 for automatic level selection) */
+        /*  set quality level for next loaded fragment (-1 for automatic level selection) */
         public function set loadLevel(level : int) : void {
             _manual_level = level;
         };


revision 02

revision 02

--- as/main/frame1.as
+++ as/main/frame1.as
@@ -1,13 +1,17 @@
-import mx.events.EventDispatcher;
+
+
+import mx.events.EventDispatcher;
 import flash.filters.*;
 import mx.transitions.easing.*;
 import com.mosesSupposes.fuse.*;
 //Thanks Moses...and respect ;-)
 import com.segonquart.*;
+
+
 //-------------------------------
 ZigoEngine.simpleSetup (Shortcuts, PennerEasing);
 ZigoEngine.register (PennerEasing, Shortcuts, FuseFMP, FuseItem);
-
+//-------------------------------

 var click_mc:MovieClip;
 var entrar_mc:MovieClip;


Transferred from the Adobe Open Source Subversion Repository

Revision: 10828
Author:   jszeto@adobe.com
Date:     2009-10-02T17:41:48.523309Z

Log Message:
-----------
FXG stroke and fill translation fix

http://bugs.adobe.com/jira/browse/SDK-23257 - Gradient translation should occur from 0,0, not the upper left bounds

The current API only passes in the shape's bounds. I have added a new targetOrigin parameter to IFill.begin, IStroke.apply and IStroke.createGraphicsStroke of type Point. It is the origin (0,0) of the shape in the target graphic's coordinate space.

Changed the logic in the gradient stroke and fills. The x and y transform properties are now positioned relative to the origin instead of to the top left corner of the bounds. If no x and y are set, then the default behavior remains the same.

Removed the centering logic in LinearGradientStroke when scaleX was set.

This API change has been approved by PARB.

QE notes: Need to add tests that exercise this logic
Doc notes: Need to document additions to the API
Bugs: SDK-23257
Reviewer: Deepa
Tests run: spark/primitives, gumbo/components
Is noteworthy for integration: Yes, modifications to the API

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/FilledElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradient.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1261163 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as
+++ frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as
@@ -17,6 +17,7 @@
 import flash.display.GraphicsGradientFill;
 import flash.display.GraphicsStroke;
 import flash.geom.Matrix;
+import flash.geom.Point;
 import flash.geom.Rectangle;

 import mx.core.mx_internal;
@@ -113,6 +114,11 @@
         super(weight, pixelHinting, scaleMode, caps, joints, miterLimit);
     }

+    /**
+     *  @private
+     */
+    private static var commonMatrix:Matrix = new Matrix();
+
     //----------------------------------
     //  focalPointRatio
     //----------------------------------
@@ -266,29 +272,19 @@
     //  Methods
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-	private static var commonMatrix:Matrix = new Matrix();

     /**
      *  @private
      */
-    override public function apply(graphics:Graphics, bounds:Rectangle = null):void
+    override public function apply(graphics:Graphics, targetBounds:Rectangle, targetOrigin:Point):void
     {
     	commonMatrix.identity();

         graphics.lineStyle(weight, 0, 1, pixelHinting, scaleMode,
                     caps, joints, miterLimit);

-        if (bounds)
-        	calculateTransformationMatrix(bounds, commonMatrix);
+        if (targetBounds)
+        	calculateTransformationMatrix(targetBounds, commonMatrix, targetOrigin);

         graphics.lineGradientStyle(GradientType.RADIAL, colors,
                             alphas, ratios, commonMatrix,
@@ -299,17 +295,17 @@
     /**
      *  @private
      */
-    override public function createGraphicsStroke(bounds:Rectangle):GraphicsStroke
+    override public function createGraphicsStroke(targetBounds:Rectangle, targetOrigin:Point):GraphicsStroke
     {
         // The parent class sets the gradient stroke properties common to
         // LinearGradientStroke and RadialGradientStroke
-        var graphicsStroke:GraphicsStroke = super.createGraphicsStroke(bounds);
+        var graphicsStroke:GraphicsStroke = super.createGraphicsStroke(targetBounds, targetOrigin);

         if (graphicsStroke)
         {
             // Set other properties specific to this RadialGradientStroke
             GraphicsGradientFill(graphicsStroke.fill).type = GradientType.RADIAL;
-            calculateTransformationMatrix(bounds, commonMatrix);
+            calculateTransformationMatrix(targetBounds, commonMatrix, targetOrigin);
             GraphicsGradientFill(graphicsStroke.fill).matrix = commonMatrix;
             GraphicsGradientFill(graphicsStroke.fill).focalPointRatio = focalPointRatio;

@@ -322,26 +318,26 @@
      *  @private
      *  Calculates this RadialGradientStroke's transformation matrix
      */
-    private function calculateTransformationMatrix(rect:Rectangle, matrix:Matrix):void
+    private function calculateTransformationMatrix(targetBounds:Rectangle, matrix:Matrix, targetOrigin:Point):void
     {
     	matrix.identity();

         if (!compoundTransform)
         {
-            var w:Number = !isNaN(scaleX) ? scaleX : rect.width;
-	    	var h:Number = !isNaN(scaleY) ? scaleY : rect.height;
-			var regX:Number = rect.left + (!isNaN(x) ? x : rect.width / 2);
-			var regY:Number = rect.top + (!isNaN(y) ? y : rect.height / 2);
+            var w:Number = !isNaN(scaleX) ? scaleX : targetBounds.width;
+	    	var h:Number = !isNaN(scaleY) ? scaleY : targetBounds.height;
+			var regX:Number = !isNaN(x) ? x + targetOrigin.x : targetBounds.left + targetBounds.width / 2;
+			var regY:Number = !isNaN(y) ? y + targetOrigin.y : targetBounds.top + targetBounds.height / 2;

             matrix.scale (w / GRADIENT_DIMENSION, h / GRADIENT_DIMENSION);
 	        matrix.rotate(!isNaN(_angle) ? _angle : rotationInRadians);
 	        matrix.translate(regX, regY);
         }
         else
-        {
+        {
             matrix.scale(1 / GRADIENT_DIMENSION, 1 / GRADIENT_DIMENSION);
             matrix.concat(compoundTransform.matrix);
-            matrix.translate(rect.left, rect.top);
+            matrix.translate(targetOrigin.x, targetOrigin.y);
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1261636 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/managers/ILayoutManagerClient.as
+++ frameworks/projects/framework/src/mx/managers/ILayoutManagerClient.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////

 package mx.managers
 {


Get video duration from metadata

Get video duration from metadata

--- src/Video.as
+++ src/Video.as
@@ -7,11 +7,12 @@

   public class Video extends flash.media.Video {

-    private var url: String;
-    private var autoplay: Boolean;
-    private var loop: Boolean;
-    private var muted: Boolean;
-    private var playing: Boolean;
+    private var _url: String;
+    private var _autoplay: Boolean;
+    private var _loop: Boolean;
+    private var _muted: Boolean;
+    private var _playing: Boolean;
+    private var _duration: Number;

     private var stream: NetStream;
     private var connection: NetConnection = new NetConnection();
@@ -19,41 +20,45 @@
     public function Video(url: String, width: uint, height: uint, autoplay: Boolean = true, loop: Boolean = true, muted: Boolean = true) {
       super(width, height);

-      this.url = url;
-      this.autoplay = autoplay;
-      this.loop = loop;
-      this.muted = muted;
+      this._url = url;
+      this._autoplay = autoplay;
+      this._loop = loop;
+      this._muted = muted;

       connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
       connection.connect(null);
     }

     public function play(): void {
-      playing = true;
+      _playing = true;
       stream.resume();
     }

     public function pause(): void {
-      playing = false;
+      _playing = false;
       stream.pause();
     }

     public function isPaused(): Boolean {
-      return !playing;
+      return !_playing;
     }

     public function mute(): void {
-      muted = true;
+      _muted = true;
       stream.soundTransform = new SoundTransform(0);
     }

     public function unmute(): void {
-      muted = false;
+      _muted = false;
       stream.soundTransform = new SoundTransform(1);
     }

     public function isMuted(): Boolean {
-      return muted;
+      return _muted;
+    }
+
+    public function duration(): Number {
+      return _duration;
     }

     private function netStatusHandler(e: NetStatusEvent): void {
@@ -61,20 +66,26 @@
         case "NetConnection.Connect.Success":
           stream = new NetStream(connection);
           stream.bufferTime = 0.5;
-          stream.soundTransform = new SoundTransform(muted ? 0 : 1);
+          stream.client = {};
+          stream.client.onMetaData = function(metadata: Object): void {
+            if (metadata.hasOwnProperty("duration") && metadata["duration"] is Number) {
+              _duration = metadata["duration"];
+            }
+          };
+          stream.soundTransform = new SoundTransform(_muted ? 0 : 1);
           stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
           attachNetStream(stream);

-          stream.play(url);
-          if (autoplay) {
-            playing = true;
+          stream.play(_url);
+          if (_autoplay) {
+            _playing = true;
           } else {
-            playing = false;
+            _playing = false;
             pause();
           }
           break;
         case "NetStream.Play.Stop":
-          if (loop) stream.seek(0);
+          if (_loop) stream.seek(0);
           break;
       }
     }


added support for stringifying Vectors

added support for stringifying Vectors

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -1177,10 +1177,11 @@

 			// loop over keys in Array or Object
 			var lineBreakIndent:String = lineBreak + indent;
+			var valueIsArrayOrVector:Boolean = value is Array || isVector(value);
 			output = [];
-			if (value is Array)
-			{
-				for (var i:int = 0; i < (value as Array).length; i++)
+			if (valueIsArrayOrVector)
+			{
+				for (var i:int = 0; i < value.length; i++)
 					output.push(_stringify(String(i), value[i], replacer, lineBreakIndent, indent, json_values_only));
 			}
 			else if (value.constructor == Object)
@@ -1201,13 +1202,23 @@
 			}

 			if (output.length == 0)
-				return value is Array ? "[]" : "{}";
-
-			return (value is Array ? "[" : "{")
+				return valueIsArrayOrVector ? "[]" : "{}";
+
+			return (valueIsArrayOrVector ? "[" : "{")
 				+ lineBreakIndent
 				+ output.join(indent ? ',' + lineBreakIndent : ', ')
 				+ lineBreak
-				+ (value is Array ? "]" : "}");
+				+ (valueIsArrayOrVector ? "]" : "}");
+		}
+
+		private static const VectorClass:Class = Object(new Vector.<Object>()).constructor;
+
+		/**
+		 * Tests if an object is a Vector.
+		 */
+		private static function isVector(object:*):Boolean
+		{
+			return object is VectorClass || object is Vector.<int> || object is Vector.<uint> || object is Vector.<Number>;
 		}

 		/**


No longer checking constructor property due to ArrayCollection.constructor crashing

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -1202,7 +1202,7 @@
 				for (var i:int = 0; i < value.length; i++)
 					output.push(_stringify(String(i), value[i], replacer, lineBreakIndent, indent, json_values_only));
 			}
-			else if (value.constructor == Object)
+			else if (getQualifiedClassName(value) == 'Object')
 			{
 				for (key in value)
 					output.push(encodeString(key) + ": " + _stringify(key, value[key], replacer, lineBreakIndent, indent, json_values_only));
@@ -2915,7 +2915,7 @@
 		 */
 		public static function cast(object:Object, type:Class):*
 		{
-			if (object is type || object === null || object.constructor != Object)
+			if (object is type || object === null || getQualifiedClassName(object) != 'Object')
 				return type(object);
 			var newObj:Object = new type();
 			for (var key:String in object)


catching more screenshot errors

catching more screenshot errors

--- WeaveCore/src/weave/core/WeaveArchive.as
+++ WeaveCore/src/weave/core/WeaveArchive.as
@@ -122,7 +122,7 @@
 		public static function createScreenshot(thumbnailSize:int = 0):ByteArray
 		{
 			var application:Object = WeaveAPI.topLevelApplication;
-
+
 			// HACK to support fixed workspace size
 			var component:IFlexDisplayObject = application.hasOwnProperty('visApp') ? application['visApp'] : application as IFlexDisplayObject;

@@ -144,11 +144,14 @@
 				else
 					WeaveAPI.URLRequestUtils.removeLocalFile(ARCHIVE_SCREENSHOT_PNG);
 			}
-			catch (e:SecurityError)
+			catch (e:Error)
 			{
 				WeaveAPI.URLRequestUtils.removeLocalFile(ARCHIVE_THUMBNAIL_PNG);
 				WeaveAPI.URLRequestUtils.removeLocalFile(ARCHIVE_SCREENSHOT_PNG);
-				WeaveAPI.ErrorManager.reportError(e, "Unable to create screenshot due to lack of permissive policy file for embedded image. " + e.message);
+				var msg:String = "Unable to create screenshot";
+				if (e is SecurityError)
+					msg += " due to lack of permissive policy file for embedded image";
+				WeaveAPI.ErrorManager.reportError(e, msg + ". " + e.message);
 			}
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18897
Author:   dloverin@adobe.com
Date:     2010-12-01T17:38:39.436052Z

Log Message:
-----------
Add copyright notice.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer:
Tests run: checkintests
Is noteworthy for integration: No.

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IGridItemEditor.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1281813 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/gridClasses/IGridItemEditor.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/IGridItemEditor.as
@@ -1,3 +1,14 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
 package spark.components.gridClasses
 {
 import mx.core.IDataRenderer;


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1250025 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as
+++ frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2007 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.managers
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1261385 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/logging/errors/InvalidFilterError.as
+++ frameworks/projects/framework/src/mx/logging/errors/InvalidFilterError.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2006 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  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
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 19724
Author:   jasonsj@adobe.com
Date:     2011-01-12T01:07:20.451197Z

Log Message:
-----------
Moved ActionBar font color style declaration to #titleDisplay part and subclasses of ButtonBase
Replaced MobileSkin usage of layoutMeasuredWidth/Height with minWidth/Height

QE notes: Some mustella baselines for ActionBar custom content will need to be regenerated. In particular, usage of TextInput with text content.
Doc notes:
Bugs:
SDK-28948 The default color for text in TextInput on ActionBar is white so it looks invisible
SDK-28953 Button width not adjusted as expected when changing percentWidth at runtime
Reviewer: rfrishbe, chiedozi
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TabbedViewNavigatorButtonBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionRoundedButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1265394 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as
@@ -97,7 +97,7 @@
                 downSymbolIconSelectedClass = spark.skins.mobile320.assets.RadioButton_downSymbolSelected;

                 layoutGap = 20;
-                layoutMeasuredWidth = 64;
+                minWidth = 64;

                 break;
             }
@@ -113,7 +113,7 @@
                 downSymbolIconSelectedClass = spark.skins.mobile240.assets.RadioButton_downSymbolSelected;

                 layoutGap = 15;
-                layoutMeasuredWidth = 48;
+                minWidth = 48;

                 break;
             }
@@ -129,7 +129,7 @@
                 downSymbolIconSelectedClass = spark.skins.mobile160.assets.RadioButton_downSymbolSelected;

                 layoutGap = 10;
-                layoutMeasuredWidth = 32;
+                minWidth = 32;

                 break;
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 22086
Author:   jszeto@adobe.com
Date:     2011-08-19T00:14:47.664747Z

Log Message:
-----------
SpinnerList bug fixes and visual update

Tweaked the SpinnerListContainer visuals based on XD and PM feedback

SDK-31201 - DateSpinner: when setting a big year like 9999 year as selectedDate , no date in Date list in dateAndTime mode .

We were hitting a Player limitation for the x/y values. The solution is to offset the y value if we exceed that maximum number.

SDK-31178 - Application freezes when SpinnerList does not have a dataProvider

Added check to VerticalSpinnerLayout and gave the SpinnerList a minimum height to draw

SDK-31096 - DateSpinner doesn't support text styles like fontWeight and color

Added the text style metadata

SDK-30969 - fontSize style isn't respected by SpinnerList

Moved fontSize style from SpinnerListItemRenderer type selector to SpinnerList type selector. Made sure typicalLayoutElement is remeasured after a text style change

QE notes: none
Doc notes: none
Bugs: listed above
Reviewer: Tom K
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerShadow.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/layouts/VerticalSpinnerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerShadow.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerShadow.fxg</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1265433 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as
@@ -174,5 +174,18 @@
 		setElementSize(scroller, unscaledWidth - borderThickness * 2, unscaledHeight);
 		setElementPosition(scroller, borderThickness, 0);
 	}
+
+    override public function styleChanged(styleProp:String):void
+    {
+        // Reinitialize the typical element so it picks up the latest styles
+        // Font styles might impact the size of the SpinnerList
+		if (styleProp != "color" && styleProp != "accentColor")
+        {
+            if (dataGroup)
+                dataGroup.resetTypicalLayoutElement();
+        }
+
+        super.styleChanged(styleProp);
+    }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1273874 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/messaging/management/MBeanParameterInfo.as
+++ frameworks/projects/rpc/src/mx/messaging/management/MBeanParameterInfo.as
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.messaging.management
+{
+
+import mx.utils.ObjectUtil;
+
+[RemoteClass(alias='flex.management.jmx.MBeanParameterInfo')]
+
+/**
+ * Client representation of metadata for a MBean operation parameter.
+ */
+public class MBeanParameterInfo extends MBeanFeatureInfo
+{
+    /**
+     *  Creates a new instance of an empty MBeanParameterInfo.
+     */
+	public function MBeanParameterInfo()
+	{
+		super();
+	}
+
+	/**
+	 * The data type of the operation parameter.
+	 */
+	public var type:String;
+
+}
+
+}