Transferred from the Adobe Open Source Subversion Repository

Revision: 807
Author:   mhorn@adobe.com
Date:     2008-03-13T20:42:31.384362Z

Log Message:
-----------
Many minor ASDoc updates.

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/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.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/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>

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

--- frameworks/projects/mx/src/mx/controls/List.as
+++ frameworks/projects/mx/src/mx/controls/List.as
@@ -332,10 +332,10 @@
     private var actualRowIndex:int;
     private var actualColIndex:int = 0;

-	/**
-	 *  cache of measuring objects by factory
-	 */
-	protected var measuringObjects:Dictionary;
+    /**
+     *  cache of measuring objects by factory
+     */
+    protected var measuringObjects:Dictionary;

     //--------------------------------------------------------------------------
     //
@@ -353,15 +353,15 @@
      */
     override public function get baselinePosition():Number
     {
-    	if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
-    	{
-       		if (listItems.length && listItems[0].length)
-            	return borderMetrics.top + cachedPaddingTop + listItems[0][0].baselinePosition;
-
-        	return NaN;
-		}
-
-		return super.baselinePosition;
+        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
+        {
+            if (listItems.length && listItems[0].length)
+                return borderMetrics.top + cachedPaddingTop + listItems[0][0].baselinePosition;
+
+            return NaN;
+        }
+
+        return super.baselinePosition;
     }

     //----------------------------------
@@ -816,16 +816,16 @@
         var rowCount:int = listItems.length;
         if (rowCount == 0) return;

-		// ignore nonvisible rows off the top
-		var yy:Number;
-		var i:int;
-		var n:int = listItems.length;
+        // ignore nonvisible rows off the top
+        var yy:Number;
+        var i:int;
+        var n:int = listItems.length;
         // if there is more than one row and it is a partial row we dont count it
         while (rowCount > 1 && rowInfo[n - 1].y + rowInfo[n-1].height > listContent.height - listContent.bottomOffset)
-		{
+        {
             rowCount--;
-			n--;
-		}
+            n--;
+        }

         // offset, when added to rowCount, is the index of the dataProvider
         // item for that row.  IOW, row 10 in listItems is showing dataProvider
@@ -855,18 +855,18 @@
                 return;
         }

-		if (listContent.topOffset)
-		{
-			yy = Math.abs(listContent.topOffset);
-			i = 0;
-			while (rowInfo[i].y + rowInfo[i].height <= yy)
-			{
-				rowCount--;
-				i++;
-				if (i == rowCount)
-					break;
-			}
-		}
+        if (listContent.topOffset)
+        {
+            yy = Math.abs(listContent.topOffset);
+            i = 0;
+            while (rowInfo[i].y + rowInfo[i].height <= yy)
+            {
+                rowCount--;
+                i++;
+                if (i == rowCount)
+                    break;
+            }
+        }

         var colCount:int = listItems[0].length;
         var oldHorizontalScrollBar:Object = horizontalScrollBar;
@@ -903,12 +903,12 @@

         var paddingTop:Number = getStyle("paddingTop");
         var paddingBottom:Number = getStyle("paddingBottom");
-		var paddingLeft:Number = getStyle("paddingLeft");
-		var paddingRight:Number = getStyle("paddingRight");
+        var paddingLeft:Number = getStyle("paddingLeft");
+        var paddingRight:Number = getStyle("paddingRight");

         h = rowInfo[rowCount - 1].y + rowInfo[rowCount - 1].height;
         h = listContent.heightExcludingOffsets - listContent.topOffset - h;
-
+
         // back up one
         var numRows:int = 0;
         try
@@ -961,8 +961,8 @@
                 data = iterator.current;
                 setupRendererFromData(item, data);
                 ch = variableRowHeight ?
-                	item.getExplicitOrMeasuredHeight() + paddingBottom + paddingTop :
-                	rowHeight;
+                    item.getExplicitOrMeasuredHeight() + paddingBottom + paddingTop :
+                    rowHeight;
             }

             h -= ch;
@@ -1004,9 +1004,9 @@

         setRowCount(listItems.length);

