Transferred from the Adobe Open Source Subversion Repository

Revision: 3297
Author:   jimurphy@adobe.com
Date:     2008-09-22T17:59:53.303960Z

Log Message:
-----------
Merge 3.0.x revisions 3260,3262,3266,3271,3276,3282,3285,3292,3294 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/FaultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/DirectHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.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/rpc/src/mx/rpc/AbstractInvoker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.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/PopUpManagerImpl.as</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/managers/IFocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/AbstractMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/Fault.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeGroup.as</path>

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

--- frameworks/projects/framework/src/mx/managers/FocusManager.as
+++ frameworks/projects/framework/src/mx/managers/FocusManager.as
@@ -33,8 +33,10 @@
 import mx.core.IButton;
 import mx.core.IChildList;
 import mx.core.IRawChildrenContainer;
+import mx.core.ISWFBridgeProvider;
 import mx.core.IUIComponent;
 import mx.core.mx_internal;
+import mx.core.SWFBridgeGroup;
 import mx.events.FlexEvent;
 import mx.events.FocusRequestDirection;
 import mx.events.SWFBridgeEvent;
@@ -150,15 +152,22 @@
 		{
         	container.systemManager.addFocusManager(container); // build a message that does the equal

+            var sm:ISystemManager = form.systemManager;
+
+            // Set up our swfBridgeGroup. If this is a pop up then the parent
+            // bridge is empty, otherwise its the form's system manager's bridge.
+            swfBridgeGroup = new SWFBridgeGroup(sm);
+            if (!popup)
+                swfBridgeGroup.parentBridge = sm.swfBridgeGroup.parentBridge;
+
 			// add ourselves to our parent focus manager if this is a bridged
 			// application not a dialog or other popup.
-			var sm:ISystemManager = form.systemManager;
-			if (sm.useSWFBridge() && !popup)
+			if (sm.useSWFBridge())
 			{
-				sm.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, removeFromParentBridge);
+			    sm.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, removeFromParentBridge);

 				// have the child listen to move requests from the parent.
-				var bridge:IEventDispatcher = sm.swfBridgeGroup.parentBridge;
+				var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
 		       	if (bridge)
 	    	   	{
 	       			bridge.addEventListener(SWFBridgeRequest.MOVE_FOCUS_REQUEST, focusRequestMoveHandler);
@@ -167,7 +176,7 @@
 	       		}

 	   			// add listener activate/deactivate requests
-	   			if (!(form.systemManager is SystemManagerProxy))
+	   			if (bridge && !(form.systemManager is SystemManagerProxy))
 	   			{
 	   				bridge.addEventListener(SWFBridgeRequest.ACTIVATE_FOCUS_REQUEST, focusRequestActivateHandler);
 	   				bridge.addEventListener(SWFBridgeRequest.DEACTIVATE_FOCUS_REQUEST, focusRequestDeactivateHandler);
@@ -253,7 +262,15 @@
 	 */
 	 private var fauxFocus:DisplayObject;

-	 private var bridgedFocusManagers:Dictionary;
+	 /**
+	  *  @private
+	  *
+	  *  The focus manager maintains its own bridges so a focus manager in a pop
+	  *  up can move focus to another focus manager in the same pop up. That is,
+	  *  A pop ups can be a collection of focus managers working together just
+	  *  as is done in the System Manager's document.
+	  */
+	 private var swfBridgeGroup:SWFBridgeGroup;

 	/**
 	 * @private
@@ -277,6 +294,15 @@
 	 *
 	 */
 	 private var popup:Boolean;
+
+	 /**
+	  *  @private
+	  *
+	  *  Used when a the skip parameter can't be passed into
+	  *  dispatchEventFromSWFBridges() because the caller doesn't take
+	  *  a skip parameter.
+	  */
+	 private var skipBridge:IEventDispatcher;

 	//--------------------------------------------------------------------------
     //
@@ -690,8 +716,7 @@
             setFocus(_lastFocus);

 		// activate children in compatibility mode or in sandboxes.
-		if (bridgedFocusManagers)
-			sendEventToBridgedFocusManagers(new SWFBridgeRequest(SWFBridgeRequest.ACTIVATE_FOCUS_REQUEST));
+    	dispatchEventFromSWFBridges(new SWFBridgeRequest(SWFBridgeRequest.ACTIVATE_FOCUS_REQUEST), skipBridge);

     }

@@ -740,9 +765,7 @@
         activated = false;

 		// deactivate children in compatibility mode or in sandboxes.
-		if (bridgedFocusManagers)
-			sendEventToBridgedFocusManagers(new SWFBridgeRequest(SWFBridgeRequest.DEACTIVATE_FOCUS_REQUEST));
-
+		dispatchEventFromSWFBridges(new SWFBridgeRequest(SWFBridgeRequest.DEACTIVATE_FOCUS_REQUEST), skipBridge);
     }

     /**
@@ -794,6 +817,18 @@
 	 */
 	public function moveFocus(direction:String, fromDisplayObject:DisplayObject = null):void
 	{
+	    if (direction == FocusRequestDirection.TOP)
+	    {
+	        setFocusToTop();
+	        return;
+	    }
+
+        if (direction == FocusRequestDirection.BOTTOM)
+        {
+            setFocusToBottom();
+            return;
+        }
+
 		var keyboardEvent:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN);
 		keyboardEvent.keyCode = Keyboard.TAB;
 		keyboardEvent.shiftKey = (direction == FocusRequestDirection.FORWARD) ? false : true;
@@ -1453,7 +1488,7 @@
     {
         var i:int;
         var o:DisplayObject = DisplayObject(event.target);
-
+
         // trace("FM got added for " + event.target);

         if (o is IFocusManagerComponent)
@@ -1876,19 +1911,26 @@
 	  	}

 		if (focusSetLocally)
-			dispatchActivatedFocusManagerEvent(null);
+		{
+            dispatchActivatedFocusManagerEvent(null);
+            lastActiveFocusManager = this;
+		}
     }

     private function focusRequestActivateHandler(event:Event):void
 	{
 		// trace("FM focusRequestActivateHandler");
+		skipBridge = IEventDispatcher(event.target);
 		activate();
+		skipBridge = null;
 	}

     private function focusRequestDeactivateHandler(event:Event):void
 	{
 		// trace("FM focusRequestDeactivateHandler");
+        skipBridge = IEventDispatcher(event.target);
 		deactivate();
+        skipBridge = null;
 	}

     private function bridgeEventActivateHandler(event:Event):void
@@ -1897,16 +1939,13 @@
 		if (event is SWFBridgeEvent)
 			return;

-		var eObj:Object = Object(event);
-
 		//trace("FM bridgeEventActivateHandler for " + form.systemManager.loaderInfo.url);
-		//trace("before clearing, lastFocus = " + lastFocus);

 		// clear last focus if we aren't active.
 		lastActiveFocusManager = null;
 		_lastFocus = null;

