Transferred from the Adobe Open Source Subversion Repository

Revision: 20839
Author:   mhorn@adobe.com
Date:     2011-03-14T14:04:15.007456Z

Log Message:
-----------
merge 20790 and 20805

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientBase.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodgeShader.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>

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

--- frameworks/projects/framework/src/mx/geom/CompoundTransform.as
+++ frameworks/projects/framework/src/mx/geom/CompoundTransform.as
@@ -10,28 +10,28 @@
 ////////////////////////////////////////////////////////////////////////////////
 package mx.geom
 {
-	import __AS3__.vec.Vector;
-
-	import flash.events.Event;
-	import flash.geom.Matrix;
-	import flash.geom.Matrix3D;
-	import flash.geom.Point;
-	import flash.geom.Vector3D;
-
-	import mx.core.AdvancedLayoutFeatures;
-	import mx.utils.MatrixUtil;
-
-	/**
-	 *  A CompoundTransform represents a 2D or 3D matrix transform.  A compound transform represents a matrix that can be queried or set either as a 2D matrix,
-	 *  a 3D matrix, or as individual convenience transform properties such as x, y, scaleX, rotationZ, etc.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public class CompoundTransform
-	{
+    import __AS3__.vec.Vector;
+
+    import flash.events.Event;
+    import flash.geom.Matrix;
+    import flash.geom.Matrix3D;
+    import flash.geom.Point;
+    import flash.geom.Vector3D;
+
+    import mx.core.AdvancedLayoutFeatures;
+    import mx.utils.MatrixUtil;
+
+    /**
+     *  A CompoundTransform represents a 2D or 3D matrix transform.  A compound transform represents a matrix that can be queried or set either as a 2D matrix,
+     *  a 3D matrix, or as individual convenience transform properties such as x, y, scaleX, rotationZ, etc.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public class CompoundTransform
+    {
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -45,718 +45,734 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-		public function CompoundTransform()
-		{
-		}
-
-
-
+        public function CompoundTransform()
+        {
+        }
+
+
+
     /**
      * @private
      * storage for transform properties. These values are concatenated together with the layout properties to
      * form the actual computed matrix used to render the object.
      */
-	private var _rotationX:Number = 0;
-	private var _rotationY:Number = 0;
-	private var _rotationZ:Number = 0;
-	private var _scaleX:Number = 1;
-	private var _scaleY:Number = 1;
-	private var _scaleZ:Number = 1;
-	private var _x:Number = 0;
-	private var _y:Number = 0;
-	private var _z:Number = 0;
-
-	private var _transformX:Number = 0;
-	private var _transformY:Number = 0;
-	private var _transformZ:Number = 0;
-
-
+    private var _rotationX:Number = 0;
+    private var _rotationY:Number = 0;
+    private var _rotationZ:Number = 0;
+    private var _scaleX:Number = 1;
+    private var _scaleY:Number = 1;
+    private var _scaleZ:Number = 1;
+    private var _x:Number = 0;
+    private var _y:Number = 0;
+    private var _z:Number = 0;
+
+    private var _transformX:Number = 0;
+    private var _transformY:Number = 0;
+    private var _transformZ:Number = 0;
+
+
     /**
      * @private
      * slots for the 2D and 3D matrix transforms.  Note that
      * these are only allocated and computed on demand -- many component instances will never use a 3D
      * matrix, for example.
      */
-	private var _matrix:Matrix;
-	private var _matrix3D:Matrix3D;
-
-
+    private var _matrix:Matrix;
+    private var _matrix3D:Matrix3D;
+
+
     /**
      * @private
      * bit field flags for indicating which transforms are valid -- the layout properties, the matrices,
      * and the 3D matrices.  Since developers can set any of the three programmatically, the last one set
      * will always be valid, and the others will be invalid until validated on demand.
      */
-	private static const MATRIX_VALID:uint		= 0x20;
-	private static const MATRIX3D_VALID:uint		= 0x40;
-	private static const PROPERTIES_VALID:uint 	= 0x80;
-
-
+    private static const MATRIX_VALID:uint      = 0x20;
+    private static const MATRIX3D_VALID:uint        = 0x40;
+    private static const PROPERTIES_VALID:uint  = 0x80;
+
+
     /**
      * @private
      * flags for tracking whether the  transform is 3D. A transform is 3D if any of the 3D properties -- rotationX/Y, scaleZ, or z -- are set.
      */
-	private static const IS_3D:uint 				= 0x200;
-	private static const M3D_FLAGS_VALID:uint			= 0x400;
-
+    private static const IS_3D:uint                 = 0x200;
+    private static const M3D_FLAGS_VALID:uint           = 0x400;
+
     /**
      * @private
      * constants to indicate which form of a transform -- the properties, matrix, or matrix3D -- is
      *  'the source of truth.'
      */
-	public static const SOURCE_PROPERTIES:uint			= 1;
-	public static const SOURCE_MATRIX:uint 			= 2;
-	public static const SOURCE_MATRIX3D:uint 			= 3;
-
+    public static const SOURCE_PROPERTIES:uint          = 1;
+    /**
+     * @private
+     * constants to indicate which form of a transform -- the properties, matrix, or matrix3D -- is
+     *  'the source of truth.'
+     */
+    public static const SOURCE_MATRIX:uint          = 2;
+    /**
+     * @private
+     * constants to indicate which form of a transform -- the properties, matrix, or matrix3D -- is
+     *  'the source of truth.'
+     */
+    public static const SOURCE_MATRIX3D:uint            = 3;
+
     /**
      * @private
      * indicates the 'source of truth' for the transform.
      */
-	public var sourceOfTruth:uint = SOURCE_PROPERTIES;
-
+    public var sourceOfTruth:uint = SOURCE_PROPERTIES;
+
     /**
      * @private
      * general storage for all of ur flags.
      */
-	private var _flags:uint =  PROPERTIES_VALID;
-
+    private var _flags:uint =  PROPERTIES_VALID;
+
     /**
      * @private
      * flags that get passed to the invalidate method indicating why the invalidation is happening.
      */
-	private static const INVALIDATE_FROM_NONE:uint = 			0;
-	private static const INVALIDATE_FROM_PROPERTY:uint = 		4;
-	private static const INVALIDATE_FROM_MATRIX:uint = 			5;
-	private static const INVALIDATE_FROM_MATRIX3D:uint = 		6;
-
-	/**
-	 * @private
-	 * static data used by utility methods below
-	 */
-	private static var decomposition:Vector.<Number> = new Vector.<Number>();
-	decomposition.push(0);
-	decomposition.push(0);
-	decomposition.push(0);
-	decomposition.push(0);
-	decomposition.push(0);
-
-	private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
-
-	//----------------------------------------------------------------------------
-
-	/**
-	 *  The x value of the transform.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set x(value:Number):void
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _x)
-			return;
-		translateBy(value-_x,0,0);
-		invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
-	}
-    /**
-     * @private
-     */
-	public function get x():Number
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		return _x;
-	}
-
-	/**
-	 *  The y value of the transform.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set y(value:Number):void
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _y)
-			return;
-		translateBy(0,value-_y,0);
-		invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
-	}
-
-    /**
-     * @private
-     */
-	public function get y():Number
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		return _y;
-	}
-
-	/**
-	 *  The z value of the transform.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set z(value:Number):void
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _z)
-			return;
-		translateBy(0,0,value-_z);
-		invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
-	}
-
-    /**
-     * @private
-     */
-	public function get z():Number
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		return _z;
-	}
-
-	//------------------------------------------------------------------------------
-
-
-	/**
-	 *  The rotationX, in degrees, of the transform.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set rotationX(value:Number):void
-	{
-	    // clamp the rotation value between -180 and 180.  This is what
+    private static const INVALIDATE_FROM_NONE:uint =            0;
+    private static const INVALIDATE_FROM_PROPERTY:uint =        4;
+    private static const INVALIDATE_FROM_MATRIX:uint =          5;
+    private static const INVALIDATE_FROM_MATRIX3D:uint =        6;
+
+    /**
+     * @private
+     * static data used by utility methods below
+     */
+    private static var decomposition:Vector.<Number> = new Vector.<Number>();
+    decomposition.push(0);
+    decomposition.push(0);
+    decomposition.push(0);
+    decomposition.push(0);
+    decomposition.push(0);
+
+    private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
+
+    //----------------------------------------------------------------------------
+
+    /**
+     *  The x value of the transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set x(value:Number):void
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _x)
+            return;
+        translateBy(value-_x,0,0);
+        invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
+    }
+    /**
+     * @private
+     */
+    public function get x():Number
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        return _x;
+    }
+
+    /**
+     *  The y value of the transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set y(value:Number):void
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _y)
+            return;
+        translateBy(0,value-_y,0);
+        invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
+    }
+
+    /**
+     * @private
+     */
+    public function get y():Number
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        return _y;
+    }
+
+    /**
+     *  The z value of the transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set z(value:Number):void
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _z)
+            return;
+        translateBy(0,0,value-_z);
+        invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+    }
+
+    /**
+     * @private
+     */
+    public function get z():Number
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        return _z;
+    }
+
+    //------------------------------------------------------------------------------
+
+
+    /**
+     *  The rotationX, in degrees, of the transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set rotationX(value:Number):void
+    {
+        // clamp the rotation value between -180 and 180.  This is what
         // the Flash player does, so let's mimic it here too.
-		value = MatrixUtil.clampRotation(value);
+        value = MatrixUtil.clampRotation(value);

-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _rotationX)
-			return;
-		_rotationX = value;
-		invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
-	}
-
-    /**
-     * @private
-     */
-	public function get rotationX():Number
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		return _rotationX;
-	}
-
-	/**
-	 *  The rotationY, in degrees, of the transform.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set rotationY(value:Number):void
-	{
-	    // clamp the rotation value between -180 and 180.  This is what
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _rotationX)
+            return;
+        _rotationX = value;
+        invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+    }
+
+    /**
+     * @private
+     */
+    public function get rotationX():Number
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        return _rotationX;
+    }
+
+    /**
+     *  The rotationY, in degrees, of the transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set rotationY(value:Number):void
+    {
+        // clamp the rotation value between -180 and 180.  This is what
         // the Flash player does, so let's mimic it here too.
-		value = MatrixUtil.clampRotation(value);
-
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _rotationY)
-			return;
-		_rotationY = value;
-		invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
-	}
-
-    /**
-     * @private
-     */
-	public function get rotationY():Number
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		return _rotationY;
-	}
-
-	/**
-	 *  The rotationZ, in degrees, of the transform.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set rotationZ(value:Number):void
-	{
-	    // clamp the rotation value between -180 and 180.  This is what
+        value = MatrixUtil.clampRotation(value);
+
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _rotationY)
+            return;
+        _rotationY = value;
+        invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+    }
+
+    /**
+     * @private
+     */
+    public function get rotationY():Number
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        return _rotationY;
+    }
+
+    /**
+     *  The rotationZ, in degrees, of the transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set rotationZ(value:Number):void
+    {
+        // clamp the rotation value between -180 and 180.  This is what
         // the Flash player does, so let's mimic it here too.
-		value = MatrixUtil.clampRotation(value);
-
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _rotationZ)
-			return;
-		_rotationZ = value;
-		invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
-	}
-
-    /**
-     * @private
-     */
-	public function get rotationZ():Number
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		return _rotationZ;
-	}
-
-	//------------------------------------------------------------------------------
-
-
-	/**
-	 *  The scaleX of the transform.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set scaleX(value:Number):void
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _scaleX)
-			return;
-		_scaleX = value;
-		invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
-	}
-
-    /**
-     * @private
-     */
-	public function get scaleX():Number
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		return _scaleX;
-	}
-
-	/**
-	 *  The scaleY of the transform.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set scaleY(value:Number):void
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _scaleY)
-			return;
-		_scaleY = value;
-		invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
-	}
-
-    /**
-     * @private
-     */
-	public function get scaleY():Number
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		return _scaleY;
-	}
-
-
-	/**
-	 *  The scaleZ of the transform.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set scaleZ(value:Number):void
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _scaleZ)
-			return;
-		_scaleZ = value;
-		invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
-	}
-
-    /**
-     * @private
-     */
-	public function get scaleZ():Number
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		return _scaleZ;
-	}
-
-
-	/**
-	 * @private
-	 * returns true if the transform has 3D values.
-	 */
-	public function get is3D():Boolean
-	{
-		if ((_flags & M3D_FLAGS_VALID) == 0)
-			update3DFlags();
-		return ((_flags & IS_3D) != 0);
-	}
-
-	//------------------------------------------------------------------------------
-	/**
-	 *  The x value of the transform center. The transform center is kept fixed as rotation and scale are applied.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set transformX(value:Number):void
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _transformX)
-			return;
-		_transformX = value;
-		invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
-	}
-
-    /**
-     * @private
-     */
-	public function get transformX():Number
-	{
-		return _transformX;
-	}
-
-	//------------------------------------------------------------------------------
-	/**
-	 *  The y value of the tansform center. The transform center is kept fixed as rotation and scale are applied.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set transformY(value:Number):void
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _transformY)
-			return;
-		_transformY = value;
-		invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
-	}
-
-    /**
-     * @private
-     */
-	public function get transformY():Number
-	{
-		return _transformY;
-	}
-	//------------------------------------------------------------------------------
-	/**
-	 *  The z value of the tansform center. The transform center is kept fixed as rotation and scale are applied.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function set transformZ(value:Number):void
-	{
-		if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
-		if (value == _transformZ)
-			return;
-		_transformZ = value;
-		invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
-	}
-
-    /**
-     * @private
-     */
-	public function get transformZ():Number
-	{
-		return _transformZ;
-	}
-
-	//------------------------------------------------------------------------------
-
-	/**
-	 * @private
-	 * invalidates our various cached values.  Any change to the CompoundTransform object that affects
-	 * the various transforms should call this function.
+        value = MatrixUtil.clampRotation(value);
+
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _rotationZ)
+            return;
+        _rotationZ = value;
+        invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
+    }
+
+    /**
+     * @private
+     */
+    public function get rotationZ():Number
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        return _rotationZ;
+    }
+
+    //------------------------------------------------------------------------------
+
+
+    /**
+     *  The scaleX of the transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set scaleX(value:Number):void
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _scaleX)
+            return;
+        _scaleX = value;
+        invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
+    }
+
+    /**
+     * @private
+     */
+    public function get scaleX():Number
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        return _scaleX;
+    }
+
+    /**
+     *  The scaleY of the transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set scaleY(value:Number):void
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _scaleY)
+            return;
+        _scaleY = value;
+        invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
+    }
+
+    /**
+     * @private
+     */
+    public function get scaleY():Number
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        return _scaleY;
+    }
+
+
+    /**
+     *  The scaleZ of the transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set scaleZ(value:Number):void
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _scaleZ)
+            return;
+        _scaleZ = value;
+        invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+    }
+
+    /**
+     * @private
+     */
+    public function get scaleZ():Number
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        return _scaleZ;
+    }
+
+
+    /**
+     * @private
+     * returns true if the transform has 3D values.
+     */
+    public function get is3D():Boolean
+    {
+        if ((_flags & M3D_FLAGS_VALID) == 0)
+            update3DFlags();
+        return ((_flags & IS_3D) != 0);
+    }
+
+    //------------------------------------------------------------------------------
+    /**
+     *  The x value of the transform center. The transform center is kept fixed as rotation and scale are applied.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set transformX(value:Number):void
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _transformX)
+            return;
+        _transformX = value;
+        invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+    }
+
+    /**
+     * @private
+     */
+    public function get transformX():Number
+    {
+        return _transformX;
+    }
+
+    //------------------------------------------------------------------------------
+    /**
+     *  The y value of the tansform center. The transform center is kept fixed as rotation and scale are applied.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set transformY(value:Number):void
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _transformY)
+            return;
+        _transformY = value;
+        invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+    }
+
+    /**
+     * @private
+     */
+    public function get transformY():Number
+    {
+        return _transformY;
+    }
+    //------------------------------------------------------------------------------
+    /**
+     *  The z value of the tansform center. The transform center is kept fixed as rotation and scale are applied.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set transformZ(value:Number):void
+    {
+        if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+        if (value == _transformZ)
+            return;
+        _transformZ = value;
+        invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+    }
+
+    /**
+     * @private
+     */
+    public function get transformZ():Number
+    {
+        return _transformZ;
+    }
+
+    //------------------------------------------------------------------------------
+
+    /**
+     * @private
+     * invalidates our various cached values.  Any change to the CompoundTransform object that affects
+     * the various transforms should call this function.
      * @param reason - the code indicating what changes to cause the invalidation.
      * @param affects3D - a flag indicating whether the change affects the 2D/3D nature of the various transforms.
      * @param dispatchChangeEvent - if true, the CompoundTransform will dispatch a change indicating that its underlying transforms
      * have been modified.
-  	 */
-	private function invalidate(reason:uint, affects3D:Boolean):void
-	{
-		//race("invalidating: " + reason);
-		switch(reason)
-		{
-			case INVALIDATE_FROM_PROPERTY:
-				sourceOfTruth = SOURCE_PROPERTIES;
-				_flags |= PROPERTIES_VALID;
-				_flags &= ~MATRIX_VALID;
-				_flags &= ~MATRIX3D_VALID;
-				break;
-			case INVALIDATE_FROM_MATRIX:
-				sourceOfTruth = SOURCE_MATRIX;
-				_flags |= MATRIX_VALID;
-				_flags &= ~PROPERTIES_VALID;
-				_flags &= ~MATRIX3D_VALID;
-				break;
-			case INVALIDATE_FROM_MATRIX3D:
-				sourceOfTruth = SOURCE_MATRIX3D;
-				_flags |= MATRIX3D_VALID;
-				_flags &= ~PROPERTIES_VALID;
-				_flags &= ~MATRIX_VALID;
-				break;
-		}
-		if (affects3D)
-			_flags &= ~M3D_FLAGS_VALID;
-
-	}
-
-	private static const EPSILON:Number = .001;
-	/**
-	 * @private
-	 * updates the flags that indicate whether the layout, offset, and/or computed transforms are 3D in nature.
-	 * Since the user can set either the individual transform properties or the matrices directly, we compute these
-	 * flags based on what the current 'source of truth' is for each of these values.
-  	 */
-	private function update3DFlags():void
-	{
-		if ((_flags & M3D_FLAGS_VALID) == 0)
-		{
-			var matrixIs3D:Boolean = false;
-
-			switch(sourceOfTruth)
-			{
-				case SOURCE_PROPERTIES:
-					matrixIs3D = ( // note that rotationZ is the same as rotation, and not a 3D affecting
-					  	(Math.abs(_scaleZ-1) > EPSILON) ||  // property.
-					  	((Math.abs(_rotationX)+EPSILON)%360) > 2*EPSILON ||
-					  	((Math.abs(_rotationY)+EPSILON)%360) > 2*EPSILON ||
-					  	Math.abs(_z) > EPSILON
-					  	);
-					break;
-				case SOURCE_MATRIX:
-					matrixIs3D = false;
-					break;
-				case SOURCE_MATRIX3D:
-					var rawData:Vector.<Number> = _matrix3D.rawData;
-					matrixIs3D = (rawData[2] != 0 ||		// rotation y
-									rawData[6] != 0 || 		// rotation x
-									rawData[8] !=0 || 		// rotation y
-									rawData[10] != 1 || 	// scalez / rotation x / rotation y
-									rawData[14] != 0);		// translation z
-					break;
-			}
-
-			if (matrixIs3D)
-				_flags |= IS_3D;
-			else
-				_flags &= ~IS_3D;
-
-			_flags |= M3D_FLAGS_VALID;
-		}
-	}
-
-
-	/**
+     */
+    private function invalidate(reason:uint, affects3D:Boolean):void
+    {
+        //race("invalidating: " + reason);
+        switch(reason)
+        {
+            case INVALIDATE_FROM_PROPERTY:
+                sourceOfTruth = SOURCE_PROPERTIES;
+                _flags |= PROPERTIES_VALID;
+                _flags &= ~MATRIX_VALID;
+                _flags &= ~MATRIX3D_VALID;
+                break;
+            case INVALIDATE_FROM_MATRIX:
+                sourceOfTruth = SOURCE_MATRIX;
+                _flags |= MATRIX_VALID;
+                _flags &= ~PROPERTIES_VALID;
+                _flags &= ~MATRIX3D_VALID;
+                break;
+            case INVALIDATE_FROM_MATRIX3D:
+                sourceOfTruth = SOURCE_MATRIX3D;
+                _flags |= MATRIX3D_VALID;
+                _flags &= ~PROPERTIES_VALID;
+                _flags &= ~MATRIX_VALID;
+                break;
+        }
+        if (affects3D)
+            _flags &= ~M3D_FLAGS_VALID;
+
+    }
+
+    private static const EPSILON:Number = .001;
+    /**
+     * @private
+     * updates the flags that indicate whether the layout, offset, and/or computed transforms are 3D in nature.
+     * Since the user can set either the individual transform properties or the matrices directly, we compute these
+     * flags based on what the current 'source of truth' is for each of these values.
+     */
+    private function update3DFlags():void
+    {
+        if ((_flags & M3D_FLAGS_VALID) == 0)
+        {
+            var matrixIs3D:Boolean = false;
+
+            switch(sourceOfTruth)
+            {
+                case SOURCE_PROPERTIES:
+                    matrixIs3D = ( // note that rotationZ is the same as rotation, and not a 3D affecting
+                        (Math.abs(_scaleZ-1) > EPSILON) ||  // property.
+                        ((Math.abs(_rotationX)+EPSILON)%360) > 2*EPSILON ||
+                        ((Math.abs(_rotationY)+EPSILON)%360) > 2*EPSILON ||
+                        Math.abs(_z) > EPSILON
+                        );
+                    break;
+                case SOURCE_MATRIX:
+                    matrixIs3D = false;
+                    break;
+                case SOURCE_MATRIX3D:
+                    var rawData:Vector.<Number> = _matrix3D.rawData;
+                    matrixIs3D = (rawData[2] != 0 ||        // rotation y
+                                    rawData[6] != 0 ||      // rotation x
+                                    rawData[8] !=0 ||       // rotation y
+                                    rawData[10] != 1 ||     // scalez / rotation x / rotation y
+                                    rawData[14] != 0);      // translation z
+                    break;
+            }
+
+            if (matrixIs3D)
+                _flags |= IS_3D;
+            else
+                _flags &= ~IS_3D;
+
+            _flags |= M3D_FLAGS_VALID;
+        }
+    }
+
+
+    /**
      *  Applies the delta to the transform's translation component. Unlike setting the x, y, or z properties directly,
-	 *  this method can be safely called without changing the transform's concept of 'the source of truth'.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function translateBy(x:Number,y:Number,z:Number = 0):void
-	{
-		if (_flags & MATRIX_VALID)
-		{
-			_matrix.tx += x;
-			_matrix.ty += y;
-		}
-		if (_flags & PROPERTIES_VALID)
-		{
-			_x += x;
-			_y += y;
-			_z += z;
-		}
-		if (_flags & MATRIX3D_VALID)
-		{
-			var data:Vector.<Number> = _matrix3D.rawData;
-			data[12] += x;
-			data[13] += y;
-			data[14] += z;
-			_matrix3D.rawData = data;
-		}
-		invalidate(INVALIDATE_FROM_NONE, z != 0 /*affects3D*/);
-	}
-
-
-	/**
-	 *  The 2D matrix either set directly by the user, or composed by combining the transform center, scale, rotation
-	 *  and translation, in that order.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function get matrix():Matrix
-	{
-
-		if (_flags & MATRIX_VALID)
-			return _matrix;
-
-		if ((_flags & PROPERTIES_VALID) == false)
-			validatePropertiesFromMatrix();
-
-		var m:Matrix = _matrix;
-		if (m == null)
-			m = _matrix = new Matrix();
-		else
-			m.identity();
-
-		AdvancedLayoutFeatures.build2DMatrix(m,_transformX,_transformY,
-					  _scaleX,_scaleY,
-					  _rotationZ,
-					  _x,_y);
-		_flags |= MATRIX_VALID;
-		return m;
-	}
-
-	/**
-	 * @private
-	 */
-	public function set matrix(v:Matrix):void
-	{
-		if (_matrix== null)
-		{
-			_matrix = v.clone();
-		}
-		else
-		{
-			_matrix.identity();
-			_matrix.concat(v);
-		}
+     *  this method can be safely called without changing the transform's concept of 'the source of truth'.
+     *
+     *  @param x The x value of the transform.
+     *
+     *  @param y The y value of the transform.
+     *
+     *  @param z The z value of the transform.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function translateBy(x:Number,y:Number,z:Number = 0):void
+    {
+        if (_flags & MATRIX_VALID)
+        {
+            _matrix.tx += x;
+            _matrix.ty += y;
+        }
+        if (_flags & PROPERTIES_VALID)
+        {
+            _x += x;
+            _y += y;
+            _z += z;
+        }
+        if (_flags & MATRIX3D_VALID)
+        {
+            var data:Vector.<Number> = _matrix3D.rawData;
+            data[12] += x;
+            data[13] += y;
+            data[14] += z;
+            _matrix3D.rawData = data;
+        }
+        invalidate(INVALIDATE_FROM_NONE, z != 0 /*affects3D*/);
+    }
+
+
+    /**
+     *  The 2D matrix either set directly by the user, or composed by combining the transform center, scale, rotation
+     *  and translation, in that order.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get matrix():Matrix
+    {
+
+        if (_flags & MATRIX_VALID)
+            return _matrix;
+
+        if ((_flags & PROPERTIES_VALID) == false)
+            validatePropertiesFromMatrix();
+
+        var m:Matrix = _matrix;
+        if (m == null)
+            m = _matrix = new Matrix();
+        else
+            m.identity();
+
+        AdvancedLayoutFeatures.build2DMatrix(m,_transformX,_transformY,
+                      _scaleX,_scaleY,
+                      _rotationZ,
+                      _x,_y);
+        _flags |= MATRIX_VALID;
+        return m;
+    }
+
+    /**
+     * @private
+     */
+    public function set matrix(v:Matrix):void
+    {
+        if (_matrix== null)
+        {
+            _matrix = v.clone();
+        }
+        else
+        {
+            _matrix.identity();
+            _matrix.concat(v);
+        }

         // affects3D is true since setting matrix changes the transform to 2D
-		invalidate(INVALIDATE_FROM_MATRIX, true /*affects3D*/);
-	}
-
-	/**
-	 * @private
-	 * decomposes the offset transform matrices down into the convenience offset properties. Note that this is not
-	 * a bi-directional transformation -- it is possible to create a matrix that can't be fully represented in the
-	 * convenience properties. This function will pull from the matrix or matrix3D values, depending on which was most
-	 * recently set
-	 */
-	private function validatePropertiesFromMatrix():void
-	{
-	    if (sourceOfTruth == SOURCE_MATRIX3D)
-	    {
-	    	var result:Vector.<Vector3D> = _matrix3D.decompose();
-	    	_rotationX = result[1].x / RADIANS_PER_DEGREES;
-	    	_rotationY = result[1].y / RADIANS_PER_DEGREES;
-	    	_rotationZ = result[1].z / RADIANS_PER_DEGREES;
-	    	_scaleX = result[2].x;
-	    	_scaleY = result[2].y;
-	    	_scaleZ = result[2].z;
-
-			if (_transformX != 0 || _transformY != 0 || _transformZ != 0)
-			{
-				var postTransformTCenter:Vector3D = _matrix3D.transformVector(new Vector3D(_transformX,_transformY,_transformZ));
-		    	_x = postTransformTCenter.x - _transformX;
-	    		_y = postTransformTCenter.y - _transformY;
-	    		_z = postTransformTCenter.z - _transformZ;
-			}
-			else
-			{
-		    	_x = result[0].x;
-		    	_y = result[0].y;
-	    		_z = result[0].z;
-	  		}
-	    }
-	    else if (sourceOfTruth == SOURCE_MATRIX)
-	    {
-	    	MatrixUtil.decomposeMatrix(decomposition,_matrix,_transformX,_transformY);
-	    	_x = decomposition[0];
-	    	_y = decomposition[1];
-	    	_z = 0;
-	    	_rotationX = 0;
-	    	_rotationY = 0;
-	    	_rotationZ = decomposition[2];
-	    	_scaleX = decomposition[3];
-	    	_scaleY = decomposition[4];
-	    	_scaleZ = 1;
-	    }
-	    _flags |= PROPERTIES_VALID;
-
-	}
-
-
-
-	/**
-	 *  The 3D matrix either set directly by the user, or composed by combining the transform center, scale, rotation
-	 *  and translation, in that order.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function get matrix3D():Matrix3D
-	{
-		if (_flags & MATRIX3D_VALID)
-			return _matrix3D;
-
-		if ((_flags & PROPERTIES_VALID) == false)
-			validatePropertiesFromMatrix();
-
-		var m:Matrix3D = _matrix3D;
-		if (m == null)
-			m =  _matrix3D = new Matrix3D();
-		else
-			m.identity();
-
-			AdvancedLayoutFeatures.build3DMatrix(m,transformX,transformY,transformZ,
-					  _scaleX,_scaleY,_scaleZ,
-					  _rotationX,_rotationY,_rotationZ,
-					  _x,_y,_z);
-		_flags |= MATRIX3D_VALID;
-		return m;
-
-	}
-
-	/**
-	 * @private
-	 */
-	public function set matrix3D(v:Matrix3D):void
-	{
-		if (_matrix3D == null)
-		{
-			_matrix3D = v.clone();
-		}
-		else
-		{
-			_matrix3D.identity();
-			if (v)
-				_matrix3D.append(v);
-		}
-		invalidate(INVALIDATE_FROM_MATRIX3D, true /*affects3D*/);
-	}
+        invalidate(INVALIDATE_FROM_MATRIX, true /*affects3D*/);
+    }
+
+    /**
+     * @private
+     * decomposes the offset transform matrices down into the convenience offset properties. Note that this is not
+     * a bi-directional transformation -- it is possible to create a matrix that can't be fully represented in the
+     * convenience properties. This function will pull from the matrix or matrix3D values, depending on which was most
+     * recently set
+     */
+    private function validatePropertiesFromMatrix():void
+    {
+        if (sourceOfTruth == SOURCE_MATRIX3D)
+        {
+            var result:Vector.<Vector3D> = _matrix3D.decompose();
+            _rotationX = result[1].x / RADIANS_PER_DEGREES;
+            _rotationY = result[1].y / RADIANS_PER_DEGREES;
+            _rotationZ = result[1].z / RADIANS_PER_DEGREES;
+            _scaleX = result[2].x;
+            _scaleY = result[2].y;
+            _scaleZ = result[2].z;
+
+            if (_transformX != 0 || _transformY != 0 || _transformZ != 0)
+            {
+                var postTransformTCenter:Vector3D = _matrix3D.transformVector(new Vector3D(_transformX,_transformY,_transformZ));
+                _x = postTransformTCenter.x - _transformX;
+                _y = postTransformTCenter.y - _transformY;
+                _z = postTransformTCenter.z - _transformZ;
+            }
+            else
+            {
+                _x = result[0].x;
+                _y = result[0].y;
+                _z = result[0].z;
+            }
+        }
+        else if (sourceOfTruth == SOURCE_MATRIX)
+        {
+            MatrixUtil.decomposeMatrix(decomposition,_matrix,_transformX,_transformY);
+            _x = decomposition[0];
+            _y = decomposition[1];
+            _z = 0;
+            _rotationX = 0;
+            _rotationY = 0;
+            _rotationZ = decomposition[2];
+            _scaleX = decomposition[3];
+            _scaleY = decomposition[4];
+            _scaleZ = 1;
+        }
+        _flags |= PROPERTIES_VALID;
+
+    }
+
+
+
+    /**
+     *  The 3D matrix either set directly by the user, or composed by combining the transform center, scale, rotation
+     *  and translation, in that order.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get matrix3D():Matrix3D
+    {
+        if (_flags & MATRIX3D_VALID)
+            return _matrix3D;
+
+        if ((_flags & PROPERTIES_VALID) == false)
+            validatePropertiesFromMatrix();
+
+        var m:Matrix3D = _matrix3D;
+        if (m == null)
+            m =  _matrix3D = new Matrix3D();
+        else
+            m.identity();
+
+            AdvancedLayoutFeatures.build3DMatrix(m,transformX,transformY,transformZ,
+                      _scaleX,_scaleY,_scaleZ,
+                      _rotationX,_rotationY,_rotationZ,
+                      _x,_y,_z);
+        _flags |= MATRIX3D_VALID;
+        return m;
+
+    }
+
+    /**
+     * @private
+     */
+    public function set matrix3D(v:Matrix3D):void
+    {
+        if (_matrix3D == null)
+        {
+            _matrix3D = v.clone();
+        }
+        else
+        {
+            _matrix3D.identity();
+            if (v)
+                _matrix3D.append(v);
+        }
+        invalidate(INVALIDATE_FROM_MATRIX3D, true /*affects3D*/);
+    }

 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3582