-		// if this code doesn't execute because editing is prevented while
-		// an effect is running, the editor should appear after the effect
-		// finishes
+        // if this code doesn't execute because editing is prevented while
+        // an effect is running, the editor should appear after the effect
+        // finishes
         if (bEditedItemPositionChanged && !editingTemporarilyPrevented(_proposedEditedItemPosition))
         {
             bEditedItemPositionChanged = false;
@@ -1023,31 +1023,31 @@
     override protected function adjustListContent(unscaledWidth:Number = -1,
                                        unscaledHeight:Number = -1):void
     {
-    	// Can't currently call this without valid parameters...
-
-		var lcx:Number = viewMetrics.left + Math.max(listContent.leftOffset, 0);
-		var lcy:Number = viewMetrics.top + listContent.topOffset;
+        // Can't currently call this without valid parameters...
+
+        var lcx:Number = viewMetrics.left + Math.max(listContent.leftOffset, 0);
+        var lcy:Number = viewMetrics.top + listContent.topOffset;
         listContent.move(lcx, lcy);

-		var ww:Number = Math.max(0, listContent.rightOffset) - lcx - viewMetrics.right;
-		var hh:Number = Math.max(0, listContent.bottomOffset) - lcy - viewMetrics.bottom;
-		var scrollableWidth:Number = unscaledWidth + ww;
-
-		// if they want the scrollbar, we don't know how much to scroll, without rendering
-		// everything (on and/or off-screen).  Since this could be expensive, we use a heuristic:
-		// if maxHorizontalScrollPosition is specified, we let them scroll that much.  If it's not
-		// specified, we double the amount of viewable space and let them scroll that much.  This is
-		// just a heuristic and may not work perfectly for really long content or short content.
-		if (horizontalScrollPolicy == ScrollPolicy.ON ||
+        var ww:Number = Math.max(0, listContent.rightOffset) - lcx - viewMetrics.right;
+        var hh:Number = Math.max(0, listContent.bottomOffset) - lcy - viewMetrics.bottom;
+        var scrollableWidth:Number = unscaledWidth + ww;
+
+        // if they want the scrollbar, we don't know how much to scroll, without rendering
+        // everything (on and/or off-screen).  Since this could be expensive, we use a heuristic:
+        // if maxHorizontalScrollPosition is specified, we let them scroll that much.  If it's not
+        // specified, we double the amount of viewable space and let them scroll that much.  This is
+        // just a heuristic and may not work perfectly for really long content or short content.
+        if (horizontalScrollPolicy == ScrollPolicy.ON ||
             (horizontalScrollPolicy == ScrollPolicy.AUTO && !isNaN(_maxHorizontalScrollPosition)))
-		{
-			if (isNaN(_maxHorizontalScrollPosition))
-				scrollableWidth *= 2;
-			else
-				scrollableWidth += _maxHorizontalScrollPosition;
-		}
+        {
+            if (isNaN(_maxHorizontalScrollPosition))
+                scrollableWidth *= 2;
+            else
+                scrollableWidth += _maxHorizontalScrollPosition;
+        }
         listContent.setActualSize(scrollableWidth, unscaledHeight + hh);
-	}
+    }

     /**
      *  @private
@@ -1068,13 +1068,13 @@
         colors = getStyle("alternatingItemColors");

         if (!colors || colors.length == 0)
-		{
-			while (rowBGs.numChildren > n)
-			{
-				rowBGs.removeChildAt(rowBGs.numChildren - 1);
-			}
+        {
+            while (rowBGs.numChildren > n)
+            {
+                rowBGs.removeChildAt(rowBGs.numChildren - 1);
+            }
             return;
-		}
+        }

         StyleManager.getColorNames(colors);

@@ -1087,7 +1087,7 @@
         {
             drawRowBackground(rowBGs, i++, rowInfo[curRow].y, rowInfo[curRow].height, colors[actualRow % colors.length], actualRow);
             curRow++;
-			actualRow++;
+            actualRow++;
         }

         while (rowBGs.numChildren > n)
@@ -1187,7 +1187,7 @@
         var oldItem:IListItemRenderer;
         var rowData:BaseListData;
         var data:Object;
-		var wrappedData:Object;
+        var wrappedData:Object;
         var uid:String;
         var more:Boolean = true;
         var valid:Boolean = true;
@@ -1203,62 +1203,62 @@
                     rowsNeeded--;

                 valid = more;
-				wrappedData = more ? iterator.current : null;
-				data = (wrappedData is ItemWrapper) ? wrappedData.data : wrappedData;
+                wrappedData = more ? iterator.current : null;
+                data = (wrappedData is ItemWrapper) ? wrappedData.data : wrappedData;

                 uid = null;

                 if (!listItems[rowNum])
                     listItems[rowNum] = [];

-				// TODO more code around renderer recycling should be shared with TileBase /
-				// moved to ListBase if possible
+                // TODO more code around renderer recycling should be shared with TileBase /
+                // moved to ListBase if possible
                 if (valid)
                 {
                     item = listItems[rowNum][colNum];
                     uid = itemToUID(wrappedData);

-					// If we have an item at the current location, we want to
-					// re use it if the data is "the same", but the test
-					// is a little complex.
-					// If we're running a data effect, and the renderer is already
-					// presenting wrapped data, make sure the wrappers are the same.
-					// If running a data effect, but not presenting wrapped data
-					// (meaning the data effect was just initiated), or if
-					// not running data effect, just check that the data is the same.
-					if (!item ||
-					    ((runningDataEffect && dataItemWrappersByRenderer[item])
-					    	? (dataItemWrappersByRenderer[item] != wrappedData)
-					    	: (item.data != data)))
+                    // If we have an item at the current location, we want to
+                    // re use it if the data is "the same", but the test
+                    // is a little complex.
+                    // If we're running a data effect, and the renderer is already
+                    // presenting wrapped data, make sure the wrappers are the same.
+                    // If running a data effect, but not presenting wrapped data
+                    // (meaning the data effect was just initiated), or if
+                    // not running data effect, just check that the data is the same.
+                    if (!item ||
+                        ((runningDataEffect && dataItemWrappersByRenderer[item])
+                            ? (dataItemWrappersByRenderer[item] != wrappedData)
+                            : (item.data != data)))
                     {
-                    	// if we're allowed to re-use existing renderers
-                    	if (allowRendererStealingDuringLayout)
-                    	{
-	                    	// first try to steal an item renderer
-							item = visibleData[uid];
-							// if we can't steal a renderer with the same wrapper, try to
-							// steal one with the same actual data (if the data is wrapped).
-							// This is to re-use renderers when we start running a data effect.
-							if (!item && (wrappedData != data))
-								item = visibleData[itemToUID(data)];
-                    	}
-
-						if (item) // if we've stolen a renderer from somewhere else...
-						{
-							// update data structures so we're not pointing to it twice
-							var ld:BaseListData = BaseListData(rowMap[item.name]);
-
-							// don't steal a previous one...only a later one
-							if (ld && (ld.rowIndex > rowNum))
-								listItems[ld.rowIndex] = [];
-							else
-								item = null;
-						}
-
-						if (!item)
-	                    	item = getReservedOrFreeItemRenderer(wrappedData);
+                        // if we're allowed to re-use existing renderers
+                        if (allowRendererStealingDuringLayout)
+                        {
+                            // first try to steal an item renderer
+                            item = visibleData[uid];
+                            // if we can't steal a renderer with the same wrapper, try to
+                            // steal one with the same actual data (if the data is wrapped).
+                            // This is to re-use renderers when we start running a data effect.
+                            if (!item && (wrappedData != data))
+                                item = visibleData[itemToUID(data)];
+                        }

-						if (!item)
+                        if (item) // if we've stolen a renderer from somewhere else...
+                        {
+                            // update data structures so we're not pointing to it twice
+                            var ld:BaseListData = BaseListData(rowMap[item.name]);
+
+                            // don't steal a previous one...only a later one
+                            if (ld && (ld.rowIndex > rowNum))
+                                listItems[ld.rowIndex] = [];
+                            else
+                                item = null;
+                        }
+
+                        if (!item)
+                            item = getReservedOrFreeItemRenderer(wrappedData);
+
+                        if (!item)
                         {
                             item = createItemRenderer(data);
                             item.owner = this;
@@ -1283,14 +1283,14 @@
                             IDropInListItemRenderer(item).listData = null;
                     }

-	                item.data = data;
+                    item.data = data;
                     item.enabled = enabled;
                     item.visible = true;
                     if (uid != null)
                         visibleData[uid] = item;

                     if (wrappedData != data)
-                    	dataItemWrappersByRenderer[item] = wrappedData;
+                        dataItemWrappersByRenderer[item] = wrappedData;

                     item.explicitWidth = ww;

@@ -1298,7 +1298,7 @@
                         && (wordWrapChanged || variableRowHeight))
                         IInvalidating(item).invalidateSize();

-					UIComponentGlobals.layoutManager.validateClient(item, true);
+                    UIComponentGlobals.layoutManager.validateClient(item, true);

                     hh = Math.ceil(variableRowHeight ?
                          item.getExplicitOrMeasuredHeight() +
@@ -1317,7 +1317,7 @@
                     hh = rowNum > 0 ? rowInfo[rowNum - 1].height : rowHeight;

                     if (hh == 0)
-                    	hh = rowHeight;
+                        hh = rowHeight;

                     oldItem = listItems[rowNum][colNum];
                     if (oldItem)
@@ -1329,11 +1329,11 @@
                 bSelected = selectedData[uid] != null;
                 if (wrappedData != data)
                 {
-                	bSelected = bSelected || selectedData[itemToUID(data)];
-					bSelected = bSelected && (!getRendererSemanticValue(item,ModifiedCollectionView.REPLACEMENT))
-						&& (!getRendererSemanticValue(item,ModifiedCollectionView.ADDED));
+                    bSelected = bSelected || selectedData[itemToUID(data)];
+                    bSelected = bSelected && (!getRendererSemanticValue(item,ModifiedCollectionView.REPLACEMENT))
+                        && (!getRendererSemanticValue(item,ModifiedCollectionView.ADDED));
                 }
-
+
                 bHighlight = highlightUID == uid;
                 bCaret = caretUID == uid;
                 rowInfo[rowNum] = new ListRowInfo(yy, hh, uid, data);
@@ -1450,15 +1450,15 @@
                 {
                     try
                     {
-						if (!iteratorValid)
-							iterator.seek(CursorBookmark.FIRST, pos);
-						else
-							iterator.seek(CursorBookmark.CURRENT, delta);
-						if (!iteratorValid)
-						{
-							iteratorValid = true;
-							lastSeekPending = null;
-						}
+                        if (!iteratorValid)
+                            iterator.seek(CursorBookmark.FIRST, pos);
+                        else
+                            iterator.seek(CursorBookmark.CURRENT, delta);
+                        if (!iteratorValid)
+                        {
+                            iteratorValid = true;
+                            lastSeekPending = null;
+                        }
                     }
                     catch(e:ItemPendingError)
                     {
@@ -1542,8 +1542,8 @@
      */
     mx_internal function setupRendererFromData(item:IListItemRenderer, wrappedData:Object):void
     {
-		var data:Object = (wrappedData is ItemWrapper) ? wrappedData.data : wrappedData;
-
+        var data:Object = (wrappedData is ItemWrapper) ? wrappedData.data : wrappedData;
+
         if (item is IDropInListItemRenderer)
         {
             if (data != null)
@@ -1557,7 +1557,7 @@
         if (item is IInvalidating)
             IInvalidating(item).invalidateSize();

-		UIComponentGlobals.layoutManager.validateClient(item, true);
+        UIComponentGlobals.layoutManager.validateClient(item, true);
     }

     /**
@@ -1578,18 +1578,18 @@

         var bookmark:CursorBookmark = (iterator) ? iterator.bookmark : null;
         if (index != -1 && iterator)
-		{
-			try
-			{
-				iterator.seek(CursorBookmark.FIRST, index);
-			}
-			catch (e:ItemPendingError)
-			{
-				// even the first item isn't paged in
-				return 0;
-			}
-
-		}
+        {
+            try
+            {
+                iterator.seek(CursorBookmark.FIRST, index);
+            }
+            catch (e:ItemPendingError)
+            {
+                // even the first item isn't paged in
+                return 0;
+            }
+
+        }
         var rw:Number;
         var more:Boolean = iterator != null;
         for (var i:int = 0; i < count; i++)
@@ -1598,14 +1598,14 @@
             if (more)
             {
                 data = iterator.current;
-				var factory:IFactory = getItemRendererFactory(data);
-				item = measuringObjects[factory];
-				if (!item)
-				{
-					item = getMeasuringRenderer(data);
-				}
-
-		        item.explicitWidth = NaN;   // gets set in measureHeightOfItems
+                var factory:IFactory = getItemRendererFactory(data);
+                item = measuringObjects[factory];
+                if (!item)
+                {
+                    item = getMeasuringRenderer(data);
+                }
+
+                item.explicitWidth = NaN;   // gets set in measureHeightOfItems
                 setupRendererFromData(item, data);

                 rw = item.measuredWidth;
@@ -1675,9 +1675,9 @@
                 rh = rowHeight;
                 data = iterator.current;

-				// trace("calculate height " + index + " " + count);
-				var item:IListItemRenderer = getMeasuringRenderer(data);
-		        item.explicitWidth = ww;
+                // trace("calculate height " + index + " " + count);
+                var item:IListItemRenderer = getMeasuringRenderer(data);
+                item.explicitWidth = ww;

                 setupRendererFromData(item, data);

@@ -1722,25 +1722,25 @@
      */
     mx_internal function getMeasuringRenderer(data:Object):IListItemRenderer
     {
-		var item:IListItemRenderer;
-		if (!measuringObjects)
-			measuringObjects = new Dictionary(true);
-
-		var factory:IFactory = getItemRendererFactory(data);
-		item = measuringObjects[factory];
-
-		if (!item)
-		{
-			item = createItemRenderer(data);
-			item.owner = this;
-			item.name = "hiddenItem";
-			item.visible = false;
-			item.styleName = listContent;
-			listContent.addChild(DisplayObject(item));
-			measuringObjects[factory] = item;
-		}
-
-		return item;
+        var item:IListItemRenderer;
+        if (!measuringObjects)
+            measuringObjects = new Dictionary(true);
+
+        var factory:IFactory = getItemRendererFactory(data);
+        item = measuringObjects[factory];
+
+        if (!item)
+        {
+            item = createItemRenderer(data);
+            item.owner = this;
+            item.name = "hiddenItem";
+            item.visible = false;
+            item.styleName = listContent;
+            listContent.addChild(DisplayObject(item));
+            measuringObjects[factory] = item;
+        }
+
+        return item;
     }

     /**
@@ -1748,14 +1748,14 @@
      */
     mx_internal function purgeMeasuringRenderers():void
     {
-		var item:IListItemRenderer;
-
-		for each (item in measuringObjects)
-			if (item.parent)
-				item.parent.removeChild(DisplayObject(item));
-
-		if (!measuringObjects)
-			measuringObjects = new Dictionary(true);
+        var item:IListItemRenderer;
+
+        for each (item in measuringObjects)
+            if (item.parent)
+                item.parent.removeChild(DisplayObject(item));
+
+        if (!measuringObjects)
+            measuringObjects = new Dictionary(true);
     }

     /**
@@ -1763,92 +1763,96 @@
      */
     override public function set itemRenderer(value:IFactory):void
     {
-		super.itemRenderer = value;
-		purgeMeasuringRenderers();
-	}
-
-    /**
-     *  Get the appropriate renderer, using the default renderer if none specified
+        super.itemRenderer = value;
+        purgeMeasuringRenderers();
+    }
+
+    /**
+     *  Get the appropriate renderer, using the default renderer if none is specified.
+     *
+     *  @param data The object from which the item renderer is created.
+     *
+     *  @return The renderer.
      */
     override public function createItemRenderer(data:Object):IListItemRenderer
-	{
-		var factory:IFactory;
-
-		// get the factory for the data
-		factory = getItemRendererFactory(data);
-		if (!factory)
-		{
-			if (data == null)
-				factory = nullItemRenderer;
-			if (!factory)
-				factory = itemRenderer;
-		}
-
-		var renderer:IListItemRenderer;
-
-		// if it is the default column factory, see if
-		// the freeItemRenderers table has a free one
-		if (factory == itemRenderer)
-		{
-			if (freeItemRenderers && freeItemRenderers.length)
-			{
-				renderer = freeItemRenderers.pop();
-				delete freeItemRenderersByFactory[factory][renderer];
-			}
-		}
-		else if (freeItemRenderersByFactory)
-		{
-			// other re-usable renderers are in the FactoryMap
-			var d:Dictionary = freeItemRenderersByFactory[factory];
-			if (d)
-			{
-				for (var p:* in d)
-				{
-					renderer = IListItemRenderer(p);
-					delete d[p];
-					break;
-				}
-			}
-		}
-
-		if (!renderer)
-		{
-			renderer = factory.newInstance();
-			renderer.styleName = this;
-			factoryMap[renderer] = factory;
-		}
-
-		renderer.owner = this;
-		return renderer;
-	}
+    {
+        var factory:IFactory;
+
+        // get the factory for the data
+        factory = getItemRendererFactory(data);
+        if (!factory)
+        {
+            if (data == null)
+                factory = nullItemRenderer;
+            if (!factory)
+                factory = itemRenderer;
+        }
+
+        var renderer:IListItemRenderer;
+
+        // if it is the default column factory, see if
+        // the freeItemRenderers table has a free one
+        if (factory == itemRenderer)
+        {
+            if (freeItemRenderers && freeItemRenderers.length)
+            {
+                renderer = freeItemRenderers.pop();
+                delete freeItemRenderersByFactory[factory][renderer];
+            }
+        }
+        else if (freeItemRenderersByFactory)
+        {
+            // other re-usable renderers are in the FactoryMap
+            var d:Dictionary = freeItemRenderersByFactory[factory];
+            if (d)
+            {
+                for (var p:* in d)
+                {
+                    renderer = IListItemRenderer(p);
+                    delete d[p];
+                    break;
+                }
+            }
+        }
+
+        if (!renderer)
+        {
+            renderer = factory.newInstance();
+            renderer.styleName = this;
+            factoryMap[renderer] = factory;
+        }
+
+        renderer.owner = this;
+        return renderer;
+    }

     /**
      *  @private
      *
      *  Determines whether editing is prevented for a specific location
      */
-	private function editingTemporarilyPrevented(coord:Object):Boolean
-	{
-		// This code prevents possible race conditions when trying to
-		// edit an item that is either being removed or replaced when
-		// an effect is running. (E.g., after editing the last item of
-		// a list, we can't have the editor pick up the old value of
-		// the data, which might appear to persist while the effect is
-		// running)
-		if (runningDataEffect && coord)
-		{
-	        var rowIndex:int = coord.rowIndex - verticalScrollPosition + offscreenExtraRowsTop;
-	        if ((rowIndex < 0) || rowIndex >= listItems.length)
-	        	return false;
-	        var item:IListItemRenderer = listItems[rowIndex][0];
-	        if (item && (getRendererSemanticValue(item,"replaced") ||
-	        			 getRendererSemanticValue(item,"removed")))
-	        	return true;
-		}
-
-		return false;
-	}
-
+    private function editingTemporarilyPrevented(coord:Object):Boolean
+    {
+        // This code prevents possible race conditions when trying to
+        // edit an item that is either being removed or replaced when
+        // an effect is running. (E.g., after editing the last item of
+        // a list, we can't have the editor pick up the old value of
+        // the data, which might appear to persist while the effect is
+        // running)
+        if (runningDataEffect && coord)
+        {
+            var rowIndex:int = coord.rowIndex - verticalScrollPosition + offscreenExtraRowsTop;
+            if ((rowIndex < 0) || rowIndex >= listItems.length)
+                return false;
+            var item:IListItemRenderer = listItems[rowIndex][0];
+            if (item && (getRendererSemanticValue(item,"replaced") ||
+                         getRendererSemanticValue(item,"removed")))
+                return true;
+        }
+
+        return false;
+    }
+
     /**
      *  @private
      */
@@ -1907,10 +1911,10 @@

         var actualLockedRows:int = lockedRowCount;

-		// determine last *visible* row
+        // determine last *visible* row
         var lastRowIndex:int = verticalScrollPosition + listItems.length - offscreenExtraRowsTop - offscreenExtraRowsBottom - 1;
         var partialRow:int = (rowInfo[listItems.length - offscreenExtraRowsBottom - 1].y +
-        	rowInfo[listItems.length - offscreenExtraRowsBottom - 1].height > listContent.height) ? 1 : 0;
+            rowInfo[listItems.length - offscreenExtraRowsBottom - 1].height > listContent.height) ? 1 : 0;

         // actual row/column is the offset into listItems
         if (rowIndex > actualLockedRows)
@@ -1931,10 +1935,10 @@
                     if (verticalScrollPosition == maxVerticalScrollPosition)
                         break;
                     verticalScrollPosition = Math.min(verticalScrollPosition + (rowIndex > lastRowIndex ? rowIndex - lastRowIndex : partialRow),
-                    								  maxVerticalScrollPosition);
+                                                      maxVerticalScrollPosition);
                     lastRowIndex = verticalScrollPosition + listItems.length - offscreenExtraRowsTop - offscreenExtraRowsBottom - 1;
                     partialRow = (rowInfo[listItems.length - offscreenExtraRowsBottom - 1].y +
-                    	rowInfo[listItems.length - offscreenExtraRowsBottom - 1].height > listContent.height) ? 1 : 0;
+                        rowInfo[listItems.length - offscreenExtraRowsBottom - 1].height > listContent.height) ? 1 : 0;
                 }
             }

