Transferred from the Adobe Open Source Subversion Repository

Revision: 7163
Author:   aharui@adobe.com
Date:     2009-05-21T02:19:55.813792Z

Log Message:
-----------
Initial checkin of frame 1 cleanup.  In an RSL linkage, more classes will now come from the RSL because they are no longer needed in frame 1, and the size of the application SWF will be smaller.

QE Notes: None
Doc Notes: Maybe.  All new classes should be undocumented, but it might be worth checking that and any changes to interfaces
Bugs:
Reviewer: darrell
tests: checkintests mustella/MarshallPlan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ActiveWindowManager.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/RSLEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/MarshalPopUpData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as</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/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFont.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</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/preloaders/Preloader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ResourceModuleRSLItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/FocusManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IMarshalSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/ToolTipManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/MustellaResultsParser.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallPlan.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SWFBridgeGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.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/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/DragManagerMarshalMixin.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/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.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/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IActiveWindowManager.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/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/PopUpManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.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/messaging/config/LoaderConfig.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/framework/src/mx/preloaders/DownloadProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManagerChildManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/CursorManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeGroup.as</path>

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

--- frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -19,6 +19,7 @@
 import flash.display.Shape;
 import flash.display.Sprite;
 import flash.events.Event;
+import flash.events.EventDispatcher;
 import flash.events.IEventDispatcher;
 import flash.events.MouseEvent;
 import flash.geom.Point;
@@ -42,19 +43,19 @@
 import mx.effects.Blur;
 import mx.effects.IEffect;
 import mx.effects.Fade;
+import mx.events.DynamicEvent;
 import mx.events.EffectEvent;
 import mx.events.FlexEvent;
 import mx.events.FlexMouseEvent;
 import mx.events.MoveEvent;
-import mx.events.SWFBridgeRequest;
+import mx.events.Request;
 import mx.managers.ISystemManager;
 import mx.managers.SystemManager;
-import mx.managers.SystemManagerProxy;
+import mx.managers.systemClasses.ActiveWindowManager;
+import mx.managers.marshalClasses.PopUpManagerMarshalMixin;
 import mx.styles.IStyleClient;
 import mx.utils.NameUtil;
-import mx.events.InterManagerRequest;
 import mx.core.UIComponent;
-import mx.events.SandboxMouseEvent;

 use namespace mx_internal;

@@ -75,7 +76,7 @@
  *
  *  @see PopUpManagerChildList
  */
-public class PopUpManagerImpl implements IPopUpManager
+public class PopUpManagerImpl extends EventDispatcher implements IPopUpManager
 {
     include "../core/Version.as";

@@ -90,6 +91,22 @@
      */
     private static var instance:IPopUpManager;

+	/**
+	 * @private
+	 *
+	 * Place to hook in additional classes
+	 */
+	public static var mixins:Array;
+
+    mx_internal static var popUpInfoClass:Class;
+
+	mx_internal static function createPopUpData():PopUpData
+    {
+        if (!popUpInfoClass)
+            return new PopUpData();
+        return new popUpInfoClass() as PopUpData;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Class methods
@@ -99,6 +116,16 @@
     /**
      *  @private
      */
+    private static function weakDependency():void { ActiveWindowManager };
+
+    /**
+     *  @private
+     */
+    private static function weakDependency2():void { PopUpManagerMarshalMixin };
+
+    /**
+     *  @private
+     */
     public static function getInstance():IPopUpManager
     {
         if (!instance)
@@ -119,12 +146,17 @@
     public function PopUpManagerImpl()
     {
         super();
-
-        var sm:ISystemManager = ISystemManager(SystemManagerGlobals.topLevelSystemManagers[0]);
-
-        sm.addEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, createModalWindowRequestHandler, false, 0, true);
-        sm.addEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, showModalWindowRequest, false, 0, true);
-        sm.addEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, hideModalWindowRequest, false, 0, true);
+
+		if (mixins)
+		{
+			var n:int = mixins.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				new mixins[i](this);
+			}
+		}
+
+		dispatchEvent(new Event("initialize"));
     }

     //--------------------------------------------------------------------------
@@ -143,7 +175,7 @@
      *  @private
      *  An array of information about currently active popups
      */
-    private var popupInfo:Array;
+    mx_internal var popupInfo:Array = [];

     //--------------------------------------------------------------------------
     //
@@ -259,54 +291,25 @@

         const visibleFlag:Boolean = window.visible;

-		if (parent is IUIComponent && window is IUIComponent &&
-			IUIComponent(window).document == null)
-			IUIComponent(window).document = IUIComponent(parent).document;
-
-		if (parent is IUIComponent && IUIComponent(parent).document is IFlexModule &&
-			window is UIComponent && UIComponent(window).moduleFactory == null)
-			UIComponent(window).moduleFactory = IFlexModule(IUIComponent(parent).document).moduleFactory;
+        if (parent is IUIComponent && window is IUIComponent &&
+              IUIComponent(window).document == null)
+              IUIComponent(window).document = IUIComponent(parent).document;
+
+        if (parent is IUIComponent && IUIComponent(parent).document is IFlexModule &&
+              window is UIComponent && UIComponent(window).moduleFactory == null)
+              UIComponent(window).moduleFactory = IFlexModule(IUIComponent(parent).document).moduleFactory;

         var sm:ISystemManager = getTopLevelSystemManager(parent);
+        // smp is the actual systemManager that will parent the popup
+        // it might get changed by the request
+        var smp:ISystemManager = sm;
         var children:IChildList;
         var topMost:Boolean;

-        if (!sm)
-        {
-            // check if parent is our sandbox root
-            sm = ISystemManager(SystemManagerGlobals.topLevelSystemManagers[0]);
-            if (sm.getSandboxRoot() != parent)
-            {
-                //trace("error: popup root was not SystemManager");
-                return; // and maybe a nice error message
-            }
-        }
-
-		var smp:ISystemManager = sm;
-
-		// if using a bridge, then create a System Manager Proxy to host
-		// the popup. The System Manager Proxy is the display object
-		// added to the top-level system manager's children, not
-		// the popup itself.
-		var sbRoot:DisplayObject = sm.getSandboxRoot();
-		var request:SWFBridgeRequest = null;
-		if (sm.useSWFBridge())
-		{
-			if (sbRoot != sm)
-			{
-				smp = new SystemManagerProxy(sm);
-				request = new SWFBridgeRequest(SWFBridgeRequest.ADD_POP_UP_REQUEST, false, false,
-				                                    sm.swfBridgeGroup.parentBridge,
-													{ window: DisplayObject(smp),
-														parent: parent,
-														modal: modal,
-														childList: childList});
-				sbRoot.dispatchEvent(request);
-			}
-			else
-				smp = sm;		// host w/o system manager proxy.
-		}
-
+        var request:Request = new Request("addPopUp", false, true, { parent: parent, sm: sm, modal: modal, childList: childList} );
+        if (!dispatchEvent(request))
+              smp = request.value as ISystemManager;
+
         if (window is IUIComponent)
             IUIComponent(window).isPopUp = true;

@@ -320,10 +323,7 @@

         window.visible = false;

-        if (!popupInfo)
-            popupInfo = [];
-
-        const o:PopUpData = new PopUpData();
+        const o:PopUpData = createPopUpData();
         o.owner = DisplayObject(window);
         o.topMost = topMost;
         o.systemManager = smp;
@@ -331,24 +331,23 @@

         if (window is IFocusManagerContainer)
         {
-			if (IFocusManagerContainer(window).focusManager)
-                smp.addFocusManager(IFocusManagerContainer(window));
+            if (IFocusManagerContainer(window).focusManager)
+            {
+                var awm:IActiveWindowManager =
+                      IActiveWindowManager(smp.getImplementation("mx.managers::IActiveWindowManager"));
+                awm.addFocusManager(IFocusManagerContainer(window));
+            }
             else
                 // Popups get their own focus loop
                 IFocusManagerContainer(window).focusManager =
                     new FocusManager(IFocusManagerContainer(window), true);
         }

-		// add a placeholder for an untrusted popup if this system manager
-		// is hosting the popup.
-		if (!sm.isTopLevelRoot() && sbRoot && sm == sbRoot)
-		{
-			request = new SWFBridgeRequest(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, false, false, null, { window: DisplayObject(window)});
-			request.requestor = sm.swfBridgeGroup.parentBridge;
-			request.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(window));
-			sm.dispatchEvent(request);
-		}
-
+        var event:DynamicEvent = new DynamicEvent("addPlaceHolder");
+        event.sm = sm;
+        event.window = window;
+        dispatchEvent(event);
+
         // force into automation hierarchy
         if (window is IAutomationObject)
             IAutomationObject(window).showInAutomationHierarchy = true;
