Transferred from the Adobe Open Source Subversion Repository

Revision: 6377
Author:   smgilson@adobe.com
Date:     2009-04-29T14:45:13.176859Z

Log Message:
-----------
ASDoc fixes for FLEXDOCS-780 and FLEXDOCS-781

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IUIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/PostScaleAdapter.as</path>

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

--- frameworks/projects/framework/src/mx/containers/utilityClasses/PostScaleAdapter.as
+++ frameworks/projects/framework/src/mx/containers/utilityClasses/PostScaleAdapter.as
@@ -30,10 +30,10 @@
 import mx.managers.ISystemManager;

 /**
- *  The PostScaleAdapter class is used as a compatibility layer for Flex3 classes that
- *  rely on width, height, min, max, explicit, measured, etc. properties to be
- *  post-scale. This is useful since in Flex4 and going forward the properties are
- *  pre-scale.
+ *  The PostScaleAdapter class is used as a compatibility layer for Flex 3 classes that
+ *  rely on width, height, min, max, explicit, measured, and other properties to be
+ *  determined after scaling is applied.
+ *  This is useful since in Flex 4, the properties are calculated before scaling is applied.
  *
  *  @langversion 3.0
  *  @playerversion Flash 9
@@ -674,97 +674,97 @@
     }

-	//--------------------------------------------------------------------------
-	//
-	//
+    //--------------------------------------------------------------------------
+    //
+    //
     // IFlexDisplayObject
-	//
-	//
-	//--------------------------------------------------------------------------
-
-
-	//--------------------------------------------------------------------------
-	//
-	//  Properties
-	//
-	//--------------------------------------------------------------------------
-
-
-	//----------------------------------
-	//  measuredHeight
-	//----------------------------------
-
-    /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-	public function get measuredHeight():Number
-	{
-	    return obj.measuredHeight * Math.abs(obj.scaleY);
-	}
-
-	//----------------------------------
-	//  measuredWidth
-	//----------------------------------
-
-    /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-	public function get measuredWidth():Number
-	{
-	    return obj.measuredWidth * Math.abs(obj.scaleX);
-	}
-
-
-	//--------------------------------------------------------------------------
-	//
-	//  Methods
-	//
-	//--------------------------------------------------------------------------
-
-    /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-	public function move(x:Number, y:Number):void
-	{
-	    obj.move(x, y);
-	}
-
-    /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-	public function setActualSize(newWidth:Number, newHeight:Number):void
-	{
-	    obj.setActualSize(newWidth / Math.abs(obj.scaleX), newHeight / Math.abs(obj.scaleY));
-	}
-
-
-	//--------------------------------------------------------------------------
-	//
-	//
+    //
+    //
+    //--------------------------------------------------------------------------
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+
+    //----------------------------------
+    //  measuredHeight
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get measuredHeight():Number
+    {
+        return obj.measuredHeight * Math.abs(obj.scaleY);
+    }
+
+    //----------------------------------
+    //  measuredWidth
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get measuredWidth():Number
+    {
+        return obj.measuredWidth * Math.abs(obj.scaleX);
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function move(x:Number, y:Number):void
+    {
+        obj.move(x, y);
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function setActualSize(newWidth:Number, newHeight:Number):void
+    {
+        obj.setActualSize(newWidth / Math.abs(obj.scaleX), newHeight / Math.abs(obj.scaleY));
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    //
     // IDisplayObject
-	//
-	//
-	//--------------------------------------------------------------------------
+    //
+    //
+    //--------------------------------------------------------------------------

     /**
      *  @inheritDoc
@@ -1210,13 +1210,13 @@
     }

-	//--------------------------------------------------------------------------
-	//
-	//
+    //--------------------------------------------------------------------------
+    //
+    //
     // IEventDispatcher
-	//
-	//
-	//--------------------------------------------------------------------------
+    //
+    //
+    //--------------------------------------------------------------------------

     public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
@@ -1242,13 +1242,13 @@
     }

-	//--------------------------------------------------------------------------
-	//
-	//
+    //--------------------------------------------------------------------------
+    //
+    //
     // IConstraintClient
-	//
-	//
-	//--------------------------------------------------------------------------
+    //
+    //
+    //--------------------------------------------------------------------------

     //--------------------------------------------------------------------------
@@ -1296,62 +1296,62 @@
             throw new Error("PostScaleAdapter can't set constraint value, underlying object is not an IConstraintClient");
     }

-	//--------------------------------------------------------------------------
-	//
-	//
+    //--------------------------------------------------------------------------
+    //
+    //
     // IInvalidating
-	//
-	//
-	//--------------------------------------------------------------------------
-
-
-	//--------------------------------------------------------------------------
-	//
-	//  Methods
-	//
-	//--------------------------------------------------------------------------
-
-    /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-	public function invalidateProperties():void
-	{
-	    if (obj is IInvalidating)
-	        IInvalidating(obj).invalidateProperties();
-	}
-
-    /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-	public function invalidateSize():void
-	{
-	    if (obj is IInvalidating)
-	        IInvalidating(obj).invalidateSize();
-	}
-
-    /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-	public function invalidateDisplayList():void
-	{
-	    if (obj is IInvalidating)
-	        IInvalidating(obj).invalidateDisplayList();
-	}
+    //
+    //
+    //--------------------------------------------------------------------------
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function invalidateProperties():void
+    {
+        if (obj is IInvalidating)
+            IInvalidating(obj).invalidateProperties();
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function invalidateSize():void
+    {
+        if (obj is IInvalidating)
+            IInvalidating(obj).invalidateSize();
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function invalidateDisplayList():void
+    {
+        if (obj is IInvalidating)
+            IInvalidating(obj).invalidateDisplayList();
+    }

     /**
      *  @inheritDoc


Transferred from the Adobe Open Source Subversion Repository

Revision: 6390
Author:   cframpto@adobe.com
Date:     2009-04-29T19:13:20.108698Z

Log Message:
-----------
Vellum private build up to changelist 697517.  Will update tomorrow with mainline build with even more API changes.

API changes so code will build with new Vellum library.
Change SimpleText/SimpleText2/RichText/RichText2 to use new TextLineRecyler API.

QE Notes: we need to test this with a new Argo FP since the text line recycling code paths will only be executed with that player
Doc Notes:
Bugs:
Reviewers: Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/textLayout.swz</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextPrimitive.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/textLayout.swf</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/tlf.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -1010,14 +1010,15 @@
         {
             if (selectionAnchorPosition == -1 && selectionActivePosition == -1)
             {
-                setSelection(int.MAX_VALUE, int.MAX_VALUE);
+                setSelection(
+                    mx_internal::_text.length, mx_internal::_text.length);
             }

             // Only editable text should have a focus ring.
             if (focusManager)
                 focusManager.showFocusIndicator = true;
         }
-
+
         super.focusInHandler(event);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19973
Author:   cframpto@adobe.com
Date:     2011-01-27T14:45:03.950539Z

Log Message:
-----------
Text bugs.  Fix mustella failure from integration with TLF build 232 related to the EditManager delayedUpdates flag.  FIx RTE when setting text to null when there is a prompt.  Fix bug in getFormatOfRange if a selection was explicitly specified, rather than using the current selection.

QE notes:
Doc notes:
Bugs: SDK-29274, SDK-29257, SDK-29243
Reviewer: Alex
Tests run: cyclone
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -643,23 +643,27 @@
     //----------------------------------

     /**
-     *  Text to be displayed if/when the actual text property is a null or empty string.
+     *  Text to be displayed if/when the actual text property is an empty string.
      *
-     *
Prompt text appears when the text control is first created. Prompt text disappears
-     *  when the control gets focus or when the control’s text property is non-null.
+     *
Prompt text appears when the text control is first created.
+     *  Prompt text disappears when the control gets focus or when the control’s
+     *  text property is a non-empty string.
      *  Prompt text reappears when the control loses focus, but only if no text was entered
-     *  (if the value of the text field is null or the empty string).

+     *  (if the value of the text field is the empty string).

      *
      *
For text controls, if the user enters text, but later deletes it, the prompt text
-     *  reappears when the control loses focus. You can also cause the prompt text
-     *  to reappear programmatically by setting the text control’s text property to null or the empty string.

-     *
-     *
You can change the style of the prompt text with CSS. If the control has prompt text
-     *  and is not disabled, the style is defined by the normalWithPrompt pseudo selector.
-     *  If the control is disabled, then the styles defined by the disabledWithPrompt pseudo selector are used.

-     *
-     *
The following example CSS changes the color of the prompt text in controls that sub-class SkinnableTextBase (this includes
-     *  the Spark TextInput and TextArea controls):
+     *  reappears when the control loses focus.
+     *  You can also cause the prompt text to reappear programmatically by setting the
+     *  text control’s text property to the empty string.

+     *
+     *
You can change the style of the prompt text with CSS.
+     *  If the control has prompt text and is not disabled, the style is defined by the
+     *  normalWithPrompt pseudo selector.
+     *  If the control is disabled, then the styles defined by the disabledWithPrompt
+     *  pseudo selector are used.

+     *
+     *
The following example CSS changes the color of the prompt text in controls that
+     *  sub-class SkinnableTextBase (this includes the Spark TextInput and TextArea controls):
      *

      *  @namespace s "library://ns.adobe.com/flex/spark";
      *  s|SkinnableTextBase:normalWithPrompt {
@@ -1160,6 +1164,8 @@
      */
     public function set text(value:String):void
     {
+        // text should never be null.  Convert null to the empty string.
+
         if (textDisplay)
         {
             textDisplay.text = value;
@@ -1168,7 +1174,7 @@
         }
         else
         {
-            textDisplayProperties.text = value;
+            textDisplayProperties.text = value ? value : "";

             // Of 'text', 'textFlow', and 'content', the last one set wins.  So
             // if we're holding onto the properties until the skin is loaded


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

--- frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityMaskShader.as
+++ frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityMaskShader.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.graphics.shaderClasses
 {


Fix function that add assets to lists

Fix function that add assets to lists

--- src/aerys/minko/type/loader/AssetsLibrary.as
+++ src/aerys/minko/type/loader/AssetsLibrary.as
@@ -2,6 +2,7 @@
 {
 	import aerys.minko.render.geometry.Geometry;
 	import aerys.minko.render.material.Material;
+	import aerys.minko.render.material.basic.BasicMaterial;
 	import aerys.minko.render.resource.texture.TextureResource;
 	import aerys.minko.scene.node.Mesh;
 	import aerys.minko.type.Signal;
@@ -122,28 +123,38 @@

 		public function setGeometry(name : String, geometry : Geometry) : void
 		{
-			++_numGeometries;
-			_geometryList.push(geometry);
-			_geometries[name] = geometry;
-			_geometryAdded.execute(this, name, geometry);
+			if (_geometryList.indexOf(geometry) == -1)
+			{
+				++_numGeometries;
+				_geometryList.push(geometry);
+				_geometries[name] = geometry;
+				_geometryAdded.execute(this, name, geometry);
+			}
 		}

 		public function setTexture(name : String, texture : TextureResource) : void
 		{
-			++_numTextures;
-			_textureList.push(texture);
-			_textures[name] = texture;
-			_textureAdded.execute(this, name, texture);
+			if (_textureList.indexOf(texture) == -1)
+			{
+				++_numTextures;
+				_textureList.push(texture);
+				_textures[name] = texture;
+				_textureAdded.execute(this, name, texture);
+			}
 		}

 		public function setMaterial(name : String, material : Material) : void
 		{
+			material ||= new BasicMaterial();
 			name ||= material.name;

-			++_numMaterials;
-			_materialList.push(material);
-			_materials[name] = material;
-			_materialAdded.execute(this, name, material);
+			if (_materialList.indexOf(material) == -1)
+			{
+				++_numMaterials;
+				_materialList.push(material);
+				_materials[name] = material;
+				_materialAdded.execute(this, name, material);
+			}
 		}

 		public function setLayer(name : String, layer : uint) : void


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

--- frameworks/projects/framework/src/mx/utils/ArrayUtil.as
+++ frameworks/projects/framework/src/mx/utils/ArrayUtil.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2004-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.utils
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/mx/src/mx/effects/easing/Quartic.as
+++ frameworks/projects/mx/src/mx/effects/easing/Quartic.as
@@ -18,6 +18,11 @@
  *  equation is greater than for a Quadratic or Cubic easing equation.
  *
  *  For more information, see http://www.robertpenner.com/profmx.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class Quartic
 {
@@ -42,6 +47,11 @@
      *  @param d Specifies the duration of the effect, in milliseconds.
      *
      *  @return Number corresponding to the position of the component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	public static function easeIn(t:Number, b:Number,
 								  c:Number, d:Number):Number
@@ -62,6 +72,11 @@
      *  @param d Specifies the duration of the effect, in milliseconds.
      *
      *  @return Number corresponding to the position of the component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	public static function easeOut(t:Number, b:Number,
 								   c:Number, d:Number):Number
@@ -84,6 +99,11 @@
      *  @param d Specifies the duration of the effect, in milliseconds.
      *
      *  @return Number corresponding to the position of the component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	public static function easeInOut(t:Number, b:Number,
 									 c:Number, d:Number):Number


FLEX-34854 FLEX-34884 Mirror of commit 047017398a2ccea7ddb2b0300ec4a184ad7f9ab6 for the spark version of Sort.as.

--- frameworks/projects/spark/src/spark/collections/Sort.as
+++ frameworks/projects/spark/src/spark/collections/Sort.as
@@ -341,10 +341,6 @@
      */
     private var _fields:Array;

-    /**
-     *  @private
-     */
-    private var fieldList:Array = [];

     [Inspectable(category="General", arrayType="mx.collections.ISortField")]
     [Bindable("fieldsChanged")]
@@ -372,16 +368,7 @@
     public function set fields(value:Array):void
     {
         _fields = value;
-        fieldList = [];
-        if (_fields)
-        {
-            var field:ISortField;
-            for (var i:int = 0; i<_fields.length; i++)
-            {
-                field = ISortField(_fields[i]);
-                fieldList.push(field.name);
-            }
-        }
+
         dispatchEvent(new Event("fieldsChanged"));
     }

@@ -542,39 +529,30 @@
         {
             compareForFind = this.compareFunction;
             // configure the search criteria
-            if (values && fieldList.length > 0)
+            if (values && fields && fields.length > 0)
             {
                 fieldsForCompare = [];
                 //build up the fields we can compare, if we skip a field in the
                 //middle throw an error.  it is ok to not have all the fields
                 //though
-                var fieldName:String;
+                var field:ISortField;
                 var hadPreviousFieldName:Boolean = true;
-                for (var i:int = 0; i < fieldList.length; i++)
+                for (var i:int = 0; i < fields.length; i++)
                 {
-                    fieldName = fieldList[i];
-                    if (fieldName)
+                    field = fields[i] as ISortField;
+                    if (field.name)
                     {
-                        var hasFieldName:Boolean = false;
-
-						try
-                        {
-                            hasFieldName = values[fieldName] !== undefined;
-                        }
-                        catch(e:Error)
-                        {
-                        }
-                        if (hasFieldName)
+                        if (field.objectHasSortField(values))
                         {
                             if (!hadPreviousFieldName)
                             {
                                 message = resourceManager.getString(
-                                    "collections", "findCondition", [ fieldName ]);
+                                    "collections", "findCondition", [ field.name ]);
                                 throw new SortError(message);
                             }
                             else
                             {
-                                fieldsForCompare.push(fieldName);
+                                fieldsForCompare.push(field.name);
                             }
                         }
                         else


Defer adding IAdvancedStyleClients to a Group until after its children have been created with createChildren(). The locale was not propagating properly.  [SDK-30452]

git-svn-id: 7d913817b0a978d84de757191e4bce372605a781@1403832 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -23,9 +23,9 @@
 import flash.display.BlendMode;
 import flash.display.DisplayObject;
 import flash.geom.Rectangle;
+import flash.utils.Dictionary;

 import mx.core.FlexVersion;
-import mx.styles.IAdvancedStyleClient;
 import mx.core.IFlexModule;
 import mx.core.IFontContextComponent;
 import mx.core.IUIComponent;
@@ -43,6 +43,8 @@
 import mx.graphics.shaderClasses.LuminosityShader;
 import mx.graphics.shaderClasses.SaturationShader;
 import mx.graphics.shaderClasses.SoftLightShader;
+import mx.styles.AdvancedStyleClient;
+import mx.styles.IAdvancedStyleClient;
 import mx.styles.ISimpleStyleClient;
 import mx.styles.IStyleClient;
 import mx.styles.StyleProtoChain;
@@ -239,6 +241,7 @@
     private var needsDisplayObjectAssignment:Boolean = false;
     private var layeringMode:uint = ITEM_ORDERED_LAYERING;
     private var numGraphicElements:uint = 0;
+    private var deferredStyleClients:Dictionary = null;  // of IAdvancedStyleClient

     private static const ITEM_ORDERED_LAYERING:uint = 0;
     private static const SPARSE_LAYERING:uint = 1;
@@ -841,6 +844,37 @@

     /**
      *  @private
+     *  Defer adding IAdvancedStyleClients until createChildren() time.  The AdvancedStyleClient's
+     *  styleName might be a component's show inclusion in the IVisualElement hierarchy was also
+     *  deferred.
+     */
+    override public function addStyleClient(styleClient:IAdvancedStyleClient):void
+    {
+        if (!createChildrenCalled)
+        {
+            if (!deferredStyleClients)
+                deferredStyleClients = new Dictionary(true);
+            deferredStyleClients[styleClient] = true;
+        }
+        else
+        {
+            super.addStyleClient(styleClient);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override public function removeStyleClient(styleClient:IAdvancedStyleClient):void
+    {
+        if (deferredStyleClients && !createChildrenCalled)
+            delete deferredStyleClients[styleClient];
+        else
+            super.removeStyleClient(styleClient);
+    }
+
+    /**
+     *  @private
      *  Whether createChildren() has been called or not.
      *  We use this in the setter for mxmlContent to know
      *  whether to validate the value immediately, or just
@@ -862,6 +896,17 @@
             mxmlContentChanged = false;
             setMXMLContent(_mxmlContent);
         }
+
+        if (deferredStyleClients)
+        {
+            for (var obj:Object in deferredStyleClients)
+            {
+                var styleClient:IAdvancedStyleClient = obj as IAdvancedStyleClient;
+                if (styleClient)
+                    super.addStyleClient(styleClient);
+            }
+            deferredStyleClients = null;
+        }
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 4378
Author:   jszeto@adobe.com
Date:     2008-12-23T00:24:54.896211Z

Log Message:
-----------
BitmapFill Bug fixes and minor Group mask change

SDK-18378 BitmapFill rotation property not rotating correctly

Change code to use radians instead of angles

SDK-18345 Cannot change BitmapFill source property at runtime using ActionScript

Fixed logic in source setter

SDK-18344 Setting BitmapFill source dynamically at runtime doesnt immediately update the display list.

Dispatch PropertyChange event from source setter

* Added transformX, transformY, x, y

   These properties are defined in the FXG spec, but were missing.

* Deprecated originX, originY, offsetX, offsetY

   These are replaced by transformX, transformY, x, and y.

* Fixed setting source to null

* Fixed originX/Y logic

   Code now translates the bitmap back

* Fixed position when sharing displayObject

   Take into account the position of the bounds passed into the begin function.

* Moved Group's mask and maskType logic from commitProperties to updateDisplayList

QE Notes: Need updated tests for BitmapFill.
- add transformX, transformY, x, y.
- test setting source to null, or changing source
- test position when you have multiple GraphicElements sharing the same displayObject
- test setting rotation

Doc Notes: Need doc for transformX, transformY, x and y.
Bugs: SDK-18378, SDK-18345, SDK-18344
Reviewer:

Modified Paths:
--------------
<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/flex4/src/mx/components/Group.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/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -14,6 +14,7 @@

 import flash.display.BlendMode;
 import flash.display.DisplayObject;
+import flash.geom.Rectangle;

 import mx.components.baseClasses.GroupBase;
 import mx.core.ILayoutElement;
@@ -238,7 +239,9 @@
             _mxmlContentType = MXML_CONTENT_TYPE_UNKNOWN;

         mxmlContentChanged = true;
+        maskChanged = true;
         invalidateProperties();
+        invalidateDisplayList();
     }

     /**
@@ -279,8 +282,6 @@
         {
             mxmlContentChanged = false;
             initializeChildrenArray();
-
-            maskChanged = true;
         }

         // Need to initializeChildrenArray before calling super.commitProperties
@@ -388,6 +389,16 @@
 	        if (currentSharedSprite)
 	        	currentSharedSprite.invalid = false;
         }
+
+        if (scaleGridChanged)
+        {
+        	scaleGridChanged = false;
+
+        	scale9Grid = new Rectangle(scaleGridLeft,
+        							   scaleGridTop,
+        							   scaleGridRight - scaleGridLeft,
+        							   scaleGridBottom - scaleGridTop);
+        }
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 11452
Author:   klin@adobe.com
Date:     2009-11-05T01:43:45.759633Z

Log Message:
-----------
Couple of various fixes.

ComboBox.as - The dropDown was not receiving changes to styles nor dataproviders. This was a result of not recreating the dropDown each time it was shown. I've changed the default of the flag for destroying the dropDown to be true. I've also modified the code to only not destroy the dropDown when it is showing or being shown.

ButtonBar.as - In one case, when calculating the percentage that each button takes of the width, there was a rounding error that caused the total percentage to be less than 100%. I've changed the code to use Numbers to avoid the rounding error.

DropDownList.as - I've fixed the page down code to take into account the case when selectedIndex==-1.

Label.as, SWFLoader.as, TextInput.as - Excluded baseColor style.

TitleWindowBoundsEvent.as - ASDoc change. "afterBounds" is always null when the "windowMoveStart" event is dispatched

QE notes: No
Doc notes: No
Bugs: SDK-21715, SDK-23338, SDK-23512, SDK-23838, SDK-23660
Reviewer: Chet
Tests run: checkintests, ButtonBar, ToggleButtonBar, tabnavigator
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<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/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/TitleWindowBoundsEvent.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ComboBox.as
+++ frameworks/projects/mx/src/mx/controls/ComboBox.as
@@ -711,7 +711,7 @@
     /**
      *  @private
      */
-    private var bRemoveDropdown:Boolean = false;
+    private var bRemoveDropdown:Boolean = true;

     /**
      *  @private
@@ -1449,9 +1449,9 @@
         {
             destroyDropdown();
         }
-        else if (!_showingDropdown && inTween)
-        {
-            bRemoveDropdown = true;
+        else if (_showingDropdown)
+        {
+            bRemoveDropdown = false;
         }

         var ddw:Number = preferredDropdownWidth;
@@ -1879,7 +1879,6 @@
             tween.endTween();

         displayDropdown(false, null, false);
-
     }

     //--------------------------------------------------------------------------
@@ -2267,9 +2266,10 @@

             PopUpManager.removePopUp(_dropdown);
             _dropdown = null;
-            bRemoveDropdown = false;
-        }
-
+        }
+
+        bRemoveDropdown = true;
+
         UIComponent.resumeBackgroundProcessing();
         var cbdEvent:DropdownEvent =
             new DropdownEvent(_showingDropdown ? DropdownEvent.OPEN : DropdownEvent.CLOSE);


Transferred from the Adobe Open Source Subversion Repository

Revision: 19128
Author:   mcho@adobe.com
Date:     2010-12-08T00:20:09.313548Z

Log Message:
-----------
Tweak width of vertical scrollbar

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as
@@ -40,13 +40,13 @@
 			case DeviceDensity.PPI_240:
 			{
 				thumbClass = spark.skins.mobile240.assets.VScrollThumb;
-				thumbWidth = 3;
+				thumbWidth = 6;
 				break;
 			}
 			default:
 			{
 				thumbClass = spark.skins.mobile160.assets.VScrollThumb;
-				thumbWidth = 2;
+				thumbWidth = 4;
 				break;
 			}
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17425
Author:   rfrishbe@adobe.com
Date:     2010-08-20T17:29:56.448841Z

Log Message:
-----------
Pretty basic refactoring for PARB (though it is a lot of files).  Renamed GestureCaptureEvent/GestureCaptureReason (these were previously TouchScrollEvent) to TouchInteractionEvent/TouchInteractionReason.  inputMode has been renamed to interactionMode and has a new enumeration class, mx.core.InteractionMode.

There's on non-PARB change that was made was in List and mobiletheme/defaults.css. I found a bug in that the item renderer wasn't highlighting on mousedown anymore. There were two issues at play. Firstly the touchDelay was set to 100 ms in the Scroller only, so I added it to List and added a FIXME comment to myself figuring out if the code in List should use scroller.getStyle("touchDelay") or itemRenderer.getStyle("touchDelay") instead of getStyle("touchDelay"). Also, I found out that the code doesn't deal with touchDelay=0 very well. Since we're planning on working on this code anyways (and possibly moving it in to ItemRenderer itself with a new downstate), I just put in a hack with a FIXME to handle this case for now.

QE notes: None
Doc notes: None
Bugs: -
Reviewer: Jason SJ, Chiedo
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/GestureCaptureEvent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/InteractionMode.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/GestureCaptureReason.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileItemRenderer.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/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/GestureCaptureEvent.as" copyfrom-rev="17393" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/TouchInteractionEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/GestureCaptureReason.as" copyfrom-rev="17393" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/TouchInteractionReason.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
@@ -15,6 +15,7 @@
 import flash.events.MouseEvent;
 import flash.geom.Point;

+import mx.core.InteractionMode;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;

@@ -497,7 +498,7 @@
             super.$invalidateDisplayList();
         }

-        if (allStyles || styleName == "inputMode")
+        if (allStyles || styleName == "interactionMode")
         {
             addHandlers();
         }
@@ -592,7 +593,7 @@
      */
     private function addHandlers():void
     {
-        if (getStyle("inputMode") == "mouse")
+        if (getStyle("interactionMode") == InteractionMode.MOUSE)
         {
             if (!rolloverEventsAdded)
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 7908
Author:   dsubrama@adobe.com
Date:     2009-06-17T01:12:10.707054Z

Log Message:
-----------
Rename MXMLComponent to DataRenderer.

QA: Yes
Doc: Yes
Checkintests: Pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/mediaClasses/normal/ScrubBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataRenderer.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/MXMLComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/mediaClasses/fullScreen/ScrubBarSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
@@ -22,7 +22,7 @@
 import spark.components.DataGroup;
 import spark.components.Group;
 import spark.components.IItemRenderer;
-import spark.components.MXMLComponent;
+import spark.components.DataRenderer;
 import spark.primitives.supportClasses.TextGraphicElement;

 use namespace mx_internal;
@@ -48,7 +48,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class ItemRenderer extends MXMLComponent implements IItemRenderer
+public class ItemRenderer extends DataRenderer implements IItemRenderer
 {
     //--------------------------------------------------------------------------
     //
@@ -349,7 +349,7 @@
     /**
      *  @private
      *  Return the skin state. This can be overridden by subclasses to add more states.
-     *  NOTE: Undocumented for now since MXMLComponent class has not been fleshed out.
+     *  NOTE: Undocumented for now since DataRenderer class has not been fleshed out.
      */
     protected function getCurrentRendererState():String
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 21828
Author:   klin@adobe.com
Date:     2011-08-04T16:51:25.389235Z

Log Message:
-----------
GridDimensions bug fix. getCellHeight should use the column index when getting a value from the node.

QE notes: No
Doc notes: No
Bugs: SDK-30175
Reviewer: Hans
Tests run: checkintests, cyclone server
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
@@ -599,7 +599,7 @@
         var node:GridRowNode = rowList.find(row);

         if (node)
-            return node.getCellHeight(row);
+            return node.getCellHeight(col);

         return NaN;
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 2509
Author:   chaase@adobe.com
Date:     2008-07-16T17:27:37.792321Z

Log Message:
-----------
New Resize effect that works with Flex4 components as well as GraphicElement objects. Minor fixes to infrastructure classes (mostly the new effects classes, but also SetProperty) as necessary, plus a minor bugfix for the old Resize effect.
As with the other 'new effects', triggers are non-functional for now, but manual playing and transitions using the effects should work.
checkintests: passed
reviewer: Jason S.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/NewEffects.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetProperty.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/AnimatePropertiesInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/RemoveActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/AnimateProperties.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/RemoveAction.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/ResizeInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/ResizeInstance.as
@@ -0,0 +1,581 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flex.effects.effectClasses
+{
+import flash.events.Event;
+
+import flex.component.Panel;
+import flex.effects.PropertyValuesHolder;
+import flex.graphics.IGraphicElement;
+
+import mx.core.Application;
+import mx.core.Container;
+import mx.core.IUIComponent;
+import mx.events.EffectEvent;
+import mx.events.TweenEvent;
+import mx.styles.IStyleClient;
+
+public class ResizeInstance extends AnimatePropertiesInstance
+{
+    include "../../core/Version.as";
+
+    public function ResizeInstance(target:Object)
+    {
+        super(target);
+
+        roundValues = true;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var restoreVisibleArray:Array;
+
+    /**
+     *  @private
+     */
+    private var restoreAutoLayoutArray:Array;
+
+    /**
+     *  @private
+     */
+    private var numHideEffectsPlaying:Number = 0;
+
+    /**
+     *  @private
+     */
+    private var heightSet:Boolean;
+
+    /**
+     *  @private
+     */
+    private var widthSet:Boolean;
+
+    /**
+     *  @private
+     */
+    private var explicitWidthSet:Boolean;
+
+    /**
+     *  @private
+     */
+    private var explicitHeightSet:Boolean;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  heightBy
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the heightBy property.
+     */
+    private var _heightBy:Number;
+
+    /**
+     *  Number of pixels by which to modify the height of the component.
+     *  Values may be negative.
+     */
+    public function get heightBy():Number
+    {
+        return _heightBy;
+    }
+
+    /**
+     *  @private
+     */
+    public function set heightBy(value:Number):void
+    {
+        _heightBy = value;
+        heightSet = !isNaN(value);
+    }
+
+    //----------------------------------
+    //  heightFrom
+    //----------------------------------
+
+    /**
+     *  Initial height. If omitted, Flex uses the current size.
+     */
+    public var heightFrom:Number;
+
+    //----------------------------------
+    //  heightTo
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the heightTo property.
+     */
+    private var _heightTo:Number;
+
+    /**
+     *  Final height, in pixels.
+     */
+    public function get heightTo():Number
+    {
+        return _heightTo;
+    }
+
+    /**
+     *  @private
+     */
+    public function set heightTo(value:Number):void
+    {
+        _heightTo = value;
+        heightSet = !isNaN(value);
+    }
+
+    //----------------------------------
+    //  widthBy
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the widthBy property.
+     */
+    private var _widthBy:Number;
+
+    /**
+     *  Number of pixels by which to modify the width of the component.
+     *  Values may be negative.
+     */
+    public function get widthBy():Number
+    {
+        return _widthBy;
+    }
+
+    /**
+     *  @private
+     */
+    public function set widthBy(value:Number):void
+    {
+        _widthBy = value;
+        widthSet = !isNaN(value);
+    }
+
+    //----------------------------------
+    //  widthFrom
+    //----------------------------------
+
+    /**
+     *  Initial width. If omitted, Flex uses the current size.
+     */
+    public var widthFrom:Number;
+
+    //----------------------------------
+    //  widthTo
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the widthTo property.
+     */
+    private var _widthTo:Number;
+
+    /**
+     *  Final width, in pixels.
+     */
+    public function get widthTo():Number
+    {
+        return _widthTo;
+    }
+
+    /**
+     *  @private
+     */
+    public function set widthTo(value:Number):void
+    {
+        _widthTo = value;
+        widthSet = !isNaN(value);
+    }
+
+    //----------------------------------
+    //  hideChildrenTargets
+    //----------------------------------
+
+    /**
+     *  An Array of Panels.
+     *  The children of these Panels are hidden while the Resize effect plays.
+     */
+    public var hideChildrenTargets:Array /* of Panel */;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function play():void
+    {
+        calculateDimensionChanges();
+
+        // If the target is a Panel, then find all Panel objects that will
+        // be affected by the animation.  Deliver a "resizeStart" event to
+        // each affected Panel, and then wait until the Panel finishes
+        // hiding its children.
+        // TODO: We should axe this from Resize and enable the
+        // functionality in a different manner, such as setting hiding
+        // effects manually on the children themselves
+        var childrenHiding:Boolean = hidePanelChildren();
+
+        if (target is IStyleClient)
+        {
+            var left:* = target.getStyle("left");
+            if (left != undefined)
+                target.setStyle("left",undefined);
+
+            var right:* = target.getStyle("right");
+            if (right != undefined)
+                target.setStyle("right",undefined);
+
+            var top:* = target.getStyle("top");
+            if (top != undefined)
+                target.setStyle("top",undefined);
+
+            var bottom:* = target.getStyle("bottom");
+            if (bottom != undefined)
+                target.setStyle("bottom",undefined);
+        }
+
+        propertyValuesList =
+            [new PropertyValuesHolder("width", [widthFrom, widthTo]),
+             new PropertyValuesHolder("height", [heightFrom, heightTo])];
+
+        // TODO: These additional pvholder items are a workaround for the
+        // current difference between GraphicElement constraints and
+        // UIComponent constraints. For components, the constraints
+        // side-effect the width/height properties which we can then animate.
+        // For GraphicElements, this does not happen, so animations on
+        // width/height are ignored when constraints are set.
+        // Expect this to change with GraphicElement and UIComponent are
+        // more closely aligned in behavior.
+        if (target is IGraphicElement && propertyChanges)
+        {
+            if (propertyChanges.start["left"] !== undefined ||
+                propertyChanges.start["right"] !== undefined ||
+                propertyChanges.end["left"] !== undefined ||
+                propertyChanges.end["right"] !== undefined)
+            {
+                var lFrom:Number = (propertyChanges.start["left"] !== undefined) ?
+                    propertyChanges.start["left"] : getCurrentValue("left");
+                var rFrom:Number = (propertyChanges.start["right"] !== undefined) ?
+                    propertyChanges.start["right"] : getCurrentValue("right");
+                var lTo:Number = (propertyChanges.end["left"] !== undefined) ?
+                    propertyChanges.end["left"] : getCurrentValue("left");
+                var rTo:Number = (propertyChanges.end["right"] !== undefined) ?
+                    propertyChanges.end["right"] : getCurrentValue("right");
+                propertyValuesList.push(new PropertyValuesHolder("left", [lFrom, lTo]));
+                propertyValuesList.push(new PropertyValuesHolder("right", [rFrom, rTo]));
+            }
+            if (propertyChanges.start["top"] !== undefined ||
+                propertyChanges.start["bottom"] !== undefined ||
+                propertyChanges.end["top"] !== undefined ||
+                propertyChanges.end["bottom"] !== undefined)
+            {
+                var tFrom:Number = (propertyChanges.start["top"] !== undefined) ?
+                    propertyChanges.start["top"] : getCurrentValue("top");
+                var bFrom:Number = (propertyChanges.start["bottom"] !== undefined) ?
+                    propertyChanges.start["bottom"] : getCurrentValue("bottom");
+                var tTo:Number = (propertyChanges.end["top"] !== undefined) ?
+                    propertyChanges.end["top"] : getCurrentValue("top");
+                var bTo:Number = (propertyChanges.end["bottom"] !== undefined) ?
+                    propertyChanges.end["bottom"] : getCurrentValue("bottom");
+                propertyValuesList.push(new PropertyValuesHolder("top", [tFrom, tTo]));
+                propertyValuesList.push(new PropertyValuesHolder("bottom", [bFrom, bTo]));
+            }
+        }
+
+        super.play();
+
+        if (childrenHiding)
+            tween.pause();
+
+    }
+
+    /**
+     * Handles the end event from the tween. The value here is an Array of
+     * values, one for each 'property' in our propertyValuesList.
+     */
+    override protected function endHandler(value:Object):void
+    {
+        super.endHandler(value);
+
+        restorePanelChildren();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    private function calculateDimensionChanges():void
+    {
+        var explicitWidth:* = propertyChanges ? propertyChanges.end["explicitWidth"] : undefined;
+        var explicitHeight:* = propertyChanges ? propertyChanges.end["explicitHeight"] : undefined;
+        var percentWidth:* = propertyChanges ? propertyChanges.end["percentWidth"] : undefined;
+        var percentHeight:* = propertyChanges ? propertyChanges.end["percentHeight"] : undefined;
+
+        // The user may have supplied some combination of widthFrom,
+        // widthTo, and widthBy. If either widthFrom or widthTo is
+        // not explicitly defined, calculate its value based on the
+        // other two values.
+        if (isNaN(widthFrom))
+        {
+            if (!isNaN(widthTo) && !isNaN(widthBy))
+                widthFrom = widthTo - widthBy;
+            else if (propertyChanges && propertyChanges.start["width"] !== undefined)
+                widthFrom = propertyChanges.start["width"];
+            else
+                widthFrom = getCurrentValue("width");
+        }
+        if (isNaN(widthTo))
+        {
+            if (isNaN(widthBy) &&
+                propertyChanges &&
+                (propertyChanges.end["width"] !== undefined ||
+                 explicitWidth !== undefined ))
+            {
+                if (explicitWidth !== undefined && !isNaN(explicitWidth))
+                {
+                    explicitWidthSet = true;
+                    _widthTo = explicitWidth;
+                }
+                else
+                {
+                    _widthTo = propertyChanges.end["width"];
+                }
+            }
+            else
+            {
+                _widthTo = (!isNaN(widthBy)) ?
+                          widthFrom + widthBy :
+                          getCurrentValue("width");
+            }
+        }
+
+        // Ditto for heightFrom, heightTo, and heightBy.
+        if (isNaN(heightFrom))
+        {
+            if (!isNaN(heightTo) && !isNaN(heightBy))
+                heightFrom = heightTo - heightBy;
+            else if (propertyChanges && propertyChanges.start["height"] != undefined)
+                heightFrom = propertyChanges.start["height"];
+            else
+                heightFrom = getCurrentValue("height");
+        }
+        if (isNaN(heightTo))
+        {
+            if (isNaN(heightBy) &&
+                propertyChanges &&
+                (propertyChanges.end["height"] !== undefined ||
+                 explicitHeight !== undefined))
+            {
+                if (explicitHeight !== undefined && !isNaN(explicitHeight))
+                {
+                    explicitHeightSet = true;
+                    _heightTo = explicitHeight;
+                }
+                else
+                {
+                    _heightTo = propertyChanges.end["height"];
+                }
+            }
+            else
+            {
+                _heightTo = (!isNaN(heightBy))?
+                           heightFrom + heightBy :
+                           getCurrentValue("height");
+            }
+        }
+    }
+
+    /**
+     *  @private
+     *  Hides children of Panels while the effect is playing.
+     */
+    private function hidePanelChildren():Boolean
+    {
+        if (!hideChildrenTargets)
+            return false;
+
+        // Initialize a couple arrays that will be needed later
+        restoreVisibleArray = [];
+        restoreAutoLayoutArray = [];
+
+        // Send each panel a "resizeStart" event, which will trigger
+        // the resizeStartEffect (if any)
+        var n:int = hideChildrenTargets.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var p:Object = hideChildrenTargets[i];
+
+            if (p is Panel)
+            {
+                var prevNumHideEffectsPlaying:Number = numHideEffectsPlaying;
+
+                p.addEventListener(EffectEvent.EFFECT_START, panelChildrenEventHandler);
+                p.dispatchEvent(new Event("resizeStart"));
+                p.removeEventListener(EffectEvent.EFFECT_START, panelChildrenEventHandler);
+
+                // If no effect started playing, then make children invisible
+                // immediately instead of waiting for the end of the effect
+                if (numHideEffectsPlaying == prevNumHideEffectsPlaying)
+                    makePanelChildrenInvisible(Panel(p), i);
+            }
+        }
+
+        return numHideEffectsPlaying > 0;
+    }
+
+    /**
+     *  @private
+     */
+    private function makePanelChildrenInvisible(panel:Panel,
+                                                panelIndex:Number):void
+    {
+        var childArray:Array = [];
+
+        var child:IUIComponent;
+
+        // Hide the Panel's children while the Resize is occurring.
+        var n:int = panel.numItems;
+        for (var i:int = 0; i < n; i++)
+        {
+            child = IUIComponent(panel.getItemAt(i));
+            if (child.visible)
+            {
+                childArray.push(child);
+                child.setVisible(false, true);
+            }
+        }
+
+        // Hide the Panel's scrollbars while the Resize is occurring.
+        //child = panel.horizontalScrollBar;
+        if (child && child.visible)
+        {
+            childArray.push(child);
+            child.setVisible(false, true);
+        }
+        //child = panel.verticalScrollBar;
+        if (child && child.visible)
+        {
+            childArray.push(child);
+            child.setVisible(false, true);
+        }
+
+        restoreVisibleArray[panelIndex] = childArray;
+
+        // Set autoLayout = false, which prevents the Panel's updateDisplayList()
+        // method from executing while the Panel is resizing.
+        /*
+        if (panel.autoLayout)
+        {
+            panel.autoLayout = false;
+            restoreAutoLayoutArray[panelIndex] = true;
+        }
+        */
+    }
+
+    /**
+     *  @private
+     */
+    private function restorePanelChildren():void
+    {
+        if (hideChildrenTargets)
+        {
+            var n:int = hideChildrenTargets.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var p:IUIComponent = hideChildrenTargets[i];
+
+                var childArray:Array = restoreVisibleArray[i];
+                if (childArray)
+                {
+                    var m:int = childArray.length;
+                    for (var j:int = 0; j < m; j++)
+                    {
+                        childArray[j].setVisible(true, true);
+                    }
+                }
+
+                //if (restoreAutoLayoutArray[i])
+                    //Panel(p).autoLayout = true;
+
+                // Trigger the resizeEndEffect (if any)
+                p.dispatchEvent(new Event("resizeEnd"));
+            }
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  This function is called when one of the Panels finishes
+     *  its "hide children" animation.
+     */
+    private function panelChildrenEventHandler(event:Event):void
+    {
+        var panel:Panel = event.target as Panel;
+
+        if (event.type == EffectEvent.EFFECT_START)
+        {
+            // Call my eventHandler() method when the effect finishes playing.
+            panel.addEventListener(EffectEvent.EFFECT_END, panelChildrenEventHandler);
+
+            // Remember how many effects we're waiting for
+            numHideEffectsPlaying++;
+        }
+
+        else if (event.type == EffectEvent.EFFECT_END)
+        {
+            // Remove the event listener that triggered this callback.
+            panel.removeEventListener(EffectEvent.EFFECT_END, panelChildrenEventHandler);
+
+            // Get the array index of the panel
+            var n:int = hideChildrenTargets.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                if (hideChildrenTargets[i] == panel)
+                    break;
+            }
+
+            makePanelChildrenInvisible(panel, i);
+
+            // If all panels have finished their "hide children" effect,
+            // then it's time to start our Resize effect.
+            if (--numHideEffectsPlaying == 0)
+                tween.resume();
+        }
+    }
+
+}
+}


fixed jenks crash bug

fixed jenks crash bug

Change-Id: Ida977ebe6e834a0cf40b53ee5cbdbc1bd76533d1

--- WeaveData/src/weave/data/BinningDefinitions/NaturalJenksBinningDefinition.as
+++ WeaveData/src/weave/data/BinningDefinitions/NaturalJenksBinningDefinition.as
@@ -126,8 +126,8 @@
 					return _keyCount/_keys.length;
 				/*ignore NaN */
 				currValue = _column.getValueFromKey(_keys[_keyCount],Number);
-				if(!isNaN(currValue))
-					_sortedValues[_keyCount] = currValue;
+				if (isFinite(currValue))
+					_sortedValues.push(currValue);
 			}

 			// begin sorting now


Fixed a bug with special/extended ASCII and Unicode characters. The
issue was that the sent chunk data between WeaveClient and WeaveAdmin
when saving to the server lost a byte converting the byte array to a
string doing bytes.toString().

Tested by opening the admin console, opening a special character xml,
saving to the server a few times, opening up other XMLs to make sure
generalizedgeometry objects and other requests still worked.

Change-Id: I95d712164bfb976d0855ba769231ed3e9e278d38

--- WeaveData/src/weave/services/LocalAsyncService.as
+++ WeaveData/src/weave/services/LocalAsyncService.as
@@ -22,6 +22,7 @@
 	import flash.events.AsyncErrorEvent;
 	import flash.events.StatusEvent;
 	import flash.net.LocalConnection;
+	import flash.net.registerClassAlias;
 	import flash.utils.ByteArray;

 	import mx.rpc.AsyncResponder;
@@ -44,7 +45,7 @@
 	 * This class provides two-way communication between Flash applications in the form of an IAsyncService.
 	 */
 	public class LocalAsyncService implements IAsyncService, IDisposableObject
-	{
+	{
 		/**
 		 * @param receivingObject The object to receive remote commands from.
 		 * @param receivingObjectIsServer If true, receivingObject acts as the server and listens for the remote object acts as a client.
@@ -260,9 +261,12 @@
 				var chunkData:ByteArray = new ByteArray();
 				var chunkSize:uint = Math.min(tempByteArray.bytesAvailable, 39900); // size limit for send data is 40k
 				tempByteArray.readBytes(chunkData, 0, chunkSize);
-				moreChunksFollow = (tempByteArray.bytesAvailable > 0);
-				// Sending a String is more reliable than sending a ByteArray because sometimes the ByteArray becomes a generic Object and loses its content.
-				conn.send(remoteName, "receiveChunkedData", commandID, chunkID++, chunkData.toString(), moreChunksFollow);
+				moreChunksFollow = (tempByteArray.bytesAvailable > 0);
+
+				// chunkData was chunkData.toString() before because byteArray is sometimes encoded as a generic object
+				// but I can't reproduce it and this fixes a bug with a unicode character (such as the greek lowercase mu, char code 181).
+				// the unicode char bug occurs during the toString() call which results in a string with a smaller size than the bytearray.
+				conn.send(remoteName, "receiveChunkedData", commandID, chunkID++, chunkData, moreChunksFollow);
 			}
 		}

@@ -281,14 +285,16 @@
 		 * @param chunkData Part of a serialized list of parameters for the receiveCommand() function.
 		 * @param moreChunksFollow If this is true, it means more chunks appear after this chunkID.  If false, this is the last chunkID.
 		 */
-		public function receiveChunkedData(commandID:String, chunkID:uint, chunkData:String, moreChunksFollow:Boolean):void
-		{
-			// convert String to ByteArray
-			var bytes:ByteArray = new ByteArray();
-			for (var i:int = 0; i < chunkData.length; i++)
-				bytes.writeByte(chunkData.charCodeAt(i));
-			bytes.position = 0;
-			_receiveChunkedData.apply(null, [commandID, chunkID, bytes, moreChunksFollow]);
+		public function receiveChunkedData(commandID:String, chunkID:uint, chunkData:ByteArray, moreChunksFollow:Boolean):void
+		{
+			trace('receiveChunkedData', chunkID, chunkData.length, moreChunksFollow);
+			chunkData.position = 0;
+//			// convert String to ByteArray
+//			var bytes:ByteArray = new ByteArray();
+//			for (var i:int = 0; i < chunkData.length; i++)
+//				bytes.writeByte(chunkData.charCodeAt(i));
+//			bytes.position = 0;
+			_receiveChunkedData.apply(null, [commandID, chunkID, chunkData, moreChunksFollow]);
 		}
 		private function _receiveChunkedData(commandID:String, chunkID:uint, chunkData:ByteArray, moreChunksFollow:Boolean):void
 		{


We don't read creds on the client.

We don't read creds on the client.

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

--- src/as/com/threerings/presents/net/ServiceCreds.as
+++ src/as/com/threerings/presents/net/ServiceCreds.as
@@ -52,14 +52,6 @@
     }

     // from interface Streamable
-    override public function readObject (ins :ObjectInputStream) :void
-    {
-        super.readObject(ins);
-        clientId = (ins.readField(String) as String);
-        _authToken = (ins.readField(String) as String);
-    }
-
-    // from interface Streamable
     override public function writeObject (out :ObjectOutputStream) :void
     {
         super.writeObject(out);


Transferred from the Adobe Open Source Subversion Repository

Revision: 5028
Author:   egeorgie@adobe.com
Date:     2009-02-21T00:02:17.627601Z

Log Message:
-----------
IGraphicElement interface clean-up and optimizations.
Animating a GraphicElement that doesn't share the Group's DO should be now faster and smoother since redrawing it won't redraw the Group anymore.

1. Group doesn't always clear the first sequence of display objects now
2. Moved the shared DO logic almost entirely into Group
3. More granular invalidation for GraphicElements

QE Notes: Make sure we have test that count the number of display objects for a given set of graphic elements and a group
Doc Notes:
Bugs: None
Reviewer: Glenn, Ryan, Jason
tests: None

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/InvalidatingSprite.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/ISharedDisplayObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.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/graphics/baseClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/ISharedGraphicsDisplayObject.as</path>

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

--- frameworks/projects/framework/src/mx/core/IVisualElement.as
+++ frameworks/projects/framework/src/mx/core/IVisualElement.as
@@ -51,6 +51,7 @@
     function get parent():DisplayObjectContainer;

 	/**
+	 * Documentation is not currently available.
      *  Determines the order in which items inside of groups and datagroups
      *  are rendered. Groups and DataGroups order their items based on their
      *  layer property, with the lowest layer in the back, and the higher in
@@ -58,9 +59,9 @@
      *  they are added to the Groups item list.
      *
      *  @default 0
-     */
-    function set layer(value:Number):void;
-    function get layer():Number;
+	 */
+	function set layer(value:Number):void;
+	function get layer():Number;

     /**
      *  The y-coordinate of the baseline


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

--- frameworks/projects/mx/src/mx/skins/halo/ColorPickerSkin.as
+++ frameworks/projects/mx/src/mx/skins/halo/ColorPickerSkin.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2004-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.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4192
Author:   rfrishbe@adobe.com
Date:     2008-11-26T19:39:48.250759Z

Log Message:
-----------
This change will allow us to handle having the same items multiple times in the list, for example “Ryan Frishberg” can now be in the list twice.

In order to do it, rather than using the item to find the itemRenderer or to tell the list that an item’s been selected, we need to use the index instead.  Methods like getItemRenderer and getRendererItem were changed to accept an index rather than an item.  Other methods were added, like isItemIndexSelected() because I felt isItemSelected() is still a useful method to have, even though it’s ambiguous when multiple items come in to play.

For now, I just tried to change the parameters where needed.  Some of the names of the methods were updated to reflect the change, but others weren’t because PARB is going to review a lot of this on Thursday, so it’s easier to make a name change only once (and after PARB approves it).

I also added properties to ItemExistanceChangeEvent.as.  In a later checkin, I’ll create a separate RendererExistanceChangeEvent.as for DataGroups and use ItemExistanceChangeEvents only for IVisualElementContainers (Halo containers  will also dispatch these events).  However, this needs to be PARB reviewed, so I figured it’s best to hold off on this change until later.

Also included in this checkin are some small ASDoc updates to no longer use any of the “addItem(), numItems”, and instead use addElement() or numElements where appropriate.

QE Notes: Steve's excluded any failing tests.  As noted in the checkin, there will probably be some renaming related to these methods.  Also, add some tests for duplicate items now.
Doc Notes: None
Bugs: SDK-17912
Reviewer: Glenn
tests: checkintests, mustella DataGroup, FxDataContainer, FxList

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.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/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -1,39 +1,21 @@
 package mx.components
 {
 import flash.display.DisplayObject;
-import flash.display.Sprite;
 import flash.events.Event;
-import flash.geom.ColorTransform;
-import flash.geom.Matrix;
-import flash.geom.Rectangle;
-import flash.utils.Dictionary;
-
-import mx.events.FlexEvent;
-import mx.events.ItemExistenceChangedEvent;
-import mx.graphics.Graphic;
-import mx.graphics.IGraphicElement;
-import mx.graphics.MaskType;
-import mx.utils.MatrixUtil;
-import mx.graphics.graphicsClasses.GraphicElement;
-import mx.layout.ILayoutElement;
-import mx.layout.BasicLayout;
-import mx.layout.LayoutElementFactory;
-
-import mx.collections.ICollectionView;
+
 import mx.collections.IList;
 import mx.components.baseClasses.GroupBase;
-import mx.controls.Label;
 import mx.core.IDataRenderer;
-import mx.core.IDeferredInstance;
 import mx.core.IFactory;
 import mx.core.IVisualElement;
 import mx.core.IVisualElementContainer;
 import mx.core.mx_internal;
-import mx.core.UIComponent;
 import mx.events.CollectionEvent;
-import mx.events.CollectionEventKind
-import mx.events.PropertyChangeEvent;
-import mx.events.PropertyChangeEventKind;
+import mx.events.CollectionEventKind;
+import mx.events.ItemExistenceChangedEvent;
+import mx.graphics.graphicsClasses.GraphicElement;
+import mx.layout.ILayoutElement;
+import mx.layout.LayoutElementFactory;
 import mx.styles.IStyleClient;

 /**
@@ -74,7 +56,7 @@
         super();
     }

-    private var itemRendererRegistry:Dictionary;
+    private var itemRendererRegistry:Array = [];

     //----------------------------------
     //  itemRenderer
@@ -239,7 +221,7 @@
     }

     /**
-     *  Create the visual representation for the item, if needed.
+     *  Create the item renderer for the item, if needed.
      *
      *
The rules to create a visual item are:

      *

if itemRendererFunction is defined, call
@@ -251,12 +233,11 @@
      *
      *  @param item The data element.
      *
-     *  @return The DisplayObject instance that represents the data elelement.
-     */
-    protected function createVisualForItem(item:Object):DisplayObject
+     *  @return The renderer that represents the data elelement.
+     */
+    protected function createRendererForItem(item:Object, index:int):Object
     {
         var myItemRenderer:Object;
-        var itemDisplayObject:DisplayObject;

         if (item === null)
             throw new Error("DataGroup content can not contain null items.");
@@ -273,13 +254,13 @@
             var rendererFactory:IFactory = itemRendererFunction(item);

             if (rendererFactory)
-                myItemRenderer = itemDisplayObject = rendererFactory.newInstance();
+                myItemRenderer = rendererFactory.newInstance();
         }

         // 2. if itemRenderer is defined, instantiate one
         if (!myItemRenderer && itemRenderer)
         {
-            myItemRenderer = itemDisplayObject = itemRenderer.newInstance();
+            myItemRenderer = itemRenderer.newInstance();
         }

         // 3. if item is a GraphicElement, create the display object for it
@@ -290,54 +271,45 @@

             if (!graphicItem.displayObject)
                 graphicItem.displayObject = graphicItem.createDisplayObject();
-
-            itemDisplayObject = graphicItem.displayObject;
+
             myItemRenderer = graphicItem;
         }

         // 4. if item is a DisplayObject, use it directly
         if (!myItemRenderer && item is DisplayObject)
         {
-            myItemRenderer = itemDisplayObject = DisplayObject(item);
+            myItemRenderer = DisplayObject(item);
         }

         // Set the renderer's data to the item, but only if the item and renderer are different
         if (myItemRenderer is IDataRenderer && myItemRenderer != item)
             IDataRenderer(myItemRenderer).data = item;
-
-        registerRenderer(item, myItemRenderer);
-
-        return itemDisplayObject;
+
+        return myItemRenderer;
     }

     /**
      *  Called to associate an item with a particular renderer.
      *  This is called automatically when an item renderer is created.
      *
-     *  @param item The item to associate the renderer with
+     *  @param index The item index to associate the renderer with
      *  @param myItemRenderer The item renderer
-     */
-    protected function registerRenderer(item:Object, myItemRenderer:Object):void
-    {
-        if (!itemRendererRegistry)
-            itemRendererRegistry = new Dictionary(true);
-
-        itemRendererRegistry[item] = myItemRenderer;
+     */
+    protected function registerRenderer(index:int, myItemRenderer:Object):void
+    {
+        itemRendererRegistry.splice(index, 0, myItemRenderer);
     }

     /**
      *  Called to dis-associate an item with a particular rendering display object.
      *  This will be called when virtualization support is added to datagroup.
      *
-     *  @param item The item to dis-associate the renderer with
+     *  @param index The item index to dis-associate the renderer with
      *  @param myItemRenderer The item renderer
      */
-    protected function unregisterRenderer(item:Object, myItemRenderer:DisplayObject):void
-    {
-        if (!itemRendererRegistry)
-            return;
-
-        delete itemRendererRegistry[item];
+    protected function unregisterRenderer(index:int, myItemRenderer:Object):void
+    {
+        itemRendererRegistry.splice(index, 1);
     }

     /**
@@ -433,9 +405,7 @@
      */
     override public function getLayoutElementAt(index:int):ILayoutElement
     {
-        var item:Object = dataProvider.getItemAt(index);
-
-        var myItemRenderer:Object = getItemRenderer(item);
+        var myItemRenderer:Object = getItemRenderer(index);

         return LayoutElementFactory.getLayoutElementFor(myItemRenderer);
     }
@@ -451,6 +421,7 @@
     protected function itemAdded(item:Object, index:int):void
     {
         var childDO:DisplayObject;
+        var myItemRenderer:Object;

         if (item is GraphicElement)
         {
@@ -461,17 +432,25 @@
             if (item is IStyleClient)
                 IStyleClient(item).regenerateStyleCache(true);

-            childDO = createVisualForItem(graphicItem);
+            myItemRenderer = createRendererForItem(graphicItem, index);
         }
         else
         {
-            childDO = createVisualForItem(item);
-        }
+            myItemRenderer = createRendererForItem(item, index);
+        }
+
+        registerRenderer(index, myItemRenderer);
+
+        if (myItemRenderer is GraphicElement)
+            childDO = GraphicElement(myItemRenderer).displayObject;
+        else
+            childDO = DisplayObject(myItemRenderer);

         addItemToDisplayList(childDO, item, index);

         dispatchEvent(new ItemExistenceChangedEvent(
-                      ItemExistenceChangedEvent.ITEM_ADD, false, false, item));
+                      ItemExistenceChangedEvent.ITEM_ADD, false, false,
+                      item, index, getItemRenderer(index)));

         invalidateSize();
         invalidateDisplayList();
@@ -487,11 +466,12 @@
      */
     protected function itemRemoved(item:Object, index:int):void
     {
-        var renderer:Object = getItemRenderer(item);
+        var renderer:Object = getItemRenderer(index);
         var childDO:DisplayObject = item as DisplayObject;

         dispatchEvent(new ItemExistenceChangedEvent(
-                      ItemExistenceChangedEvent.ITEM_REMOVE, false, false, item));
+                      ItemExistenceChangedEvent.ITEM_REMOVE, false, false,
+                      item, index, renderer));

         // if either the item or the renderer is a GraphicElement,
         // release the display objects
@@ -519,6 +499,8 @@

         if (childDO)
             super.removeChild(childDO);
+
+        unregisterRenderer(index, renderer);

         invalidateSize();
         invalidateDisplayList();
@@ -721,49 +703,33 @@
     //--------------------------------------------------------------------------

     /**
-     *  Returns the instance of the renderer for the specified item. If the
-     *  the specified item is a visual item (component or IGraphicElment) that
-     *  doesn't use an item renderer, the item itself is returned.
-     *
-     *  @param item The item whose renderer is to be returned.
+     *  Returns the instance of the renderer at the specified index. If the item
+     *  at that index is a visual element and uses no renderer, then the visual
+     *  element will be returned.
+     *
+     *  @param index The item index whose renderer is to be returned.
      *
      *  @return The renderer instance for the specified item. If the item
-     *          is a subclass of DisplayObject or GraphicElement and has no
-     *          item renderer, the item itself is returned.
-     */
-    public function getItemRenderer(item:Object):Object
-    {
-        var result:Object = null;
-
-        if (itemRendererRegistry)
-            result = itemRendererRegistry[item];
-
-        if (!result && item is DisplayObject)
-            result = item;
-
-        return result;
-    }
-
-    /**
-     *  Returns the item associated with the specified renderer.
+     *          is a visual element and has no item renderer,
+     *          the visual element itself is returned.
+     */
+    public function getItemRenderer(index:int):Object
+    {
+        return itemRendererRegistry[index];
+    }
+
+    /**
+     *  Returns the item index associated with the specified renderer.
      *
      *  @param renderer The renderer whose item you want to retrieve.
      *
-     *  @return The item associated with the specified renderer.
-     */
-    public function getRendererItem(renderer:Object):Object
-    {
-        // !! This implementation is really slow...
-        var item:Object;
-
-        for (var i:int = 0; i < dataProvider.length; i++)
-        {
-            item = dataProvider.getItemAt(i);
-            if (getItemRenderer(item) == renderer)
-                return item;
-        }
-
-        return null;
+     *  @return The item index associated with the specified renderer,
+     *          or -1 if there is no item associated with the passed in
+     *          renderer.
+     */
+    public function getRendererItem(renderer:Object):int
+    {
+        return itemRendererRegistry.indexOf(renderer);
     }

     /**


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

--- frameworks/projects/spark/src/spark/effects/RemoveAction.as
+++ frameworks/projects/spark/src/spark/effects/RemoveAction.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: 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@1269327 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/core/Repeater.as
+++ frameworks/projects/mx/src/mx/core/Repeater.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-2007 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: 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@1252871 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/charts/src/mx/charts/GridLines.as
+++ frameworks/projects/charts/src/mx/charts/GridLines.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.charts
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4073
Author:   rfrishbe@adobe.com
Date:     2008-11-11T22:09:40.130593Z

Log Message:
-----------
Add IViewport properties to FxContainer and FxDataContainer.  This is using a new property delegation pattern.  This pattern may be refined later on.  For part of it, we are doing bit manipulation to store a set of booleans efficiently.  I removed the Flags32 class and replaced it with static helpers because it's more efficient without the object overhead.  So I cleaned up Button and ToggleButton to use the new static helper class.

Ran checkintests and mustella tests for: List, FxContainer, FxDataContainer, Button, ToggleButton, CheckBox, RadioButton.

QE Notes: Need to test these new properties (how they facade, setting them explicitly, what happens when skins changed, bindability of these properties, etc...)
Doc Notes: None
Bugs: -
Reviewer: Hans, Evtim

Modified Paths:
--------------
<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/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxToggleButton.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/utils/Flags32.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/BitFlagUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/framework/src/FrameworkClasses.as
+++ frameworks/projects/framework/src/FrameworkClasses.as
@@ -143,6 +143,7 @@
 	import mx.utils.XMLUtil; XMLUtil;
 	import mx.utils.Base64Decoder; Base64Decoder;
 	import mx.utils.Base64Encoder; Base64Encoder;
+	import mx.utils.BitFlagUtil; BitFlagUtil;
 	import mx.utils.OnDemandEventDispatcher; OnDemandEventDispatcher;
 	import mx.validators.Validator; Validator;
 	// Maintain alphabetical order