Transferred from the Adobe Open Source Subversion Repository

Revision: 3499
Author:   rfrishbe@adobe.com
Date:     2008-10-06T23:57:04.003486Z

Log Message:
-----------
Code cleanup:

1.  Remove IDisplayObjectElement and IAssignableDisplayObjectElement.  No one was actually using these interfaces...a few classes were implementing them though.

2.  Big ASDoc comment scrub for Group, DataGroup, and GroupBase.  Fixed some ASDoc in LayoutBase, IViewport, and ResizeMode.

3.  Spit and finish on Group.  No more variables or parameters typed as "*".  Got the content APIs in-line with Flash's DisplayObjectContainer, which means exceptions are now thrown where appropriate.

4.  Fixed a bug in DataGround where graphic items with item renderers had trouble in itemRemoved() (SDK-17175)

QE: Yes - Please revamp the excluded test cases to look for the new exceptions.
Doc: Yes
Bugs: SDK-17175
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/GroupBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/IDisplayObjectElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/IAssignableDisplayObjectElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/intf/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/TextGraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -64,7 +64,7 @@
     private var contentChanged:Boolean = false;
     private var needsDisplayObjectAssignment:Boolean = false;

-    private var _content:*;
+    private var _content:Object;
     private var _contentType:int;
     private var layeringMode:uint = ITEM_ORDERED_LAYERING;

@@ -127,6 +127,16 @@
     /**
      *  Documentation is not currently available.
      */
+    override public function get blendMode():String
+    {
+        if (blendModeExplicitlySet)
+            return _blendMode;
+        else return BlendMode.LAYER;
+    }
+
+    /**
+     *  @private
+     */
     override public function set blendMode(value:String):void
     {
     	if (blendModeExplicitlySet && value == _blendMode)
@@ -144,23 +154,28 @@
     }

     /**
-     *  Documentation is not currently available.
-     */
-    override public function get blendMode():String
-    {
-    	if (blendModeExplicitlySet)
-        	return _blendMode;
-		else return BlendMode.LAYER;
-    }
-
-    public function set content(value:*):void
+     *  Content for this Group.
+     *
+     *
The content can be an Array or a single item.
+     *  The content items can be any type.

+     *
+     *
If the content is an Array, do not modify the array
+     *  directly. Use the methods defined on Group to do this.

+     *
+     *  @default null
+     */
+    public function get content():Object
+    {
+        return _content;
+    }
+
+    /**
+     *  @private
+     */
+    public function set content(value:Object):void
     {
         _content = value;

-        // Need to convert null to undefined here, since subsequent content checks test for undefined
-        if (_content === null)
-            _content = undefined;
-
         if (_content is Array)
             _contentType = CONTENT_TYPE_ARRAY;
         else
@@ -169,12 +184,11 @@
         contentChanged = true;
         invalidateProperties();
     }
-
-    public function get content():*
-    {
-        return _content;
-    }
-
+
+    /**
+     *  Internal Group method used to grab the elements from the content array
+     *  and add them to the Group.
+     */
     protected function initializeChildrenArray():void
     {
         // Get rid of existing display object children.
@@ -186,7 +200,7 @@
             //itemRemoved(0);
             super.removeChildAt(0);

-        if (_content !== undefined)
+        if (_content !== null)
         {
             for (var i:int = 0; i < numItems; i++)
             {
@@ -223,6 +237,9 @@
         } */
     }

+    /**
+     *  @private
+     */
     override protected function commitProperties():void
     {
         super.commitProperties();
@@ -260,6 +277,9 @@
         }
     }

+    /**
+     *  @private
+     */
     override public function validateSize(recursive:Boolean = false):void
     {
         // Since GraphicElement is not ILayoutManagerClient, we need to make sure we
@@ -279,6 +299,9 @@
         super.validateSize(recursive);
     }

+    /**
+     *  @private
+     */
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
         super.updateDisplayList(unscaledWidth, unscaledHeight);
@@ -306,9 +329,14 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  The number of items in this group.
+     *
+     *  @return The number of items in this group
+     */
     public function get numItems():int
     {
-        if (_content === undefined)
+        if (_content === null)
             return 0;

         if (_contentType == CONTENT_TYPE_ARRAY)
@@ -317,9 +345,21 @@
         return 1;
     }