@@ -368,7 +367,7 @@
         if (modal)
         {
             // create a modal window shield which blocks input and sets up mouseDownOutside logic
-            createModalWindow(parent, o, children, visibleFlag, smp, sbRoot);
+            createModalWindow(parent, o, children, visibleFlag, smp, smp.getSandboxRoot());
         }
         else
         {
@@ -393,27 +392,26 @@

         if (window is IFocusManagerContainer && visibleFlag)
         {
-         	if (!(smp is SystemManagerProxy) && smp.useSWFBridge())
-         		// We want the top-level root to activate the window.
-         		SystemManager(smp).dispatchActivatedWindowEvent(DisplayObject(window));
-         	else
-            	smp.activate(IFocusManagerContainer(window));
+              event = new DynamicEvent("addedPopUp", false, true);
+              event.window = window;
+              event.systemManager = smp;
+              dispatchEvent(event);
         }

         // trace("END POPUP: addPopUp" + parent);
     }

-	private function getTopLevelSystemManager(parent:DisplayObject):ISystemManager
+	mx_internal function getTopLevelSystemManager(parent:DisplayObject):ISystemManager
 	{
 	    var localRoot:DisplayObjectContainer;
 		var sm:ISystemManager;

-		if (parent.parent is SystemManagerProxy)
-			localRoot = DisplayObjectContainer(SystemManagerProxy(parent.parent).systemManager);
-		else if (parent is IUIComponent && IUIComponent(parent).systemManager is SystemManagerProxy)
-			localRoot = DisplayObjectContainer(SystemManagerProxy(IUIComponent(parent).systemManager).systemManager);
-		else
+		var request:Request = new Request("topLevelSystemManager", false, true);
+		request.value = parent;
+		if (!dispatchEvent(request))
+		    localRoot = request.value as DisplayObjectContainer;
+		if (!localRoot)
 			localRoot = DisplayObjectContainer(parent.root);

         // If the parent isn't rooted yet,
@@ -471,16 +469,10 @@
             var pt:Point;
             var isTopLevelRoot:Boolean;
             var sbRoot:DisplayObject = systemManager.getSandboxRoot();
-
-            // Only need to calc the visible rect when the sandbox root is an untrusted application.
-            // Otherwise the alert will float over the entire application.
-            if (systemManager != sbRoot)
-            {
-                var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
-                                                            "isTopLevelRoot");
-                sbRoot.dispatchEvent(request);
-                isTopLevelRoot = Boolean(request.value);
-            }
+
+			var request:Request = new Request("isTopLevelRoot", false, true);
+			if (!dispatchEvent(request))
+				isTopLevelRoot = Boolean(request.value);
             else
                 isTopLevelRoot = systemManager.isTopLevelRoot();

@@ -494,15 +486,7 @@
             }
             else
             {
-                if (systemManager != sbRoot)
-                {
-                    request = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
-                                            "getVisibleApplicationRect");
-                    sbRoot.dispatchEvent(request);
-                    rect = Rectangle(request.value);
-                }
-                else
-                    rect = systemManager.getVisibleApplicationRect();
+                rect = systemManager.getVisibleApplicationRect();

                 // Offset the top, left of the window to bring it into view.
                 clippingOffset = new Point(rect.x, rect.y);
@@ -601,18 +585,13 @@
             const o:PopUpData = findPopupInfoByOwner(popUp);
             if (o)
             {
+				var dynamicEvent:DynamicEvent = new DynamicEvent("bringToFront", false, true);
+				dynamicEvent.popUpData = o;
+				dynamicEvent.popUp = popUp;
+				if (!dispatchEvent(dynamicEvent))
+					return;
                 const sm:ISystemManager = ISystemManager(popUp.parent);
-                if (sm is SystemManagerProxy)
-                {
-                    // Since the proxy is parented to the SystemManager we need to
-                    // be it to the front, not the pop up.
-                    var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST,
-                                            false, false,
-                                            "bringToFront",
-                                            {topMost: o.topMost, popUp: sm});
-                    sm.getSandboxRoot().dispatchEvent(request);
-                }
-                else if (o.topMost)
+                if (o.topMost)
                     sm.popUpChildren.setChildIndex(DisplayObject(popUp), sm.popUpChildren.numChildren - 1);
                 else
                     sm.setChildIndex(DisplayObject(popUp), sm.numChildren - 1);
@@ -628,7 +607,7 @@
      *      1. Create a modal window for a local pop up.
      *      2. Create a modal window for a remote pop up. In this case o.owner will be null.
      */