@@ -1961,12 +1965,12 @@
             commitEditedItemPosition(null);
             return;
         }
-		if (!isItemEditable(item.data))
-		{
+        if (!isItemEditable(item.data))
+        {
             // assume that editing was cancelled
             commitEditedItemPosition(null);
             return;
-		}
+        }

         var event:ListEvent =
             new ListEvent(ListEvent.ITEM_EDIT_BEGIN, false, true);
@@ -2122,7 +2126,7 @@
         {
             DisplayObject(itemEditorInstance).removeEventListener(KeyboardEvent.KEY_DOWN, editorKeyDownHandler);
             if (stage)
-				stage.removeEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true);
+                stage.removeEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true);

             var event:ListEvent =
                 new ListEvent(ListEvent.ITEM_FOCUS_OUT);
@@ -2200,13 +2204,13 @@
      */
     public function isItemEditable(data:Object):Boolean
     {
-		if (!editable)
-			return false;
+        if (!editable)
+            return false;

         if (data == null)
             return false;

-		return true;
+        return true;
     }

     /**
@@ -2631,15 +2635,15 @@
             {
                 bFieldChanged = true;
                 try
-				{
+                {
                     data[labelField] = newData;
                     if (!(data is IPropertyChangeNotifier))
                     {
-                    	// update the underlying collection if a data effect is running
-                    	if (actualCollection)
-                    		actualCollection.itemUpdated(data, labelField);
-                    	else
-                        	collection.itemUpdated(data, labelField);
+                        // update the underlying collection if a data effect is running
+                        if (actualCollection)
+                            actualCollection.itemUpdated(data, labelField);
+                        else
+                            collection.itemUpdated(data, labelField);
                     }
                 }
                 catch(e:Error)
@@ -2656,9 +2660,9 @@
                 }
                 if (bChanged)
                 {
-                	// if running a data effect try to update the underlying collection
-                	var editCollection:IList = actualCollection ? actualCollection as IList : collection as IList;
-                	// if editCollection is null here, underlying collection doesn't implement IList
+                    // if running a data effect try to update the underlying collection
+                    var editCollection:IList = actualCollection ? actualCollection as IList : collection as IList;
+                    // if editCollection is null here, underlying collection doesn't implement IList
                     if (editCollection)
                         IList(editCollection).setItemAt(data, event.rowIndex);
                     else
@@ -2778,17 +2782,17 @@
      */
     mx_internal function callSetupRendererFromData(item:IListItemRenderer, data:Object):void
     {
-    	setupRendererFromData(item, data);
+        setupRendererFromData(item, data);
     }

     /**
      *  @private
      */
     mx_internal function callMakeListData(data:Object, uid:String,
-								 rowNum:int):BaseListData
-	{
-		return makeListData(data, uid, rowNum);
-	}
+                                 rowNum:int):BaseListData
+    {
+        return makeListData(data, uid, rowNum);
+    }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 9309
Author:   jimurphy@adobe.com
Date:     2009-08-14T12:57:06.648526Z