-    public function getItemAt(index:int):*
-    {
-        if (_content === undefined)
+    /**
+     *  Returns the item that exists at the specified index.
+     *
+     *  @param index The index of the item to retrieve.
+     *
+     *  @return The item at the specified index.
+     *
+     *  @throws RangeError Throws if the index position does not exist in the child list.
+     */
+    public function getItemAt(index:int):Object
+    {
+        // check for RangeError:
+        checkForRangeError(index);
+
+        if (_content === null)
             return null;

         if (_contentType == CONTENT_TYPE_ARRAY)
@@ -328,15 +368,80 @@
         return _content;
     }

-    public function addItem(item:*):*
+    /**
+     *  @private
+     *  Checks the range of index to make sure it's valid
+     */
+    private function checkForRangeError(index:int, addingItem:Boolean = false):void
+    {
+        // figure out the maximum allowable index
+        var maxIndex:int = -1;
+
+        if (_content === null)
+            maxIndex = -1;
+        else if (_contentType == CONTENT_TYPE_UNKNOWN)
+            maxIndex = 0;
+        else if (_contentType == CONTENT_TYPE_ARRAY)
+            maxIndex = content.length - 1;
+
+        // if adding an item, we allow an extra index at the end
+        if (addingItem)
+            maxIndex++;
+
+        if (index > maxIndex)
+            throw new RangeError("Index " + index + " is out of range");
+    }
+
+    /**
+     *  Adds an item to this Group. The item is added after all other
+     *  items and on top of all other items.  (To add an item to a specific
+     *  index position, use the addChildAt() method.)
+     *
+     *
If you add an item object that already has a different
+     * container as a parent, the object is removed from the child
+     * list of the other container.

+     *
+     *  @param item The item to add as a child of this Group instance
+     *
+     *  @return The item that was added to the Group.
+     *
+     *  @event itemAdded Dispatched when the item is added to the child list
+     *
+     *  @throws ArgumentError if the child is the same as the parent.
+     */
+    public function addItem(item:Object):Object
     {
         return addItemAt(item, numItems);
     }

-    public function addItemAt(item:*, index:int):*
-    {
+    /**
+     *  Adds an item to this Group. The item is added at the index
+     *  position specified.  An index of 0 represents the first item
+     *  and the back (bottom) of the display list.
+     *
+     *  @param item The item to add as a child of this Group instance
+     *  @param index The index position to which the item is added. If
+     *  you specify a currently occupied index position, the child object
+     *  that exists at that position and all higher positions are moved
+     *  up one position in the child list.
+     *
+     *  @return The item that was added to the Group.
+     *
+     *  @event itemAdded Dispatched when the item is added to the child list
+     *
+     *  @throws ArgumentError if the child is the same as the parent.
+     *  @throws RangeError Throws if the index position does not exist in the child list.
+     */
+    public function addItemAt(item:Object, index:int):Object
+    {
+        if (item == this)
+            throw new ArgumentError("Cannot add yourself as a child of yourself");
+
+        // check for RangeError:
+        checkForRangeError(index, true);
+
         // If we don't have any content yet, initialize it to an empty array
-        if (_content === undefined)
+        if (_content === null)
         {
             content = [];
             contentChanged = false;
@@ -360,16 +465,39 @@
         return item;
     }

-    public function removeItem(item:*):*
+    /**
+     *  Removes the specified item from the child list of this group.
+     *  The index positions of any items above the item in the Group
+     *  are decreased by 1.
+     *
+     *  @param item The item to be removed from the Group.
+     *
+     *  @return The item removed from the Group.
+     *
+     *  @throws ArgumentError Throws if the item parameter is not a child of this object.
+     */
+    public function removeItem(item:Object):Object
     {
         return removeItemAt(getItemIndex(item));
     }

-    public function removeItemAt(index:int):*
-    {
-        var item:*;
-
-        if (_content === undefined)
+    /**
+     *  Removes an item from the specified index position in the Group.
+     *
+     *  @param index The index of the item to remove.
+     *
+     *  @return The item removed from the Group.
+     *
+     *  @throws RangeError Throws if the index does not exist in the child list.
+     */
+    public function removeItemAt(index:int):Object
+    {
+        // check RangeError
+        checkForRangeError(index);
+
+        var item:Object;
+
+        if (_content === null)
             return null;

         // Need to call itemRemoved before removing the item so anyone listening
@@ -390,7 +518,7 @@
             case CONTENT_TYPE_UNKNOWN:
             {
                 item = _content;
-                _content = undefined;
+                _content = null;
                 break;
             }
         }
@@ -401,28 +529,93 @@
         return item;
     }

-    public function getItemIndex(item:*):int
-    {
-        if (_content === undefined)
-            return -1;
-
-        if (_contentType == CONTENT_TYPE_ARRAY)
-            return _content.indexOf(item);
-
-        return 0;
-    }
-
-    public function setItemIndex(item:*, index:int):void
-    {
+    /**
+     *  Returns the index position of an item
+     *
+     *  @param item The item to identify
+     *
+     *  @return The index position of the item to identify
+     *
+     *  @throws ArgumentError Throws if the item is not a child of this object
+     */
+    public function getItemIndex(item:Object):int
+    {
+        var index:int = -1;
+
+        switch (_contentType)
+        {
+            case CONTENT_TYPE_UNKNOWN:
+            {
+                if (_content == item)
+                    index = 0;
+                break;
+            }
+
+            case CONTENT_TYPE_ARRAY:
+            {
+                index = _content.indexOf(item);
+                break;
+            }
+        }
+
+        if (index == -1)
+            throw ArgumentError(item + " is not found in this Group");
+        else
+            return index;
+    }
+
+    /**
+     *  Changes the position of an existing child in the Group.
+     *
+     *
When you use the setItemIndex() method and specify an
+     *  index position that is already occupied, the only positions
+     *  that change are those in between the item's former and new position.
+     *  All others will stay the same.  If an item is moved to an index
+     *  LOWER than its current index, all items in between will INCREASE
+     *  by 1 for their index reference.  If an item is moved to an index
+     *  HIGHER than its current index, all items in between will
+     *  DECREASE by 1 for their index reference.

+     *
+     *  @param item The item for which you want to change the index number.
+     *  @param index The resulting index number for the item
+     *
+     *  @throws RangeError - Throws if the index does not exist in the child list.
+     *  @throws ArgumentError - Throws if the item parameter is not a child
+     *  of this object
+     */
+    public function setItemIndex(item:Object, index:int):void
+    {
+        // check for RangeError...this is done in addItemAt
+        // but we want to do it before removing the item
+        checkForRangeError(index);
+
         removeItem(item);
         addItemAt(item, index);
     }

-    public function swapItems(item1:*, item2:*):void
+    /**
+     *  Swaps the index of the two specified items. All other items
+     *  remain in the same index position.
+     *
+     *  @param item1 The first item.
+     *  @param item2 The second item.
+     *
+     *  @throws ArgumentError Throws if either item is not a child of this object
+     */
+    public function swapItems(item1:Object, item2:Object):void
     {
         swapItemsAt(getItemIndex(item1), getItemIndex(item2));
     }

+    /**
+     *  Swaps the items at the two specified index positions in
+     *  the Group.  All other items remain in the same index position.
+     *
+     *  @param index1 The index of the first item.
+     *  @param index2 The index of the second item.
+     *
+     *  @throws RangeError If either index does not exist in the child list
+     */
     public function swapItemsAt(index1:int, index2:int):void
     {
         // Make sure that index1 is the smaller index so that addItemAt
@@ -436,8 +629,8 @@
         else if (index1 == index2)
             return;

-        var item1:* = getItemAt(index1);
-        var item2:* = getItemAt(index2);
+        var item1:Object = getItemAt(index1);
+        var item2:Object = getItemAt(index2);

         removeItem(item1);
         removeItem(item2);
@@ -454,9 +647,9 @@
     //  is the item itself. For data items, the layout item is the item renderer
     //  instance that is associated with the item.
     //--------------------------------------------------------------------------
-     /**
-     *  The number of layout items in this Group. Typically this is the same
-     *  as the number of items in the Group.
+
+    /**
+     *  @private
      */
     override public function get numLayoutItems():int
     {
@@ -464,17 +657,13 @@
     }

     /**
-     *  Gets the nth layout item in the Group. For visual items, the
-     *  layout item is the item itself. For data items, the layout item is the
-     *  item renderer instance that is associated with the item.
-     *
-     *  @param index The index of the item to retrieve.
-     *
-     *  @return The layout item at the specified index.
-     */
+     *  @inheritDoc
+     *
+     *  @throws RangeError Throws if the index position does not exist in the child list.
+     */
     override public function getLayoutItemAt(index:int):ILayoutItem
     {
-        var item:* = getItemAt(index);
+        var item:Object = getItemAt(index);

         return LayoutItemFactory.getLayoutItemFor(item);
     }
@@ -486,19 +675,26 @@
     //
     //--------------------------------------------------------------------------

-
+    /**
+     *  @private
+     */
     override public function invalidateLayering():void
     {
-    	if(layeringMode == ITEM_ORDERED_LAYERING)
+    	if (layeringMode == ITEM_ORDERED_LAYERING)
     		layeringMode = SPARSE_LAYERING;
-    	if(needsDisplayObjectAssignment == true)
+    	if (needsDisplayObjectAssignment == true)
     		return;
     	needsDisplayObjectAssignment = true;
     	invalidateProperties();
     }

-
-    protected function itemAdded(item:*, index:int):void
+    /**
+     *  Internal Group method called to add an item to this Group.
+     *
+     *  @param item The item that was added.
+     *  @param index The index where the item was added.
+     */
+    protected function itemAdded(item:Object, index:int):void
     {
         var child:DisplayObject;

@@ -515,10 +711,12 @@
                 IStyleClient(item).regenerateStyleCache(true);
         }
         else
-        {
+        {
+            // item must be a DisplayObject
+
             // This always adds the child to the end of the display list. Any
             // ordering discrepancies will be fixed up in assignDisplayObjects().
-            child = addItemToDisplayList(item, item);
+            child = addItemToDisplayList(DisplayObject(item), item);
         }

         dispatchEvent(new ItemExistenceChangedEvent(
@@ -528,9 +726,14 @@
         invalidateDisplayList();
     }

+    /**
+     *  Internal Group method called to remove an item from this Group.
+     *
+     *  @param index The index of the item that is being removed.
+     */
     protected function itemRemoved(index:int):void
     {
-        var item:* = getItemAt(index);
+        var item:Object = getItemAt(index);
         var childDO:DisplayObject = item as DisplayObject;

         dispatchEvent(new ItemExistenceChangedEvent(
@@ -549,14 +752,23 @@
         invalidateDisplayList();
     }

-    // Returns true if the Group's display object can be shared with graphic elements
-    // inside the group
+    /**
+     *  @private
+     *
+     *  Returns true if the Group's display object can be shared with graphic elements
+     *  inside the group
+     */
     private function get canShareDisplayObject():Boolean
     {
     	return blendMode == "normal" && (layeringMode == ITEM_ORDERED_LAYERING);
     }

-   private function assignDisplayObjects():void
+    /**
+     *  @private
+     *
+     *  Called to assign display objects to graphic elements
+     */
+    private function assignDisplayObjects():void
     {
         var topLayerItems:Vector.<IVisualItem>;
         var bottomLayerItems:Vector.<IVisualItem>;
@@ -570,24 +782,24 @@
         var len:int = numItems;
         for (var i:int = 0; i < len; i++)
         {
-            var item:* = getItemAt(i);
+            var item:Object = getItemAt(i);

-        	if(layeringMode != ITEM_ORDERED_LAYERING)
+        	if (layeringMode != ITEM_ORDERED_LAYERING)
         	{
         		var layer:Number = 0;
         		if (item is IVisualItem)
         			layer = (item as IVisualItem).layer;
-        		if(layer != 0)
+        		if (layer != 0)
         		{
             		if (layer > 0)
             		{
-            			if(topLayerItems == null) topLayerItems = new Vector.<IVisualItem>();
+            			if (topLayerItems == null) topLayerItems = new Vector.<IVisualItem>();
             			topLayerItems.push(item);
             			continue;
             		}
             		else
             		{
-            			if(bottomLayerItems == null) bottomLayerItems = new Vector.<IVisualItem>();
+            			if (bottomLayerItems == null) bottomLayerItems = new Vector.<IVisualItem>();
             			bottomLayerItems.push(item);
             			continue;
             		}
@@ -595,18 +807,19 @@
          	}
 			assignDisplayObjectTo(item,mergeData);
         }
-        if(topLayerItems != null)
+        if (topLayerItems != null)
         {
         	keepLayeringEnabled = true;
         	//topLayerItems.sortOn("layer",Array.NUMERIC);
         	sortOnLayer(topLayerItems);
         	len = topLayerItems.length;
-        	for(i=0;i<len;i++)
+        	for (i=0;i<len;i++)
         	{
         		assignDisplayObjectTo(topLayerItems[i],mergeData);
         	}
         }
-        if(bottomLayerItems != null)
+
+        if (bottomLayerItems != null)
         {
         	keepLayeringEnabled = true;
 	        mergeData.currentAssignableDO  = null;
@@ -617,34 +830,36 @@
         	sortOnLayer(bottomLayerItems);
         	len = bottomLayerItems.length;

-        	for(i=0;i<len;i++)
+        	for (i=0;i<len;i++)
         	{
         		assignDisplayObjectTo(bottomLayerItems[i],mergeData);
         	}
         }
-        if(keepLayeringEnabled == false)
+
+        if (keepLayeringEnabled == false)
         	layeringMode = ITEM_ORDERED_LAYERING;
     }

     /**
-    * @private
-    * a simple insertion sort.  This works well for small lists (under 12 or so), uses
-    * no aditional memory, and most importantly, is stable, meaning items with comparable
-    * values will stay in the same order relative to each other. For layering, we guarantee
-    * first the layer property, and then the item order, so a stable sort is important (and the
-    * built in flash sort is not stable).
-    */
+     *  @private
+     *
+     *  A simple insertion sort.  This works well for small lists (under 12 or so), uses
+     *  no aditional memory, and most importantly, is stable, meaning items with comparable
+     *  values will stay in the same order relative to each other. For layering, we guarantee
+     *  first the layer property, and then the item order, so a stable sort is important (and the
+     *  built in flash sort is not stable).
+     */
 	private static function sortOnLayer(a:Vector.<IVisualItem>):void
 	{
 		var len:Number = a.length;
-		var tmp:*;
-		if(len<= 1)
+		var tmp:IVisualItem;
+		if (len<= 1)
 			return;
-		for(var i:int = 1;i<len;i++)
+		for (var i:int = 1;i<len;i++)
 		{
 			for (var j:int = i;j > 0;j--)
 			{
-				if( a[j].layer < a[j-1].layer )
+				if ( a[j].layer < a[j-1].layer )
 				{
 					tmp = a[j];
 					a[j] = a[j-1];
@@ -656,9 +871,11 @@
 		}
 	}

-    private function assignDisplayObjectTo(item:*,mergeData:GroupDisplayObjectMergeData):void
-    {
-
+    /**
+     *  @private
+     */
+    private function assignDisplayObjectTo(item:Object,mergeData:GroupDisplayObjectMergeData):void
+    {
     	if (mergeData.lastDisplayObject == this)
     		mergeData.insertIndex = 0;
     	else
@@ -709,10 +926,18 @@
         }
     }

-
-    // Helper function to remove child from other Group or display list before
-    // adding to the display list.
-    protected function addItemToDisplayList(child:DisplayObject, item:*, index:int = -1):DisplayObject
+    /**
+     *  Internal helper method to remove item from another group or display list
+     *  before adding it to this display list.
+     *
+     *  @param child DisplayObject to add to the display list
+     *  @param item Item associated with the display object to be added.  If
+     *  the item itself is a display object, it will be the same as the child parameter.
+     *  @param index Index position where the display object will be added
+     *
+     *  @return DisplayObject that was added
+     */
+    protected function addItemToDisplayList(child:DisplayObject, item:Object, index:int = -1):DisplayObject
     {
         var host:DisplayObject;

@@ -750,12 +975,13 @@
             }
             else
                 child.parent.removeChild(child);
-
         }

         return super.addChildAt(child, index != -1 ? index : super.numChildren);
     }
-
+    /**
+     *  @private
+     */
     override public function elementLayerChanged(e:IGraphicElement):void
     {
         super.elementLayerChanged(e);
@@ -765,8 +991,17 @@
         invalidateProperties();
     }

+    /**
+     *  Dictionary to keep track of mask elements.  Because mask elements can be applied
+     *  to GraphicElements, which may not be DisplayObjects, the Group needs to know this
+     *  to map GraphicElements to DisplayObjects later on since masking takes place
+     *  at the Flash Player level.
+     */
     protected var maskElements:Dictionary;

+    /**
+     *  @private
+     */
     override public function addMaskElement(mask:DisplayObject, target:IGraphicElement):void
     {
         if (!maskElements)
@@ -780,6 +1015,9 @@

     }

+    /**
+     *  @private
+     */
     override public function removeMaskElement(mask:DisplayObject, target:IGraphicElement):void
     {
         if (maskElements && mask in maskElements)
@@ -920,38 +1158,57 @@
         }
     }

-    // TODO (rfrishbe): need to figure out if we must duplicate these
-    // RTEs across DataGroup and Group.
+    /**
+     *  @private
+     */
     override public function addChild(child:DisplayObject):DisplayObject
     {
         throw(new Error("addChild is not available in Group. Use addItem instead."));
     }

+    /**
+     *  @private
+     */
     override public function addChildAt(child:DisplayObject, index:int):DisplayObject
     {
         throw(new Error("addChildAt is not available in Group. Use addItemAt instead."));
     }

+    /**
+     *  @private
+     */
     override public function removeChild(child:DisplayObject):DisplayObject
     {
         throw(new Error("removeChild is not available in Group. Use removeItem instead."));
     }

+    /**
+     *  @private
+     */
     override public function removeChildAt(index:int):DisplayObject
     {
         throw(new Error("removeChildAt is not available in Group. Use removeItemAt instead."));
     }

+    /**
+     *  @private
+     */
     override public function setChildIndex(child:DisplayObject, index:int):void
     {
         throw(new Error("setChildIndex is not available in Group. Use setItemIndex instead."));
     }

+    /**
+     *  @private
+     */
     override public function swapChildren(child1:DisplayObject, child2:DisplayObject):void
     {
         throw(new Error("swapChildren is not available in Group. Use swapItems instead."));
     }

+    /**
+     *  @private
+     */
     override public function swapChildrenAt(index1:int, index2:int):void
     {
         throw(new Error("swapChildrenAt is not available in Group. Use swapItemsAt instead."));


context3d喪失に対応.

--- src/Main.as
+++ src/Main.as
@@ -74,7 +74,6 @@

 		private function onContent3DCreate(e:Event):void
 		{
-			_stage3d.removeEventListener(Event.CONTEXT3D_CREATE, onContent3DCreate);
 			_stage3d.removeEventListener(ErrorEvent.ERROR, onContent3DCreateError);
 			_extended3dEnabled = (_profiles[0] != Context3DProfile.BASELINE);
 			Utils.Trace("Alternativa3D.version: " + Alternativa3D.version);
@@ -111,7 +110,9 @@

 			uploadResouces();
 			stage.addEventListener(Event.ENTER_FRAME, onEnterFrame);
-			stage.addEventListener(Event.RESIZE, onResize);
+			if (!stage.hasEventListener(Event.RESIZE)) {
+				stage.addEventListener(Event.RESIZE, onResize);
+			}
 		}

 		private function uploadResouces():void
@@ -123,8 +124,14 @@

 		private function onEnterFrame(e:Event):void
 		{
-			_controller.update();
-			_camera.render(_stage3d)
+			if (_stage3d.context3D == null) {
+				Utils.Trace("Context3D is lost.");
+				stage.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
+				_stage3d.requestContext3D(Context3DRenderMode.AUTO, _profiles[0]);
+			} else {
+				_controller.update();
+				_camera.render(_stage3d)
+			}
 		}

 		private function onResize(e:Event):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 22009
Author:   eday@adobe.com
Date:     2011-08-16T04:30:02.984632Z

Log Message:
-----------
Fix for SDK-30988: paging always snaps scroll position to page boundary

QE notes:
Doc notes:
Bugs: SDK-30988
Reviewer: Jason Szeto
Tests run: checkintests, Cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/mobile/scripts/ListSnappingTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Scroller.as</path>

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -580,6 +580,21 @@
     /**
      *  @private
      */
+    private var scrollRangesChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var pageScrollingChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var snappingModeChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
     private var _pullEnabled:Boolean = true;

     /**
@@ -599,7 +614,8 @@
 			return;

         _pullEnabled = value;
-        determineScrollRanges();
+        scrollRangesChanged = true;
+        invalidateProperties();
     }

     /**
@@ -624,7 +640,8 @@
 			return;

         _bounceEnabled = value;
-        determineScrollRanges();
+        scrollRangesChanged = true;
+        invalidateProperties();
     }

@@ -1190,16 +1207,14 @@
             return;

         _pageScrollingEnabled = value;
-        if (canScrollHorizontally)
-        {
-            if (canScrollVertically)
+        if (getStyle("interactionMode") == InteractionMode.TOUCH)
+        {
+            if (canScrollHorizontally && canScrollVertically)
                 throw new Error(resourceManager.getString("components", "operationSupportedForOneAxisOnly"));
-
-            currentPageScrollPosition = viewport.horizontalScrollPosition;
-        }
-        else if (canScrollVertically)
-        {
-            currentPageScrollPosition = viewport.verticalScrollPosition;
+
+            scrollRangesChanged = true;
+            pageScrollingChanged = true;
+            invalidateProperties();
         }
     }

@@ -1246,10 +1261,9 @@
             if (canScrollHorizontally && canScrollVertically)
                 throw new Error(resourceManager.getString("components", "operationSupportedForOneAxisOnly"));

-            // TODO (eday): we really should use invalidateProperties/commitProperties to manage
-            // the scroll ranges and positions
-            determineScrollRanges();
-            snapContentScrollPosition();
+            scrollRangesChanged = true;
+            snappingModeChanged = true;
+            invalidateProperties();
         }
     }

@@ -1545,12 +1559,7 @@

         // See whether the current page scroll position still needs to be initialized.
         if (pageScrollingEnabled && isNaN(currentPageScrollPosition))
-        {
-            if (canScrollHorizontally)
-                currentPageScrollPosition = viewport.horizontalScrollPosition;
-            else if (canScrollVertically)
-                currentPageScrollPosition = viewport.verticalScrollPosition;
-        }
+            determineCurrentPageScrollPosition();
     }

     /**
@@ -1720,56 +1729,96 @@
      */
     private function determineScrollRanges():void
     {
-        var viewportHeight:Number = isNaN(viewport.height) ? 0 : viewport.height;
-        var viewportWidth:Number = isNaN(viewport.width) ? 0 : viewport.width;
-
         minVerticalScrollPosition = maxVerticalScrollPosition = 0;
         minHorizontalScrollPosition = maxHorizontalScrollPosition = 0;

-        // For now, having both bounce and pull disabled puts us into a sort of
-        // "endless" scrolling mode, in which there are practically no minimum/maximum
-        // edges to bounce/pull against.
-        // TODO (eday): bounce and pull probably don't need to be controlled separately.  These
-        // should be combined into a single property.
-        if (!bounceEnabled && !pullEnabled)
-        {
-            minVerticalScrollPosition = minHorizontalScrollPosition = -Number.MAX_VALUE;
-            maxVerticalScrollPosition = maxHorizontalScrollPosition = Number.MAX_VALUE;
-        }
-        else if (scrollSnappingMode == ScrollSnappingMode.NONE)
-        {
-            maxVerticalScrollPosition = viewport.contentHeight > viewportHeight ?
-                viewport.contentHeight-viewportHeight : 0;
-            maxHorizontalScrollPosition = viewport.contentWidth > viewportWidth ?
-                viewport.contentWidth-viewportWidth : 0;
-        }
-        else
-        {
-            var layout:LayoutBase = viewportLayout;
-
-            // Nothing to do if there is no layout or no layout elements
-            if (!layout || layout.target.numElements == 0)
-                return;
-
-            // Nothing to do if the viewport dimensions have not been set yet
-            if ((canScrollHorizontally && viewportWidth == 0) || (canScrollVertically && viewportHeight == 0))
-                return;
-
-            switch (scrollSnappingMode)
+        if (viewport)
+        {
+            var viewportHeight:Number = isNaN(viewport.height) ? 0 : viewport.height;
+            var viewportWidth:Number = isNaN(viewport.width) ? 0 : viewport.width;
+
+            // For now, having both bounce and pull disabled puts us into a sort of
+            // "endless" scrolling mode, in which there are practically no minimum/maximum
+            // edges to bounce/pull against.
+            // TODO (eday): bounce and pull probably don't need to be controlled separately.  These
+            // should be combined into a single property.
+            if (!bounceEnabled && !pullEnabled)
             {
-                case ScrollSnappingMode.LEADING_EDGE:
-                    determineLeadingEdgeSnappingScrollRanges();
-                    break;
-                case ScrollSnappingMode.CENTER:
-                    determineCenterSnappingScrollRanges();
-                break;
-                case ScrollSnappingMode.TRAILING_EDGE:
-                    determineTrailingEdgeSnappingScrollRanges();
-                    break;
+                minVerticalScrollPosition = minHorizontalScrollPosition = -Number.MAX_VALUE;
+                maxVerticalScrollPosition = maxHorizontalScrollPosition = Number.MAX_VALUE;
             }
-        }
-    }
-
+            else if (scrollSnappingMode == ScrollSnappingMode.NONE)
+            {
+                var remaining:Number;
+                maxVerticalScrollPosition = viewport.contentHeight > viewportHeight ?
+                    viewport.contentHeight-viewportHeight : 0;
+                if (pageScrollingEnabled && canScrollVertically && viewportHeight != 0)
+                {
+                    // If the content height isn't an exact multiple of the viewport height,
+                    // then we make sure the max scroll position allows for a full page (including
+                    // padding) at the end.
+                    remaining = viewport.contentHeight % viewportHeight;
+                    if (remaining)
+                        maxVerticalScrollPosition += viewportHeight - remaining;
+                }
+
+                maxHorizontalScrollPosition = viewport.contentWidth > viewportWidth ?
+                    viewport.contentWidth-viewportWidth : 0;
+                if (pageScrollingEnabled && canScrollHorizontally && viewportWidth != 0)
+                {
+                    // If the content width isn't an exact multiple of the viewport width,
+                    // then we make sure the max scroll position allows for a full page (including
+                    // padding) at the end.
+                    remaining = viewport.contentWidth % viewportWidth;
+                    if (remaining)
+                        maxHorizontalScrollPosition += viewportWidth - remaining;
+                }
+            }
+            else
+            {
+                var layout:LayoutBase = viewportLayout;
+
+                // Nothing to do if there is no layout or no layout elements
+                if (!layout || layout.target.numElements == 0)
+                    return;
+
+                // Nothing to do if the viewport dimensions have not been set yet
+                if ((canScrollHorizontally && viewportWidth == 0) || (canScrollVertically && viewportHeight == 0))
+                    return;
+
+                switch (scrollSnappingMode)
+                {
+                    case ScrollSnappingMode.LEADING_EDGE:
+                        determineLeadingEdgeSnappingScrollRanges();
+                        break;
+                    case ScrollSnappingMode.CENTER:
+                        determineCenterSnappingScrollRanges();
+                        break;
+                    case ScrollSnappingMode.TRAILING_EDGE:
+                        determineTrailingEdgeSnappingScrollRanges();
+                        break;
+                }
+            }
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function determineCurrentPageScrollPosition():void
+    {
+        if (canScrollHorizontally)
+        {
+            viewport.horizontalScrollPosition = getSnappedPosition(viewport.horizontalScrollPosition,HORIZONTAL_SCROLL_POSITION);
+            currentPageScrollPosition = viewport.horizontalScrollPosition;
+        }
+        else if (canScrollVertically)
+        {
+            viewport.verticalScrollPosition = getSnappedPosition(viewport.verticalScrollPosition,VERTICAL_SCROLL_POSITION);
+            currentPageScrollPosition = viewport.verticalScrollPosition;
+        }
+    }
+
     /**
      *  @private
      */
@@ -1809,9 +1858,8 @@
                     // not due to a touch interaction or animation)
                     if (!inTouchInteraction && (!snapElementAnimation || !snapElementAnimation.isPlaying))
                     {
-                        // If snapping is enabled, we need to ensure the scroll position is always
-                        // an appropriately snapped value.
-                        if (scrollSnappingMode != ScrollSnappingMode.NONE && !settingScrollPosition)
+                        // We need to ensure the scroll position is always an appropriately snapped value.
+                        if (!settingScrollPosition)
                         {
                             settingScrollPosition = true;
                             viewport[event.property] = getSnappedPosition(Number(event.newValue), String(event.property));
@@ -2191,12 +2239,12 @@
             {
                 // Go to the next horizontal page
                 // Set the new page scroll position so the throw effect animates the page into place
-                currentPageScrollPosition = Math.min(currentPageScrollPosition + viewport.width, viewport.contentWidth - viewport.width);
+                currentPageScrollPosition = Math.min(currentPageScrollPosition + viewport.width, maxHorizontalScrollPosition);
             }
             else if (velocityX > minVelocityPixels || viewport.horizontalScrollPosition <= currentPageScrollPosition - viewport.width * pageDragDistanceThreshold)
             {
                 // Go to the previous horizontal page
-                currentPageScrollPosition = Math.max(currentPageScrollPosition - viewport.width, 0);
+                currentPageScrollPosition = Math.max(currentPageScrollPosition - viewport.width, minHorizontalScrollPosition);
             }

             // Ensure the new page position is snapped appropriately
@@ -2209,12 +2257,12 @@
             {
                 // Go to the next vertical page
                 // Set the new page scroll position so the throw effect animates the page into place
-                currentPageScrollPosition = Math.min(currentPageScrollPosition + viewport.height, viewport.contentHeight - viewport.height);
+                currentPageScrollPosition = Math.min(currentPageScrollPosition + viewport.height, maxVerticalScrollPosition);
             }
             else if (velocityY > minVelocityPixels || viewport.verticalScrollPosition <= currentPageScrollPosition - viewport.height * pageDragDistanceThreshold)
             {
                 // Go to the previous vertical page
-                currentPageScrollPosition = Math.max(currentPageScrollPosition - viewport.height, 0);
+                currentPageScrollPosition = Math.max(currentPageScrollPosition - viewport.height, minVerticalScrollPosition);
             }

             // Ensure the new page position is snapped appropriately
@@ -2304,7 +2352,37 @@
         var layout:LayoutBase = viewportLayout;
         var nearestElementIndex:int;
         var nearestElementBounds:Rectangle;
-
+
+        var viewportWidth:Number = isNaN(viewport.width) ? 0 : viewport.width;
+        var viewportHeight:Number = isNaN(viewport.height) ? 0 : viewport.height;
+
+        if (scrollSnappingMode == ScrollSnappingMode.NONE && pageScrollingEnabled)
+        {
+            // If we're in paging mode and no snapping is enabled, then we must snap
+            // the position to the beginning of a page.  i.e. a multiple of the
+            // viewport size.
+            var offset:Number;
+            if (canScrollHorizontally && propertyName == HORIZONTAL_SCROLL_POSITION && viewportWidth != 0)
+            {
+                // Get the offset into the current page.  If less than half way, snap
+                // to the beginning of the page.  Otherwise, snap to the beginning
+                // of the next page
+                offset = position % viewportWidth;
+                if (offset < viewportWidth / 2)
+                    position -= offset;
+                else
+                    position += viewportWidth - offset;
+            }
+            else if (canScrollVertically && propertyName == VERTICAL_SCROLL_POSITION && viewportHeight != 0)
+            {
+                offset = position % viewportHeight;
+                if (offset < viewportHeight / 2)
+                    position -= offset;
+                else
+                    position += viewportHeight - offset;
+            }
+        }
+
         if (layout && layout.target.numElements > 0)
         {
             switch (_scrollSnappingMode)
@@ -2326,29 +2404,29 @@
                 case ScrollSnappingMode.CENTER:
                     if (canScrollHorizontally && propertyName == HORIZONTAL_SCROLL_POSITION)
                     {
-                        nearestElementIndex = layout.getElementNearestScrollPosition(new Point(position + viewport.width/2, 0), "center");
+                        nearestElementIndex = layout.getElementNearestScrollPosition(new Point(position + viewportWidth/2, 0), "center");
                         nearestElementBounds = layout.getElementBounds(nearestElementIndex);
-                        position = nearestElementBounds.left + (nearestElementBounds.width / 2) - (viewport.width / 2);
+                        position = nearestElementBounds.left + (nearestElementBounds.width / 2) - (viewportWidth / 2);
                     }
                     else if (canScrollVertically && propertyName == VERTICAL_SCROLL_POSITION)
                     {
-                        nearestElementIndex = layout.getElementNearestScrollPosition(new Point(0, position + viewport.height/2), "center");
+                        nearestElementIndex = layout.getElementNearestScrollPosition(new Point(0, position + viewportHeight/2), "center");
                         nearestElementBounds = layout.getElementBounds(nearestElementIndex);
-                        position = nearestElementBounds.top + (nearestElementBounds.height / 2) - (viewport.height / 2);
+                        position = nearestElementBounds.top + (nearestElementBounds.height / 2) - (viewportHeight / 2);
                     }
                     break;
                 case ScrollSnappingMode.TRAILING_EDGE:
                     if (canScrollHorizontally && propertyName == HORIZONTAL_SCROLL_POSITION)
                     {
-                        nearestElementIndex = layout.getElementNearestScrollPosition(new Point(position + viewport.width, 0), "bottomRight");
+                        nearestElementIndex = layout.getElementNearestScrollPosition(new Point(position + viewportWidth, 0), "bottomRight");
                         nearestElementBounds = layout.getElementBounds(nearestElementIndex);
-                        position = nearestElementBounds.right - viewport.width;
+                        position = nearestElementBounds.right - viewportWidth;
                     }
                     else if (canScrollVertically && propertyName == VERTICAL_SCROLL_POSITION)
                     {
-                        nearestElementIndex = layout.getElementNearestScrollPosition(new Point(0, position + viewport.height), "bottomRight");
+                        nearestElementIndex = layout.getElementNearestScrollPosition(new Point(0, position + viewportHeight), "bottomRight");
                         nearestElementBounds = layout.getElementBounds(nearestElementIndex);
-                        position = nearestElementBounds.bottom - viewport.height;
+                        position = nearestElementBounds.bottom - viewportHeight;
                     }
                     break;
             }
@@ -2551,6 +2629,32 @@
             verticalScrollBar.viewport = null;
         else if (instance == horizontalScrollBar)
             horizontalScrollBar.viewport = null;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (scrollRangesChanged)
+        {
+            determineScrollRanges();
+            scrollRangesChanged = false;
+        }
+
+        if (pageScrollingChanged)
+        {
+            determineCurrentPageScrollPosition();
+            pageScrollingChanged = false;
+        }
+
+        if (snappingModeChanged)
+        {
+            snapContentScrollPosition();
+            snappingModeChanged = false;
+        }
     }

     //--------------------------------------------------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 20020
Author:   klin@adobe.com
Date:     2011-01-31T21:20:57.777154Z

Log Message:
-----------
Add mx_internal virtualLayoutSupported to layouts. By default, this flag is set to true. In BasicLayout, it is set to false. List checks this flag to prevent setting "useVirtualLayout" when the layout does not support virtualization. Fixes runtime error issues for tools.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/BasicLayout.as
+++ frameworks/projects/spark/src/spark/layouts/BasicLayout.as
@@ -14,11 +14,14 @@

 import mx.core.ILayoutElement;
 import mx.core.IVisualElement;
+import mx.core.mx_internal;
 import mx.resources.ResourceManager;

 import spark.components.supportClasses.GroupBase;
 import spark.layouts.supportClasses.LayoutBase;
 import spark.layouts.supportClasses.LayoutElementHelper;
+
+use namespace mx_internal;

 [ResourceBundle("layout")]

@@ -191,6 +194,20 @@
     {
         super();
     }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override mx_internal function get virtualLayoutSupported():Boolean
+    {
+        return false;
+    }

     //--------------------------------------------------------------------------
     //


fix bugs in xmldiffer

fix bugs in xmldiffer

--- mustella/as3/src/mustella/CompareBitmap.as
+++ mustella/as3/src/mustella/CompareBitmap.as
@@ -1396,12 +1396,16 @@
         var retval:Boolean = false;
         var q:String;
         var i:int;
+        var j:int;
         var n:int;
         var m:int;
         var st:String;
         var tt:String;
         var sv:String;
         var tv:String;
+
+        if (s.toXMLString() == t.toXMLString())
+            return false;

         // compare tag names
         var sn:String = s.name().toString();
@@ -1453,7 +1457,7 @@
                 else
                 {
                     sv = s['@' + st].toString();
-                    tv = s['@' + tt].toString();
+                    tv = t['@' + tt].toString();
                     if (sv != tv)
                     {
                         if (xywidthheight[st] == 1)
@@ -1473,11 +1477,11 @@
                             tv = tv.substring(1, tv.length - 2);
                             sparts = sv.split(",");
                             tparts = tv.split(",");
-                            n = sparts.length;
-                            for (i = 0; i < n; i++)
+                            m = sparts.length;
+                            for (j = 0; j < m; j++)
                             {
-                                sv = sparts[i];
-                                tv = tparts[i];
+                                sv = sparts[j];
+                                tv = tparts[j];
                                 sv = sv.split("=")[1];
                                 tv = tv.split("=")[1];
                                 sf = Number(sv);
@@ -1512,8 +1516,20 @@
         {
             for (i = 0; i < n; i++)
             {
-                if (compareNodes(sl[i], tl[i]))
-                    retval = true;
+                var nk:String = sl[i].nodeKind();
+                if (nk == "text")
+                {
+                    if (sl[i].text() != tl[i].text())
+                    {
+                        trace(sn, "different number of text nodes: cur=", sl[i].text(), "xml=", tl[i].text());
+                        retval = true;
+                    }
+                }
+                else if (nk == "element")
+                {
+                    if (compareNodes(sl[i], tl[i]))
+                        retval = true;
+                }
             }
         }
         return retval;


revision

revision

--- as/form/frame2.as
+++ as/form/frame2.as
@@ -1,8 +1,5 @@
-#include "includes/idiomes.as"
-//Segonquart Studio 2007. Steal it with respect , honey ;-)
-//-------------------------------
-//Imports
-//-------------------------------
+#include "includes/idiomes.as"
+
 import System.Objects.*;
 import flash.filters.GlowFilter;
 import mx.transitions.easing.*;
@@ -11,10 +8,8 @@
 //-------------------------------
 ZigoEngine.simpleSetup (Shortcuts, PennerEasing);
 ZigoEngine.register (PennerEasing, Shortcuts, FuseFMP, FuseItem);
-Stage.scaleMode = "noScale";
-//-------------------------------
-//Variables
-//-------------------------------
+
+
 var m03:MovieClip;
 var o3:MovieClip;
 var cp:TextField;
@@ -24,7 +19,6 @@
 var cp:MovieClip;
 /*Button */
 var ok_mc:MovieClip;
-
 var gf:GlowFilter = new GlowFilter (0xBEE47E, 100, 3, 3, 5, 3, false, false);

@@ -43,6 +37,8 @@
 	this.ok_mc._scale = 20;
 	this.ok_mc.scaleTo (25, 1, "easeInOutBounce");
 }
+
+

 function transformElementsUI ():Void{


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

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

--- frameworks/projects/framework/src/mx/effects/easing/Elastic.as
+++ frameworks/projects/framework/src/mx/effects/easing/Elastic.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.effects.easing
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3672
Author:   clucier@adobe.com
Date:     2008-10-15T23:54:51.581066Z

Log Message:
-----------
Removing the commonly used getUnqualifiedClassName out of the less commonly used utility class to reduce SWF size for the general case.
Reviewer: Gordon
QE: No

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/framework/src/mx/utils/OrderedObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/NameUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -81,7 +81,6 @@
 import mx.managers.systemClasses.PlaceholderData;
 import mx.utils.EventUtil;
 import mx.utils.NameUtil;
-import mx.utils.ObjectUtil;
 import mx.utils.SecurityUtil;
 import mx.events.ResizeEvent;


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

--- frameworks/projects/mx/src/mx/accessibility/ListBaseAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/ListBaseAccImpl.as
@@ -26,6 +26,11 @@
 /**
  *  ListBaseAccImpl is a subclass of AccessibilityImplementation
  *  which implements accessibility for the ListBase class.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ListBaseAccImpl extends AccImpl
 {
@@ -91,6 +96,11 @@
 	 *  Afterwards, when instances of ListBase are initialized,
 	 *  their accessibilityImplementation property
 	 *  will be set to an instance of this class.

+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function enableAccessibility():void
 	{
@@ -122,6 +132,11 @@
 	 *
 	 *  @param master The UIComponent instance that this AccImpl instance
 	 *  is making accessible.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function ListBaseAccImpl(master:UIComponent)
 	{


Pass the filename to the parser, make the default the empty string

--- axscript/mscom.as
+++ axscript/mscom.as
@@ -222,12 +222,12 @@

     import flash.utils.*; // for our ByteArray clone - either it should die, or we rename the package in our clone!

-    public function compileString(str, fname:String = null, startLineNumber:int = 0): ByteArray
+    public function compileString(str, fname:String = "", startLineNumber:int = 0): ByteArray
     {
         import Parse.*;
         import Lex.*;
         var top = []
-        var parser = new Parse.Parser(str,top);
+        var parser = new Parse.Parser(str,top,fname);
         parser.scan.lnCoord += startLineNumber;
         var prog = parser.program();
         var ts = prog[0]


Fixed bug where initial Ignore caused failure due to test time information computation

--- FlexUnit4CIListener/src/org/flexunit/listeners/CIListener.as
+++ FlexUnit4CIListener/src/org/flexunit/listeners/CIListener.as
@@ -177,7 +177,7 @@
 			var descriptor:Descriptor = getDescriptorFromDescription(description);

 			var xml:String =
-				"<testcase classname=\""+descriptor.suite+"\" name=\""+descriptor.method+"\" time=\"0\" status=\""+IGNORE+"\">"
+				"<testcase classname=\""+descriptor.suite+"\" name=\""+descriptor.method+"\" time=\"" + lastTestTime  + "\" status=\""+IGNORE+"\">"
 				+ "<skipped />"
 				+ "</testcase>";


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

--- frameworks/projects/framework/src/mx/effects/effectClasses/FadeInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/FadeInstance.as
@@ -41,6 +41,11 @@
  *
  *  @see mx.effects.Fade
  *  @see mx.events.TweenEvent
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class FadeInstance extends TweenEffectInstance
 {
@@ -56,6 +61,11 @@
 	 *  Constructor.
 	 *
 	 *  @param target The Object to animate with this effect.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function FadeInstance(target:Object)
 	{
@@ -92,6 +102,11 @@
 	/**
 	 *  Initial transparency level between 0.0 and 1.0,
 	 *  where 0.0 means transparent and 1.0 means fully opaque.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var alphaFrom:Number;

@@ -102,6 +117,11 @@
 	/**
 	 *  Final transparency level between 0.0 and 1.0,
 	 *  where 0.0 means transparent and 1.0 means fully opaque.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var alphaTo:Number;


Transferred from the Adobe Open Source Subversion Repository

Revision: 20277
Author:   chiedozi@adobe.com
Date:     2011-02-10T19:23:03.642013Z

Log Message:
-----------
Added a null check in ViewNavigator to prevent an RTE

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

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -385,17 +385,20 @@

             // If the view is already initialized, that means it was cached.  We can complete the
             // activation process if the view hasn't been invalidated in any way.
-            if (activeView.initialized &&
-                !activeView.invalidatePropertiesFlag &&
-                !activeView.invalidateSizeFlag &&
-                !activeView.invalidateDisplayListFlag)
+            if (activeView)
             {
-                completeViewCommitProcess();
-            }
-            else
-            {
-                // Wait until the view validates before activating it
-                activeView.addEventListener(FlexEvent.UPDATE_COMPLETE, completeViewCommitProcess);
+                if (activeView.initialized &&
+                    !activeView.invalidatePropertiesFlag &&
+                    !activeView.invalidateSizeFlag &&
+                    !activeView.invalidateDisplayListFlag)
+                {
+                    completeViewCommitProcess();
+                }
+                else
+                {
+                    // Wait until the view validates before activating it
+                    activeView.addEventListener(FlexEvent.UPDATE_COMPLETE, completeViewCommitProcess);
+                }
             }

             // Need to force a validation on the actionBar


Transferred from the Adobe Open Source Subversion Repository

Revision: 20097
Author:   jasonsj@adobe.com
Date:     2011-02-03T17:48:25.773740Z

Log Message:
-----------
Remove use of minWidth and minHeight where possible from mobile skins to fix constraint use cases. Replace usage of minWidth/minHeight and layoutMeasuredWidth/layoutMeasuredHeight with MobileSkin property measuredDefaultWidth/measuredDefaultHeight.

Use minWidth/minHeight for skins that do not scale down: Beveled buttons, CheckBox, RadioButton, and scroll bars.

Doc notes:
Bugs:
SDK-28715 Cannot size and position button correctly in i4 build.
Reviewer: egeorgie
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarFirstButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarMiddleButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TabbedViewNavigatorTabBarTabSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarLastButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ImageSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as
@@ -77,7 +77,7 @@
             }
             default:
             {
-                // default PPI160
+                // default DPI_160
                 trackWidth = 300;
                 trackHeight = 10;


Transferred from the Adobe Open Source Subversion Repository

Revision: 21755
Author:   betravis@adobe.com
Date:     2011-08-01T18:25:08.599842Z

Log Message:
-----------
Updates to ToggleSwitch, fixing layout bugs and visual appearance tweaks

QE notes: None
Doc notes: None
Bugs:
SDK-30929 - thumb looks incorrect when ToggleSwitch initialized with selected=true
SDK-30870 - changing width on a certain state messes up ToggleSwitch skin
SDK-30854 - click doesn't trigger selection change in Android devices
SDK-30853 - label appears initially truncated when layout is specified in View
Reviewer: Kevin Lin
Tests run: checkintests, mustella
Is noteworthy for integration: Yes, update to ToggleSwitch and ToggleSwitchSkin

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
@@ -19,6 +19,7 @@

 import mx.core.DPIClassification;
 import mx.core.IVisualElement;
+import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.utils.ColorUtil;

@@ -184,16 +185,40 @@
     protected var layoutTextShadowOffset:Number;

     /**
-     *  The label and its shadow for the selected side of the component
-     */
-    private var selectedLabel:StyleableTextField;
-    private var selectedLabelShadow:StyleableTextField;
-
-    /**
-     *  The label and its shadow for the unselected side of the component
-     */
-    private var unselectedLabel:StyleableTextField;
-    private var unselectedLabelShadow:StyleableTextField;
+     *  The label for the selected side of the component
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public var selectedLabelDisplay:StyleableTextField;
+
+    /**
+     *  The label's shadow for the unselected side of the component
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public var selectedLabelDisplayShadow:StyleableTextField;
+
+    /**
+     *  The label for the unselected side of the component
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public var unselectedLabelDisplay:StyleableTextField;
+
+    /**
+     *  The label's shadow for the unselected side of the component
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public var unselectedLabelDisplayShadow:StyleableTextField;

     /**
      *  The content clipped by the track that slides to match the thumb's
@@ -392,9 +417,9 @@
             layoutOuterStrokeWeight + (calculatedContentHeight - layoutThumbHeight) / 2);

         layoutTrack(calculatedContentWidth, layoutThumbHeight);
-        // Sliding content must be positioned after the track has been sized
+        layoutThumb(calculatedContentWidth, layoutThumbHeight);
+        // Sliding content must be positioned after the track & thumb have been sized
         layoutSlidingContent(calculatedContentWidth, layoutThumbHeight);
-        layoutThumb(calculatedContentWidth, layoutThumbHeight);
         layoutMask(calculatedContentWidth, layoutThumbHeight);
     }

@@ -403,19 +428,21 @@
      */
     override protected function measure():void
     {
-        if (selectedLabel.isTruncated || unselectedLabel.isTruncated)
+        if (selectedLabelDisplay.isTruncated || unselectedLabelDisplay.isTruncated)
         {
-            selectedLabel.text = selectedLabelText;
-            unselectedLabel.text = unselectedLabelText;
+            selectedLabelDisplay.text = selectedLabelText;
+            unselectedLabelDisplay.text = unselectedLabelText;
         }
+        selectedLabelDisplay.commitStyles();
+        unselectedLabelDisplay.commitStyles();

         // The skin must be at least as large as the thumb + outer stroke
         measuredMinWidth = layoutThumbWidth + 2 * layoutOuterStrokeWeight;
         measuredMinHeight = layoutThumbWidth + 2 * layoutOuterStrokeWeight;

         // The preferred size will display all label text
-        var labelWidth:Number = Math.max(getElementPreferredWidth(selectedLabel),
-            getElementPreferredWidth(unselectedLabel));
+        var labelWidth:Number = Math.max(getElementPreferredWidth(selectedLabelDisplay),
+            getElementPreferredWidth(unselectedLabelDisplay));

         measuredWidth = layoutThumbWidth + labelWidth + layoutInnerPadding +
             layoutOuterPadding + 2 * layoutOuterStrokeWeight;
@@ -430,14 +457,14 @@
         if (currentState && currentState.indexOf("disabled") >= 0)
         {
             alpha = 0.5;
-            selectedLabelShadow.visible = false;
-            unselectedLabelShadow.visible = false;
+            selectedLabelDisplayShadow.visible = false;
+            unselectedLabelDisplayShadow.visible = false;
         }
         else
         {
             alpha = 1.0;
-            selectedLabelShadow.visible = true;
-            unselectedLabelShadow.visible = true;
+            selectedLabelDisplayShadow.visible = true;
+            unselectedLabelDisplayShadow.visible = true;
         }
     }

@@ -461,27 +488,27 @@
         slidingContentForeground = new SpriteVisualElement();
         contents.addChild(slidingContentForeground);

-        selectedLabelShadow = StyleableTextField(createInFontContext(StyleableTextField));
-        selectedLabelShadow.styleName = this;
-        selectedLabelShadow.colorName = "textShadowColor";
-        selectedLabelShadow.text = selectedLabelText;
-        slidingContentForeground.addChild(selectedLabelShadow);
-
-        selectedLabel = StyleableTextField(createInFontContext(StyleableTextField));
-        selectedLabel.styleName = this;
-        selectedLabel.text = selectedLabelText;
-        slidingContentForeground.addChild(selectedLabel);
-
-        unselectedLabelShadow = StyleableTextField(createInFontContext(StyleableTextField));
-        unselectedLabelShadow.styleName = this;
-        unselectedLabelShadow.colorName = "textShadowColor";
-        unselectedLabelShadow.text = unselectedLabelText;
-        slidingContentForeground.addChild(unselectedLabelShadow);
-
-        unselectedLabel = StyleableTextField(createInFontContext(StyleableTextField));
-        unselectedLabel.styleName = this;
-        unselectedLabel.text = unselectedLabelText;
-        slidingContentForeground.addChild(unselectedLabel);
+        selectedLabelDisplayShadow = StyleableTextField(createInFontContext(StyleableTextField));
+        selectedLabelDisplayShadow.styleName = this;
+        selectedLabelDisplayShadow.colorName = "textShadowColor";
+        selectedLabelDisplayShadow.text = selectedLabelText;
+        slidingContentForeground.addChild(selectedLabelDisplayShadow);
+
+        selectedLabelDisplay = StyleableTextField(createInFontContext(StyleableTextField));
+        selectedLabelDisplay.styleName = this;
+        selectedLabelDisplay.text = selectedLabelText;
+        slidingContentForeground.addChild(selectedLabelDisplay);
+
+        unselectedLabelDisplayShadow = StyleableTextField(createInFontContext(StyleableTextField));
+        unselectedLabelDisplayShadow.styleName = this;
+        unselectedLabelDisplayShadow.colorName = "textShadowColor";
+        unselectedLabelDisplayShadow.text = unselectedLabelText;
+        slidingContentForeground.addChild(unselectedLabelDisplayShadow);
+
+        unselectedLabelDisplay = StyleableTextField(createInFontContext(StyleableTextField));
+        unselectedLabelDisplay.styleName = this;
+        unselectedLabelDisplay.text = unselectedLabelText;
+        slidingContentForeground.addChild(unselectedLabelDisplay);

         // Track
         track = new SpriteVisualElement();
@@ -502,6 +529,23 @@
         contents.addChild(contentMask);
     }

+    /**
+     *  @private
+     */
+    override public function styleChanged(styleProp:String):void
+    {
+        super.styleChanged(styleProp);
+        // Because their parent is not an ISimpleStyleClient, we need to update
+        // these manually.
+        var labels:Array = [ selectedLabelDisplay, selectedLabelDisplayShadow,
+            unselectedLabelDisplay, unselectedLabelDisplayShadow ];
+        for each (var textField:StyleableTextField in labels)
+        {
+            if (textField)
+                textField.styleChanged(styleProp);
+        }
+    }
+
     //----------------------------------------------------------------------------------------------
     //
     //  Methods
@@ -540,12 +584,12 @@
     {
         var visibleTrackArea:Number = skinWidth - layoutThumbWidth;

-        layoutLabels(selectedLabel, selectedLabelShadow, (-visibleTrackArea + layoutOuterPadding), 0,
+        layoutLabels(selectedLabelDisplay, selectedLabelDisplayShadow, (-visibleTrackArea + layoutOuterPadding), 0,
             (visibleTrackArea - layoutInnerPadding - layoutOuterPadding), layoutThumbHeight,
-            layoutTextShadowOffset);
-        layoutLabels(unselectedLabel, unselectedLabelShadow, (layoutThumbWidth + layoutInnerPadding), 0,
+            layoutTextShadowOffset, selectedLabelText);
+        layoutLabels(unselectedLabelDisplay, unselectedLabelDisplayShadow, (layoutThumbWidth + layoutInnerPadding), 0,
             (visibleTrackArea - layoutInnerPadding - layoutOuterPadding), layoutThumbHeight,
-            layoutTextShadowOffset);
+            layoutTextShadowOffset, unselectedLabelText);

         setElementSize(slidingContentOverlay, skinWidth, layoutThumbHeight);
         setElementPosition(slidingContentOverlay, 0, (skinHeight - layoutThumbHeight) / 2);
@@ -558,8 +602,13 @@
      */
     private function layoutLabels(label:StyleableTextField, labelShadow:StyleableTextField,
                                   x:Number, y:Number, width:Number, height:Number,
-                                  shadowYOffset:Number):void
-    {
+                                  shadowYOffset:Number, labelText:String):void
+    {
+        if (label.isTruncated) {
+            label.text = labelText;
+            labelShadow.text = labelText;
+        }
+
         var textWidth:Number = getElementPreferredWidth(label);
         var textHeight:Number = getElementPreferredHeight(label);

@@ -567,6 +616,9 @@
         var labelHeight:Number = textHeight;

         labelShadow.alpha = getStyle("textShadowAlpha");
+
+        label.commitStyles();
+        labelShadow.commitStyles();

         setElementSize(label, labelWidth, labelHeight);
         setElementSize(labelShadow, labelWidth, labelHeight);


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

--- frameworks/projects/mx/src/mx/controls/scrollClasses/ScrollBarDirection.as
+++ frameworks/projects/mx/src/mx/controls/scrollClasses/ScrollBarDirection.as
@@ -19,6 +19,11 @@
  *  @see mx.controls.scrollClasses.ScrollBar
  *  @see mx.controls.HScrollBar
  *  @see mx.controls.VScrollBar
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public final class ScrollBarDirection
 {
@@ -32,11 +37,21 @@

 	/**
 	 *  Specifies that a ScrollBar control is for horizontal scrolling.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const HORIZONTAL:String = "horizontal";

 	/**
 	 *  Specifies that a ScrollBar control is for vertical scrolling.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const VERTICAL:String = "vertical";
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12380
Author:   smgilson@adobe.com
Date:     2009-12-02T18:37:15.838623Z

Log Message:
-----------
ASDoc edits in preparation for localization

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DisplayLayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListItemDragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
@@ -68,7 +68,7 @@
  *  Dispatched when the thumb is pressed and then moved by the mouse.
  *  This event is always preceded by a thumbPress event.
  *
- *  @eventType spark.events.TrackBaseEvent
+ *  @eventType spark.events.TrackBaseEvent.THUMB_DRAG
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -81,7 +81,7 @@
  *  Dispatched when the thumb is pressed, meaning
  *  the user presses the mouse button over the thumb.
  *
- *  @eventType mx.events.SliderEvent
+ *  @eventType spark.events.TrackBaseEvent.THUMB_PRESS
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -95,7 +95,7 @@
  *  meaning the user releases the mouse button after
  *  a thumbPress event.
  *
- *  @eventType mx.events.SliderEvent
+ *  @eventType spark.events.TrackBaseEvent.THUMB_RELEASE
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -165,7 +165,7 @@
  *  <s:TrackBase
  *    Styles
  *    slideDuration="300"
- *
+ *
  *    Events
  *    change="No default"
  *    changing="No default"
@@ -485,13 +485,13 @@
     private var clickOffset:Point;

     /**
-     *  Sets the bounds of skin parts - typically the thumb - whose geometry isn't fully
+     *  Sets the bounds of skin parts, typically the thumb, whose geometry isn't fully
      *  specified by the skin's layout.
      *
      *
Most subclasses override this method to update the thumb's size, position, and
      *  visibility, based on the minimum, maximum, and value properties.

      *
-     *
Does nothing by default.

+     *
By default, this method does nothing.

      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -528,6 +528,7 @@
     }

     /**
+     *  @private
      *  Handles the mouseWheel event when the component is in focus. The thumb is
      *  moved by the amount of the mouse event delta multiplied by the stepSize.
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 3509
Author:   jimurphy@adobe.com
Date:     2008-10-07T18:19:17.646255Z

Log Message:
-----------
Rename of flex -> mx.

For compatibility reasons it was decided that the new functionality remain integrated with the old framework, although we will continue to build two separate SWCs, one with primarily existing framework classes, and one with new Flex 4 classes. This change removes duplicate names from the Flex 4 framework to avoid class name overlapping with the old framework code.  The naming overlap consists of two major areas:  New Components, and New Effects

Modified Paths:
--------------
386 paths were modified

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
@@ -9,12 +9,13 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package flex.component
+package mx.components.baseClasses
 {

 import flash.events.Event;
 import flash.events.MouseEvent;
 import flash.geom.Point;
+import mx.components.FxButton;

 /**
  *  Dispatched when the value of the control changes
@@ -36,13 +37,13 @@
  *  track. TrackBase also provides the code for
  *  thumb dragging which is shared by Slider and ScrollBar.
  *
- *  @see flex.component.Range
- *  @see flex.component.Slider
- *  @see flex.component.ScrollBar
+ *  @see mx.components.Range
+ *  @see mx.components.Slider
+ *  @see mx.components.ScrollBar
  */
-public class TrackBase extends Range
+public class FxTrackBase extends FxRange
 {
-    include "../core/Version.as";
+    include "../../core/Version.as";

     //--------------------------------------------------------------------------
     //
@@ -53,7 +54,7 @@
     /**
      *  Constructor.
      */
-    public function TrackBase():void
+    public function FxTrackBase():void
     {
         super();
     }
@@ -74,7 +75,7 @@
      *  will automatically update the position of the thumb
      *  with respect to the track.
      */
-    public var thumb:Button;
+    public var thumb:FxButton;

     [SkinPart]

@@ -83,7 +84,7 @@
      *  that, when  pressed, will set the value
      *  to the value corresponding with that position.
      */
-    public var track:Button;
+    public var track:FxButton;

     //--------------------------------------------------------------------------


Update PopUpInfoUtil#popUpFieldInfosToXML() to include pop-up field format.

--- src/com/esri/builder/views/supportClasses/PopUpInfoUtil.as
+++ src/com/esri/builder/views/supportClasses/PopUpInfoUtil.as
@@ -156,11 +156,30 @@
             {
                 fieldXML.@visible = popUpFieldInfo.visible;
             }
+            if (popUpFieldInfo.format)
+            {
+                fieldXML.appendChild(popUpFieldFormatToXML(popUpFieldInfo.format));
+            }

             fieldsXML.appendChild(fieldXML);
         }

         return fieldsXML;
+    }
+
+    private static function popUpFieldFormatToXML(format:PopUpFieldFormat):XML
+    {
+        var formatXML:XML = <format precision={format.precision}
+                usethousandsseparator={format.useThousandsSeparator}
+                useutc={format.useUTC}/>;
+
+        var dateFormat:String = format.dateFormat;
+        if (dateFormat)
+        {
+            formatXML.@dateformat = dateFormat;
+        }
+
+        return formatXML;
     }

     public static function popUpFieldInfosFromFields(fields:Array):Array


clean up event listeners

clean up event listeners

--- skinnable-popup-fx/src/main/actionscript/net/riastar/components/Toaster.as
+++ skinnable-popup-fx/src/main/actionscript/net/riastar/components/Toaster.as
@@ -208,5 +208,25 @@
         messages.length ? open() : close();
     }

+
+    /* ------------------- */
+    /* --- destruction --- */
+    /* ------------------- */
+
+    override protected function partRemoved(partName:String, instance:Object):void {
+        switch (instance) {
+            case messageList:
+                messageList.dataGroup.removeEventListener(RendererExistenceEvent.RENDERER_ADD, handleItemRendererAdded);
+                messageList.removeEventListener(IndexChangeEvent.CHANGE, handleMessageSelection);
+                messageList.removeEventListener(ResizeEvent.RESIZE, handleListResize);
+                break;
+            case rendererDestructionEffect:
+                rendererDestructionEffect.removeEventListener(EffectEvent.EFFECT_END, handleDestructionEffectEnd);
+                break;
+        }
+
+        super.partRemoved(partName, instance);
+    }
+
 }
 }