-    private function createModalWindow(parentReference:DisplayObject,
+    mx_internal function createModalWindow(parentReference:DisplayObject,
                                        o:PopUpData,
                                        childrenList:IChildList,
                                        visibleFlag:Boolean,
@@ -656,17 +635,9 @@
     	if (!sm && parentReference)
 	        sm = IUIComponent(parentReference).systemManager;

-		var smp:SystemManagerProxy;
-		var realSm:ISystemManager;
-		if (sm is SystemManagerProxy)
-		{
-			smp = SystemManagerProxy(sm);
-			realSm = smp.systemManager;
-		}
-		else
-		    realSm = sm;
-
-    	realSm.numModalWindows++;
+		var awm:IActiveWindowManager =
+			IActiveWindowManager(sm.getImplementation("mx.managers::IActiveWindowManager"));
+    	awm.numModalWindows++;

         // Add it to the collection just below the popup
         if (popup)
@@ -679,53 +650,45 @@
         if (popup is IAutomationObject)
             IAutomationObject(popup).showInAutomationHierarchy = true;

-        // set alpha of the popup and get it out of the focus loop
-        if (!isNaN(o.modalTransparency))
-            modalWindow.alpha = o.modalTransparency;
-        else if (popupStyleClient)
+        o.modalWindow = modalWindow;
+
+        if (popupStyleClient)
             modalWindow.alpha = popupStyleClient.getStyle("modalTransparency");
 		else
 			modalWindow.alpha = 0;

-		o.modalTransparency = modalWindow.alpha;
-
         modalWindow.tabEnabled = false;

-        const s:Rectangle = realSm.screen;
+        const s:Rectangle = sm.screen;
         const g:Graphics = modalWindow.graphics;

         var c:Number = 0xFFFFFF;
-        if (!isNaN(o.modalTransparencyColor))
-            c = o.modalTransparencyColor;
-        else if (popupStyleClient)
+        if (popupStyleClient)
         {
             c = popupStyleClient.getStyle("modalTransparencyColor");
-            o.modalTransparencyColor = c;
-        }
-
+        }
+
+		var dynamicEvent:DynamicEvent = new DynamicEvent("createModalWindow", false, true);
+		dynamicEvent.popUpData = o;
+		dynamicEvent.popUp = popup;
+		dynamicEvent.color = c;
+        dynamicEvent.visibleFlag = visibleFlag;
+		dynamicEvent.childrenList = childrenList;
+		if (!dispatchEvent(dynamicEvent))
+			c = dynamicEvent.color;
+
         // trace("createModalWindow: drawing modal " + s);
         g.clear();
         g.beginFill(c, 100);
         g.drawRect(s.x, s.y, s.width, s.height);
         g.endFill();

-        o.modalWindow = modalWindow;
-
-        if (o.exclude)
-        {
-            o.modalMask = new Sprite();
-            updateModalMask(realSm, modalWindow,
-                            o.useExclude ? o.exclude : null,
-                            o.excludeRect, o.modalMask);
-            modalWindow.mask = o.modalMask;
-            childrenList.addChild(o.modalMask);
-
-            // update the modal window mask when the size or position of the area
-            // we are excluding changes.
-            o.exclude.addEventListener(Event.RESIZE, o.resizeHandler);
-            o.exclude.addEventListener(MoveEvent.MOVE, o.resizeHandler);
-        }
-
+		dynamicEvent = new DynamicEvent("updateModalMask");
+		dynamicEvent.popUpData = o;
+		dynamicEvent.popUp = popup;
+		dynamicEvent.childrenList = childrenList;
+		dispatchEvent(dynamicEvent);
+
         // a modal mousedownoutside handler just dispatches the event
         o._mouseDownOutsideHandler  = dispatchMouseDownOutsideEvent;
         o._mouseWheelOutsideHandler = dispatchMouseWheelOutsideEvent;
@@ -733,7 +696,7 @@
         // the following handlers all get removed in REMOVED on the popup

         // Set the resize handler so the modal can stay the size of the screen
-       	realSm.addEventListener(Event.RESIZE, o.resizeHandler);
+       	sm.addEventListener(Event.RESIZE, o.resizeHandler);

         if (popup)
         {
@@ -749,126 +712,14 @@
         else
             popup.visible = visibleFlag;

-        if (realSm.useSWFBridge())
-        {
-            if (popupStyleClient)
-            {
-                o.modalTransparencyDuration = popupStyleClient.getStyle("modalTransparencyDuration");
-                o.modalTransparencyBlur = popupStyleClient.getStyle("modalTransparencyBlur");
-            }
-
-            dispatchModalWindowRequest(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, realSm, sbRoot, o, visibleFlag);
-        }
-    }
-
-
-    private function dispatchModalWindowRequest(type:String,
-                                                sm:ISystemManager,
-                                                sbRoot:DisplayObject,
-                                                o:PopUpData,
-                                                visibleFlag:Boolean):void
-    {
-        // if our first target is a sandbox root that is the top level root,
-        // then we don't need to send a modal request.
-        if (!o.isRemoteModalWindow && sm != sbRoot)
-        {
-            var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
-                                                        "isTopLevelRoot");
-            sbRoot.dispatchEvent(request);
-            if (Boolean(request.value))
-                return;
-        }
-
-        var modalRequest:SWFBridgeRequest = new SWFBridgeRequest(type, false, false, null,
-												{ skip: !o.isRemoteModalWindow && sm != sbRoot,
-												  useExclude: o.useExclude,
-												  show: visibleFlag,
-												  remove: false,
-												  transparencyDuration: o.modalTransparencyDuration,
-												  transparency: o.modalTransparency,
-												  transparencyColor: o.modalTransparencyColor,
-												  transparencyBlur: o.modalTransparencyBlur});
-        var bridge:IEventDispatcher = sm.swfBridgeGroup.parentBridge;;
-        modalRequest.requestor = bridge;
-        bridge.dispatchEvent(modalRequest);
-    }
-
-
-
-    /**
-     *  @private
-     *
-     *  Update a mask to exclude the area of the exclude parameter from the area
-     *  of the modal window parameter.
-     *
-     *  @param sm The system manager that hosts the modal window
-     *  @param modalWindow The base area of the mask
-     *  @param exclude The area to exlude from the mask, may be null.
-     *  @param excludeRect An optionally rectangle that is included in the area
-     *  to exclude. The rectangle is in global coordinates.
-     *  @param mask A non-null sprite. The mask is rewritten for each call.
-     *
-     */
-    mx_internal static function updateModalMask(sm:ISystemManager,
-                                     modalWindow:DisplayObject,
-                                     exclude:IUIComponent,
-                                     excludeRect:Rectangle,
-                                     mask:Sprite):void
-    {
-        var modalBounds:Rectangle = modalWindow.getBounds(DisplayObject(sm));
-        var excludeBounds:Rectangle;
-        var pt:Point;
-
-        if (exclude is ISWFLoader)
-        {
-            excludeBounds = ISWFLoader(exclude).getVisibleApplicationRect();
-            pt = new Point(excludeBounds.x, excludeBounds.y);
-            pt = DisplayObject(sm).globalToLocal(pt);
-            excludeBounds.x = pt.x;
-            excludeBounds.y = pt.y;
-        }
-        else if (!exclude)
-            excludeBounds = modalBounds.clone();    // don't exclude anything extra
-        else
-            excludeBounds = DisplayObject(exclude).getBounds(DisplayObject(sm));
-
-        // apply excludeRect to the result
-        if (excludeRect)
-        {
-            pt = new Point(excludeRect.x, excludeRect.y);
-            pt = DisplayObject(sm).globalToLocal(pt);
-            var rect:Rectangle = new Rectangle(pt.x, pt.y, excludeRect.width, excludeRect.height);
-            excludeBounds = excludeBounds.intersection(rect);
-        }
-
-        mask.graphics.clear();
-        mask.graphics.beginFill(0x000000);
-
-        // Fill the mask in three logical rows
-        // 1. Above the exclude bounds
-        if (excludeBounds.y > modalBounds.y)
-            mask.graphics.drawRect(modalBounds.x, modalBounds.y,
-                                   modalBounds.width, excludeBounds.y - modalBounds.y);
-
-        // 2. Left and right of the exclude bounds
-        if (modalBounds.x < excludeBounds.x)
-            mask.graphics.drawRect(modalBounds.x, excludeBounds.y,
-                                   excludeBounds.x - modalBounds.x, excludeBounds.height);
-
-        if ((modalBounds.x + modalBounds.width) > (excludeBounds.x + excludeBounds.width))
-            mask.graphics.drawRect(excludeBounds.x + excludeBounds.width,
-                                   excludeBounds.y,
-                                   modalBounds.x + modalBounds.width - excludeBounds.x - excludeBounds.width,
-                                   excludeBounds.height);
-
-        // 3. Below the exclude bounds
-        if ((excludeBounds.y + excludeBounds.height) < (modalBounds.y + modalBounds.height))
-            mask.graphics.drawRect(modalBounds.x, excludeBounds.y + excludeBounds.height,
-                                   modalBounds.width,
-                                   modalBounds.y + modalBounds.height - excludeBounds.y - excludeBounds.height);
-        mask.graphics.endFill();
-
-    }
+		dynamicEvent = new DynamicEvent("createdModalWindow");
+		dynamicEvent.popUpData = o;
+		dynamicEvent.popUp = popup;
+        dynamicEvent.visibleFlag = visibleFlag;
+		dynamicEvent.childrenList = childrenList;
+		dispatchEvent(dynamicEvent);
+    }
+

     /**
      *  @private
@@ -888,57 +739,57 @@
         }
     }

-    private function showModalWindow(o:PopUpData, sm:ISystemManager, sendRequest:Boolean = true):void
+    mx_internal function showModalWindow(o:PopUpData, sm:ISystemManager, sendRequest:Boolean = true):void
     {
     	const popUpStyleClient:IStyleClient = o.owner as IStyleClient;
         var duration:Number = 0;
         var alpha:Number = 0;

-        if (!isNaN(o.modalTransparencyDuration))
-            duration = o.modalTransparencyDuration;
-        else if (popUpStyleClient)
+        if (popUpStyleClient)
         {
             duration = popUpStyleClient.getStyle("modalTransparencyDuration");
-            o.modalTransparencyDuration = duration;
-        }
-
-        if (!isNaN(o.modalTransparency))
-            alpha = o.modalTransparency;
-        else if (popUpStyleClient)
+        }
+
+        if (popUpStyleClient)
         {
             alpha = popUpStyleClient.getStyle("modalTransparency");
-            o.modalTransparency = alpha;
         }

+	    var blurAmount:Number = 0;
+
+	    if (popUpStyleClient)
+	    {
+	    	blurAmount = popUpStyleClient.getStyle("modalTransparencyBlur");
+	    }
+
+		var transparencyColor:Number = 0xFFFFFF;
+	    if (popUpStyleClient)
+	    {
+	    	transparencyColor = popUpStyleClient.getStyle("modalTransparencyColor");
+	    }
+
+        var sbRoot:DisplayObject = sm.getSandboxRoot();
+
+		var dynamicEvent:DynamicEvent = new DynamicEvent("showModalWindow", false, true);
+		dynamicEvent.popUpData = o;
+		dynamicEvent.sendRequest = sendRequest;
+		dynamicEvent.alpha = alpha;
+		dynamicEvent.blurAmount = blurAmount;
+		dynamicEvent.duration = duration;
+        dynamicEvent.systemManager = sm;
+		dynamicEvent.transparencyColor = transparencyColor;
+		if (!dispatchEvent(dynamicEvent))
+		{
+			alpha = dynamicEvent.alpha;
+			blurAmount = dynamicEvent.blurAmount;
+			duration = dynamicEvent.duration;
+			transparencyColor = dynamicEvent.transparencyColor;
+		}
+
 		o.modalWindow.alpha = alpha;

-	    var blurAmount:Number = 0;
-
-        if (!isNaN(o.modalTransparencyBlur))
-            blurAmount = o.modalTransparencyBlur;
-	    else if (popUpStyleClient)
-	    {
-	    	blurAmount = popUpStyleClient.getStyle("modalTransparencyBlur");
-	    	o.modalTransparencyBlur = blurAmount;
-	    }
-
-		var transparencyColor:Number = 0xFFFFFF;
-        if (!isNaN(o.modalTransparencyColor))
-            transparencyColor = o.modalTransparencyColor;
-	    else if (popUpStyleClient)
-	    {
-	    	transparencyColor = popUpStyleClient.getStyle("modalTransparencyColor");
-	    	o.modalTransparencyColor = transparencyColor;
-	    }
-
-        if (sm is SystemManagerProxy)
-            sm = SystemManagerProxy(sm).systemManager;
-        var sbRoot:DisplayObject = sm.getSandboxRoot();
-
         showModalWindowInternal(o, duration, alpha, transparencyColor, blurAmount, sm, sbRoot);

-        if (sendRequest && sm.useSWFBridge())
-            dispatchModalWindowRequest(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, sm, sbRoot, o, true);
     }

     /**
@@ -992,15 +843,15 @@
                     // Get the application document of the sandbox root.
                     // Use a request to get the document so APIs may change
                     // between Flex versions.
-                    var sbRootApp:Object;
-                    var applicationRequest:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST,
-                                                                       false, false,
-                                                                       "application",
-                                                                       sbRootApp);
-                    sbRoot.dispatchEvent(applicationRequest);
-                    o.blurTarget = applicationRequest.value;
+                    var sbRootApp:Object;   // sbRoot.application;
+
+				    var request:Request = new Request("blurTarget", false, true, { popUpData: o });
+                    if (!dispatchEvent(request))
+                    {
+					    o.blurTarget = request.value;
+                    }
                 }
-                else
+				else
                     o.blurTarget = FlexGlobals.topLevelApplication;

                 const blur:Blur = new Blur(o.blurTarget);
@@ -1026,14 +877,8 @@
      *  Hide the modal transparency blocker, playing effects if needed.
      *
      */