Log Message:
-----------
Merged 3.x revisions 8758,8762-8763,8765,8844-8845,8906,8970,9030,9049,9055,9096-9097,9191,9208,9221,9228,9242,9278 -> trunk

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/framework/src/mx/controls/MenuBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.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/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/RSLEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateFormatter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/LocaleSorter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLSchemaInstance.as</path>

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

--- frameworks/projects/mx/src/mx/controls/Menu.as
+++ frameworks/projects/mx/src/mx/controls/Menu.as
@@ -22,7 +22,6 @@
 import flash.geom.Rectangle;
 import flash.ui.Keyboard;
 import flash.utils.clearInterval;
-import flash.utils.getTimer;
 import flash.utils.setTimeout;
 import flash.xml.XMLNode;
 import mx.collections.ArrayCollection;
@@ -760,6 +759,12 @@
      */
     mx_internal var _rootModel:ICollectionView;

+	/**
+     *  @private
+     *  Storage variable for dataProvider passed to parent
+     */
+    mx_internal var _listDataProvider:ICollectionView;
+
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -865,11 +870,6 @@
      */
     override public function set dataProvider(value:Object):void
     {
-        if (_rootModel)
-            _rootModel.removeEventListener(
-                            CollectionEvent.COLLECTION_CHANGE,
-                            collectionChangeHandler);
-
         // handle strings and xml
         if (typeof(value)=="string")
             value = new XML(value);
@@ -909,9 +909,7 @@
         {
             _rootModel = new ArrayCollection();
         }
-        //add listeners as weak references
-        _rootModel.addEventListener(CollectionEvent.COLLECTION_CHANGE,
-                                    collectionChangeHandler, false, 0, true);
+
         //flag for processing in commitProps
         dataProviderChanged = true;
         invalidateProperties();
@@ -1192,22 +1190,30 @@
                 }
             }