-		dispatchActivatedFocusManagerEvent(eObj);
+		dispatchActivatedFocusManagerEvent(IEventDispatcher(event.target));
 	}

     /**
@@ -1936,28 +1975,22 @@
 	 * When the top-level focus manager is called the bridge becomes
 	 * one of the focus managers managed by the top-level focus manager.
 	 */
-	public function addSWFBridge(bridge:IEventDispatcher):void
+	public function addSWFBridge(bridge:IEventDispatcher, owner:DisplayObject):void
 	{
 //    	trace("FocusManager.addFocusManagerBridge: in  = " + this._form.systemManager.loaderInfo.url);
-
+        if (!owner)
+            return;
+
 		var sm:ISystemManager = _form.systemManager;
-		var displayObject:DisplayObject = DisplayObject(sm.swfBridgeGroup.getChildBridgeProvider(bridge));
-		if (displayObject)
+       	if (focusableObjects.indexOf(owner) == -1)
 		{
-           	if (focusableObjects.indexOf(displayObject) == -1)
-			{
-				focusableObjects.push(displayObject);
-        	    calculateCandidates = true;
-   			}
-		}
-	    else
-	    	throw new Error();		// should never get here.
+			focusableObjects.push(owner);
+    	    calculateCandidates = true;
+   		}

 		// listen for move requests from the bridge.
-		if (!bridgedFocusManagers)
-			bridgedFocusManagers = new Dictionary(true);
-
-		bridgedFocusManagers[bridge] = 1;
+        swfBridgeGroup.addChildBridge(bridge, ISWFBridgeProvider(owner));
+
    		bridge.addEventListener(SWFBridgeRequest.MOVE_FOCUS_REQUEST, focusRequestMoveHandler);
         bridge.addEventListener(SWFBridgeRequest.SET_SHOW_FOCUS_INDICATOR_REQUEST,
                                 setShowFocusIndicatorRequestHandler);
@@ -1971,7 +2004,7 @@
 	public function removeSWFBridge(bridge:IEventDispatcher):void
 	{
 		var sm:ISystemManager = _form.systemManager;
-		var displayObject:DisplayObject = DisplayObject(sm.swfBridgeGroup.getChildBridgeProvider(bridge));
+		var displayObject:DisplayObject = DisplayObject(swfBridgeGroup.getChildBridgeProvider(bridge));
 		if (displayObject)
 		{
 			var index:int = focusableObjects.indexOf(displayObject);
@@ -1991,25 +2024,9 @@
                                     setShowFocusIndicatorRequestHandler);
   		bridge.removeEventListener(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE,
    					    		    bridgeEventActivateHandler);
-		if (bridgedFocusManagers)
-			delete bridgedFocusManagers[bridge];
-
+        swfBridgeGroup.removeChildBridge(bridge);
 	}

-	/**
-	 * @return true if the focus manager contains any focus manager
-	 * 		   bridges.
-	 */
-	private function hasAnyFocusManagerBridges():Boolean
-	{
-		for (var iter:Object in bridgedFocusManagers)
-		{
-			return true;
-		}
-
-		return false;
-	}
-
 	/**
 	 */
 	private function removeFromParentBridge(event:Event):void
@@ -2017,12 +2034,12 @@
 		// add ourselves to our parent focus manager if this is a bridged
 		// application not a dialog or other popup.
 		var sm:ISystemManager = form.systemManager;
-		if (sm.useSWFBridge() && !popup)
+		if (sm.useSWFBridge())
 		{
 			sm.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, removeFromParentBridge);

 			// have the child listen to move requests from the parent.
-			var bridge:IEventDispatcher = sm.swfBridgeGroup.parentBridge;
+			var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
 		    if (bridge)
 	    	{
 	       		bridge.removeEventListener(SWFBridgeRequest.MOVE_FOCUS_REQUEST, focusRequestMoveHandler);
@@ -2031,7 +2048,7 @@
 	       	}

 	   		// add listener activate/deactivate requests
-	   		if (!(form.systemManager is SystemManagerProxy))
+	   		if (bridge && !(form.systemManager is SystemManagerProxy))
 	   		{
 	   			bridge.removeEventListener(SWFBridgeRequest.ACTIVATE_FOCUS_REQUEST, focusRequestActivateHandler);
 	   			bridge.removeEventListener(SWFBridgeRequest.DEACTIVATE_FOCUS_REQUEST, focusRequestDeactivateHandler);
@@ -2073,9 +2090,8 @@
      */
     private function getParentBridge():IEventDispatcher
     {
-    	var sm:ISystemManager = _form.systemManager;
-    	if (sm.swfBridgeGroup)
-    		return sm.swfBridgeGroup.parentBridge;
+    	if (swfBridgeGroup)
+    		return swfBridgeGroup.parentBridge;

 		return null;
     }
@@ -2095,8 +2111,7 @@
                                             false,
                                             null,   // bridge is set before it is dispatched
                                             value);
-        var sm:ISystemManager = form.systemManager;
-        sm.dispatchEventFromSWFBridges(request, skip);
+        dispatchEventFromSWFBridges(request, skip);
     }

 	/**
@@ -2107,60 +2122,69 @@
 	 *  @param eObj if a SandboxBridgeEvent, then propagate the message,
 	 * 			   if null, start a new message.
 	 */