-    private function hideModalWindow(o:PopUpData, destroy:Boolean = false):void
-    {
-        if (destroy && o.exclude)
-        {
-            o.exclude.removeEventListener(Event.RESIZE, o.resizeHandler);
-            o.exclude.removeEventListener(MoveEvent.MOVE, o.resizeHandler);
-        }
-
+    mx_internal function hideModalWindow(o:PopUpData, destroy:Boolean = false):void
+    {
         const popUpStyleClient:IStyleClient = o.owner as IStyleClient;

         var duration:Number = 0;
@@ -1078,33 +923,10 @@
             o.modalWindow.visible = false;
         }

-        var sm:ISystemManager = ISystemManager(FlexGlobals.topLevelApplication.systemManager);
-        if (sm.useSWFBridge())
-        {
-            var sbRoot:DisplayObject = sm.getSandboxRoot();
-
-            // if our first target is a sandbox root that is the top level root,
-            // then we don't need to send a modal request.
-            if (!o.isRemoteModalWindow && sm != sbRoot)
-            {
-                var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
-                                                            "isTopLevelRoot");
-                sbRoot.dispatchEvent(request);
-                if (Boolean(request.value))
-                    return;
-            }
-
-            var modalRequest:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, false, false, null,
-														{ skip: !o.isRemoteModalWindow && sm != sbRoot,
-															show: false,
-															remove: destroy});
-            var bridge:IEventDispatcher = sm.swfBridgeGroup.parentBridge;
-            var target:IEventDispatcher;
-            modalRequest.requestor = bridge;
-
-            bridge.dispatchEvent(modalRequest);
-        }
-
+		var dynamicEvent:DynamicEvent = new DynamicEvent("hideModalWindow", false, false);
+		dynamicEvent.popUpData = o;
+		dynamicEvent.destroy = destroy;
+		dispatchEvent(dynamicEvent);
     }

     /**
@@ -1125,22 +947,6 @@

     /**
      *  @private
-     *  Returns the PopUpData for the highest remote modal window on display.
-     */
-    private function findHighestRemoteModalPopupInfo():PopUpData
-    {
-        const n:int = popupInfo.length - 1;
-        for (var i:int = n; i >= 0; i--)
-        {
-            var o:PopUpData = popupInfo[i];
-            if (o.isRemoteModalWindow)
-                return o;
-        }
-        return null;
-    }
-
-    /**
-     *  @private
      *  Add mouse out listeners for modal and non-modal windows.
      */
     private function addMouseOutEventListeners(o:PopUpData):void
@@ -1157,8 +963,9 @@
             sbRoot.addEventListener(MouseEvent.MOUSE_WHEEL, o.mouseWheelOutsideHandler, true);
         }