+            if (_listDataProvider)
+            {
+                _listDataProvider.removeEventListener(CollectionEvent.COLLECTION_CHANGE,
+                                          collectionChangeHandler, false);
+            }
+
             // At this point _rootModel may be null so we dont need to continue.
             if (_rootModel)
             {
                 if (!tmpCollection)
                     tmpCollection = _rootModel;

+                _listDataProvider = tmpCollection;
                 super.dataProvider = tmpCollection;

                 // not really a default handler, but we need to be later than the wrapper
-                tmpCollection.addEventListener(CollectionEvent.COLLECTION_CHANGE,
+                _listDataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE,
                                           collectionChangeHandler,
                                           false,
                                           EventPriority.DEFAULT_HANDLER, true);
             }
             else
             {
+                _listDataProvider = null;
                 super.dataProvider = null;
             }
         }
@@ -1776,6 +1782,7 @@
             {
                 super.collectionChangeHandler(event);
                 dataProviderChanged = true;
+                invalidateProperties();
                 invalidateSize();
                 UIComponentGlobals.layoutManager.validateClient(this);
                 setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
@@ -1784,19 +1791,22 @@
             {
                 super.collectionChangeHandler(event);
                 dataProviderChanged = true;
+                invalidateProperties();
                 invalidateSize();
                 UIComponentGlobals.layoutManager.validateClient(this);
                 setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
             }
             else if (ce.kind == CollectionEventKind.REFRESH)
             {
+                dataProviderChanged = true;
+                invalidateProperties();
                 invalidateSize();
+            }
+            else if (ce.kind == CollectionEventKind.RESET)
+            {
+                dataProviderChanged = true;
                 invalidateProperties();
-            }
-            else if (ce.kind == CollectionEventKind.RESET)
-            {
                 invalidateSize();
-                invalidateProperties();
             }
         }
         itemsSizeChanged = true;


Stage autosize correction.

Stage autosize correction.

--- src/flash/display/Stage.as
+++ src/flash/display/Stage.as
@@ -242,6 +242,8 @@
 			_stage3Ds[2].__stage = this;
 			_stage3Ds[3].__stage = this;

+			window_resize();
+
 			window.addEventListener("resize", window_resize, false);
 			window.addEventListener("orientationchange", window_resize, false);
 			setTimeout(__update);
@@ -261,7 +263,7 @@
 			return _instance;
 		}