Author:   egreenfi@adobe.com
Date:     2008-10-11T00:13:59.101068Z

Log Message:
-----------
FxRotate3D effect now no longer uses the component's transform point to rotate, but rather adjusts x/y to simulate rotation around its transform center.  It does so using a new transformAround() method added to ITransformable (including implemetnations by UICompoennt, GraphicElement, and CompoundTransform)

REview: Chet
QA: shouldn't affect any existing test cases
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/ITransformable.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxRotate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/geom/CompoundTransform.as
+++ frameworks/projects/framework/src/mx/geom/CompoundTransform.as
@@ -125,6 +125,7 @@
      * @private
      * flags that get passed to the invalidate method indicating why the invalidation is happening.
      */
+	private static const INVALIDATE_FROM_NONE:uint = 			0;
 	private static const INVALIDATE_FROM_PROPERTY:uint = 		4;
 	private static const INVALIDATE_FROM_MATRIX:uint = 			5;
 	private static const INVALIDATE_FROM_MATRIX3D:uint = 		6;
@@ -142,6 +143,10 @@

 	private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;

+    /**
+     * @private
+     */
+	mx_internal var owner:AdvancedLayoutFeatures;
 	//----------------------------------------------------------------------------

 	/**
@@ -153,7 +158,7 @@
 		if(value == _x)
 			return;
 		translateBy(value-_x,0,0);
-		invalidate(0,false);
+		invalidate(INVALIDATE_FROM_NONE,false);
 	}
     /**
      * @private
@@ -173,7 +178,7 @@
 		if(value == _y)
 			return;
 		translateBy(0,value-_y,0);
-		invalidate(0,false);
+		invalidate(INVALIDATE_FROM_NONE,false);
 	}

     /**
@@ -194,7 +199,7 @@
 		if(value == _z)
 			return;
 		translateBy(0,0,value-_z);
-		invalidate(0,true);
+		invalidate(INVALIDATE_FROM_NONE,true);
 	}

     /**
@@ -207,7 +212,7 @@
 	}

 	//------------------------------------------------------------------------------
-
+

 	/**
 	 * the rotationX, in degrees, of the transform
@@ -346,7 +351,7 @@
 	 */
 	mx_internal function get is3D():Boolean
 	{
-		if((_flags & M3D_FLAGS_VALID) == false)
+		if((_flags & M3D_FLAGS_VALID) == 0)
 			update3DFlags();
 		return ((_flags & IS_3D) != 0);
 	}