-	private function dispatchActivatedFocusManagerEvent(eObj:Object):void
+	private function dispatchActivatedFocusManagerEvent(skip:IEventDispatcher = null):void
 	{
-		// If in a popup, then don't send this message to non-popup
-		// focus managers that are part of the application.
-		if (popup)
-			return;
-
-		var sm:ISystemManager = form.systemManager;
-		if (sm && sm.swfBridgeGroup)
-		{
-			var lastBridge:IEventDispatcher = eObj ? eObj.target : null;
-	       	var parentBridge:IEventDispatcher = sm.swfBridgeGroup.parentBridge;
-
-//			TODODJL: don't send the ACTIVATED_FOCUS_MANAGER message if we are already
-//			active.
-//	       	if (lastActiveFocusManager == this)
-//	       	{
-//	       		// trace("FM: dispatchActivatedFocusManagerEvent already active, skipping messages");
-//	       		return;		// already active
-//	       	}
+
+		// Don't send the ACTIVATED_FOCUS_MANAGER message if we are already
+		// active.
+       	if (lastActiveFocusManager == this)
+       	{
+       		// trace("FM: dispatchActivatedFocusManagerEvent already active, skipping messages");
+       		return;		// already active
+       	}

-	       	// need to create the event locally so the "is this a message from ourselves"
-	       	// check works. Otherwise the message is created in the same domain.
-    		eObj = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE);
-
-	       	// send message to top-level that we are active
-	       	if (parentBridge && parentBridge != lastBridge)
-	       		parentBridge.dispatchEvent(Event(eObj));
-
-	       			// send to children
-			for (var iter:Object in bridgedFocusManagers)
-			{
-				if (iter != lastBridge)
-				{
-					var childBridge:IEventDispatcher = IEventDispatcher(iter);
-					childBridge.dispatchEvent(Event(eObj));
-				}
-			}
-
-		}
+    	var event:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_FOCUS_MANAGER_ACTIVATE);
+        dispatchEventFromSWFBridges(event, skip);
 	}

 	/**
-	 * Send the event to all the subordinate focus managers.
-	 */
-	private function sendEventToBridgedFocusManagers(event:Event):void
-	{
-		for (var iter:Object in bridgedFocusManagers)
-		{
-			IEventDispatcher(iter).dispatchEvent(event);
-		}
-	}
-
-
+     *  A Focus Manager has its own set of child bridges that may be different from the child
+     *  bridges of its System Manager if the Focus Manager is managing a pop up. In the case of
+     *  a pop up don't send messages to the SM parent bridge because that will be the form. But
+     *  do send the messages to the bridges in bridgeFocusManagers dictionary.
+     */
+    private function dispatchEventFromSWFBridges(event:Event, skip:IEventDispatcher = null):void
+    {
+
+
+        var clone:Event;
+        // trace(">>dispatchEventFromSWFBridges", this, event.type);
+        var sm:ISystemManager = form.systemManager;
+
+        if (!popup)
+        {
+            var parentBridge:IEventDispatcher = swfBridgeGroup.parentBridge;
+
+            if (parentBridge && parentBridge != skip)
+            {
+                // Ensure the requestor property has the correct bridge.
+                clone = event.clone();
+                if (clone is SWFBridgeRequest)
+                    SWFBridgeRequest(clone).requestor = parentBridge;
+
+                parentBridge.dispatchEvent(clone);
+            }
+        }
+
+        var children:Array = swfBridgeGroup.getChildBridges();
+        for (var i:int = 0; i < children.length; i++)
+        {
+            if (children[i] != skip)
+            {
+                // trace("send to child", i, event.type);
+                clone = event.clone();
+
+                // Ensure the requestor property has the correct bridge.
+                if (clone is SWFBridgeRequest)
+                    SWFBridgeRequest(clone).requestor = IEventDispatcher(children[i]);
+
+                IEventDispatcher(children[i]).dispatchEvent(clone);
+            }
+        }
+
+        // trace("<<dispatchEventFromSWFBridges", this, event.type);
+    }
+
 	private function getBrowserFocusComponent(shiftKey:Boolean):InteractiveObject
 	{
     	var focusComponent:InteractiveObject = form.systemManager.stage.focus;


Transferred from the Adobe Open Source Subversion Repository

Revision: 20146
Author:   aharui@adobe.com
Date:     2011-02-04T21:19:14.596552Z

Log Message:
-----------
Add try/catch around a test that will throw a security error in a sandboxed app

QE notes: none
Doc notes:  none
Bugs: SDK-29238
Reviewer: Darrell
Tests run: checkintests mustella cyclone
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -1655,10 +1655,18 @@

             if (nativeApp)
             {
-                var appXML:XML = XML(nativeApp["nativeApplication"]["applicationDescriptor"]);
-                var ns:Namespace = appXML.namespace();
-
-                _softKeyboardBehavior = String(appXML..ns::softKeyboardBehavior);
+                try
+                {
+                    var appXML:XML = XML(nativeApp["nativeApplication"]["applicationDescriptor"]);
+                    var ns:Namespace = appXML.namespace();
+
+                    _softKeyboardBehavior = String(appXML..ns::softKeyboardBehavior);
+                }
+                catch (e:Error)
+                {
+                    // TODO (aharui): Marshall this someday?
+                    _softKeyboardBehavior = "";
+                }
             }
             else
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12331
Author:   smgilson@adobe.com
Date:     2009-12-01T19:45:33.274910Z

Log Message:
-----------
ASDoc updates 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/TitleWindow.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/airspark/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airspark/src/spark/components/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/TitleWindow.as
+++ frameworks/projects/spark/src/spark/components/TitleWindow.as
@@ -155,6 +155,10 @@
  *               Width is the larger of the default or explicit width of the widest child, plus the left and
  *               right container borders padding, or the width of the title text.
  *

+ *

+ *           Default skin class
+ *           spark.skins.spark.TitleWindowSkin
+ *

  *

  *
  *  @mxml
@@ -166,10 +170,10 @@
  *  <s:TitleWindow>
  *    Events
  *    close="No default"
+ *    windowMove="No default"
+ *    windowMoveEnd="No default"
  *    windowMoveStart="No default"
  *    windowMoving="No default"
- *    windowMove="No default"
- *    windowMoveEnd="No default"
  *  </s:TitleWindow>
  *

  *
@@ -377,7 +381,7 @@
     }

     /**
-     *  @inheritDoc
+     *  @private
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

Revision: 5270
Author:   hmuller@adobe.com
Date:     2009-03-12T19:10:16.600232Z

Log Message:
-----------

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -859,17 +859,6 @@
      */
      private function updateLLV(layoutTarget:GroupBase):void
      {
-        var contentChangeDeltas:Vector.<int> = layoutTarget.mx_internal::contentChangeDeltas;
-        if (contentChangeDeltas)
-            for(var i:int = 0; i < contentChangeDeltas.length; i++)
-            {
-                var delta:int = contentChangeDeltas[i];
-                if (delta < 0)
-                    llv.remove(-(delta + 1));
-                else
-                    llv.insert(delta - 1);
-            }
-
         var typicalElt:ILayoutElement = typicalLayoutElement;
         if (typicalElt)
         {
@@ -881,6 +870,24 @@
         if (layoutTarget)
             llv.length = layoutTarget.numElements;
      }
+
+    /**
+     *  @private
+     */
+     override public function elementAdded(index:int):void
+     {
+         if (useVirtualLayout)
+            llv.insert(index);
+     }
+
+    /**
+     *  @private
+     */
+     override public function elementRemoved(index:int):void
+     {
+         if (useVirtualLayout)
+            llv.remove(index);
+     }

     /**
      *  @private
@@ -902,7 +909,10 @@

         updateLLV(layoutTarget);
         if (variableRowHeight)
-            layoutTarget.measuredHeight =  llv.end(measuredEltCount - 1);
+        {
+            var endIndex:int = Math.max(0, Math.min(measuredEltCount, eltCount) - 1);
+            layoutTarget.measuredHeight = llv.end(endIndex);
+        }
         else
         {
             var vgap:Number = (measuredEltCount > 1) ? (measuredEltCount - 1) * gap : 0;


Transferred from the Adobe Open Source Subversion Repository

Revision: 2998
Author:   hmuller@adobe.com
Date:     2008-08-26T15:32:00.001204Z

Log Message:
-----------
In the layout classes, only set the Group layoutTarget's scrollRect
when a scrolling request is implied, i.e. when
vertical,horizontalScrollPosition isn't zero, or when the Group's
contentWidth,Height is bigger than its unscaled width,height.
At the moment, the code for doing this is a static function on BasicLayout
that's also used by Vertical,HorizontalLayout.  If a layout utilities
class was defined, BasicLayout.setScrollRect() should move there.

This change should mitigate the number of bugs caused by
unconditionally clipping Groups to their width,height.  Unfortunately,
because of line stroke widths and anti-aliasing, many skins
currently draw outside of their measured bounds.

QE: No
Doc: No
Checkintests: Pass
Reviewer: Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -455,20 +455,8 @@
         }
         if (explicitRowCount == -1)
         	setRowCount(visibleRows);
-
-        var r:Rectangle = layoutTarget.scrollRect;
-        if (r != null)
-        {
-            r.width = unscaledWidth;
-            r.height = unscaledHeight;
-            layoutTarget.scrollRect = r;
-        }
-        else
-        {
-        	var rx:Number = layoutTarget.horizontalScrollPosition;
-        	var ry:Number = layoutTarget.verticalScrollPosition;
-        	layoutTarget.scrollRect = new Rectangle(rx, ry, unscaledWidth, unscaledHeight);
-        }
+
+        BasicLayout.setScrollRect(layoutTarget, unscaledWidth, unscaledHeight);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8031
Author:   egeorgie@adobe.com
Date:     2009-06-20T01:10:03.288554Z

Log Message:
-----------
Scrub the TODOs in the framework, convert to FIXMEs in the new convention and assigning an owner.

Doc Notes: N/A
Bugs: N/A
Reviewer: Deepa
tests: build, checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Timeline.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/VolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</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/collections/ModifiedCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ErrorSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.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/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/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/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectTargetFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/BitmapUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/StreamingVideoSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RemoveActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/pathSegments/LineSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.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/flex4/src/spark/effects/supportClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.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/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -1519,7 +1519,7 @@
         // the element if it's "contentJustify" or "justify".
         var containerWidth:Number = targetWidth;

-        // TODO: in the center or right case, we end up calculating percentWidth
+        // FIXME (egeorgie): in the center or right case, we end up calculating percentWidth
         // twice.  Once here for the contentWidth and once in distributeHeight
         // to size that particular element.
         if (horizontalAlign == HorizontalAlign.CONTENT_JUSTIFY ||


Transferred from the Adobe Open Source Subversion Repository

Revision: 4937
Author:   smgilson@adobe.com
Date:     2009-02-12T13:27:15.179540Z

Log Message:
-----------
Commit user patch for SDK-16942. This is an update to ASDoc comments on NumberFormatter.as.

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/NumberFormatter.as

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 17116
Author:   dloverin@adobe.com
Date:     2010-07-29T13:27:01.624740Z

Log Message:
-----------
Prevent sub-applications and modules from being pinned in memory by ResourceManager.

This set of changes fixes a module leak that is cause by resource bundles. The ResourceManager is a singleton the holds a reference to all resource bundles in the system. This includes sub-applications and modules. The leaks occurs when a sub-application or module defines a new resource bundle that is not in the application domain of the main application. Creating a new instance of this resource bundle creates a reference from the main application to the application domain of the sub-application or module, pinning it in memory.

The solution to the module leak problem is to modify the ResourceManager API to allow an application to opt-in to maintaining references to their own resource bundles instead of allowing ResourceManager to do it. Since the resource bundles are referenced by the applications or modules, the ResourceManager can keep a weak reference to the resource bundles which will allow the references to be garbage collected when the sub-applications or modules are garbage collected.

So how are does the ResourceManager allow you to opt-in? A useWeakReference parameter was added to both the addResourceBundle and installCompiledResourceBundles functions. The new parameter has a default value of "false" if no value is supplied. A value of "false" provides the old behavior so older applications compiling with the new API will see no change in behavior. A value of "true" for useWeakReference tells the ResourceManager to provide a weak reference with the agreement that the caller will provide a hard reference. Flex sub-applications and modules automatically opt-in to use the new weak reference capability.

The addResourceBundle function adds just the new useWeakReference. A value of true means the caller should store the passed resourceBundle in an application instance variable.

The installCompiledResourceBundles function also has a new parameter useWeakReference and now returns an Array (used to return void). The useWeakReference parameter has the same meaning as in addResourceBundle. The installCompiledResourceBundles function returns and array of resource bundles to give the caller and opportunity to had a hard reference to them.

QE notes: None.
Doc notes: None.
Bugs: SDK-24306
Reviewer: Alex (code), Gordon (API)
Tests run: checkintests, cyclone server
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/resources/IResourceManager.as</path>

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

--- frameworks/projects/framework/src/mx/resources/IResourceManager.as
+++ frameworks/projects/framework/src/mx/resources/IResourceManager.as
@@ -240,13 +240,31 @@
      *  methods such as getString().
      *
      *  @param resourceBundle The resource bundle to be added.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    function addResourceBundle(resourceBundle:IResourceBundle):void;
+     *  @param useWeakReference Determines if the ResourceManager
+     *  keeps a weak reference to the resource bundle.
+     *  If useWeakReference is true then the ResourceManager will
+     *  provide a weak reference to the resource bundle. When the
+     *  caller chooses to use a weak reference it becomes the
+     *  caller's responsibility to keep a hard reference the resource bundle
+     *  so it is not garbaged collected prematurely. If useWeakReference is
+     *  false the ResourceManager will keep a hard reference to the resource
+     *  bundle so it will not be garbage collected.
+     *
+     *  When a Flex sub-application or module automatically adds its compiled
+     *  resource bundles to the ResourceManager, it calls addResourceBundle()
+     *  with useWeakReference set to true, to avoid becoming pinned in memory.
+     *  If you create resource bundles at runtime in a sub-application or
+     *  module, you should do the same. You then need to hold on to these
+     *  resource bundles with a hard reference to prevent them from being
+     *  garbage-collected.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function addResourceBundle(resourceBundle:IResourceBundle,
+                               useWeakReference:Boolean = false):void;

     /**
      *  Removes the specified ResourceBundle from the ResourceManager
@@ -746,7 +764,8 @@
     function installCompiledResourceBundles(
                                 applicationDomain:ApplicationDomain,
                                 locales:Array /* of String */,
-                                bundleNames:Array /* of String */):void;
+                                bundleNames:Array /* of String */,
+                                useWeakReference:Boolean = false):Array;

 	/**
 	 *  Used only by classes which implement IFlexModuleFactory.


Transferred from the Adobe Open Source Subversion Repository

Revision: 4440
Author:   cframpto@adobe.com
Date:     2009-01-08T15:35:17.153071Z

Log Message:
-----------
If no selection, insertText() does an append.  Previously it did nothing.

QE Notes:
Doc Notes: None
Bugs: SDK-16410
Reviewers: Gordan

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -1702,7 +1702,8 @@
     /**
      *  Inserts the specified text as if you had typed it.
      *  If a range was selected, the new text replaces the selected text;
-     *  if there was an insertion point, the new text is inserted there.
+     *  if there was an insertion point, the new text is inserted there,
+     *  otherwise the text is appended to the text that is there.
      *  An insertion point is then set after the new text.
      */
     public function insertText(text:String):void