-		private function window_resize(e:Object):void
+		private function window_resize(e:Object = null):void
 		{
 			SpriteFlexjs.dirtyGraphics = true;
 			if (SpriteFlexjs.autoSize){
@@ -913,7 +915,11 @@
 		 *   the Security.allowDomain() method or the Security.allowInsecureDomain() method.
 		 *   For more information, see the "Security" chapter in the ActionScript 3.0 Developer's Guide.
 		 */
-		public function get stageHeight ():int { return _stageHeight; }
+		public function get stageHeight ():int
+		{
+			if (SpriteFlexjs.autoSize) _stageHeight = window.innerHeight;
+			return _stageHeight;
+		}
 		public function set stageHeight (value:int):void { _stageHeight = value; }

 		/**
@@ -962,7 +968,11 @@
 		 *   the Security.allowDomain() method or the Security.allowInsecureDomain() method.
 		 *   For more information, see the "Security" chapter in the ActionScript 3.0 Developer's Guide.
 		 */
-		public function get stageWidth ():int { return _stageWidth; }
+		public function get stageWidth ():int
+		{
+			if (SpriteFlexjs.autoSize) _stageWidth = window.innerWidth;
+			return _stageWidth;
+		}
 		public function set stageWidth (value:int):void { _stageWidth = value; }

 		/**


+ 为 Box 增加了一些碰撞判断的方法

+ 为 Box 增加了一些碰撞判断的方法

--- age/src/age/data/Box.as
+++ age/src/age/data/Box.as
@@ -242,6 +242,11 @@

 		private var _width:Number = 0;

+		/**
+		 * width
+		 * @return
+		 *
+		 */
 		[Inline]
 		final public function get width():Number
 		{
@@ -257,6 +262,11 @@

 		private var _height:Number = 0;

+		/**
+		 * height
+		 * @return
+		 *
+		 */
 		[Inline]
 		final public function get height():Number
 		{
@@ -272,6 +282,11 @@

 		private var _depth:Number = 0;

+		/**
+		 * depth
+		 * @return
+		 *
+		 */
 		[Inline]
 		final public function get depth():Number
 		{
@@ -285,6 +300,20 @@
 			validateZ();
 		}

+		/**
+		 * 设置 Box 到指定属性
+		 * @param x
+		 * @param y
+		 * @param z
+		 * @param width
+		 * @param height
+		 * @param depth
+		 * @param pivotX
+		 * @param pivotY
+		 * @param pivotZ
+		 * @param rotationX
+		 *
+		 */
 		public function setTo(x:Number, y:Number, z:Number, width:Number, height:Number, depth:Number, pivotX:Number = NaN, pivotY:Number = NaN, pivotZ:Number = NaN, rotationX:Number = NaN):void
 		{
 			if (!isNaN(pivotX))
@@ -342,7 +371,82 @@
 		 */
 		public function intersection(b:Box):Box
 		{
-			var result:Box;
+			if (!intersect(b))
+			{
+				return null;
+			}
+			var p:Vector3D;
+			var vertices:Vector.<Vector3D>;
+			var i:int;
+			var veticesIntersection:Array = new Array();
+			vertices = this.vertices;
+
+			for (i = 0; i < vertices.length; i++)
+			{
+				p = vertices[i];
+
+				if (b.isInBox(p.x, p.y, p.z))
+				{
+					veticesIntersection.push(p);
+				}
+			}
+			vertices = b.vertices;
+
+			for (i = 0; i < vertices.length; i++)
+			{
+				p = vertices[i];
+
+				if (isInBox(p.x, p.y, p.z))
+				{
+					veticesIntersection.push(p);
+				}
+			}
+			var newArray:Array = veticesIntersection.sortOn([ "z", "y", "z" ], Array.NUMERIC);
+			var plbf:Vector3D = newArray[0];
+			var prtb:Vector3D = newArray[newArray.length - 1];
+			var box:Box = new Box(plbf.x, plbf.y, plbf.z, prtb.x, prtb.y, prtb.z);
+			return box;
+		}
+
+		/**
+		 * 检查点是否在 Box 内
+		 * @param x
+		 * @param y
+		 * @param z
+		 * @return
+		 *
+		 */
+		public function isInBox(x:Number, y:Number, z:Number):Boolean
+		{
+			var result:Boolean = true;
+
+			do
+			{
+				if (x < lower.x || x > upper.x)
+				{
+					result = false;
+				}
+
+				if (!result)
+				{
+					break;
+				}
+
+				if (y < lower.y || y > upper.y)
+				{
+					result = false;
+				}
+
+				if (!result)
+				{
+					break;
+				}
+
+				if (z < lower.z || z > upper.z)
+				{
+					result = false;
+				}
+			} while (false);
 			return result;
 		}

@@ -352,8 +456,33 @@
 		 * @return
 		 *
 		 */
-		public function intersect(b:Box):Boolean
-		{
+		public function intersect(otherBox:Box):Boolean
+		{
+			var p:Vector3D;
+			var vetices:Vector.<Vector3D>;
+			var i:int;
+			vetices = this.vertices;
+
+			for (i = 0; i < vetices.length; i++)
+			{
+				p = vetices[i];
+
+				if (otherBox.isInBox(p.x, p.y, p.z))
+				{
+					return true;
+				}
+			}
+			vetices = otherBox.vertices;
+
+			for (i = 0; i < vetices.length; i++)
+			{
+				p = vetices[i];
+
+				if (this.isInBox(p.x, p.y, p.z))
+				{
+					return true;
+				}
+			}
 			return false;
 		}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/effects/easing/Quintic.as
+++ frameworks/projects/mx/src/mx/effects/easing/Quintic.as
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+
+/**
+ *  The Quintic class defines three easing functions to implement
+ *  motion with Flex effect classes. The acceleration of motion for a Quintic easing
+ *  equation is greater than for a Quadratic, Cubic, or Quartic easing equation.
+ *
+ *  For more information, see http://www.robertpenner.com/profmx.
+ */
+public class Quintic
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  The easeIn() method starts motion from zero velocity,
+     *  and then accelerates motion as it executes.
+     *
+     *  @param t Specifies time.
+	 *
+     *  @param b Specifies the initial position of a component.
+	 *
+     *  @param c Specifies the total change in position of the component.
+	 *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeIn(t:Number, b:Number,
+								  c:Number, d:Number):Number
+	{
+		return c * (t /= d) * t * t * t * t + b;
+	}
+
+    /**
+     *  The easeOut() method starts motion fast,
+     *  and then decelerates motion to a zero velocity as it executes.
+     *
+     *  @param t Specifies time.
+	 *
+     *  @param b Specifies the initial position of a component.
+	 *
+     *  @param c Specifies the total change in position of the component.
+	 *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeOut(t:Number, b:Number,
+								   c:Number, d:Number):Number
+	{
+		return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
+	}
+
+    /**
+     *  The easeInOut() method combines the motion
+     *  of the easeIn() and easeOut() methods
+	 *  to start the motion from a zero velocity, accelerate motion,
+	 *  then decelerate to a zero velocity.
+     *
+     *  @param t Specifies time.
+	 *
+     *  @param b Specifies the initial position of a component.
+	 *
+     *  @param c Specifies the total change in position of the component.
+	 *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeInOut(t:Number, b:Number,
+									 c:Number, d:Number):Number
+	{
+		if ((t /= d / 2) < 1)
+			return c / 2 * t * t * t * t * t + b;
+
+		return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19300
Author:   harishs@adobe.com
Date:     2010-12-11T17:05:41.985690Z

Log Message:
-----------
QE notes:
Doc notes:
Bugs: No bugs fixed. Just applied code reveiw feedback.
Reviewer: Gordon Smith
Tests run: checkintests and full cyclone tests.
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ISort.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/collections/Sort.as</path>

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

--- frameworks/projects/spark/src/spark/collections/Sort.as
+++ frameworks/projects/spark/src/spark/collections/Sort.as
@@ -749,17 +749,8 @@
                 if (unique)
                 {
                     var uniqueRet2:Object;
-                    /*
-                    if (sortArgs && fields.length == 1)
-                    {
-                        uniqueRet2 = items.sortOn(sortArgs.fields[0], sortArgs.options[0] | Array.UNIQUESORT);
-                    }
-                    else
-                    */
-                    {
-                        uniqueRet2 = items.sort(internalCompare,
-                                                Array.UNIQUESORT);
-                    }
+                    uniqueRet2 = items.sort(internalCompare,
+                                            Array.UNIQUESORT);
                     if (uniqueRet2 == 0)
                     {
                         message = resourceManager.getString(
@@ -769,16 +760,7 @@
                 }
                 else
                 {
-                    /*
-                    if (sortArgs)
-                    {
-                        items.sortOn(sortArgs.fields, sortArgs.options);
-                    }
-                    else
-                    */
-                    {
-                        items.sort(internalCompare);
-                    }
+                    items.sort(internalCompare);
                 }
             }
             else


Transferred from the Adobe Open Source Subversion Repository

Revision: 20439
Author:   egeorgie@adobe.com
Date:     2011-02-24T02:07:47.917641Z

Log Message:
-----------
Fix for http://bugs.adobe.com/jira/browse/SDK-29631 Changing Group.blendMode does not work properly in some cases

In this change:
- modify Group to completely bypass UIComponent's blendMode setters/getters.

QE notes:  A general pass over Group blendMode with & without GraphicElements
Doc notes:
Bugs: SDK-29631
Reviewer: Ryan
Tests run: mustella full cyclone
Is noteworthy for integration: Yes

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

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -498,8 +498,14 @@
         if (value == "auto")
         {
             _blendMode = value;
-            if (((alpha > 0 && alpha < 1) && super.blendMode != BlendMode.LAYER) ||
-                ((alpha == 1 || alpha == 0) && super.blendMode != BlendMode.NORMAL) )
+            // SDK-29631: Use super.$blendMode instead of super.blendMode
+            // since Group completely overrides blendMode and we
+            // want to bypass the extra logic in UIComponent which
+            // has its own override.
+            // TODO (egeorgie): figure out whether we can share some
+            // of that logic in the future.
+            if (((alpha > 0 && alpha < 1) && super.$blendMode != BlendMode.LAYER) ||
+                ((alpha == 1 || alpha == 0) && super.$blendMode != BlendMode.NORMAL) )
             {
                 invalidateDisplayObjectOrdering();
             }
@@ -886,16 +892,22 @@

             // Figure out the correct blendMode value
             // to set.
+            // SDK-29631: Use super.$blendMode instead of super.blendMode
+            // since Group completely overrides blendMode and we
+            // want to bypass the extra logic in UIComponent which
+            // has its own override.
+            // TODO (egeorgie): figure out whether we can share some
+            // of that logic in the future.
             if (_blendMode == "auto")
             {
                 if (alpha == 0 || alpha == 1)
-                    super.blendMode = BlendMode.NORMAL;
+                    super.$blendMode = BlendMode.NORMAL;
                 else
-                    super.blendMode = BlendMode.LAYER;
+                    super.$blendMode = BlendMode.LAYER;
             }
             else if (!isAIMBlendMode(_blendMode))
             {
-                super.blendMode = _blendMode;
+                super.$blendMode = _blendMode;
             }

             if (blendShaderChanged)


Transferred from the Adobe Open Source Subversion Repository

Revision: 10064
Author:   gruehle@adobe.com
Date:     2009-09-08T19:59:34.687094Z

Log Message:
-----------
Spark skins for all containers now use backgroundColor and backgroundAlpha styles instead of contentBackgroundColor and contentBackgroundAlpha. All controls (including List and NavBar/ButtonBar) continue to use contentBackgroundColor and contentBackgroundAlpha.

Add new MX ContainerBorderSkin.

QE notes: This should clear up some failures from last week. ContainerBorderSkin needs tests that are independent from BorderSkin tests.
Doc notes: None.
Bugs: SDK-23038, SDK-23037, SDK-
Reviewer: pending
Tests run: checkintests
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/SparkSkinsClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/PanelBorderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ContainerBorderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/sparkskins/src/SparkSkinsClasses.as
+++ frameworks/projects/sparkskins/src/SparkSkinsClasses.as
@@ -31,7 +31,8 @@
 	import mx.skins.spark.ButtonBarMiddleButtonSkin; ButtonBarMiddleButtonSkin;
 	import mx.skins.spark.CheckBoxSkin; CheckBoxSkin;
 	import mx.skins.spark.ColorPickerSkin; ColorPickerSkin;
-	import mx.skins.spark.ComboBoxSkin; ComboBoxSkin;
+    import mx.skins.spark.ComboBoxSkin; ComboBoxSkin;
+    import mx.skins.spark.ContainerBorderSkin; ContainerBorderSkin;
 	import mx.skins.spark.DataGridHeaderBackgroundSkin; DataGridHeaderBackgroundSkin;
 	import mx.skins.spark.DataGridHeaderSeparatorSkin; DataGridHeaderSeparatorSkin;
 	import mx.skins.spark.DataGridSortArrow; DataGridSortArrow;


Refactor callback checks to validateCallback

--- src/asfac/src/com/thedevstop/asfac/AsFactory.as
+++ src/asfac/src/com/thedevstop/asfac/AsFactory.as
@@ -70,11 +70,7 @@
 			if (!type)
 				throw new IllegalOperationError("Type cannot be null when registering a callback");

-			if (callback == null)
-				throw new IllegalOperationError("Callback cannot be null when registering a type");
-
-			if (!isValid(callback))
-				throw new IllegalOperationError("Callback function registered for {0} must have no arguments or a single AsFactory argument".replace("{0}", getQualifiedClassName(type)));
+			validateCallback(callback);

 			if (asSingleton)
 				_registrations[type] = (function(callback:Function):Function
@@ -174,10 +170,14 @@
 		 * Confirms that a callback is valid for registration. Currently the callback must accept no arguments, or a single AsFactory argument
 		 * @param	callback the callback being tested
 		 */
-		private function isValid(callback:Function):Boolean
+		private function validateCallback(callback:Function):void
 		{
+			if (callback == null)
+				throw new IllegalOperationError("Callback cannot be null when registering a type");
+
 			// TODO: How to check type?
-			return callback.length < 2;
+			if (callback.length > 1)
+				throw new IllegalOperationError("Callback function must have no arguments or a single AsFactory argument");
 		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19960
Author:   clucier@adobe.com
Date:     2011-01-26T21:26:28.368013Z

Log Message:
-----------
Fixing pause/resume Effect logic as it relates to active delay timer.

QE notes: None
Doc notes: None
Bugs: SDK-29219
Reviewer: Glenn
Tests run: Cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/effects/EffectInstance.as

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

--- frameworks/projects/framework/src/mx/effects/EffectInstance.as
+++ frameworks/projects/framework/src/mx/effects/EffectInstance.as
@@ -755,6 +755,7 @@
         if (delayTimer && !delayTimer.running && !isNaN(delayElapsedTime))
         {
             delayTimer.delay = !playReversed ? delayTimer.delay - delayElapsedTime : delayElapsedTime;
+            delayStartTime = getTimer();
             delayTimer.start();
         }
     }


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

--- frameworks/projects/framework/src/mx/managers/CursorManager.as
+++ frameworks/projects/framework/src/mx/managers/CursorManager.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: 2814
Author:   jimurphy@adobe.com
Date:     2008-08-12T13:49:02.219041Z

Log Message:
-----------
Merged 3.0.x revs [2798,2804,2811] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>

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

--- frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -431,8 +431,7 @@
 	 *  into the stage area, and release the mouse button.
 	 *  Without the mouseCatcher, the Button wouldn't return to its "up" state.
 	 */
-	 // VERSION_SKEW change from private to mx_internal so SystemManagerProxy can set.
-	mx_internal var mouseCatcher:Sprite;
+	private var mouseCatcher:Sprite;

 	/**
 	 *  @private
@@ -1338,7 +1337,7 @@
 			{
 			}
 		}
-
+
 		if (hasSandboxBridges())
 		{
 			if (!eventProxy)
@@ -1441,7 +1440,7 @@
 			{
 			}
 		}
-
+
 		if (hasSandboxBridges())
 		{
 			var actualType:String = EventUtil.marshalMouseEventMap[type];
@@ -1468,10 +1467,10 @@
 				removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
 			}
 		}
-		else
-		{
-			super.removeEventListener(type, listener, useCapture);
-		}
+        else
+        {
+            super.removeEventListener(type, listener, useCapture);
+        }
 	}

 	//--------------------------------------------------------------------------
@@ -2758,8 +2757,7 @@
 	 *  Makes the mouseCatcher the same size as the stage,
 	 *  filling it with transparent pixels.
 	 */
-	// VERSION_SKEW change from private to mx_internal so it can be called by SystemManagerProxy
-	mx_internal function resizeMouseCatcher():void
+	private function resizeMouseCatcher():void
 	{
 		if (mouseCatcher)
 		{
@@ -4676,8 +4674,8 @@
 	}

    /**
-     *  @inheritdoc
-     */
+    *  @inheritdoc
+    */
     public function getVisibleApplicationRect(bounds:Rectangle = null):Rectangle
     {
         if (!bounds)
@@ -4708,6 +4706,16 @@
         return bounds;
     }

+   /**
+    *  @inheritdoc
+    */
+    public function deployMouseShields(deploy:Boolean):void
+    {
+        var me:MarshalEvent = new MarshalEvent(MarshalEvent.DRAG_MANAGER, false, false,
+                                    "mouseShield", deploy);
+        getSandboxRoot().dispatchEvent(me);
+    }
+
 	/**
 	 * @private
 	 *
@@ -5039,8 +5047,8 @@
 				addEventListenerToSandboxes(eventObj.userType, sandboxMouseListener,
 							eventObj.useCapture, eventObj.priority, eventObj.useWeakReference, event.target as IEventDispatcher);
 				if (getSandboxRoot() == this)
-					super.addEventListener(actualType, eventProxy.marshalListener,
-							eventObj.useCapture, eventObj.priority, eventObj.useWeakReference);
+                    super.addEventListener(actualType, eventProxy.marshalListener,
+                            eventObj.useCapture, eventObj.priority, eventObj.useWeakReference);
 			}
 			// trace("<<eventListenerRequestHandler ADD ", this, eventObj.userType);
 		}
@@ -5121,15 +5129,15 @@

 	public function marshalListener(event:Event):void
 	{
-		if (event is MouseEvent)
-		{
-			var me:MouseEvent = event as MouseEvent;;
-			var mme:MarshalMouseEvent = new MarshalMouseEvent(EventUtil.mouseEventMap[event.type],
-				false, false, me.ctrlKey, me.altKey, me.shiftKey, me.buttonDown);
-			// trace(">>marshalListener", systemManager, mme.type);
-			systemManager.dispatchEventToSandboxes(mme, null, true);
-			// trace("<<marshalListener", systemManager);
-		}
+        if (event is MouseEvent)
+        {
+            var me:MouseEvent = event as MouseEvent;;
+            var mme:MarshalMouseEvent = new MarshalMouseEvent(EventUtil.mouseEventMap[event.type],
+                false, false, me.ctrlKey, me.altKey, me.shiftKey, me.buttonDown);
+            // trace(">>marshalListener", systemManager, mme.type);
+            systemManager.dispatchEventToSandboxes(mme, null, true);
+            // trace("<<marshalListener", systemManager);
+        }
 	}

 }
@@ -5151,6 +5159,7 @@

 	public function stageListener(event:Event):void
 	{
+	    // trace("stageListener " + this + event.type);
 		if (event.target is Stage)
 			listener(event);
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 11273
Author:   aharui@adobe.com
Date:     2009-10-29T18:57:54.403337Z

Log Message:
-----------
Initial check in of MXItemRenderer and friends

QE Notes: New Classes and Code
Doc Notes: New Classes and Code
Bugs: None
Reviewer: Ryan
API Change: yes
Is noteworthy for integration: No
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/BaseListData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListData.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/treeClasses</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridListData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeListData.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/halo/scripts/MXItemRendererTestScript.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/listClasses/MXItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests-config.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/halo/views/MXItemRendererTests.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/MXDataGridItemRenderer.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/listClasses</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/treeClasses/MXTreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</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/tests/basicTests/BasicTests.mxml</path>

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListData.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListData.as
@@ -92,7 +92,9 @@
 	//  icon
 	//----------------------------------

-	/**
+	[Bindable("dataChange")]
+
+    /**
 	 *  A Class representing the icon for the item in the List control computed
 	 *  from the list class's itemToIcon() method
 	 *
@@ -107,7 +109,9 @@
 	//  labelField
 	//----------------------------------

-	/**
+	[Bindable("dataChange")]
+
+    /**
 	 *  The value of the labelField property in the list class.
 	 *  This is the value normally used to calculate which property should
 	 *  be taken from the item in the data provider for the text displayed