@@ -364,7 +369,7 @@
 		_transformX = value;
 		invalidate(INVALIDATE_FROM_PROPERTY,true);
 	}
-
+
     /**
      * @private
      */
@@ -467,6 +472,7 @@
 			dispatchEvent(new Event(Event.CHANGE));
 	}

+	private static const EPSILON:Number = .0001;
 	/**
 	 * @private
 	 * updates the flags that indicate whether the layout, offset, and/or computed transforms are 3D in nature.
@@ -475,7 +481,7 @@
   	 */
 	private function update3DFlags():void
 	{
-		if((_flags & M3D_FLAGS_VALID) == false)
+		if((_flags & M3D_FLAGS_VALID) == 0)
 		{
 			var matrixIs3D:Boolean = false;

@@ -483,10 +489,10 @@
 			{
 				case SOURCE_PROPERTIES:
 					matrixIs3D = ( // note that rotationZ is the same as rotation, and not a 3D affecting
-					  	_scaleZ != 1 ||  // property.
-					  	(Math.abs(_rotationX)%360) != 0 ||
-					  	(Math.abs(_rotationY)%360) != 0 ||
-					  	_z != 0
+					  	(Math.abs(_scaleZ-1) > EPSILON) ||  // property.
+					  	((Math.abs(_rotationX)+EPSILON)%360) > 2*EPSILON ||
+					  	((Math.abs(_rotationY)+EPSILON)%360) > 2*EPSILON ||
+					  	Math.abs(_z) > EPSILON
 					  	);
 					break;
 				case SOURCE_MATRIX:
@@ -507,7 +513,7 @@
 	}

-	private function translateBy(x:Number,y:Number,z:Number = 0):void
+	mx_internal function translateBy(x:Number,y:Number,z:Number = 0):void
 	{
 		if(_flags & MATRIX_VALID)
 		{
@@ -528,6 +534,7 @@
 			data[14] += z;
 			_matrix3D.rawData = data;
 		}
+		invalidate(INVALIDATE_FROM_NONE,z != 0);
 	}

@@ -678,7 +685,7 @@
 		else
 			m.identity();

-			AdvancedLayoutFeatures.build3DMatrix(m,_transformX,_transformY,_transformZ,
+			AdvancedLayoutFeatures.build3DMatrix(m,transformX,transformY,transformZ,
 					  _scaleX,_scaleY,_scaleZ,
 					  _rotationX,_rotationY,_rotationZ,
 					  _x,_y,_z);
@@ -703,5 +710,33 @@
 		}
 		invalidate(INVALIDATE_FROM_MATRIX3D,true);
 	}
+
+	public function transformAround(rx:Number,ry:Number,rz:Number,sx:Number,sy:Number,sz:Number,tx:Number,ty:Number,tz:Number):void
+	{
+		if(owner != null)
+		{
+			var is3D:Boolean = ((!isNaN(rx) && rx != 0) || (!isNaN(ry) && ry != 0) || (!isNaN(sz) && sz != 1));
+			var token:* = owner.prepareForTransformCenterAdjustment(false,is3D,tx,ty,tz);
+
+			if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+
+			if(!isNaN(rx))
+				_rotationX = rx;
+			if(!isNaN(ry))
+				_rotationY = ry;
+			if(!isNaN(rz))
+				_rotationZ = rz;
+			if(!isNaN(sx))
+				_scaleX = sx;
+			if(!isNaN(sx))
+				_scaleY = sy;
+			if(!isNaN(sz))
+				_scaleZ = sz;
+
+			invalidate(INVALIDATE_FROM_PROPERTY,is3D);
+			owner.completeTransformCenterAdjustment(token,is3D);
+		}
+		// TODO: support transformAround when we don't have an owner.
+	}
 }
 }


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@1261711 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/managers/LayoutManager.as
+++ frameworks/projects/framework/src/mx/managers/LayoutManager.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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: 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@1267349 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/accessibility/ComboBoxAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/ComboBoxAccImpl.as
@@ -0,0 +1,140 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2006 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.accessibility
+{
+
+import mx.collections.CursorBookmark;
+import mx.controls.ComboBox;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+/**
+ *  The ComboBoxAccImpl class is the accessibility class for List.
+ *
+ *  @helpid 3005
+ *  @tiptext This is the ComboBoxAccImpl Accessibility Class.
+ *  @review
+ */
+public class ComboBoxAccImpl extends ComboBaseAccImpl
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class initialization
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Static variable triggering the hookAccessibility() method.
+	 *  This is used for initializing ComboBoxAccImpl class to hook its
+	 *  createAccessibilityImplementation() method to ComboBox class
+	 *  before it gets called from UIComponent.
+	 */
+	private static var accessibilityHooked:Boolean = hookAccessibility();
+
+	/**
+	 *  @private
+	 *  Static method for swapping the createAccessibilityImplementation()
+	 *  method of ComboBox with the ComboBoxAccImpl class.
+	 */
+	private static function hookAccessibility():Boolean
+	{
+		ComboBox.createAccessibilityImplementation =
+			createAccessibilityImplementation;
+
+		return true;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Method for creating the Accessibility class.
+	 *  This method is called from UIComponent.
+	 *  @review
+	 */
+	mx_internal static function createAccessibilityImplementation(
+								component:UIComponent):void
+	{
+		component.accessibilityImplementation =
+			new ComboBoxAccImpl(component);
+	}
+
+	/**
+	 *  Method call for enabling accessibility for a component.
+	 *  This method is required for the compiler to activate
+	 *  the accessibility classes for a component.
+	 */
+	public static function enableAccessibility():void
+	{
+		ListAccImpl.enableAccessibility();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param master The UIComponent instance that this AccImpl instance
+	 *  is making accessible.
+	 */
+	public function ComboBoxAccImpl(master:UIComponent)
+	{
+		super(master);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: AccImpl
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  method for returning the name of the ComboBox
+	 *  Have to override getName as itemToLabel() is only in ComboBox
+	 *  The ListItem should return the label as the name with m of n string and
+	 *  ComboBox should return the name specified in the AccessibilityProperties.
+	 *
+	 *  @param childID uint
+	 *
+	 *  @return Name String
+	 *  @review
+	 */
+	override protected function getName(childID:uint):String
+	{
+		if (childID == 0)
+			return "";
+
+		var comboBox:ComboBox = ComboBox(master);
+		comboBox.collectionIterator.seek(CursorBookmark.FIRST, childID - 1);
+		var item:Object = comboBox.collectionIterator.current;
+
+		var mofn:String = " " + childID + " of " + comboBox.dataProvider.length;
+
+		return comboBox.itemToLabel(item) + mofn;
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6174
Author:   jszeto@adobe.com
Date:     2009-04-20T23:35:57.095896Z

Log Message:
-----------
Updated ASDoc comments for DropDownList.

- Updated comments in DropDownController and DropDownList
- Localized error messages for DropDownList

SDK-19874  Setting selectedIndex on Spark DropDownList control doesnt auto-scroll dropdown

Call ensureIndexIsVisible when opening the dropDown.

QE Notes:
Doc Notes: ASDoc comments need review
Bugs: SDK-19874
Reviewer: Deepa

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/bundles/en_US/components.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>

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

--- frameworks/projects/spark/src/spark/components/DropDownList.as
+++ frameworks/projects/spark/src/spark/components/DropDownList.as
@@ -15,7 +15,7 @@
 - List current dispatches selectionChanged on arrowUp/Down. Should we subclass List
 and change behavior to commit value only on ENTER, SPACE, or CTRL-UP?

-- Modify DropDownEvent to have commitData boolean property.
+- Handle commitData
 - Add typicalItem support for measuredSize (lower priority)

 *  @langversion 3.0
@@ -199,8 +199,17 @@
 	private var _dropDownController:DropDownController;

 	/**
-     *  @private
-     *  TODO (jszeto) Add ASdoc comments
+     *  Instance of the helper class that handles all of the mouse, keyboard
+     *  and focus user interactions. The type of this class is determined by the
+     *  dropDownControllerClass property.
+     *
+     *  The initializeDropDownController() function is called after
+     *  the dropDownController is created in the constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
 	protected function get dropDownController():DropDownController
 	{
@@ -214,8 +223,15 @@
 	private var _dropDownControllerClass:Class = DropDownController;

 	/**
-     *  @private
-     *  TODO (jszeto) Add ASdoc comments
+     *  The class used to create an instance for the dropDownController
+     *  property. Set this property if you want to use a
+     *  DropDownController subclass to modify the default mouse,
+     *  keyboard and focus user interactions.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
 	public function set dropDownControllerClass(value:Class):void
 	{
@@ -246,10 +262,8 @@
      *  The prompt for the DropDownList control. A prompt is
      *  a String that is displayed in the TextInput portion of the
      *  DropDownList when selectedIndex = -1.  It is usually
-     *  a String like "Select one...".  If there is no
-     *  prompt, the DropDownList control sets selectedIndex to 0
-     *  and displays the first item in the dataProvider.
-     *
+     *  a String like "Select one...".
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
@@ -386,7 +400,7 @@
     override public function set selectedIndices(value:Array):void
     {
     	// TODO (jszeto) This needs to be localized
-    	throw new Error("The selectedIndices property is not supported in DropDownList");
+    	throw new Error(resourceManager.getString("components", "selectedIndicesDropDownListError"));
     }

     //----------------------------------
@@ -399,7 +413,7 @@
     override public function set selectedItems(value:Array):void
     {
     	// TODO (jszeto) This needs to be localized
-    	throw new Error("The selectedItems property is not supported in DropDownList");
+    	throw new Error(resourceManager.getString("components", "selectedItemsDropDownListError"));
     }

@@ -410,10 +424,7 @@
     //--------------------------------------------------------------------------

 	/**
-     *  Initializes the dropDown and changes the skin state to open.
-     *
-     *  It should not be necessary to override this function. Instead, override the
-     *  initializeDropDown function.
+     *  Opens the dropDown.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -426,12 +437,7 @@
     }

 	 /**
-     *  Changes the skin state to normal, commits the data from the dropDown and
-     *  performs some cleanup.
-     *
-     *  The user can close the dropDown either in a committing or non-committing manner
-     *  based on their interaction gesture. If the user has performed a committing
-     *  gesture, then set commitData to true.
+     *  Closes the dropDown.
      *
      *  @param commitData Flag indicating if the component should commit the selected
      *  data from the dropDown.
@@ -447,8 +453,14 @@
     }

 	/**
-     *  @private
-     *  TODO (jszeto) Should this be exposed? If yes, needs ASDOC
+     *  Initializes the dropDownController after it has been created.
+     *  Override this function if you create a DropDownController subclass
+     *  and need to perform additional initialization.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
 	protected function initializeDropDownController():void
 	{
@@ -573,7 +585,6 @@
      */
     override protected function item_clickHandler(event:MouseEvent):void
 	{
-		//trace("DDL.item_clickHandler mouse event",event.type);
 		super.item_clickHandler(event);
 		closeDropDown(true);
 	}
@@ -585,7 +596,6 @@
     // doesn't listen for keyDown events in the capture phase
     override protected function keyDownHandler(event:KeyboardEvent) : void
 	{
-		//trace("DropDownList.keyDownHandler key",event.keyCode);
 		list_keyDownHandler(event);
 	}

@@ -594,7 +604,6 @@
 	 */
 	override protected function list_keyDownHandler(event:KeyboardEvent) : void
 	{
-		//trace("DropDownList.list_keyDownHandler key",event.keyCode);
 		if(!enabled)
             return;

@@ -620,19 +629,33 @@
     //--------------------------------------------------------------------------

     /**
-     *  @private
-     *  TODO (jszeto) Add ASDoc comments
+     *  Event handler for the dropDownController
+     *  DropdownEvent.OPEN event. Updates the skin's state and
+     *  ensures that the selectedItem is visible.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function dropDownController_openHandler(event:DropdownEvent):void
     {
     	// set skin state
     	skin.currentState = getCurrentSkinState();
+
+    	ensureIndexIsVisible(selectedIndex);
+
     	dispatchEvent(event);
     }

     /**
-     *  @private
-     *  TODO (jszeto) Add ASDoc comments
+     *  Event handler for the dropDownController
+     *  DropdownEvent.CLOSE event. Updates the skin's state.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function dropDownController_closeHandler(event:DropdownEvent):void
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 9117
Author:   jszeto@adobe.com
Date:     2009-08-05T21:12:45.311327Z

Log Message:
-----------
DropDownList bug fixes

http://bugs.adobe.com/jira/browse/SDK-22536 - Spark DropDownList highlight not working as expected when navigating using keyboard with useVirtualLayout=true

In the keyDownHandler function, the DropDownList was trying to set the selected state on the new itemRenderer. However, in a virtual layout, the renderer might not exist until later.

The fix is to update the renderer in the updateRenderer function. This function calls isItemIndexSelected in order to choose which item to select. I have overridden the behavior to select the proposedSelectedIndex instead of the selectedIndex.

I have also renamed proposedSelectedIndex to userProposedSelectedIndex to avoid a naming conflict in ListBase.

http://bugs.adobe.com/jira/browse/SDK-22406 - Spark DropDownList popup behaves unexpectedly when component is initially disabled

I removed the call in the partAdded function that was setting the openButton to disabled. Spark components handle disabling by blocking user interaction.

QE notes: Add test cases for both bugs
Doc notes: None
Bugs: SDK-22536, SDK-22406
Reviewer: Ryan
Tests run: DropDownList
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as

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

--- frameworks/projects/spark/src/spark/components/DropDownList.as
+++ frameworks/projects/spark/src/spark/components/DropDownList.as
@@ -33,7 +33,6 @@
 import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
-import flash.ui.Keyboard;

 import mx.collections.IList;
 import mx.core.mx_internal;
@@ -42,11 +41,8 @@

 import spark.components.supportClasses.ButtonBase;
 import spark.components.supportClasses.DropDownController;
-import spark.components.supportClasses.ListBase;
 import spark.core.NavigationUnit;
 import spark.events.DropDownEvent;
-import spark.layouts.VerticalLayout;
-import spark.layouts.supportClasses.LayoutBase;
 import spark.primitives.supportClasses.TextGraphicElement;
 import spark.utils.LabelUtil;

@@ -222,7 +218,8 @@
     //--------------------------------------------------------------------------

     private var labelChanged:Boolean = false;
-    mx_internal var proposedSelectedIndex:Number = -1;
+    // Stores the user selected index until the dropDown closes
+    mx_internal var userProposedSelectedIndex:Number = -1;
     mx_internal static var PAGE_SIZE:int = 5;

     //--------------------------------------------------------------------------
@@ -533,7 +530,6 @@
         {
             if (dropDownController)
                 dropDownController.openButton = openButton;
-            openButton.enabled = enabled;
         }

         if (instance == labelDisplay)
@@ -569,7 +565,7 @@
     override protected function item_clickHandler(event:MouseEvent):void
     {
         super.item_clickHandler(event);
-        proposedSelectedIndex = selectedIndex;
+        userProposedSelectedIndex = selectedIndex;
         closeDropDown(true);
     }

@@ -591,14 +587,16 @@

             if (dropDownController.isOpen)
             {
-                proposedNewIndex = layout.getNavigationDestinationIndex(proposedSelectedIndex, navigationUnit, arrowKeysWrapFocus);
+                proposedNewIndex = layout.getNavigationDestinationIndex(userProposedSelectedIndex, navigationUnit, arrowKeysWrapFocus);

                 if (proposedNewIndex != -1)
                 {
-                    itemSelected(proposedSelectedIndex, false);
-                    proposedSelectedIndex = proposedNewIndex;
-                    itemSelected(proposedSelectedIndex, true);
-                    ensureIndexIsVisible(proposedSelectedIndex);
+                    // Store the selection in userProposedSelectedIndex because we
+                    // don't want to update selectedIndex until the dropdown closes
+                    itemSelected(userProposedSelectedIndex, false);
+                    userProposedSelectedIndex = proposedNewIndex;
+                    itemSelected(userProposedSelectedIndex, true);
+                    ensureIndexIsVisible(userProposedSelectedIndex);
                 }
             }
             else if (dataProvider)
@@ -653,6 +651,15 @@
         super.focusOutHandler(event);
     }

+    /**
+     *  @private
+     *  In updateRenderer, we want to select the proposedSelectedIndex
+     */
+    override mx_internal function isItemIndexSelected(index:int):Boolean
+    {
+        return userProposedSelectedIndex == index;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Event handling
@@ -673,7 +680,7 @@
     mx_internal function dropDownController_openHandler(event:DropDownEvent):void
     {
         addEventListener(FlexEvent.UPDATE_COMPLETE, open_updateCompleteHandler);
-        proposedSelectedIndex = selectedIndex;
+        userProposedSelectedIndex = selectedIndex;
         invalidateSkinState();
     }

@@ -705,7 +712,7 @@

         if (!event.isDefaultPrevented())
         {
-            selectedIndex = proposedSelectedIndex;
+            selectedIndex = userProposedSelectedIndex;
         }
     }


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@1281052 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/ToggleButton.as
+++ frameworks/projects/spark/src/spark/components/ToggleButton.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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: 4600
Author:   jszeto@adobe.com
Date:     2009-01-20T21:11:33.133710Z

Log Message:
-----------
Flex SDK - Move style metadata from base class down to component classes

Previously, all spark and text styles were defined on FxComponent even though not every component supports all of those styles. So I have moved each style to the top-most base class where the style will apply to all descendant classes of that base class.

This is the set of styles that were added to the various classes:

baseColor
color
focusColor
symbolColor
selectionColor
contentBackgroundColor
rollOverColor
alternatingItemColors
basic text styles
advanced text styles

Here are some details about the implementation:
- baseColor was added to FxComponent because every component and container supports it
- FxContainer and GroupBase are containers, so their children can potentially support any of the styles. Thus the container classes support all of the styles indirectly.
- FxDataContainer doesn't support all of the styles because its subclasses (FxButtonBar, FxList) don't support all styles.
- FxList supports selectionColor, but not inactiveSelectionColor or unfocusedSelectionColor. All other components that support selectionColor, support the other two styles, and thus include styles/metadata/SelectionFormatTextStyles.as
- GroupBase contains the style declarations that have the full ASDoc. All other declarations use the @copy keyword to reference the asdoc from GroupBase.

QE Notes: Update tests to remove references to styles that are no longer allowed on various components/FxButton.as
Doc Notes: Write the ASDoc comments for the style declarations in GroupBase
Bugs: n/a
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxNumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxCheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxRadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxSpinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as
@@ -21,6 +21,11 @@
 import mx.core.IViewport;
 import mx.events.PropertyChangeEvent;
 import mx.events.ResizeEvent;
+
+/**
+ *  @copy mx.components.baseClasses.GroupBase#symbolColor
+ */
+[Style(name="symbolColor", type="uint", format="Color", inherit="yes")]

 /**
  *  The FxScrollBar class helps to position


added helpful comment so I don't make the same mistake again in the future

git-svn-id: a3e1eb16dde062992de22c830ed8045c8013209a@293 c613c5cb-e716-0410-b11b-feb51c14d237

--- src/as/com/threerings/ezgame/client/EZGameConfigurator.as
+++ src/as/com/threerings/ezgame/client/EZGameConfigurator.as
@@ -103,7 +103,9 @@
                 var ident :String = String(_customConfigs[ii]);
                 var control :UIComponent = (_customConfigs[ii + 1] as UIComponent);
                 if (control is LabeledSlider) {
-                    params.put(ident, (control as LabeledSlider).slider.value);
+                    // this is wrapped in our own Integer class so that it can play in a friendly
+                    // way with Java that deserializes this StreamableHashMap
+                    params.put(ident, new Integer((control as LabeledSlider).slider.value));

                 } else if (control is CheckBox) {
                     params.put(ident, (control as CheckBox).selected);


Gah, I tried to abort the last commit so I could make this change,
and instead my checkin message got mangled.

*clearing throat*
..So our old way of doing things was pointlessly waiting a frame to handle
network events.
We also ran object subscribe/unsubscribe requests through the same queue,
and now those are processed immediately. Everything seems ok, but let's
keep an eye out.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@5016 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/presents/client/ClientDObjectMgr.as
+++ src/as/com/threerings/presents/client/ClientDObjectMgr.as
@@ -374,9 +374,6 @@
     /** A reference to our client instance. */
     protected var _client :Client;

-    /** Our primary dispatch queue. */
-    protected var _actions :Array = new Array();
-
     /** All of the distributed objects that are active on this client. */
     protected var _ocache :HashMap = new HashMap();


no need for global var

no need for global var

--- kdp3Lib/src/com/kaltura/kdpfl/view/controls/KFlavorComboBox.as
+++ kdp3Lib/src/com/kaltura/kdpfl/view/controls/KFlavorComboBox.as
@@ -129,10 +129,7 @@
 		private var _bitrateDetectionMessage:String = "Detecting Your Bandwidth";

 		private var _switchPausedMessage:String = "Switching is Paused";
-		/**
-		 * indicate "SD Low" label was already added to flavors list
-		 */
-		private var _usedLowHeight:Boolean;
+

 		/**
 		 * Constructor
@@ -331,6 +328,8 @@
 				//descending sort of flavors according to bitrate
 				sortedFlavorArray.sortOn("bitrate", Array.NUMERIC | Array.DESCENDING);
 				var usedPixelsArr:Array;
+				// will be true if "SD Low" label was already added to flavors list
+				var usedLowHeight:Boolean = false;
 				if (usePixels)
 				{
 					//this array indicates if we already inserted the corresponding height to the data provider
@@ -339,7 +338,6 @@
 					{
 						usedPixelsArr.push(false);
 					}
-					_usedLowHeight = false;
 				}

 				for(var i:int=0; i<sortedFlavorArray.length; i++)
@@ -384,10 +382,10 @@
 						{
 							label = lowHeight;
 							//if we already inserted the "SD Low" label, don't insert another one
-							if (_usedLowHeight)
+							if (usedLowHeight)
 								continue;

-							_usedLowHeight = true;
+							usedLowHeight = true;
 						}
 						else
 						{


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@1253182 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/charts/src/mx/charts/renderers/AreaRenderer.as
+++ frameworks/projects/charts/src/mx/charts/renderers/AreaRenderer.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 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.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


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@1258581 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/binding/utils/BindingUtils.as
+++ frameworks/projects/framework/src/mx/binding/utils/BindingUtils.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006-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.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////