@@ -1715,8 +1716,10 @@
         var priorEditingMode:String = getEditingMode(textFlow.interactionManager);
         switchToEditingMode(textFlow, EditingMode.READ_WRITE);

-        // This does nothing if there is not an insertion point, ie
-        // there is no selection.
+        // If no selection, then it's an append.
+        if (!textFlow.interactionManager.hasSelection())
+            textFlow.interactionManager.setSelection(int.MAX_VALUE, int.MAX_VALUE);
+
         EditManager(textFlow.interactionManager).insertText(text);

         // Update TLF display.  This initiates the InsertTextOperation.
@@ -1745,7 +1748,10 @@

         // An append is an insert with the selection set to the end.
         textFlow.interactionManager.setSelection(int.MAX_VALUE, int.MAX_VALUE);
-        insertText(text);
+        EditManager(textFlow.interactionManager).insertText(text);
+
+        // Update TLF display.  This initiates the InsertTextOperation.
+        textFlow.flowComposer.updateAllContainers();

         // Restore the prior editing mode.
         switchToEditingMode(textFlow, priorEditingMode);


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

--- frameworks/projects/automation/src/mx/automation/codec/ArrayPropertyCodec.as
+++ frameworks/projects/automation/src/mx/automation/codec/ArrayPropertyCodec.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 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: 18567
Author:   klin@adobe.com
Date:     2010-11-13T00:28:51.781896Z