-        sbRoot.addEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE,  o.marshalMouseOutsideHandler);
-        sbRoot.addEventListener(SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE, o.marshalMouseOutsideHandler, true);
+		var dynamicEvent:DynamicEvent = new DynamicEvent("addMouseOutEventListeners", false, false);
+		dynamicEvent.popUpData = o;
+		dispatchEvent(dynamicEvent);
     }

     /**
@@ -1179,8 +986,9 @@
             sbRoot.removeEventListener(MouseEvent.MOUSE_WHEEL, o.mouseWheelOutsideHandler, true);
         }

-        sbRoot.removeEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE,  o.marshalMouseOutsideHandler);
-        sbRoot.removeEventListener(SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE, o.marshalMouseOutsideHandler, true);
+		var dynamicEvent:DynamicEvent = new DynamicEvent("removeMouseOutEventListeners", false, false);
+		dynamicEvent.popUpData = o;
+		dispatchEvent(dynamicEvent);
     }

     //--------------------------------------------------------------------------
@@ -1237,122 +1045,6 @@
         }
     }

-    /**
-     *  @private
-     *
-     *  Create a modal window and optionally show it.
-     */
-    private function createModalWindowRequestHandler(event:Event):void
-    {
-        var request:SWFBridgeRequest;
-
-        if (event is SWFBridgeRequest)
-            request = SWFBridgeRequest(event);
-        else
-            request = SWFBridgeRequest.marshal(event);
-
-        var sm:ISystemManager = getTopLevelSystemManager(DisplayObject(FlexGlobals.topLevelApplication));
-        var sbRoot:DisplayObject = sm.getSandboxRoot();
-
-        // process the message
-        var popUpData:PopUpData = new PopUpData();
-        popUpData.isRemoteModalWindow = true;
-        popUpData.systemManager = sm;
-        popUpData.modalTransparency = request.data.transparency;
-
-        // disable blur because we can mask the application and blur is not
-        // working if we blur the modalWindow.
-        popUpData.modalTransparencyBlur = 0; //request.transparencyBlur;
-        popUpData.modalTransparencyColor = request.data.transparencyColor;
-        popUpData.modalTransparencyDuration = request.data.transparencyDuration;
-
-        // Get the SWFLoader to exclude.
-        // The requestor may be a real SWFLoader or a sandbox bridge that
-        // requires a look up to get the SWFLoader.
-        popUpData.exclude = sm.swfBridgeGroup.getChildBridgeProvider(request.requestor) as IUIComponent;
-        popUpData.useExclude = request.data.useExclude;
-        popUpData.excludeRect = Rectangle(request.data.excludeRect);
-
-        if (!popupInfo)
-            popupInfo = [];
-
-        popupInfo.push(popUpData);
-
-        createModalWindow(null, popUpData, sm.popUpChildren, request.data.show, sm, sbRoot);
-    }
-
-    /**
-     *  @private
-     *
-     *  Show a modal window.
-     */
-    private function showModalWindowRequest(event:Event):void
-    {
-        var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
-
-        if (event is SWFBridgeRequest)
-            request = SWFBridgeRequest(event);
-        else
-            request = SWFBridgeRequest.marshal(event);
-
-        var sm:ISystemManager = getTopLevelSystemManager(DisplayObject(FlexGlobals.topLevelApplication));
-        var sbRoot:DisplayObject = sm.getSandboxRoot();
-
-        // the highest popUpData in the list is the most recent modal window.
-        // sanity check that the popupdata is really a modal window with a null
-        // parent and popup window.
-        var popUpData:PopUpData = findHighestRemoteModalPopupInfo();
-        popUpData.excludeRect = Rectangle(request.data);
-        popUpData.modalTransparency = request.data.transparency;
-
-        // disable blur because we can mask the application and blur is not
-        // working if we blur the modalWindow.
-        popUpData.modalTransparencyBlur = 0; //request.transparencyBlur;
-        popUpData.modalTransparencyColor = request.data.transparencyColor;
-        popUpData.modalTransparencyDuration = request.data.transparencyDuration;
-
-        if (popUpData.owner || popUpData.parent)
-            throw new Error();              // not popUpData for a modal window
-
-        showModalWindow(popUpData, sm);
-    }
-
-    /**
-     *  @private
-     *
-     *  Hide a modal window and optionally remove it.
-     */
-    private function hideModalWindowRequest(event:Event):void
-    {
-        var request:SWFBridgeRequest;
-
-        // If the event is redispatched from the SystemManger it will be
-        // marshalled. If the PopUpManager dispatches the event using
-        // the sandbox root it will come here directly.
-        if (event is SWFBridgeRequest)
-            request = SWFBridgeRequest(event);
-        else
-            request = SWFBridgeRequest.marshal(event);
-
-        var sm:ISystemManager = getTopLevelSystemManager(DisplayObject(FlexGlobals.topLevelApplication));
-        var sbRoot:DisplayObject = sm.getSandboxRoot();
-
-        // the highest popUpData in the list is the most recent modal window.
-        // sanity check that the popupdata is really a modal window with a null
-        // parent and popup window.
-        var popUpData:PopUpData = findHighestRemoteModalPopupInfo();
-        if (!popUpData || popUpData.owner || popUpData.parent)
-            throw new Error();              // not popUpData for a modal window
-
-        hideModalWindow(popUpData, request.data.remove);
-
-        // handle removing popup window
-        if (request.data.remove)
-        {
-            popupInfo.splice(popupInfo.indexOf(popUpData), 1);
-            sm.numModalWindows--;
-        }
-    }

     /**
      *  @private
@@ -1374,47 +1066,27 @@
                 var popUpParent:DisplayObject = o.parent,
                     modalWindow:DisplayObject = o.modalWindow,
                     sm:ISystemManager         = o.systemManager;
-                var realSm:ISystemManager;

-                if (sm is SystemManagerProxy)
-                    realSm = SystemManagerProxy(sm).systemManager;
-                else
-                    realSm = sm;
-
 				if (!sm.isTopLevel())
 					sm = sm.topLevelSystemManager;

                 if (popUp is IUIComponent)
                     IUIComponent(popUp).isPopUp = false;

+				var awm:IActiveWindowManager =
+					IActiveWindowManager(sm.getImplementation("mx.managers::IActiveWindowManager"));
                 if (popUp is IFocusManagerContainer)
-                    sm.removeFocusManager(IFocusManagerContainer(popUp));
+				{
+                    awm.removeFocusManager(IFocusManagerContainer(popUp));
+				}

                 popUp.removeEventListener(Event.REMOVED,  popupRemovedHandler);

-				// remove the focus manager from a bridged system manager, if any
-				if (sm is SystemManagerProxy)
-				{
-					var parentBridge:IEventDispatcher = realSm.swfBridgeGroup.parentBridge;
-					var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, false, false,
-  					                                    parentBridge,
-        												{ window: DisplayObject(sm),
-        												  parent:	o.parent,
-        												  modal: o.modalWindow != null});
-					realSm.getSandboxRoot().dispatchEvent(request);
-				}
-				else if (sm.useSWFBridge())
-				{
-					// Must be locally hosted popup.
-					// We need to remove the placeholder at the top level root
-					request = new SWFBridgeRequest(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, false, false, null,
-																	{ window: DisplayObject(popUp)});
-					request.requestor = sm.swfBridgeGroup.parentBridge;
-					request.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(popUp));
-					sm.dispatchEvent(request);
-				}
-
-                if (o.owner)
+				var event2:DynamicEvent = new DynamicEvent("popUpRemoved");
+				event2.popUpData = o;
+                dispatchEvent(event2);
+
+				if (o.owner)
                 {
                     o.owner.removeEventListener(FlexEvent.SHOW, showOwnerHandler);
                     o.owner.removeEventListener(FlexEvent.HIDE, hideOwnerHandler);
@@ -1426,13 +1098,13 @@
                 if (modalWindow)
                 {
                     // clean up all handlers
-                    realSm.removeEventListener(Event.RESIZE, o.resizeHandler);
+                    sm.removeEventListener(Event.RESIZE, o.resizeHandler);

                     popUp.removeEventListener(FlexEvent.SHOW, popupShowHandler);
                     popUp.removeEventListener(FlexEvent.HIDE, popupHideHandler);

                     hideModalWindow(o, true);
-                    realSm.numModalWindows--;
+    				awm.numModalWindows--;
                 }

                 popupInfo.splice(i, 1);
@@ -1610,247 +1282,7 @@
         event.relatedObject = InteractiveObject(evt.target);
         owner.dispatchEvent(event);
     }
-
+
 }

 }
-
-import flash.display.DisplayObject;
-import flash.display.Sprite;
-import flash.geom.Rectangle;
-import flash.events.Event;
-import flash.events.IEventDispatcher;
-import flash.events.MouseEvent;
-import flash.display.Stage;
-import flash.geom.Point;
-
-import mx.core.IUIComponent;
-import mx.core.mx_internal;
-import mx.effects.Effect;
-import mx.events.SandboxMouseEvent;
-import mx.managers.ISystemManager;
-import mx.managers.PopUpManagerImpl;
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Helper class: PopUpData
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/**
- *  @private
- */
-class PopUpData
-{
-
-    //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  Constructor.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function PopUpData()
-    {
-        super();
-        useExclude = true;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Variables
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *
-     *  The popup in the normal case but will null in the case where only a
-     *  modal window is displayed over an application.
-     */
-    public var owner:DisplayObject;
-
-    /**
-     *  @private
-     */
-    public var parent:DisplayObject;
-
-    /**
-     *  @private
-     */
-    public var topMost:Boolean;
-
-    /**
-     *  @private
-     */
-    public var modalWindow:DisplayObject;
-
-    /**
-     *  @private
-     */
-    public var _mouseDownOutsideHandler:Function;
-
-    /**
-     *  @private
-     */
-    public var _mouseWheelOutsideHandler:Function;
-
-    /**
-     *  @private
-     */
-    public var fade:Effect;
-
-    /**
-     *  @private
-     */
-    public var blur:Effect;
-
-    /**
-     *  @private
-     *
-     */
-    public var blurTarget:Object;
-
-    /**
-     *   @private
-     *
-     *   The host of the modal dialog.
-     */
-    public var systemManager:ISystemManager;
-
-    //--------------------------------------
-    //  fields only for remote modal windows
-    //--------------------------------------
-
-    /**
-     *   @private
-     *
-     *   Is this popup just a modal window for a popup
-     *   in an untrusted sandbox?
-     */
-    public var isRemoteModalWindow:Boolean;
-
-    /**
-     *   @private
-     */
-    public var modalTransparencyDuration:Number;
-
-    /**
-     *   @private
-     */
-    public var modalTransparency:Number;
-
-    /**
-     *   @private
-     */
-    public var modalTransparencyBlur:Number;
-
-    /**
-     *   @private
-     */
-    public var modalTransparencyColor:Number;
-
-    /**
-     *   @private
-     *
-     *   Object to exclude from the modal dialog. The area of the
-     *   display object will be excluded from the modal dialog.
-     */
-    public var exclude:IUIComponent;
-
-    /**
-     *   @private
-     *
-     *   Flag to determine if the exclude property should be used
-     *   or ignored. Typically the exclude field is used when a
-     *   SystemManager contains its exclude child. But this isn't
-     *   true when the child is in a pop up window. In this case
-     *   useExclude is false.
-     */
-    public var useExclude:Boolean;
-
-    /**
-     *   @private
-     *
-     *   Rectangle to exclude from the <code>exclude</code> component
-     *   which is in turn excluded from the modal dialog.
-     *   This is passed within a sandbox so A.2 can tell A what
-     *   the size of A.2.3 was. Each top-level application
-     *   calculates excludeRect if there is mutual trust with its parent.
-     *   If there is no trust this property will be null.
-     */
-    public var excludeRect:Rectangle;
-
-    /**
-     *   @private
-     *
-     *   Mask created from the modalWindow and exclude fields.
-     */
-    public var modalMask:Sprite;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Event handlers
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    public function mouseDownOutsideHandler(event:MouseEvent):void
-    {
-        _mouseDownOutsideHandler(owner, event);
-    }
-
-    /**
-     *  @private
-     */
-    public function mouseWheelOutsideHandler(event:MouseEvent):void
-    {
-        _mouseWheelOutsideHandler(owner, event);
-    }
-
-    /**
-     *  @private
-     */
-    public function marshalMouseOutsideHandler(event:Event):void
-    {
-        if (!(event is SandboxMouseEvent))
-            event = SandboxMouseEvent.marshal(event);
-
-        if (owner)
-            owner.dispatchEvent(event);
-    }
-
-    /**
-     *  @private
-     *  Set by PopUpManager on modal windows to make sure they cover the whole screen
-     */
-    public function resizeHandler(event:Event):void
-    {
-        // Resize the modal window if either the popup or the modal window are on the
-        // same stage as the resize event target.
-        // A modal window may have no popup in the case where the popup originated
-        // from an untrusted application.
-        if ((owner && owner.stage == DisplayObject(event.target).stage) ||
-            (modalWindow && modalWindow.stage == DisplayObject(event.target).stage))
-        {
-            var s:Rectangle = systemManager.screen;
-
-            modalWindow.width = s.width;
-            modalWindow.height = s.height;
-            modalWindow.x = s.x;
-            modalWindow.y = s.y;
-            if (modalMask)
-                PopUpManagerImpl.mx_internal::updateModalMask(systemManager, modalWindow,
-                                                              exclude, excludeRect, modalMask);
-        }
-    }
-}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18444
Author:   cframpto@adobe.com
Date:     2010-11-04T14:32:20.154567Z

Log Message:
-----------
Fix a flash integration layoutDirection bug, a popup layoutDirection bug when in v3 compatibility mode, and added missing parens on logical expression in if-clause so order of precedence would be what was intended.

QE notes:
Doc notes:
Bugs: SDK28419, SDK-26473, SDK-26205
Reviewer: Hans
Tests run: cyclone
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as</path>

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

--- frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -27,6 +27,7 @@
 import mx.automation.IAutomationObject;
 import mx.core.FlexGlobals;
 import mx.core.FlexSprite;
+import mx.core.FlexVersion;
 import mx.core.IChildList;
 import mx.core.IFlexDisplayObject;
 import mx.core.IFlexModule;
@@ -387,9 +388,12 @@

         // The layout direction may have changed since last time the
         // popup was opened so need to reinit mirroring fields.
-       if (window is ILayoutDirectionElement)
-            ILayoutDirectionElement(window).invalidateLayoutDirection();
-
+        if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
+        {
+           if (window is ILayoutDirectionElement)
+                ILayoutDirectionElement(window).invalidateLayoutDirection();
+        }
+
         if (modal)
         {
             // create a modal window shield which blocks input and sets up mouseDownOutside logic
@@ -559,13 +563,16 @@

             // If the layout has been mirrored, then 0,0 is the uppper
             // right corner; compensate here.
-            if (popUp is ILayoutDirectionElement &&
-                ILayoutDirectionElement(popUp).layoutDirection ==
-                LayoutDirection.RTL)
+            if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
             {
-                 x = -x /* to flip it on the other side of the x axis*/
-                     -popUp.width /* because 0 is the right edge */;
-
+                if (popUp is ILayoutDirectionElement &&
+                    ILayoutDirectionElement(popUp).layoutDirection ==
+                    LayoutDirection.RTL)
+                {
+                     x = -x /* to flip it on the other side of the x axis*/
+                         -popUp.width /* because 0 is the right edge */;
+
+                }
             }

             pt = new Point(clippingOffset.x, clippingOffset.y);


Transferred from the Adobe Open Source Subversion Repository

Revision: 4492
Author:   gosmith@adobe.com
Date:     2009-01-12T22:47:10.154251Z

Log Message:
-----------
Simplified how an accessibility class gets hooked into its corresponding component class.

We now do the hooking in the static method enableAccessibility(), which is called by code that is autogenerated by the compiler. Previously this method did nothing and the hooking happened at static initialization time. This allows us to remove the static var accessibilityHooked and the static method hookAccessibility() in each accessibility class.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Deepa and Alex

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateFieldAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LinkButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateChooserAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccProps.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TitleWindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl.as</path>

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

--- frameworks/projects/mx/src/mx/accessibility/TitleWindowAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/TitleWindowAccImpl.as
@@ -23,11 +23,8 @@
 use namespace mx_internal;

 /**
- *  The TitleWindowAccImpl class is the accessibility class for TitleWindow.
- *
- *  @helpid 3011
- *  @tiptext This is the TitleWindow Accessibility Class.
- *  @review
+ *  TitleWindowAccImpl is a subclass of AccessibilityImplementation
+ *  which implements accessibility for the TitleWindow class.
  */
 public class TitleWindowAccImpl extends PanelAccImpl
 {
@@ -35,75 +32,61 @@

 	//--------------------------------------------------------------------------
 	//
-	//  Class initialization
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 *  Static variable triggering the hookAccessibility() method.
-	 *  This is used for initializing TitleWindowAccImpl class to hook its
-	 *  createAccessibilityImplementation() method to TitleWindow class
-	 *  before it gets called from UIComponent.
-	 */
-	private static var accessibilityHooked:Boolean = hookAccessibility();
-
-	/**
-	 *  @private
-	 *  Static Method for swapping the
-	 *  createAccessibilityImplementation method of TitleWindow with
-	 *  the TitleWindowAccImpl class.
-	 */
-	private static function hookAccessibility():Boolean
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static const STATE_SYSTEM_FOCUSED:uint = 0x00000004;
+
+	/**
+	 *  @private
+	 */
+	private static const STATE_SYSTEM_MOVEABLE:uint = 0x00040000;
+
+	/**
+	 *  @private
+	 */
+	private static const EVENT_OBJECT_CREATE:uint = 0x8000;
+
+	/**
+	 *  @private
+	 */
+	private static const EVENT_OBJECT_DESTROY:uint = 0x8001;
+
+	/**
+	 *  @private
+	 */
+	private static const EVENT_OBJECT_LOCATIONCHANGE:uint = 0x800B;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Enables accessibility in the TitleWindow class.
+	 *
+	 *
This method is called by application startup code
+	 *  that is autogenerated by the MXML compiler.
+	 *  Afterwards, when instances of TitleWindow are initialized,
+	 *  their accessibilityImplementation property
+	 *  will be set to an instance of this class.

+	 */
+	public static function enableAccessibility():void
 	{
 		TitleWindow.createAccessibilityImplementation =
 			createAccessibilityImplementation;
-
-		return true;
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Class constants
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_FOCUSED:uint = 0x00000004;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_MOVEABLE:uint = 0x00040000;
-
-	/**
-	 *  @private
-	 */
-	private static const EVENT_OBJECT_CREATE:uint = 0x8000;
-
-	/**
-	 *  @private
-	 */
-	private static const EVENT_OBJECT_DESTROY:uint = 0x8001;
-
-	/**
-	 *  @private
-	 */
-	private static const EVENT_OBJECT_LOCATIONCHANGE:uint = 0x800B;
-
-	//--------------------------------------------------------------------------
-	//
-	//  Class methods
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 *  Method for creating the Accessibility class.
-	 *  This method is called from UIComponent.
-	 *  @review
+	}
+
+	/**
+	 *  @private
+	 *  Creates a TitleWindow's AccessibilityImplementation object.
+	 *  This method is called from UIComponent's
+	 *  initializeAccessibility() method.
 	 */
 	mx_internal static function createAccessibilityImplementation(
 								component:UIComponent):void
@@ -118,15 +101,6 @@
 		Accessibility.sendEvent(titleBar, 0, EVENT_OBJECT_CREATE);

 		Accessibility.updateProperties();
-	}
-
-	/**
-	 *  Method call for enabling accessibility for a component.
-	 *  This method is required for the compiler to activate
-	 *  the accessibility classes for a component.
-	 */
-	public static function enableAccessibility():void
-	{
 	}

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


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

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

 package mx.messaging.errors
 {


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

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

 package mx.charts.series
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 10872
Author:   cframpto@adobe.com
Date:     2009-10-05T19:39:47.041984Z

Log Message:
-----------
Most changes already approved by PARB and a few are pending.  Given the two reviewers are at MAX and then there is a shutdown week we decided to take a chance that these changes will actually stick.

TLFText.css -> MXFTEText.css
TLFTextField -> FTETextField
UITLFTextField -> UIFTETextField
TLFDataGridItemRenderer -> FTEDataGridItemRenderer
TLFTextInput -> MXFTETextInput

UITextFormat.useTLF -> UITextFormat.useFTE

QE notes:
Doc notes:
Bugs: SDK-22909
Reviewer: Gordon
Tests run: checkintests
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/TextStyles.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/spark/src/SparkClasses.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/TLFTextInput.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/MXFTETextInput.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/TLFTextInput.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/TLFTextField.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/FTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/TLFDataGridItemRenderer.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/TextFieldFactory.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/TLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/CSSTextLayoutFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/TLFDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ITextFieldFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/TLFText.css" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/MXFTEText.css</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/TLFText.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/core/TextFieldFactory.as
+++ frameworks/projects/framework/src/mx/core/TextFieldFactory.as
@@ -77,12 +77,12 @@

 	/**
 	 *  @private
-	 *  Cache of TLFTextFields. Limit of one per module factory.
+	 *  Cache of FTETextFields. Limit of one per module factory.
 	 *  In this Dictionary, each key is a weak reference
 	 *  to an IFlexModuleFactory and each value is a Dictionary
-	 *  with a single entry (a TLFTextField as a weak key).
+	 *  with a single entry (a FTETextField as a weak key).
 	 */
-	private var tlfTextFields:Dictionary = new Dictionary(true);
+	private var fteTextFields:Dictionary = new Dictionary(true);

 	//--------------------------------------------------------------------------
 	//
@@ -97,7 +97,7 @@
 	 *
 	 *  @param moduleFactory The IFlexModuleFactory requesting the TextField.
 	 *
-	 *	@return A TLFTextField created in the context
+	 *	@return A FTETextField created in the context
 	 *  of moduleFactory.
 	 *
 	 *  @langversion 3.0
@@ -139,54 +139,54 @@

 	/**
 	 *  @private
-	 *  Creates an instance of TLFTextField
+	 *  Creates an instance of FTETextField
 	 *  in the context of the specified module factory.
 	 *
 	 *  @param moduleFactory The IFlexModuleFactory requesting the TextField.
 	 *  May not be null.
 	 *
-	 *	@return A TLFTextField created in the context
+	 *	@return A FTETextField created in the context
 	 *  of moduleFactory.
 	 *  The return value is loosely typed as Object
-	 *  to avoid linking in TLFTextField (and therefore much of TLF).
+	 *  to avoid linking in FTETextField (and therefore much of TLF).
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion Flash 9
 	 *  @playerversion AIR 1.1
 	 *  @productversion Flex 4
 	 */
-	public function createTLFTextField(moduleFactory:IFlexModuleFactory):Object
+	public function createFTETextField(moduleFactory:IFlexModuleFactory):Object
 	{
 		// Check to see if we already have a text field for this module factory.
-		var tlfTextField:Object = null;
-		var tlfTextFieldDictionary:Dictionary = tlfTextFields[moduleFactory];
+		var fteTextField:Object = null;
+		var fteTextFieldDictionary:Dictionary = fteTextFields[moduleFactory];

-		if (tlfTextFieldDictionary)
+		if (fteTextFieldDictionary)
 		{
-			for (var iter:Object in tlfTextFieldDictionary)
+			for (var iter:Object in fteTextFieldDictionary)
 			{
-				tlfTextField = iter;
+				fteTextField = iter;
 				break;
 			}
 		}
-		if (!tlfTextField)
+		if (!fteTextField)
 		{
 			if (moduleFactory)
 			{
-				tlfTextField = moduleFactory.create(
-					"mx.core.TLFTextField");
-                tlfTextField.textLineCreator = moduleFactory;
+				fteTextField = moduleFactory.create(
+					"mx.core.FTETextField");
+                fteTextField.textLineCreator = moduleFactory;
 			}

 			// The dictionary could be empty, but not null because entries in the dictionary
 			// could be garbage collected.
-			if (!tlfTextFieldDictionary)
-				tlfTextFieldDictionary = new Dictionary(true);
-			tlfTextFieldDictionary[tlfTextField] = 1;
-			tlfTextFields[moduleFactory] = tlfTextFieldDictionary;
+			if (!fteTextFieldDictionary)
+				fteTextFieldDictionary = new Dictionary(true);
+			fteTextFieldDictionary[fteTextField] = 1;
+			fteTextFields[moduleFactory] = fteTextFieldDictionary;
 		}

-		return tlfTextField;
+		return fteTextField;
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 2957
Author:   aharui@adobe.com
Date:     2008-08-22T09:01:31.559126Z

Log Message:
-----------
Changes from API Review

Highlights:

MarshalEvent -> SandboxRootRequest
MarshalMouseEvent -> SandboxRootMouseEvent
MarshalDragEvet -> SandboxRootDragEvent
SandboxBridgeEvent -> SWFBridgeEvent
SandboxBridgeRequest -> SWFBridgeRequest

Checkintests passed.  Mustella for Marshall Plan will certainly fail until tests updated to new APIs
Probably ok to merge to trunk.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/FocusDirection.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/PopUpRequest.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxBridgeEvent.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SizeRequest.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/FocusRequest.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/FocusRequestDirection.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/MarshalEvent.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxRootDragEvent.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/MarshalMouseEvent.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollThumb.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxRootRequest.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/utils/EventUtil.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxRootMouseEvent.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/InvalidateRequestData.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxBridgeRequest.as</path>
<path kind="file" action="A">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>
<path kind="file" action="D">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/MarshalDragEvent.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/ModalWindowRequest.as</path>

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

--- frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as
+++ frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as
@@ -0,0 +1,136 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.events
+{
+
+import flash.events.Event;
+import flash.events.IEventDispatcher;
+
+/**
+ *  This is an event sent between sandboxes.
+ *  The event lets objects in other sandboxes know
+ *  what is going on in this sandbox.
+ *  The events are informational in nature as opposed to SWFBridgeRequests,
+ *  which request an object do something on its behalf.
+ */
+public class SWFBridgeEvent extends Event
+{
+	include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *	Dispatched to a parent bridge or sandbox root to notify it that
+	 *  another application has been activated.
+	 */
+    public static const NOTIFY_APPLICATION_ACTIVATED:String =
+        "notifyApplicationActivate";
+
+    /**
+     *  Sent via bridge to a child application's systemManager to notify it
+	 *  that the SWF is about to be unloaded.  The systemManager marshals and
+	 *  re-dispatches the event so that application code can remove references
+	 *  that would prevent the SWF from unloading
+     */
+    public static const NOTIFY_BEFORE_UNLOAD:String = "notifyBeforeUnload";
+
+	/**
+	 *  Dispatched via bridges to all other FocusManagers to notify them
+	 *  that another focus manager is now active.
+	 */
+	public static const NOTIFY_FOCUS_MANAGER_ACTIVATED:String =
+        "notifyFocusManagerActivated";
+
+	/**
+	 *  Dispatched via parent bridge to its SWFLoader to notify it
+	 *  that a new system manager has been initialized.
+	 */
+	public static const NOTIFY_NEW_BRIDGED_APPLICATION:String =
+        "notifyNewBridgedApplication";
+
+	/**
+	 *	Dispatched to a parent bridge or sandbox root to notify it that
+	 *  a window was activated.
+	 *
+	 *  For a compatible application, the data property
+     *  is set to the system manager proxy that was activated.
+	 *  For an untrusted application, the data property
+     *  is set to a string id of the window.
+	 */
+    public static const NOTIFY_WINDOW_ACTIVATED:String = "notifyWindowActivated";
+
+	/**
+	 *	Dispatched to a parent bridge or sandbox root to notify it that
+	 *	the proxy system manager was deactivated.
+	 *
+	 *  For a compatible application, the data property
+     *  is set to the system manager proxy that was activated.
+	 *  For an untrusted application, the data property
+     *  is set to a string id of the window.
+     *
+	 */
+    public static const NOTIFY_WINDOW_DEACTIVATED:String = "notifyWindowDeactivated";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function SWFBridgeEvent(type:String, bubbles:Boolean = false,
+                                       cancelable:Boolean = false,
+                                       data:Object = null)
+	{
+		super(type, bubbles, cancelable);
+
+		this.data = data;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  data
+	//----------------------------------
+
+	/**
+	 *  Related data.
+	 */
+	public var data:Object;
+
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: Event
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function clone():Event
+	{
+		return new SWFBridgeEvent(type, bubbles, cancelable, data);
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/accessibility/MenuBarAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/MenuBarAccImpl.as
@@ -0,0 +1,424 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.accessibility
+{
+
+import flash.accessibility.Accessibility;
+import flash.events.Event;
+import mx.controls.MenuBar;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.events.MenuEvent;
+
+use namespace mx_internal;
+
+/**
+ *  The MenuBarAccImpl class is the accessibility class for MenuBar.
+ *
+ *  @helpid 3007
+ *  @tiptext This is the MenuBarAccImpl Accessibility Class.
+ *  @review
+ */
+public class MenuBarAccImpl extends AccImpl
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class initialization
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Static variable triggering the hookAccessibility() method.
+	 *  This is used for initializing MenuBarAccImpl class to hook its
+	 *  createAccessibilityImplementation() method to MenuBar class
+	 *  before it gets called from UIComponent.
+	 */
+	private static var accessibilityHooked:Boolean = hookAccessibility();
+
+	/**
+	 *  @private
+	 *  Static method for swapping the createAccessibilityImplementation()
+	 *  method of MenuBar with the MenuBarAccImpl class.
+	 */
+	private static function hookAccessibility():Boolean
+	{
+		MenuBar.createAccessibilityImplementation =
+			createAccessibilityImplementation;
+
+		return true;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Role of menuItem.
+	 */
+	private static const ROLE_SYSTEM_MENUITEM:uint = 0x0C;
+
+	/**
+	 *  @private
+	 */
+	private static const STATE_SYSTEM_FOCUSABLE:uint = 0x00100000;
+
+	/**
+	 *  @private
+	 */
+	private static const STATE_SYSTEM_FOCUSED:uint = 0x00000004;
+
+	/**
+	 *  @private
+	 */
+	private static const STATE_SYSTEM_HASPOPUP:uint = 0x40000000;
+
+	/**
+	 *  @private
+	 */
+	private static const STATE_SYSTEM_HOTTRACKED:uint = 0x00000080;
+
+	/**
+	 *  @private
+	 */
+	private static const STATE_SYSTEM_SELECTABLE:uint = 0x00200000;
+
+	/**
+	 *  @private
+	 */
+	private static const STATE_SYSTEM_UNAVAILABLE:uint = 0x00000001;
+
+	/**
+	 *  @private
+	 */
+	private static const EVENT_OBJECT_FOCUS:uint = 0x8005;
+
+	/**
+	 *  @private
+	 */
+	private static const EVENT_SYSTEM_MENUEND:uint = 0x00000005;
+
+	/**
+	 *  @private
+	 */
+	private static const EVENT_SYSTEM_MENUSTART:uint = 0x00000004;
+
+	/**
+	 *  @private
+	 */
+	private static const EVENT_OBJECT_SELECTION:uint = 0x8006;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Method for creating the Accessibility class.
+	 *  This method is called from UIComponent.
+	 *  @review
+	 */
+	mx_internal static function createAccessibilityImplementation(
+								component:UIComponent):void
+	{
+		component.accessibilityImplementation =
+			new MenuBarAccImpl(component);
+	}
+
+	/**
+	 *  Method call for enabling accessibility for a component.
+	 *  This method is required for the compiler to activate
+	 *  the accessibility classes for a component.
+	 */
+	public static function enableAccessibility():void
+	{
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param master The UIComponent instance that this AccImpl instance
+	 *  is making accessible.
+	 */
+	public function MenuBarAccImpl(master:UIComponent)
+	{
+		super(master);
+
+		role = 0x02;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden properties: AccImpl
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  eventsToHandle
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *	Array of events that we should listen for from the master component.
+	 */
+	override protected function get eventsToHandle():Array
+	{
+		return super.eventsToHandle.concat(
+			[ "menuShow", "menuHide", "focusIn", "focusOut" ]);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: AccessibilityImplementation
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Gets the role for the component.
+	 *
+	 *  @param childID uint
+	 */
+	override public function get_accRole(childID:uint):uint
+	{
+		if (childID == 0)
+			return role;
+
+		return ROLE_SYSTEM_MENUITEM;
+	}
+
+	/**
+	 *  @private
+	 *  IAccessible method for returning the state of the MenuItem.
+	 *  States are predefined for all the components in MSAA.
+	 *  Values are assigned to each state.
+	 *  Depending upon the listItem being Selected, Selectable,
+	 *  Invisible, Offscreen, a value is returned.
+	 *
+	 *  @param childID uint
+	 *
+	 *  @return State uint
+	 */
+	override public function get_accState(childID:uint):uint
+	{
+		var accState:uint = getState(childID);
+
+		if (childID > 0)
+		{
+			var menuBar:MenuBar = MenuBar(master);
+
+			var index:int = childID - 1;
+
+			if (!menuBar.menuBarItems[index] || !menuBar.menuBarItems[index].enabled)
+			{
+				accState |= STATE_SYSTEM_UNAVAILABLE;
+			}
+			else
+			{
+				accState |= STATE_SYSTEM_SELECTABLE | STATE_SYSTEM_FOCUSABLE;
+
+				// if (menuBar.getMenuAt(index))
+				accState |= STATE_SYSTEM_HASPOPUP;
+
+				if (index == menuBar.selectedIndex)
+					accState |= STATE_SYSTEM_HOTTRACKED | STATE_SYSTEM_FOCUSED;
+			}
+		}
+		return accState;
+	}
+
+	/**
+	 *  @private
+	 *  IAccessible method for returning the Default Action.
+	 *
+	 *  @param childID uint
+	 *
+	 *  @return name of default action.
+	 */
+	override public function get_accDefaultAction(childID:uint):String
+	{
+		if (childID == 0)
+			return null;
+
+		return childID - 1 == MenuBar(master).selectedIndex ? "Close" : "Open";
+	}
+
+	/**
+	 *  @private
+	 *  IAccessible method for executing the Default Action.
+	 *
+	 *  @param childID uint
+	 */
+	override public function accDoDefaultAction(childID:uint):void
+	{
+		if (childID > 0)
+		{
+			var index:int = childID - 1;
+			//MenuBar(master).selectedIndex = index;
+			//MenuBar(master).showMenu(index);
+		}
+	}
+
+ 	/**
+	 *  @private
+	 *  Method to return an array of childIDs.
+	 *
+	 *  @return Array
+	 */
+	override public function getChildIDArray():Array
+	{
+		var childIDs:Array = [];
+
+		if (MenuBar(master).menuBarItems)
+		{
+			var n:int = MenuBar(master).menuBarItems.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				childIDs[i] = i + 1;
+			}
+		}
+		return childIDs;
+	}
+
+ 	/**
+	 *  @private
+	 *  IAccessible method for returning the bounding box of the MenuBarItem.
+	 *
+	 *  @param childID uint
+	 *
+	 *  @return Location Object
+	 */
+	override public function accLocation(childID:uint):*
+	{
+		//should check that this is returning the needed component
+		return MenuBar(master).menuBarItems[childID - 1];
+		//return MenuBar(master).getMenuBarItemAt(childID - 1);
+	}
+
+	/**
+	 *  @private
+	 *  IAccessible method for returning the childFocus of the List.
+	 *
+	 *  @param childID uint
+	 *
+	 *  @return focused childID.
+	 */
+	override public function get_accFocus():uint
+	{
+		var index:int = MenuBar(master).selectedIndex;
+
+		return index >= 0 ? index + 1 : 0;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: AccImpl
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  IAccessible method for returning the name of the MenuBar
+	 *  which is spoken out by the screen reader.
+	 *  The MenuItem should return the label as the name
+	 *  and MenuBar should return the name specified in the Accessibility Panel.
+	 *
+	 *  @param childID uint
+	 *
+	 *  @return Name String
+	 */
+	override protected function getName(childID:uint):String
+	{
+		if (childID == 0)
+			return "";
+		var menuBar:MenuBar = MenuBar(master);
+		var index:int = childID - 1;
+
+		if (menuBar.menuBarItems && menuBar.menuBarItems.length > index)
+		{
+			if (menuBar.menuBarItems[index] && menuBar.menuBarItems[index].data)
+				return menuBar.itemToLabel(menuBar.menuBarItems[index].data);
+		}
+		return "";
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden event handlers: AccImpl
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Override the generic event handler.
+	 *  All AccImpl must implement this
+	 *  to listen for events from its master component.
+	 */
+	override protected function eventHandler(event:Event):void
+	{
+		switch (event.type)
+		{
+			case "menuShow":
+			{
+				var index:int = MenuBar(master).selectedIndex;
+
+				// since all the menu events are also received by Menubar.
+				if (index >= 0 && !MenuEvent(event).menu.parentMenu)
+				{
+					var childID:uint = index + 1;
+
+					Accessibility.sendEvent(master, childID,
+											EVENT_OBJECT_FOCUS);
+
+					Accessibility.sendEvent(master, childID,
+											EVENT_OBJECT_SELECTION);
+				}
+
+				break;
+			}
+
+			case "menuHide":
+			{
+				if (!MenuEvent(event).menu.parentMenu)
+					Accessibility.sendEvent(master, 0, EVENT_SYSTEM_MENUEND);
+				break;
+			}
+
+			case "focusIn":
+			{
+				Accessibility.sendEvent(master, 0, EVENT_SYSTEM_MENUSTART);
+				break;
+			}
+
+			case "focusOut":
+			{
+				if (MenuBar(master).selectedIndex == -1)
+					Accessibility.sendEvent(master, 0, EVENT_SYSTEM_MENUEND);
+				break;
+			}
+		}
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/containers/FormItemDirection.as
+++ frameworks/projects/mx/src/mx/containers/FormItemDirection.as
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.containers
+{
+
+/**
+ *  The FormItemDirection class defines the constant values
+ *  for the direction property of the FormItem class.
+ *
+ *  @see mx.containers.FormItem
+ */
+public final class FormItemDirection
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Specifies that the children of the FormItem container
+     *  are laid out horizontally.
+     */
+    public static const HORIZONTAL:String = "horizontal";
+
+    /**
+     *  Specifies that the children of the FormItem container
+     *  are laid out vertically.
+     */
+    public static const VERTICAL:String = "vertical";
+}
+
+}