Log Message:
-----------
Fix for Bindable metadata being in the wrong place in DataGrid, Grid and GridColumn. Made GridColumn.editable Bindable. variableRowHeight and resizableColumns were also not dispatching a change event. I also took the liberty of performing some code clean up and fixing some docs.

QE notes: Check properties to make sure they're Bindable
Doc notes: No
Bugs: SDK-28464
Reviewer: Hans
Tests run: DataGrid, checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/GridEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/CellPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridRowList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IGridItemRendererOwner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/UITextFieldGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/CellRegion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridRowNode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridSelectionMode.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
@@ -52,7 +52,11 @@
      *      }
      *      argArray.splice(0, 0, startIndex, 0);
      *      vec.splice.apply(vec, argArray);
-     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public static function insertValuesToVector(vec:Vector.<Number>, startIndex:int, values:Vector.<Number>):void
     {
@@ -76,6 +80,11 @@
     /**
      *  Insert count elements of the specified value starting from
      *  startIndex.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public static function insertValueToVector(vec:Vector.<Number>, startIndex:int, count:int, value:Number):void
     {
@@ -94,6 +103,11 @@
     /**
      *  Sets all of the numbers in a vector to be value unless otherwise
      *  specified.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public static function clearVector(vec:Vector.<Number>, value:Number, startIndex:int = 0, count:int = -1):void
     {
@@ -123,7 +137,7 @@
     //
     //--------------------------------------------------------------------------

-    public var rowList:GridRowList = new GridRowList();
+    private var rowList:GridRowList = new GridRowList();
     private var _columnWidths:Vector.<Number> = new Vector.<Number>();

     //cache for cumulative y values.
@@ -144,7 +158,12 @@
     //--------------------------------------------------------------------------

     /**
-     *  Constructor
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function GridDimensions()
     {
@@ -166,6 +185,11 @@
     /**
      *  The number of rows in the Grid. If this is decreased, the
      *  excess rows will be removed.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function get rowCount():int
     {
@@ -195,8 +219,13 @@
     private var _columnCount:int = 0;

     /**
-     *  The number of columns in the Grid. If this is decreased, the
-     *  excess columns will be removed.
+     *  The number of columns in the Grid.
+     *  Setting this property will clear the cache.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function get columnCount():int
     {
@@ -205,9 +234,6 @@

     /**
      *  @private
-     *
-     *  Clears the cache and resets GridDimensions such that the
-     *  number of columns is value.
      */
     public function set columnCount(value:int):void
     {
@@ -240,6 +266,11 @@
      *  The gap between rows.
      *
      *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function get rowGap():Number
     {
@@ -270,7 +301,12 @@
     /**
      *  The gap between columns.
      *
-     *  @default 0
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function get columnGap():Number
     {
@@ -308,6 +344,11 @@
      *  defaultRowHeight.</p>
      *
      *  @default NaN
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function get defaultRowHeight():Number
     {
@@ -337,6 +378,11 @@
     /**
      *  The default width of a column.
      *  If this changes, update the ASDoc for GridLayout/getItemRendererAt().
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public var defaultColumnWidth:Number = 150;

@@ -347,6 +393,11 @@
     /**
      *  If variableRowHeight is false, calling getRowHeight
      *  will return the value of defaultRowHeight.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public var variableRowHeight:Boolean = false;  // default value must match Grid property default value

@@ -360,6 +411,11 @@
      *  The minimum height of each row.
      *
      *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function get minRowHeight():Number
     {
@@ -388,6 +444,11 @@
      *  The maximum height of each row.
      *
      *  @default 10000
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function get maxRowHeight():Number
     {
@@ -408,18 +469,22 @@

     //--------------------------------------------------------------------------
     //
-    //  Class methods
+    //  Methods
     //
     //--------------------------------------------------------------------------

     /**
-     *  Returns the height of the row at the given index. Returns the
-     *  fixedRowHeight if set. If not, returns the height specified by
-     *  setRowHeight. If no height has been specified, returns the
-     *  natural height of the row (maximum height of its cells. If the
-     *  cells haven't been cached, returns defaultRowHeight.
-     *  The return value is always bounded by the minRowHeight and
-     *  maxRowHeight.
+     *  Returns the height of the row at the given index. If variableRowHeight
+     *  is true, then the height in precendence order is: the height set by setRowHeight,
+     *  the natural height of the row (determined by the maximum of its cell heights),
+     *  and defaultRowHeight. If variableRowHeight is false, then the height returned
+     *  is the defaultRowHeight. The returned height is always bounded by the minRowHeight
+     *  and maxRowHeight.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getRowHeight(row:int):Number
     {
@@ -444,8 +509,13 @@
     /**
      *  Sets the height of a given row. This height takes precedence over
      *  the natural height of the row (determined by the maximum of its
-     *  cell heights) and the defaultRowHeight. However, fixedRowHeight
-     *  takes precedence over this height.
+     *  cell heights) and the defaultRowHeight. However, if variableRowHeight
+     *  is true, this method has no effect.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function setRowHeight(row:int, height:Number):void
     {
@@ -472,6 +542,11 @@
      *  the width specified by setColumnWidth. If no width has been
      *  specified, returns the typical width. If no typical width has
      *  been set, it returns the defaultColumnWidth.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getColumnWidth(col:int):Number
     {
@@ -490,17 +565,26 @@

     /**
      *  Sets the width of a given column.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function setColumnWidth(col:int, width:Number):void
     {
-        // out of bounds col will throw an error..should we handle it?
         _columnWidths[col] = width;
     }

     /**
      *  Returns the height of the specified cell. Returns the height
-     *  set by setCellHeight. If the height has not been specified,
+     *  specified by setCellHeight. If the height has not been specified,
      *  returns NaN.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getCellHeight(row:int, col:int):Number
     {
@@ -514,6 +598,11 @@

     /**
      *  Sets the height of the specified cell.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function setCellHeight(row:int, col:int, height:Number):void
     {
@@ -541,6 +630,11 @@
     /**
      *  Returns the layout bounds of the specified cell. The cell height
      *  and width are determined by its row's height and column's width.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getCellBounds(row:int, col:int):Rectangle
     {
@@ -559,6 +653,11 @@

     /**
      *  Returns the X coordinate of the origin of the specified cell.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getCellX(row:int, col:int):Number
     {
@@ -574,6 +673,11 @@

     /**
      *  Returns the Y coordinate of the origin of the specified cell.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getCellY(row:int, col:int):Number
     {
@@ -605,6 +709,7 @@
     }

     /**
+     *  @private
      *  Returns the starting y value of the specified row. The row must be before
      *  startNode.
      *
@@ -653,6 +758,7 @@
     }

     /**
+     *  @private
      *  Returns the starting y value of the specified row. The row must be after
      *  startNode.
      *
@@ -706,6 +812,11 @@

     /**
      *  Returns the layout bounds of the specified row.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getRowBounds(row:int):Rectangle
     {
@@ -727,6 +838,11 @@
      *  Return the dimensions of a row that's being used to "pad" the grid
      *  by filling unused space below the last row in a layout where all rows
      *  are visible.  Pad rows have index >= rowCount, height = defaultRowHeight.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getPadRowBounds(row:int):Rectangle
     {
@@ -759,6 +875,11 @@

     /**
      *  Returns the layout bounds of the specified column.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getColumnBounds(col:int):Rectangle
     {
@@ -783,6 +904,11 @@
      *
      *  @return The index of the row at the coordinates provided. If the
      *  coordinates are out of bounds, return -1.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getRowIndexAt(x:Number, y:Number):int
     {
@@ -819,6 +945,7 @@
     }

     /**
+     *  @private
      *  Checks if a certain y value lies in a row's bounds.
      */
     private function isYInRow(y:Number, startY:Number, node:GridRowNode):Boolean
@@ -837,6 +964,7 @@
     }

     /**
+     *  @private
      *  Returns the index of the row that contains the specified y value.
      *  The row will be before startNode.
      *
@@ -899,6 +1027,7 @@
     }

     /**
+     *  @private
      *  Returns the index of the row that contains the specified y value.
      *  The row will be after startNode.
      *
@@ -978,6 +1107,11 @@
      *  Returns the index of the column at the specified coordinates. If
      *  the coordinates lie in a gap area, the index returned is the
      *  previous column. Returns -1 if the coordinates are out of bounds.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getColumnIndexAt(x:Number, y:Number):int
     {
@@ -1013,6 +1147,11 @@
      *  Returns the total layout width of the content including gaps.   If
 	 *  columnCountOverride is specified, then the overall width of as many columns
 	 *  is returned.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getContentWidth(columnCountOverride:int = -1):Number
     {
@@ -1059,6 +1198,11 @@
      *  Returns the total layout height of the content including gaps.  If
 	 *  rowHeightOverride is specified, then the overall height of as many rows
 	 *  is returned.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getContentHeight(rowCountOverride:int = -1):Number
     {
@@ -1090,6 +1234,11 @@
      *  Returns the sum of the typical cell widths including gaps.  If
 	 *  columnCountOverride is specified, then the overall typicalCellWidth
      *  of as many columns is returned.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getTypicalContentWidth(columnCountOverride:int = -1):Number
     {
@@ -1121,6 +1270,11 @@
      *  Returns the content height which is maximum cell height of the
      *  typical item times the total number of rows including gaps.
      *  If rowCountOverride is specified, then we only include that many rows.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getTypicalContentHeight(rowCountOverride:int = -1):Number
     {
@@ -1139,6 +1293,11 @@
     /**
      *  Return the preferred bounds width of the grid's typicalItem when rendered with the item renderer
      *  for the specified column.  If no value has yet been specified, return NaN.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getTypicalCellWidth(columnIndex:int):Number
     {
@@ -1147,6 +1306,11 @@

     /**
      *  Sets the preferred bounds width of the grid's typicalItem for the specified column.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function setTypicalCellWidth(columnIndex:int, value:Number):void
     {
@@ -1156,6 +1320,11 @@
     /**
      *  Return the preferred bounds height of the grid's typicalItem when rendered with the item renderer
      *  for the specified column.  If no value has yet been specified, return NaN.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function getTypicalCellHeight(columnIndex:int):Number
     {
@@ -1164,6 +1333,11 @@

     /**
      *  Sets the preferred bounds height of the grid's typicalItem for the specified column.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function setTypicalCellHeight(columnIndex:int, value:Number):void
     {
@@ -1181,6 +1355,11 @@

     /**
      *  Clears the typical cell for every column and row.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function clearTypicalCellWidthsAndHeights():void
     {
@@ -1188,11 +1367,22 @@
         clearVector(typicalCellHeights, NaN);
         maxTypicalCellHeight = NaN;
     }
-
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods for handling dataProvider and column list changes
+    //
+    //--------------------------------------------------------------------------
+
     /**
      *  Inserts count number of rows starting from startRow. This shifts
      *  any rows after startRow down by count and will increment
      *  rowCount.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function insertRows(startRow:int, count:int):void
     {
@@ -1203,6 +1393,11 @@
      *  Inserts count number of columns starting from startColumn. This
      *  shifts any columns after startColumn down by count and will
      *  increment columnCount.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function insertColumns(startColumn:int, count:int):void
     {
@@ -1228,6 +1423,11 @@
      *  Removes count number of rows starting from startRow. This
      *  shifts any rows after startRow up by count and will
      *  decrement rowCount.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function removeRows(startRow:int, count:int):void
     {
@@ -1238,6 +1438,11 @@
      *  Removes count number of columns starting from startColumn. This
      *  shifts any columns after startColumn up by count and will
      *  decrement columnCount.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function removeColumns(startColumn:int, count:int):void
     {
@@ -1274,6 +1479,11 @@
     /**
      *  Removes any nodes that occupy the indices between startRow
      *  and startRow + count.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function clearRows(startRow:int, count:int):void
     {
@@ -1302,6 +1512,11 @@
     /**
      *  Clears any columns that occupy the indices between startColumn
      *  and startColumn + count.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function clearColumns(startColumn:int, count:int):void
     {
@@ -1322,6 +1537,11 @@
     /**
      *  Moves count number of rows from the fromRow index to the toRow
      *  index. This operation will not affect rowCount.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function moveRows(fromRow:int, toRow:int, count:int):void
     {
@@ -1340,6 +1560,11 @@
     /**
      *  Moves count number of columns from the fromCol index to the toCol
      *  index. This operation will not affect colCount.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function moveColumns(fromCol:int, toCol:int, count:int):void
     {
@@ -1355,6 +1580,11 @@

     /**
      *  Removes all cells and sets rowCount to 0.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function clear():void
     {
@@ -1367,6 +1597,7 @@
     }

     /**
+     *  @private
      *  Inserts count number of rows starting from startRow. This will increment
      *  rowCount. If the nodes parameter is set, the nodes will be inserted
      *  to the rowList.
@@ -1416,6 +1647,7 @@
     }

     /**
+     *  @private
      *  Removes count number of rows starting from startRow. This will
      *  decrement rowCount. Returns any removed nodes.
      */
@@ -1456,6 +1688,11 @@

     /**
      *  Handles changes in the dataProvider.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function dataProviderCollectionChanged(event:CollectionEvent):void
     {
@@ -1508,6 +1745,11 @@

     /**
      *  Handles changes in columns.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
      */
     public function columnsCollectionChanged(event:CollectionEvent):void
     {
@@ -1553,11 +1795,12 @@
     }

     /**
+     *  @private
      *  For debugging purposes.
      */
     public function toString():String
     {
-        // TODO: Build really useful string here.
+        // TODO (klin): Build really useful string here.
         return rowList.toString();
     }
 }


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

--- frameworks/projects/framework/src/mx/core/IIMESupport.as
+++ frameworks/projects/framework/src/mx/core/IIMESupport.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2006 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 15083
Author:   klin@adobe.com
Date:     2010-03-26T22:14:52.263931Z

Log Message:
-----------
Merge 15082 from 4.x to trunk.

Fix for http://bugs.adobe.com/jira/browse/SDK-25997. The knob in a dividedBox is incorrectly positioned. This is the result of a couple of things in BitmapAsset and SpriteAsset.

-Changed rotation setter to set super.rotation when not mirrored.
-width/height are now always positive regardless of whether scaleX/Y is negative.
-width/height getters now take the full transform into account. Basically, they return the bounding box size now.
-Also, BoxDivider sets the layoutDirection of its knob to null (inheriting) in order to be positioned correctly.

QE notes: No
Doc notes: No
Bugs: SDK-25997
Reviewer: Carol, Jason
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SpriteAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/dividedBoxClasses/BoxDivider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/BitmapAsset.as</path>

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

--- frameworks/projects/framework/src/mx/core/SpriteAsset.as
+++ frameworks/projects/framework/src/mx/core/SpriteAsset.as
@@ -17,6 +17,7 @@
 import flash.geom.Matrix;

 import mx.core.AdvancedLayoutFeatures;
+import mx.utils.MatrixUtil;

 /**
  *  SpriteAsset is a subclass of the flash.display.Sprite class which
@@ -243,7 +244,9 @@
      */
     override public function get width():Number
     {
-        return (layoutFeatures == null) ? super.width : layoutFeatures.layoutWidth;
+        // Return bounding box width in mirroring case
+        return (layoutFeatures == null) ? super.width :
+               MatrixUtil.transformSize(layoutFeatures.layoutWidth, _height, transform.matrix).x;
     }

     /**
@@ -280,7 +283,9 @@
      */
     override public function get height():Number
     {
-        return (layoutFeatures == null) ? super.height : _height;
+        // Return bounding box height in mirroring case
+        return (layoutFeatures == null) ? super.height :
+               MatrixUtil.transformSize(layoutFeatures.layoutWidth, _height, transform.matrix).y;
     }

     /**
@@ -403,7 +408,19 @@
      */
     override public function set rotation(value:Number):void
     {
-        rotationZ = value;
+        // TODO (klin): rotation actually affects width and height as well.
+        if (rotation == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
+            super.rotation = value;
+        }
+        else
+        {
+            layoutFeatures.layoutRotationZ = value;
+            validateTransformMatrix();
+        }
     }

     //----------------------------------
@@ -433,7 +450,7 @@
         else
         {
             layoutFeatures.layoutScaleX = value;
-            layoutFeatures.layoutWidth = value * measuredWidth;
+            layoutFeatures.layoutWidth = Math.abs(value) * measuredWidth;
             validateTransformMatrix();
         }
     }
@@ -465,7 +482,7 @@
         else
         {
             layoutFeatures.layoutScaleY = value;
-            _height = value * measuredHeight;
+            _height = Math.abs(value) * measuredHeight;
             validateTransformMatrix();
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5190
Author:   hmuller@adobe.com
Date:     2009-03-06T14:55:28.277220Z

Log Message:
-----------
Initial support for mirroring: added mirror and dir properties to IVisualElement, mirroring logic to UIComponent, GraphicElement, UIMovieClip.  Mirroring in mx.core.SpriteVisualElement is just a stub.  Support for the mirror bit and the mirror transform is in mx.core.AdvancedLayoutFeatures.

QE Notes: Mustella tests pass
Doc Notes: None
Bugs:
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -2307,6 +2307,13 @@

             _width = value;

+            // The width is needed for the mirroring transform.
+            if (_layoutFeatures)
+            {
+                _layoutFeatures.layoutWidth = value;
+                invalidateTransform();
+            }
+
             dispatchEvent(new Event("widthChanged"));
         }
     }
@@ -3125,6 +3132,111 @@
     public function set tweeningProperties(value:Array):void
     {
         _tweeningProperties = value;
+    }
+
+
+    //----------------------------------
+    //  mirror
+    //----------------------------------
+
+    public function get mirror():Boolean
+    {
+        return _layoutFeatures && _layoutFeatures.mirror;
+    }
+
+    public function set mirror(value:Boolean):void
+    {
+        if (value == mirror)
+            return;
+
+        if (_layoutFeatures == null)
+            initAdvancedLayoutFeatures();
+        _layoutFeatures.mirror = value;
+        invalidateTransform();
+    }
+
+    //----------------------------------
+    //  dir
+    //----------------------------------
+
+    private var _dir:String;
+
+    public function get dir():String
+    {
+        return _dir;
+    }
+
+    public function set dir(value:String):void
+    {
+        if (_dir == value)
+            return;
+
+        _dir = value;
+        mirrorTree(findAncestorDir(this));
+    }
+
+    /**
+     *  @private
+     *  Return the value of the dir property for the first ancestor whose
+     *  dir is non-null.  Typically that's the FxApplication's dir, which
+     *  is default "ltr".
+     */
+    private function findAncestorDir(elt:IVisualElement):String
+    {
+        var parentElt:IVisualElement = elt.parent as IVisualElement;
+        if (!parentElt)
+            return null;
+        var ancestorDir:String = parentElt.dir;
+        return (ancestorDir) ? ancestorDir : findAncestorDir(parentElt);
+    }
+
+    /**
+     *  @private
+     *  Walk the IVisualElement tree setting the mirror property for elements whose
+     *  dir doesn't match their nearest ancestor's, clearing it if it does match.
+     *
+     *  This is a bit messy because we need to walk into FxComponent skins.  A
+     *  FxComponent::mirrorTree override handles that.
+     *
+     *  It's also messy because although this function is defined on UIComponent,
+     *  we need to visit IVisualElements that are not UIComponents, notably
+     *  GraphicalElements.
+     */
+    mx_internal function mirrorTree(ancestorDir:String):void
+    {
+        ancestorDir = mirrorElement(this, ancestorDir);
+
+        var root:IVisualElementContainer = this as IVisualElementContainer;
+        if (root)
+        {
+            var n:int = root.numElements;
+            for (var i:int = 0; i < n; i++)
+            {
+                var elt:IVisualElement = root.getElementAt(i);
+                if (elt is UIComponent)
+                    UIComponent(elt).mirrorTree(ancestorDir);
+                else
+                    mx_internal::mirrorElement(elt, ancestorDir);
+            }
+        }
+    }
+
+    /**
+     *  @private
+     *  If elt's dir doesn't match ancestorDir (see mirrorTree),
+     *  then set its mirror property.  If that happens elt's dir becomes
+     *  the new ancestorDir, which is what we return.
+     */
+    mx_internal function mirrorElement(elt:IVisualElement, ancestorDir:String):String
+    {
+        if (elt.dir && (elt.dir != ancestorDir))
+        {
+            elt.mirror = (ancestorDir) ? true : (elt.dir == "rtl");
+            ancestorDir = elt.dir;
+        }
+        else
+            elt.mirror = false;
+        return ancestorDir;
     }

     //--------------------------------------------------------------------------
@@ -6373,6 +6485,15 @@
         // but some need to react to even this early change.
         if (child is UIComponent)
             UIComponent(child).stylesInitialized();
+
+        if (child is IVisualElement)
+        {
+            var ancestorDir:String = findAncestorDir(IVisualElement(child));
+            if (child is UIComponent)
+                UIComponent(child).mx_internal::mirrorTree(ancestorDir);
+            else
+                mirrorElement(IVisualElement(child), ancestorDir);
+        }
     }

     /**
@@ -8198,6 +8319,11 @@
         if (_width != w)
         {
             _width = w;
+            if(_layoutFeatures)
+            {
+                _layoutFeatures.layoutWidth = w;
+                invalidateTransform();
+            }
             dispatchEvent(new Event("widthChanged"));
             changed = true;
         }
@@ -11110,6 +11236,7 @@
         features.layoutX = x;
         features.layoutY = y;
         features.layoutZ = z;
+        features.layoutWidth = width;
         _layoutFeatures = features;
         invalidateTransform();
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 10006
Author:   gruehle@adobe.com
Date:     2009-09-03T22:04:47.081899Z

Log Message:
-----------
Initial checkin of the "More styles for Spark skins" feature. Details here:
http://opensource.adobe.com/wiki/display/flexsdk/More+Styles+for+Spark+Skins

There are some known issues:
* Panel bottom corners not rounded correctly when the panel has a control bar
* cornerRadius on Tab and DateChooser non functional
* cornerRadius values > 4 have drawing artifacts in the "down" state of Button and button-like components
* TextInput/TextArea incorrectly list lineBreak and verticalAlign as valid styles

This checkin also includes a couple minor unrelated bug fixes:
* Remove MiniDebugTarget. This is a logging target that used MiniDebug, which hasn't worked since Flex 1.5
* Fix RTEs when setting focusSkin to null
* Optimization: don't measure skins if the host component has explicit sizes

QE notes: Yes, many baseline images will need to be regenerated
Doc notes: New ASDoc comments should be scrubbed
Bugs: SDK-22931, SDK-22798, SDK-22217, SDK-19358
Reviewer: Jason
Tests run: checkintests, cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/StepperIncrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/PopUpButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/SparkChromeWindowedApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/WindowedApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ButtonBarLastButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/logging/targets/MiniDebugTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/StepperDecrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SpinnerDecrementButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatorContent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/EditableComboBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/DefaultButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ButtonBarLastButtonSkin.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/sparkskins/src/mx/skins/spark/SparkSkinForHalo.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/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ButtonBarFirstButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/TextInputBorderSkin.mxml</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/skins/spark/SpinnerIncrementButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/halo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.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/controls/ComboBase.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/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ButtonBarFirstButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DropDownListButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ComboBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/SparkSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/BorderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/NumericStepperTextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.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/spark/src/spark/skins/spark/ApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/BorderTestScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ApplicationSkin.mxml</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -8915,11 +8915,14 @@
                 focusPane.removeChild(focusObj);
                 focusObj = null;
             }
+
+            if (!focusClass)
+                return;

             if (!focusObj)
             {
                 focusObj = new focusClass();
-
+
                 focusObj.name = "focus";

                 focusPane.addChild(focusObj);


Transferred from the Adobe Open Source Subversion Repository

Revision: 5098
Author:   gauravj@adobe.com
Date:     2009-02-27T02:21:27.489350Z

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:
--------------
151 paths were modified

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

--- frameworks/projects/spark/src/spark/effects/AddAction.as
+++ frameworks/projects/spark/src/spark/effects/AddAction.as
@@ -53,6 +53,11 @@
  *  @see mx.states.AddChild
  *
  *  @includeExample ../states/examples/TransitionExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class AddAction extends Effect
 {
@@ -73,30 +78,55 @@
 	 * Constant used to specify the position to add the item.
 	 *
 	 * @see #position
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
     public static const BEFORE:String = "before";
     /**
      * Constant used to specify the position to add the item.
      *
      * @see #position
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static const AFTER:String = "after";
     /**
      * Constant used to specify the position to add the item.
      *
      * @see #position
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static const FIRST_CHILD:String = "firstChild";
     /**
      * Constant used to specify the position to add the item.
      *
      * @see #position
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static const LAST_CHILD:String = "lastChild";
     /**
      * Constant used to specify the position to add the item.
      *
      * @see #position
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static const INDEX:String = "index";

@@ -110,6 +140,11 @@
 	 *  Constructor.
 	 *
 	 *  @param target The Object to animate with this effect.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function AddAction(target:Object = null)
 	{
@@ -140,6 +175,11 @@
 	 *  A value of -1 means add the child as the last child of the parent.
 	 *
 	 *  @default -1
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public var index:int = -1;

@@ -153,6 +193,11 @@
 	 *  The location where the child component is added.
 	 *  By default, Flex determines this value from the AddChild
 	 *  property definition in the view state definition.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public var relativeTo:DisplayObjectContainer;

@@ -177,6 +222,11 @@
      *  @see #FIRST_CHILD
      *  @see #LAST_CHILD
      *  @see #INDEX
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public var position:String = INDEX;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package spark.events
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12756
Author:   gruehle@adobe.com
Date:     2009-12-09T22:18:46.364767Z

Log Message:
-----------
Add null check before removing listeners from the stage.

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

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as

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

--- frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
+++ frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
@@ -4729,8 +4729,11 @@
         // Same security issue as addFocusEventListeners()
         try
         {
-            stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
-            stage.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
+            if (stage)
+            {
+                stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
+                stage.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
+            }
         }
         catch (err:SecurityError)
         {