Transferred from the Adobe Open Source Subversion Repository

Revision: 11984
Author:   jimurphy@adobe.com
Date:     2009-11-19T15:30:34.821822Z

Log Message:
-----------
Merged 3.x revisions 11672,11898,11927,11952 -> trunk
........
  r11672 | clucier@adobe.com | 2009-11-11 17:07:26 -0500 (Wed, 11 Nov 2009) | 10 lines

  Bugs: SDK-23661
........
  r11898 | clucier@adobe.com | 2009-11-17 12:38:44 -0500 (Tue, 17 Nov 2009) | 10 lines

  Bugs: SDK-22721
........
  r11927 | clucier@adobe.com | 2009-11-18 08:42:28 -0500 (Wed, 18 Nov 2009) | 10 lines

  Bugs: SDK-16241
........
  r11952 | clucier@adobe.com | 2009-11-18 15:42:08 -0500 (Wed, 18 Nov 2009) | 10 lines

  Bugs: SDK-15988
........

The majority of files in this change list are svn property changes - removing the svn:mergeinfo property

The following paths are the actual changes from 3.x that were merged:
frameworks/projects/rpc/src/mx/rpc/soap/SOAPDecoder.as
frameworks/projects/framework/src/mx/formatters/NumberFormatter.as
frameworks/projects/framework/src/mx/formatters/NumberBase.as
frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as
frameworks/projects/framework/src/mx/controls/ColorPicker.as

Modified Paths:
--------------
127 paths were modified

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

--- frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as
+++ frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as
@@ -24,7 +24,6 @@
 import flash.events.NativeDragEvent;
 import flash.geom.Point;
 import flash.system.Capabilities;
-import flash.utils.getDefinitionByName

 import mx.core.DragSource;
 import mx.core.IFlexDisplayObject;
@@ -38,7 +37,6 @@
 import mx.managers.dragClasses.DragProxy;
 import mx.styles.CSSStyleDeclaration;
 import mx.styles.StyleManager;
-import mx.core.IFlexModuleFactory;

 use namespace mx_internal;

@@ -52,246 +50,233 @@
 public class NativeDragManagerImpl implements IDragManager
 {

-    //--------------------------------------------------------------------------
-    //
-    //  Class variables
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    private static var sm:ISystemManager;
-
-    /**
-     *  @private
-     */
-    private static var instance:IDragManager;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Class methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    public static function getInstance():IDragManager
-    {
-        if (!instance)
-        {
-            sm = SystemManagerGlobals.topLevelSystemManagers[0];
-            instance = new NativeDragManagerImpl();
-        }
-
-        return instance;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    public function NativeDragManagerImpl()
-    {
-        super();
-
-        if (instance)
-            throw new Error("Instance already exists.");
-
-        registerSystemManager(sm);
-        sandboxRoot = sm.getSandboxRoot();
-        sandboxRoot.addEventListener(InterDragManagerEvent.DISPATCH_DRAG_EVENT, marshalDispatchEventHandler, false, 0, true);
-
-        // trace("creating DragManagerImpl", sm);
-        sandboxRoot.addEventListener(InterManagerRequest.DRAG_MANAGER_REQUEST, marshalDragManagerHandler, false, 0, true);
-        var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
-        me.name = "update";
-        // trace("--->update request for DragManagerImpl", sm);
-        sandboxRoot.dispatchEvent(me);
-        // trace("<---update request for DragManagerImpl", sm);
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Variables
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  Object being dragged around.
-     */
-    public var dragProxy:DragProxy;
-
-    /**
-     *  @private
-     */
-    private var mouseIsDown:Boolean = false;
-
-    private var _action:String;
-
-    /**
-     *  @private
-     */
-    private var _dragInitiator:IUIComponent;
-
-    /**
-     *  @private
-     */
-    private var _clipboard:Clipboard;
-
-    /**
-     *  @private
-     */
-    private var _dragImage:IFlexDisplayObject;
-
-    private var _offset:Point;
-
-    private var _allowedActions:NativeDragOptions;
-
-    private var _allowMove:Boolean;
-
-    private var _relatedObject:InteractiveObject;
-
-    /**
-     *  @private
-     *  The highest place we can listen for events in our DOM
-     */
-    private var sandboxRoot:IEventDispatcher;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Properties
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  Read-only property that returns true
-     *  if a drag is in progress.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function get isDragging():Boolean
-    {
-        return flash.desktop.NativeDragManager.isDragging;// || bDoingDrag;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Methods
-    //
-    //--------------------------------------------------------------------------
-
-
-    /**
-     *  Initiates a drag and drop operation.
-     *
-     *  @param dragInitiator IUIComponent that specifies the component initiating
-     *  the drag.
-     *
-     *  @param dragSource DragSource object that contains the data
-     *  being dragged.
-     *
-     *  @param mouseEvent The MouseEvent that contains the mouse information
-     *  for the start of the drag.
-     *
-     *  @param dragImage The image to drag. This argument is optional.
-     *  If omitted, a standard drag rectangle is used during the drag and
-     *  drop operation. If you specify an image, you must explicitly set a
-     *  height and width of the image or else it will not appear.
-     *
-     *  @param xOffset Number that specifies the x offset, in pixels, for the
-     *  dragImage. This argument is optional. If omitted, the drag proxy
-     *  is shown at the upper-left corner of the drag initiator. The offset is expressed
-     *  in pixels from the left edge of the drag proxy to the left edge of the drag
-     *  initiator, and is usually a negative number.
-     *
-     *  @param yOffset Number that specifies the y offset, in pixels, for the
-     *  dragImage. This argument is optional. If omitted, the drag proxy
-     *  is shown at the upper-left corner of the drag initiator. The offset is expressed
-     *  in pixels from the top edge of the drag proxy to the top edge of the drag
-     *  initiator, and is usually a negative number.
-     *
-     *  @param imageAlpha Number that specifies the alpha value used for the
-     *  drag image. This argument is optional. If omitted, the default alpha
-     *  value is 0.5. A value of 0.0 indicates that the image is transparent;
-     *  a value of 1.0 indicates it is fully opaque.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function doDrag(
-            dragInitiator:IUIComponent,
-            dragSource:DragSource,
-            mouseEvent:MouseEvent,
-            dragImage:IFlexDisplayObject = null, // instance of dragged item(s)
-            xOffset:Number = 0,
-            yOffset:Number = 0,
-            imageAlpha:Number = 0.5,
-            allowMove:Boolean = true):void
-    {
-    	if (dragAutomationHandlerClass)
-		{
-			dragAutomationHandlerClass["storeAIRDragSourceDetails"](dragSource);
-		}
-
-        var proxyWidth:Number;
-        var proxyHeight:Number;
-
-        // Can't start a new drag if we're already in the middle of one...
-        if (isDragging)
-            return;
-
-        // Can't do a drag if the mouse isn't down
-        if (!(mouseEvent.type == MouseEvent.MOUSE_DOWN ||
-              mouseEvent.type == MouseEvent.CLICK ||
-              mouseIsDown ||
-              mouseEvent.buttonDown))
-        {
-            return;
-        }
-
-        var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
-        me.name = "isDragging";
-        me.value = true;
-        // trace("-->dispatch isDragging for DragManagerImpl", sm, true);
-        sandboxRoot.dispatchEvent(me);
-        // trace("<--dispatch isDragging for DragManagerImpl", sm, true);
-
-        me = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
-        me.name = "mouseShield";
-        me.value = true;
-        // trace("-->dispatch add mouseShield.for DragManagerImpl", sm);
-        sandboxRoot.dispatchEvent(me);
-
-        _clipboard = new Clipboard();
-        _dragInitiator = dragInitiator;
-        _offset = new Point(xOffset, yOffset);
-        _allowMove = allowMove;
-
-        //adjust offsets for imagePlacement.
-        _offset.y -= InteractiveObject(dragInitiator).mouseY;
-        _offset.x -= InteractiveObject(dragInitiator).mouseX;
-
-        // TODO!!! We need to pass in these values as a function parameter
-        _allowedActions = new NativeDragOptions();
-        _allowedActions.allowCopy = true;
-        _allowedActions.allowLink = true;
-        _allowedActions.allowMove = allowMove;
-
-        // Transfer the dragSource into a Clipboard
-        for (var i:int = 0; i < dragSource.formats.length; i++)
-        {
-            var format:String = dragSource.formats[i] as String;
+	//--------------------------------------------------------------------------
+	//
+	//  Class variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static var sm:ISystemManager;
+
+	/**
+	 *  @private
+	 */
+	private static var instance:IDragManager;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	public static function getInstance():IDragManager
+	{
+		if (!instance)
+		{
+			sm = SystemManagerGlobals.topLevelSystemManagers[0];
+			instance = new NativeDragManagerImpl();
+		}
+
+		return instance;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	public function NativeDragManagerImpl()
+	{
+		super();
+
+		if (instance)
+			throw new Error("Instance already exists.");
+
+		registerSystemManager(sm);
+		sandboxRoot = sm.getSandboxRoot();
+		sandboxRoot.addEventListener(InterDragManagerEvent.DISPATCH_DRAG_EVENT, marshalDispatchEventHandler, false, 0, true);
+
+		// trace("creating DragManagerImpl", sm);
+		sandboxRoot.addEventListener(InterManagerRequest.DRAG_MANAGER_REQUEST, marshalDragManagerHandler, false, 0, true);
+		var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
+		me.name = "update";
+		// trace("--->update request for DragManagerImpl", sm);
+		sandboxRoot.dispatchEvent(me);
+		// trace("<---update request for DragManagerImpl", sm);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Object being dragged around.
+	 */
+	public var dragProxy:DragProxy;
+
+	/**
+	 *  @private
+	 */
+	private var mouseIsDown:Boolean = false;
+
+	private var _action:String;
+
+	/**
+	 *  @private
+	 */
+	private var _dragInitiator:IUIComponent;
+
+	/**
+	 *  @private
+	 */
+	private var _clipboard:Clipboard;
+
+	/**
+	 *  @private
+	 */
+	private var _dragImage:IFlexDisplayObject;
+
+	private var _offset:Point;
+
+	private var _allowedActions:NativeDragOptions;
+
+	private var _allowMove:Boolean;
+
+	private var _relatedObject:InteractiveObject;
+
+	/**
+	 *  @private
+	 *  The highest place we can listen for events in our DOM
+	 */
+	private var sandboxRoot:IEventDispatcher;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Read-only property that returns true
+	 *  if a drag is in progress.
+	 */
+	public function get isDragging():Boolean
+	{
+		return flash.desktop.NativeDragManager.isDragging;// || bDoingDrag;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+
+	/**
+	 *  Initiates a drag and drop operation.
+	 *
+	 *  @param dragInitiator IUIComponent that specifies the component initiating
+	 *  the drag.
+	 *
+	 *  @param dragSource DragSource object that contains the data
+	 *  being dragged.
+	 *
+	 *  @param mouseEvent The MouseEvent that contains the mouse information
+	 *  for the start of the drag.
+	 *
+	 *  @param dragImage The image to drag. This argument is optional.
+	 *  If omitted, a standard drag rectangle is used during the drag and
+	 *  drop operation. If you specify an image, you must explicitly set a
+	 *  height and width of the image or else it will not appear.
+	 *
+	 *  @param xOffset Number that specifies the x offset, in pixels, for the
+	 *  dragImage. This argument is optional. If omitted, the drag proxy
+	 *  is shown at the upper-left corner of the drag initiator. The offset is expressed
+	 *  in pixels from the left edge of the drag proxy to the left edge of the drag
+	 *  initiator, and is usually a negative number.
+	 *
+	 *  @param yOffset Number that specifies the y offset, in pixels, for the
+	 *  dragImage. This argument is optional. If omitted, the drag proxy
+	 *  is shown at the upper-left corner of the drag initiator. The offset is expressed
+	 *  in pixels from the top edge of the drag proxy to the top edge of the drag
+	 *  initiator, and is usually a negative number.
+	 *
+	 *  @param imageAlpha Number that specifies the alpha value used for the
+	 *  drag image. This argument is optional. If omitted, the default alpha
+	 *  value is 0.5. A value of 0.0 indicates that the image is transparent;
+	 *  a value of 1.0 indicates it is fully opaque.
+	 */
+	public function doDrag(
+			dragInitiator:IUIComponent,
+			dragSource:DragSource,
+			mouseEvent:MouseEvent,
+			dragImage:IFlexDisplayObject = null, // instance of dragged item(s)
+			xOffset:Number = 0,
+			yOffset:Number = 0,
+			imageAlpha:Number = 0.5,
+			allowMove:Boolean = true):void
+	{
+		var proxyWidth:Number;
+		var proxyHeight:Number;
+
+		// Can't start a new drag if we're already in the middle of one...
+		if (isDragging)
+			return;
+
+		// Can't do a drag if the mouse isn't down
+		if (!(mouseEvent.type == MouseEvent.MOUSE_DOWN ||
+			  mouseEvent.type == MouseEvent.CLICK ||
+			  mouseIsDown ||
+			  mouseEvent.buttonDown))
+		{
+			return;
+		}
+
+		var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
+		me.name = "isDragging";
+		me.value = true;
+		// trace("-->dispatch isDragging for DragManagerImpl", sm, true);
+		sandboxRoot.dispatchEvent(me);
+		// trace("<--dispatch isDragging for DragManagerImpl", sm, true);
+
+		me = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
+		me.name = "mouseShield";
+		me.value = true;
+		// trace("-->dispatch add mouseShield.for DragManagerImpl", sm);
+		sandboxRoot.dispatchEvent(me);
+
+		_clipboard = new Clipboard();
+		_dragInitiator = dragInitiator;
+		_offset = new Point(xOffset, yOffset);
+		_allowMove = allowMove;
+
+		//adjust offsets for imagePlacement.
+		_offset.y -= InteractiveObject(dragInitiator).mouseY;
+		_offset.x -= InteractiveObject(dragInitiator).mouseX;
+
+		// TODO!!! We need to pass in these values as a function parameter
+		_allowedActions = new NativeDragOptions();
+		_allowedActions.allowCopy = true;
+		_allowedActions.allowLink = true;
+		_allowedActions.allowMove = allowMove;
+
+		// Transfer the dragSource into a Clipboard
+		for (var i:int = 0; i < dragSource.formats.length; i++)
+		{
+			var format:String = dragSource.formats[i] as String;

 			// Create an object to store a reference to the format and dragSource.
 			// This delays copying over the drag data until it is needed
@@ -300,362 +285,291 @@
 			dataFetcher.format = format;

 			_clipboard.setDataHandler(format, dataFetcher.getDragSourceData, false);
-        }
-
-        if (!dragImage)
-        {
-            // No drag image specified, use default
-            var dragManagerStyleDeclaration:CSSStyleDeclaration =
-                StyleManager.getStyleManager(sm as IFlexModuleFactory).getStyleDeclaration("mx.managers.DragManager");
-            var dragImageClass:Class =
-                dragManagerStyleDeclaration.getStyle("defaultDragImageSkin");
-            dragImage = new dragImageClass();
-            proxyWidth = dragInitiator ? dragInitiator.width : 0;
-            proxyHeight = dragInitiator ? dragInitiator.height : 0;
-            if (dragImage is IFlexDisplayObject)
-                IFlexDisplayObject(dragImage).setActualSize(proxyWidth, proxyHeight);
-        }
-        else
-        {
-            proxyWidth = dragImage.width;
-            proxyHeight = dragImage.height;
-        }
-
-        _dragImage = dragImage;
-
-        if (dragAutomationHandlerClass)
-		{
-			dragAutomationHandlerClass["recordAutomatableDragStart1"](dragInitiator as IUIComponent, mouseEvent);
-		}
-
-        if (dragImage is IUIComponent && dragImage is ILayoutManagerClient &&
-            !ILayoutManagerClient(dragImage).initialized && dragInitiator)
-        {
-            dragImage.addEventListener(FlexEvent.UPDATE_COMPLETE,initiateDrag);
-            dragInitiator.systemManager.popUpChildren.addChild(DisplayObject(dragImage));
-
-            if (dragImage is ILayoutManagerClient )
-            {
-                UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(dragImage), true);
-            }
-
-            if(dragImage is IUIComponent)
-            {
-                dragImage.setActualSize(proxyWidth, proxyHeight);
-                proxyWidth = (dragImage as IUIComponent).getExplicitOrMeasuredWidth();
-                proxyHeight = (dragImage as IUIComponent).getExplicitOrMeasuredHeight();
-            }
-            else
-            {
-                proxyWidth = dragImage.measuredWidth;
-                proxyHeight = dragImage.measuredHeight;
-            }
-
-            if (dragImage is ILayoutManagerClient )
-            {
-                UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(dragImage));
-            }
-        }
-        else
-        {
-            initiateDrag(null, false);
-            return;
-        }
-    }
-
-    /**
-     *  Finish up the doDrag once the dragImage has been drawn
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    private function initiateDrag(event:FlexEvent, removeImage:Boolean = true):void
-    {
-        if (removeImage)
-            _dragImage.removeEventListener(FlexEvent.UPDATE_COMPLETE, initiateDrag);
-        var dragBitmap:BitmapData
-        if (_dragImage.width && _dragImage.height)
-            dragBitmap = new BitmapData(_dragImage.width, _dragImage.height, true, 0x000000);
-        else
-            dragBitmap = new BitmapData(1, 1, true, 0x000000);
-        dragBitmap.draw(_dragImage);
-
-        if (removeImage && _dragImage is IUIComponent && _dragInitiator)
-        {
-            _dragInitiator.systemManager.popUpChildren.removeChild(DisplayObject(_dragImage));
-        }
-
-        // TODO!!! include _dragActions as the last param
-        flash.desktop.NativeDragManager.doDrag(InteractiveObject(_dragInitiator), _clipboard, dragBitmap, _offset, _allowedActions);
-        //NativeDragManager.dropAction = _allowMove ? DragManager.MOVE : DragManager.COPY;
-    }
-
-    /**
-     *  Call this method from your dragEnter event handler if you accept
-     *  the drag/drop data.
-     *  For example:
-     *
-     *
DragManager.acceptDragDrop(event.target);

-     *
-     *  @param target The drop target accepting the drag.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function acceptDragDrop(target:IUIComponent):void
-    {
-        if (isDragging)
-        {
-            // trace("NativeDragMgr.acceptDragDrop targ",target);
-            var dispObj:InteractiveObject = target as InteractiveObject;
-            if (dispObj)
-                flash.desktop.NativeDragManager.acceptDragDrop(dispObj);
-        }
-        else
-        {
-            var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
-            me.name = "acceptDragDrop";
-            me.value = target;
-            // trace("-->dispatch acceptDragDrop for DragManagerImpl", sm, target);
-            sandboxRoot.dispatchEvent(me);
-            // trace("<--dispatch acceptDragDrop for DragManagerImpl", sm, target);
-        }
-    }
-
-    /**
-     *  Sets the feedback indicator for the drag and drop operation.
-     *  Possible values are DragManager.COPY, DragManager.MOVE,
-     *  DragManager.LINK, or DragManager.NONE.
-     *
-     *  @param feedback The type of feedback indicator to display.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function showFeedback(feedback:String):void
-    {
-        if (isDragging)
-        {
-            if (feedback == DragManager.MOVE && !_allowedActions.allowMove)
-                return;
-            else if (feedback == DragManager.COPY && !_allowedActions.allowCopy)
-                return;
-            else if (feedback == DragManager.LINK && !_allowedActions.allowLink)
-                return;
-            flash.desktop.NativeDragManager.dropAction = feedback;
-        }
-        else
-        {
-            var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
-            me.name = "showFeedback";
-            me.value = feedback;
-            // trace("-->dispatch showFeedback for DragManagerImpl", sm, feedback);
-            sandboxRoot.dispatchEvent(me);
-            // trace("<--dispatch showFeedback for DragManagerImpl", sm, feedback);
-        }
-    }
-
-    /**
-     *  Returns the current drag and drop feedback.
-     *
-     *  @return  Possible return values are DragManager.COPY,
-     *  DragManager.MOVE,
-     *  DragManager.LINK, or DragManager.NONE.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function getFeedback():String
-    {
-        if (!isDragging)
-        {
-            var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
-            me.name = "getFeedback";
-            // trace("-->dispatch getFeedback for DragManagerImpl", sm);
-            sandboxRoot.dispatchEvent(me);
-            // trace("<--dispatch getFeedback for DragManagerImpl", sm);
-            return me.value as String;
-        }
-
-        return flash.desktop.NativeDragManager.dropAction;
-    }
-
-    /**
-     *  @Review
-     *  Not Supported by NativeDragManagerImpl
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function endDrag():void
-    {
-        var me:InterManagerRequest;
-
-        me = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
-        me.name = "mouseShield";
-        me.value = false;
-        // trace("-->dispatch remove mouseShield.for DragManagerImpl", sm);
-        sandboxRoot.dispatchEvent(me);
-
-        me = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
-        me.name = "isDragging";
-        me.value = false;
-        // trace("-->dispatch isDragging for DragManagerImpl", sm, false);
-        sandboxRoot.dispatchEvent(me);
-        // trace("<--dispatch isDragging for DragManagerImpl", sm, false);
-        // trace("<--endDrag for DragManagerImpl", sm);
-
-    }
-
-    /**
-     *  @private
-     *  register ISystemManagers that will listen for events
-     *  (such as those for additional windows)
-     */
-    mx_internal function registerSystemManager(sm:ISystemManager):void
-    {
-        if (sm.isTopLevel())
-        {
-            sm.addEventListener(MouseEvent.MOUSE_DOWN, sm_mouseDownHandler);
-            sm.addEventListener(MouseEvent.MOUSE_UP, sm_mouseUpHandler);
-        }
-
-        sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER, nativeDragEventHandler, true);
-        sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_COMPLETE, nativeDragEventHandler, true);
-        sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP, nativeDragEventHandler, true);
-        sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_EXIT, nativeDragEventHandler, true);
-        sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_OVER, nativeDragEventHandler, true);
-        sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_START, nativeDragEventHandler, true);
-
-    }
-
-    /**
-     *  @private
-     *  unregister ISystemManagers that will listen for events
-     *  (such as those for additional windows)
-     */
-    mx_internal function unregisterSystemManager(sm:ISystemManager):void
-    {
-        if (sm.isTopLevel())
-        {
-            sm.removeEventListener(MouseEvent.MOUSE_DOWN, sm_mouseDownHandler);
-            sm.removeEventListener(MouseEvent.MOUSE_UP, sm_mouseUpHandler);
-        }
-
-        sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_ENTER, nativeDragEventHandler, true);
-        sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_COMPLETE, nativeDragEventHandler, true);
-        sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_DROP, nativeDragEventHandler, true);
-        sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_EXIT, nativeDragEventHandler, true);
-        sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_OVER, nativeDragEventHandler, true);
-        sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_START, nativeDragEventHandler, true);
-
-    }
-
-
-    //--------------------------------------------------------------------------
-    //
-    //  Automation
-    //
-    //--------------------------------------------------------------------------
-    /**
-	 * @private
-	 * This function gets the class which is responsible for getting the
-	 * drag automation handler class.
-	 */
-
-	 private var _dragAutomationHandlerClass:Class;
-
-	 /**
-	  *  @private
-	  */
-	 private function get dragAutomationHandlerClass():Class
-	 {
-	 	if (!_dragAutomationHandlerClass)
-	 	{
-	 	 	try
-		 	{
-		 		if (sm)
-		 		{
-		 			_dragAutomationHandlerClass =
-		 				Class(sm.getDefinitionByName("mx.automation.delegates.DragManagerAutomationImpl"));
-		 		}
-		 		else
-		 		{
-		 			_dragAutomationHandlerClass =
-		 				Class(getDefinitionByName("mx.automation.delegates.DragManagerAutomationImpl"));
-		 		}
-		 	}
-		 	catch (e:Error)
-		 	{
-		 		trace(e.message);
-		 	}
-	 	}
-	 	return _dragAutomationHandlerClass;
-	 }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Event handlers
-    //
-    //--------------------------------------------------------------------------
-    private function sm_mouseDownHandler(event:MouseEvent):void
-    {
-        mouseIsDown = true;
-    }
-
-    private function sm_mouseUpHandler(event:MouseEvent):void
-    {
-        mouseIsDown = false;
-    }
-
-    /**
-     *  Listens for all NativeDragEvents and then redispatches them as DragEvents
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    private function nativeDragEventHandler(event:NativeDragEvent):void
-    {
-        var newType:String = event.type.charAt(6).toLowerCase() + event.type.substr(7);
-        var dragSource:DragSource = new DragSource();
-        var target:DisplayObject = event.target as DisplayObject;
-        var clipboard:Clipboard = event.clipboard;
-        var origFormats:Array = clipboard.formats;
-        var len:int = origFormats.length;
-        var format:String;
-        var data:Object;
-        var me:InterManagerRequest;
-
-        _allowedActions = event.allowedActions;
-
-        //translate either commandKey or controlKey to old-style ctrlKey
-        var ctrlKey:Boolean = false;
-        if (Capabilities.os.substring(0,3) == "Mac")
-            ctrlKey = event.commandKey;
-        else
-            ctrlKey = event.controlKey;
-
-        //default to move if drag is from same app
-        if (NativeDragManager.dragInitiator && event.type == NativeDragEvent.NATIVE_DRAG_START)
-        {
-            flash.desktop.NativeDragManager.dropAction =
-                (ctrlKey || !_allowMove) ? DragManager.COPY : DragManager.MOVE;
-        }
-
-        // Transfer clipboard data to dragSource
-        if (event.type != NativeDragEvent.NATIVE_DRAG_EXIT)
-        {
-            for (var i:int = 0; i < len; i++)
-            {
-                format = origFormats[i];
-                if (clipboard.hasFormat(format))
+		}
+
+		if (!dragImage)
+		{
+			// No drag image specified, use default
+			var dragManagerStyleDeclaration:CSSStyleDeclaration =
+				StyleManager.getStyleDeclaration("DragManager");
+			var dragImageClass:Class =
+				dragManagerStyleDeclaration.getStyle("defaultDragImageSkin");
+			dragImage = new dragImageClass();
+			proxyWidth = dragInitiator ? dragInitiator.width : 0;
+			proxyHeight = dragInitiator ? dragInitiator.height : 0;
+			if (dragImage is IFlexDisplayObject)
+				IFlexDisplayObject(dragImage).setActualSize(proxyWidth, proxyHeight);
+		}
+		else
+		{
+			proxyWidth = dragImage.width;
+			proxyHeight = dragImage.height;
+		}
+
+		_dragImage = dragImage;
+
+		if (dragImage is IUIComponent && dragImage is ILayoutManagerClient &&
+			!ILayoutManagerClient(dragImage).initialized && dragInitiator)
+		{
+			dragImage.addEventListener(FlexEvent.UPDATE_COMPLETE,initiateDrag);
+			dragInitiator.systemManager.popUpChildren.addChild(DisplayObject(dragImage));
+
+			if (dragImage is ILayoutManagerClient )
+			{
+				UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(dragImage), true);
+			}
+
+			if(dragImage is IUIComponent)
+			{
+				dragImage.setActualSize(proxyWidth, proxyHeight);
+				proxyWidth = (dragImage as IUIComponent).getExplicitOrMeasuredWidth();
+				proxyHeight = (dragImage as IUIComponent).getExplicitOrMeasuredHeight();
+			}
+			else
+			{
+				proxyWidth = dragImage.measuredWidth;
+				proxyHeight = dragImage.measuredHeight;
+			}
+
+			if (dragImage is ILayoutManagerClient )
+			{
+				UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(dragImage));
+			}
+		}
+		else
+		{
+			initiateDrag(null, false);
+			return;
+		}
+	}
+
+	/**
+	 *  Finish up the doDrag once the dragImage has been drawn
+	 */
+	private function initiateDrag(event:FlexEvent, removeImage:Boolean = true):void
+	{
+		if (removeImage)
+			_dragImage.removeEventListener(FlexEvent.UPDATE_COMPLETE, initiateDrag);
+		var dragBitmap:BitmapData
+		if (_dragImage.width && _dragImage.height)
+			dragBitmap = new BitmapData(_dragImage.width, _dragImage.height, true, 0x000000);
+		else
+			dragBitmap = new BitmapData(1, 1, true, 0x000000);
+		dragBitmap.draw(_dragImage);
+
+		if (removeImage && _dragImage is IUIComponent && _dragInitiator)
+		{
+			_dragInitiator.systemManager.popUpChildren.removeChild(DisplayObject(_dragImage));
+		}
+
+		// TODO!!! include _dragActions as the last param
+		flash.desktop.NativeDragManager.doDrag(InteractiveObject(_dragInitiator), _clipboard, dragBitmap, _offset, _allowedActions);
+		//NativeDragManager.dropAction = _allowMove ? DragManager.MOVE : DragManager.COPY;
+	}
+
+	/**
+	 *  Call this method from your dragEnter event handler if you accept
+	 *  the drag/drop data.
+	 *  For example:
+	 *
+	 *
DragManager.acceptDragDrop(event.target);

+	 *
+	 *	@param target The drop target accepting the drag.
+	 */
+	public function acceptDragDrop(target:IUIComponent):void
+	{
+		if (isDragging)
+		{
+			// trace("NativeDragMgr.acceptDragDrop targ",target);
+			var dispObj:InteractiveObject = target as InteractiveObject;
+			if (dispObj)
+				flash.desktop.NativeDragManager.acceptDragDrop(dispObj);
+		}
+		else
+		{
+			var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
+			me.name = "acceptDragDrop";
+			me.value = target;
+			// trace("-->dispatch acceptDragDrop for DragManagerImpl", sm, target);
+			sandboxRoot.dispatchEvent(me);
+			// trace("<--dispatch acceptDragDrop for DragManagerImpl", sm, target);
+		}
+	}
+
+	/**
+	 *  Sets the feedback indicator for the drag and drop operation.
+	 *  Possible values are DragManager.COPY, DragManager.MOVE,
+	 *  DragManager.LINK, or DragManager.NONE.
+	 *
+	 *  @param feedback The type of feedback indicator to display.
+	 */
+	public function showFeedback(feedback:String):void
+	{
+		if (isDragging)
+		{
+			if (feedback == DragManager.MOVE && !_allowedActions.allowMove)
+				return;
+			else if (feedback == DragManager.COPY && !_allowedActions.allowCopy)
+				return;
+			else if (feedback == DragManager.LINK && !_allowedActions.allowLink)
+				return;
+			flash.desktop.NativeDragManager.dropAction = feedback;
+		}
+		else
+		{
+			var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
+			me.name = "showFeedback";
+			me.value = feedback;
+			// trace("-->dispatch showFeedback for DragManagerImpl", sm, feedback);
+			sandboxRoot.dispatchEvent(me);
+			// trace("<--dispatch showFeedback for DragManagerImpl", sm, feedback);
+		}
+	}
+
+	/**
+	 *  Returns the current drag and drop feedback.
+	 *
+	 *  @return  Possible return values are DragManager.COPY,
+	 *  DragManager.MOVE,
+	 *  DragManager.LINK, or DragManager.NONE.
+	 */
+	public function getFeedback():String
+	{
+		if (!isDragging)
+		{
+			var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
+			me.name = "getFeedback";
+			// trace("-->dispatch getFeedback for DragManagerImpl", sm);
+			sandboxRoot.dispatchEvent(me);
+			// trace("<--dispatch getFeedback for DragManagerImpl", sm);
+			return me.value as String;
+		}
+
+		return flash.desktop.NativeDragManager.dropAction;
+	}
+
+	/**
+	 *  @Review
+	 *  Not Supported by NativeDragManagerImpl
+	 */
+	public function endDrag():void
+	{
+		var me:InterManagerRequest;
+
+		me = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
+		me.name = "mouseShield";
+		me.value = false;
+		// trace("-->dispatch remove mouseShield.for DragManagerImpl", sm);
+		sandboxRoot.dispatchEvent(me);
+
+		me = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
+		me.name = "isDragging";
+		me.value = false;
+		// trace("-->dispatch isDragging for DragManagerImpl", sm, false);
+		sandboxRoot.dispatchEvent(me);
+		// trace("<--dispatch isDragging for DragManagerImpl", sm, false);
+		// trace("<--endDrag for DragManagerImpl", sm);
+
+	}
+
+	/**
+	 *  @private
+	 *  register ISystemManagers that will listen for events
+	 *  (such as those for additional windows)
+	 */
+	mx_internal function registerSystemManager(sm:ISystemManager):void
+	{
+		if (sm.isTopLevel())
+		{
+			sm.addEventListener(MouseEvent.MOUSE_DOWN, sm_mouseDownHandler);
+			sm.addEventListener(MouseEvent.MOUSE_UP, sm_mouseUpHandler);
+		}
+
+		sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER, nativeDragEventHandler, true);
+		sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_COMPLETE, nativeDragEventHandler, true);
+		sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP, nativeDragEventHandler, true);
+		sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_EXIT, nativeDragEventHandler, true);
+		sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_OVER, nativeDragEventHandler, true);
+		sm.stage.addEventListener(NativeDragEvent.NATIVE_DRAG_START, nativeDragEventHandler, true);
+
+	}
+
+	/**
+	 *  @private
+	 *  unregister ISystemManagers that will listen for events
+	 *  (such as those for additional windows)
+	 */
+	mx_internal function unregisterSystemManager(sm:ISystemManager):void
+	{
+		if (sm.isTopLevel())
+		{
+			sm.removeEventListener(MouseEvent.MOUSE_DOWN, sm_mouseDownHandler);
+			sm.removeEventListener(MouseEvent.MOUSE_UP, sm_mouseUpHandler);
+		}
+
+		sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_ENTER, nativeDragEventHandler, true);
+		sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_COMPLETE, nativeDragEventHandler, true);
+		sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_DROP, nativeDragEventHandler, true);
+		sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_EXIT, nativeDragEventHandler, true);
+		sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_OVER, nativeDragEventHandler, true);
+		sm.stage.removeEventListener(NativeDragEvent.NATIVE_DRAG_START, nativeDragEventHandler, true);
+
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Event handlers
+	//
+	//--------------------------------------------------------------------------
+	private function sm_mouseDownHandler(event:MouseEvent):void
+	{
+		mouseIsDown = true;
+	}
+
+	private function sm_mouseUpHandler(event:MouseEvent):void
+	{
+		mouseIsDown = false;
+	}
+
+	/**
+	 *  Listens for all NativeDragEvents and then redispatches them as DragEvents
+	 */
+	private function nativeDragEventHandler(event:NativeDragEvent):void
+	{
+		var newType:String = event.type.charAt(6).toLowerCase() + event.type.substr(7);
+		var dragSource:DragSource = new DragSource();
+		var target:DisplayObject = event.target as DisplayObject;
+		var clipboard:Clipboard = event.clipboard;
+		var origFormats:Array = clipboard.formats;
+		var len:int = origFormats.length;
+		var format:String;
+		var data:Object;
+		var me:InterManagerRequest;
+
+		_allowedActions = event.allowedActions;
+
+		//translate either commandKey or controlKey to old-style ctrlKey
+		var ctrlKey:Boolean = false;
+		if (Capabilities.os.substring(0,3) == "Mac")
+			ctrlKey = event.commandKey;
+		else
+			ctrlKey = event.controlKey;
+		//default to move if drag is from same app
+
+                if (NativeDragManager.dragInitiator && event.type == NativeDragEvent.NATIVE_DRAG_START)
                 {
+                    flash.desktop.NativeDragManager.dropAction =
+                        (ctrlKey || !_allowMove) ? DragManager.COPY : DragManager.MOVE;
+                }
+
+		// Transfer clipboard data to dragSource
+		if (event.type != NativeDragEvent.NATIVE_DRAG_EXIT)
+		{
+			for (var i:int = 0; i < len; i++)
+			{
+				format = origFormats[i];
+				if (clipboard.hasFormat(format))
+				{
 					// Create an object to store a reference to the format and clipboard.
 					// This delays copying over the drag data until it is needed
 					var dataFetcher:DragDataFormatFetcher = new DragDataFormatFetcher();
@@ -663,102 +577,88 @@
 					dataFetcher.format = format;

 					dragSource.addHandler(dataFetcher.getClipboardData, format);
-                }
-            }
-        }
-        if (event.type == NativeDragEvent.NATIVE_DRAG_DROP)
-            _relatedObject = event.target as InteractiveObject;
-
-
-
-        // Need a dragInitiator in NativeDragEvent
-        var dragEvent:DragEvent
-            = new DragEvent(newType, false, event.cancelable,
-                            NativeDragManager.dragInitiator as IUIComponent,
-                            dragSource, event.dropAction, ctrlKey,
-                            event.altKey, event.shiftKey);
-        dragEvent.buttonDown = event.buttonDown;
-        dragEvent.delta = event.delta;
-        dragEvent.localX = event.localX;
-        dragEvent.localY = event.localY;
-        if (newType == DragEvent.DRAG_COMPLETE)
-            dragEvent.relatedObject = _relatedObject;
-        else
-            dragEvent.relatedObject = event.relatedObject;
-
-        if (dragAutomationHandlerClass)
-		{
-			if (newType == DragEvent.DRAG_DROP)
-			{
-				dragAutomationHandlerClass["recordAutomatableDragDrop1"](target,dragEvent);
+				}
 			}
-			else if (newType == DragEvent.DRAG_COMPLETE)
-			{
-			   	dragAutomationHandlerClass["recordAutomatableDragCancel1"]
-			   		(NativeDragManager.dragInitiator as IUIComponent, dragEvent);
-			}
-		}
-
-        // Resend the event as a DragEvent.
-        _dispatchDragEvent(target, dragEvent);
-
-        if (newType == DragEvent.DRAG_COMPLETE)
-        {
-            if (sm == sandboxRoot)
-                endDrag();
-            else
-            {
-                me = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
-                me.name = "endDrag";
-                // trace("-->dispatch endDrag for DragManagerImpl", sm);
-                sandboxRoot.dispatchEvent(me);
-                // trace("<--dispatch endDrag for DragManagerImpl", sm);
-            }
-        }
-    }
+		}
+		if (event.type == NativeDragEvent.NATIVE_DRAG_DROP)
+			_relatedObject = event.target as InteractiveObject;
+
+
+
+		// Need a dragInitiator in NativeDragEvent
+		var dragEvent:DragEvent
+			= new DragEvent(newType, false, event.cancelable,
+							NativeDragManager.dragInitiator as IUIComponent,
+							dragSource, event.dropAction, ctrlKey,
+							event.altKey, event.shiftKey);
+		dragEvent.buttonDown = event.buttonDown;
+		dragEvent.delta = event.delta;
+		dragEvent.localX = event.localX;
+		dragEvent.localY = event.localY;
+		if (newType == DragEvent.DRAG_COMPLETE)
+			dragEvent.relatedObject = _relatedObject;
+		else
+			dragEvent.relatedObject = event.relatedObject;
+		// Resend the event as a DragEvent.
+		_dispatchDragEvent(target, dragEvent);
+
+		if (newType == DragEvent.DRAG_COMPLETE)
+		{
+		    if (sm == sandboxRoot)
+		        endDrag();
+		    else
+		    {
+    			me = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
+    			me.name = "endDrag";
+    			// trace("-->dispatch endDrag for DragManagerImpl", sm);
+    			sandboxRoot.dispatchEvent(me);
+    			// trace("<--dispatch endDrag for DragManagerImpl", sm);
+    		}
+		}
+	}

     /**
      *  @private
      */
     private function _dispatchDragEvent(target:DisplayObject, event:DragEvent):void
     {
-        // in trusted mode, the target could be in another application domain
-        // in untrusted mode, the mouse events shouldn't work so we shouldn't be here
-
-        // same domain
-        if (isSameOrChildApplicationDomain(target))
-            target.dispatchEvent(event);
-        else
-        {
-            // wake up all the other DragManagers
-            var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.INIT_MANAGER_REQUEST);
-            me.name = "mx.managers.IDragManagerImpl";
-            sandboxRoot.dispatchEvent(me);
-            // bounce this message off the sandbox root and hope
-            // another DragManager picks it up
-            var mde:InterDragManagerEvent = new InterDragManagerEvent(InterDragManagerEvent.DISPATCH_DRAG_EVENT, false, false,
-                                                    event.localX,
-                                                    event.localY,
-                                                    event.relatedObject,
-                                                    event.ctrlKey,
-                                                    event.altKey,
-                                                    event.shiftKey,
-                                                    event.buttonDown,
-                                                    event.delta,
-                                                    target,
-                                                    event.type,
-                                                    event.dragInitiator,
-                                                    event.dragSource,
-                                                    event.action,
-                                                    event.draggedItem
-                                                    );
-            sandboxRoot.dispatchEvent(mde);
-        }
-    }
-
-    private function isSameOrChildApplicationDomain(target:Object):Boolean
-    {
-        var swfRoot:DisplayObject = SystemManager.getSWFRoot(target);
+		// in trusted mode, the target could be in another application domain
+		// in untrusted mode, the mouse events shouldn't work so we shouldn't be here
+
+		// same domain
+		if (isSameOrChildApplicationDomain(target))
+			target.dispatchEvent(event);
+		else
+		{
+			// wake up all the other DragManagers
+			var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.INIT_MANAGER_REQUEST);
+			me.name = "mx.managers.IDragManagerImpl";
+			sandboxRoot.dispatchEvent(me);
+			// bounce this message off the sandbox root and hope
+			// another DragManager picks it up
+			var mde:InterDragManagerEvent = new InterDragManagerEvent(InterDragManagerEvent.DISPATCH_DRAG_EVENT, false, false,
+													event.localX,
+													event.localY,
+													event.relatedObject,
+													event.ctrlKey,
+													event.altKey,
+													event.shiftKey,
+													event.buttonDown,
+													event.delta,
+													target,
+													event.type,
+													event.dragInitiator,
+													event.dragSource,
+													event.action,
+													event.draggedItem
+													);
+			sandboxRoot.dispatchEvent(mde);
+		}
+	}
+
+	private function isSameOrChildApplicationDomain(target:Object):Boolean
+	{
+		var swfRoot:DisplayObject = SystemManager.getSWFRoot(target);
         if (swfRoot)
             return true;

@@ -772,107 +672,99 @@
         return false;
     }

-    /**
-     *  Marshal dispatchEvents
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    private function marshalDispatchEventHandler(event:Event):void
-    {
-        if (event is InterDragManagerEvent)
-            return;
-
-        var marshalEvent:Object = event;
-
-        var swfRoot:DisplayObject = SystemManager.getSWFRoot(marshalEvent.dropTarget);
-        if (!swfRoot)
-            return; // doesn't belong to this appdomain
-
-        var dragEvent:DragEvent = new DragEvent(marshalEvent.dragEventType, marshalEvent.bubbles, marshalEvent.cancelable);
-        dragEvent.localX = marshalEvent.localX;
-        dragEvent.localY = marshalEvent.localY;
-        dragEvent.action = marshalEvent.action;
-        dragEvent.ctrlKey = marshalEvent.ctrlKey;
-        dragEvent.altKey = marshalEvent.altKey;
-        dragEvent.shiftKey = marshalEvent.shiftKey;
-        dragEvent.draggedItem = marshalEvent.draggedItem;
-        dragEvent.dragSource = new DragSource();
-        var formats:Array = marshalEvent.dragSource.formats;
-        var n:int = formats.length;
-        for (var i:int = 0; i < n; i++)
-        {
-            // this will call handlers right away, so deferred clipboard will be costly
-            dragEvent.dragSource.addData(marshalEvent.dragSource.dataForFormat(formats[i]), formats[i]);
-        }
-        if (!marshalEvent.dropTarget.dispatchEvent(dragEvent))
-        {
-            event.preventDefault();
-        }
-    }
-
-    /**
-     *  Marshal dragManager
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    private function marshalDragManagerHandler(event:Event):void
-    {
-        if (event is InterManagerRequest)
-            return;
-
-        var marshalEvent:Object = event;
-        switch (marshalEvent.name)
-        {
-        case "isDragging":
-            // trace("--marshaled isDragging for DragManagerImpl", sm, marshalEvent.value);
-            // bDoingDrag = marshalEvent.value; // not supported in AIR right now, we'd need more info
-            break;
-        case "acceptDragDrop":
-            if (isDragging)
-            {
-                // trace("NativeDragMgr.acceptDragDrop targ",target);
-                var dispObj:InteractiveObject = marshalEvent.value as InteractiveObject;
-                if (dispObj)
-                    flash.desktop.NativeDragManager.acceptDragDrop(dispObj);
-            }
-            break;
-        case "showFeedback":
-            if (isDragging) // it is our drag
-            {
-                // trace("--marshaled showFeedback for DragManagerImpl", sm, marshalEvent.value);
-                showFeedback(marshalEvent.value);
-            }
-            break;
-        case "getFeedback":
-            if (isDragging) // it is our drag
-            {
-                marshalEvent.value = getFeedback();
-                // trace("--marshaled getFeedback for DragManagerImpl", sm, marshalEvent.value);
-            }
-            break;
-        case "endDrag":
-            // trace("--marshaled endDrag for DragManagerImpl", sm, marshalEvent.value);
-            endDrag();
-            break;
-        case "update":
-            // if we own the drag, then redispatch to tell the new guy
-            if (isDragging)
-            {
-                // trace("-->marshaled update for DragManagerImpl", sm);
-                var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
-                me.name = "isDragging";
-                me.value = true;
-                // trace("-->dispatched isDragging for DragManagerImpl", sm, true);
-                sandboxRoot.dispatchEvent(me);
-                // trace("<--dispatched isDragging for DragManagerImpl", sm, true);
-                // trace("<--marshaled update for DragManagerImpl", sm);
-            }
-        }
-    }
+	/**
+	 *  Marshal dispatchEvents
+	 */
+	private function marshalDispatchEventHandler(event:Event):void
+	{
+		if (event is InterDragManagerEvent)
+			return;
+
+		var marshalEvent:Object = event;
+
+		var swfRoot:DisplayObject = SystemManager.getSWFRoot(marshalEvent.dropTarget);
+		if (!swfRoot)
+			return;	// doesn't belong to this appdomain
+
+		var dragEvent:DragEvent = new DragEvent(marshalEvent.dragEventType, marshalEvent.bubbles, marshalEvent.cancelable);
+		dragEvent.localX = marshalEvent.localX;
+		dragEvent.localY = marshalEvent.localY;
+		dragEvent.action = marshalEvent.action;
+		dragEvent.ctrlKey = marshalEvent.ctrlKey;
+		dragEvent.altKey = marshalEvent.altKey;
+		dragEvent.shiftKey = marshalEvent.shiftKey;
+		dragEvent.draggedItem = marshalEvent.draggedItem;
+		dragEvent.dragSource = new DragSource();
+		var formats:Array = marshalEvent.dragSource.formats;
+		var n:int = formats.length;
+		for (var i:int = 0; i < n; i++)
+		{
+			// this will call handlers right away, so deferred clipboard will be costly
+			dragEvent.dragSource.addData(marshalEvent.dragSource.dataForFormat(formats[i]), formats[i]);
+		}
+		if (!marshalEvent.dropTarget.dispatchEvent(dragEvent))
+		{
+			event.preventDefault();
+		}
+	}
+
+	/**
+	 *  Marshal dragManager
+	 */
+	private function marshalDragManagerHandler(event:Event):void
+	{
+		if (event is InterManagerRequest)
+			return;
+
+		var marshalEvent:Object = event;
+		switch (marshalEvent.name)
+		{
+		case "isDragging":
+			// trace("--marshaled isDragging for DragManagerImpl", sm, marshalEvent.value);
+			// bDoingDrag = marshalEvent.value; // not supported in AIR right now, we'd need more info
+			break;
+		case "acceptDragDrop":
+			if (isDragging)
+			{
+				// trace("NativeDragMgr.acceptDragDrop targ",target);
+				var dispObj:InteractiveObject = marshalEvent.value as InteractiveObject;
+				if (dispObj)
+					flash.desktop.NativeDragManager.acceptDragDrop(dispObj);
+			}
+			break;
+		case "showFeedback":
+			if (isDragging)	// it is our drag
+			{
+				// trace("--marshaled showFeedback for DragManagerImpl", sm, marshalEvent.value);
+				showFeedback(marshalEvent.value);
+			}
+			break;
+		case "getFeedback":
+			if (isDragging)	// it is our drag
+			{
+				marshalEvent.value = getFeedback();
+				// trace("--marshaled getFeedback for DragManagerImpl", sm, marshalEvent.value);
+			}
+			break;
+		case "endDrag":
+			// trace("--marshaled endDrag for DragManagerImpl", sm, marshalEvent.value);
+			endDrag();
+			break;
+		case "update":
+			// if we own the drag, then redispatch to tell the new guy
+			if (isDragging)
+			{
+				// trace("-->marshaled update for DragManagerImpl", sm);
+				var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST);
+				me.name = "isDragging";
+				me.value = true;
+				// trace("-->dispatched isDragging for DragManagerImpl", sm, true);
+				sandboxRoot.dispatchEvent(me);
+				// trace("<--dispatched isDragging for DragManagerImpl", sm, true);
+				// trace("<--marshaled update for DragManagerImpl", sm);
+			}
+		}
+	}
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

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


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

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

 package mx.managers.marshalClasses
 {


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

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

 package spark.components.supportClasses
 {


Improve a log message.

Improve a log message.

--- sdk-remote/src/tests/liburbi-check.as
+++ sdk-remote/src/tests/liburbi-check.as
@@ -102,7 +102,8 @@
 # use an installed urbi-console, but rather the one which is part of
 # this package.
 if test -d $abs_top_srcdir/../../src/kernel; then
-  stderr "This SDK-Remote is part of a kernel package."
+  stderr "This SDK-Remote is part of a kernel package" \
+         "  ($abs_top_srcdir/../../src/kernel exists)."
   URBI_SERVER=$abs_top_builddir/../src/urbi-console
   export URBI_PATH=$abs_top_srcdir/../share
 else


Keeping position in the animation on timeFunction and reverse change

--- src/aerys/minko/scene/controller/animation/AbstractAnimationController.as
+++ src/aerys/minko/scene/controller/animation/AbstractAnimationController.as
@@ -43,6 +43,7 @@
 		protected var _timeFunction				: Function;

 		protected var _lastTime					: int;
+		protected var _lastTimeUntransformed	: int;

 		protected var _labelNames				: Vector.<String>;
 		protected var _labelTimes				: Vector.<Number>;
@@ -63,6 +64,12 @@

 		public function set reverse(value:Boolean):void
 		{
+			if (_reverse != value)
+			{
+				_lastTime = -_lastTime;
+				_lastTimeUntransformed = -_lastTimeUntransformed;
+			}
+
 			_reverse = value;
 			updateNextLabel(_currentTime);
 		}
@@ -79,6 +86,22 @@

 		public function set timeFunction(value : Function) : void
 		{
+			if (value != null && _timeFunction == null)
+			{
+				_lastTime = value(_lastTime);
+			}
+			else if (_timeFunction != null)
+			{
+				var time		: int = _reverse ? -getTimer() : getTimer();
+				var prevTime	: int = _timeFunction(time);
+				var prevDeltaT	: int = prevTime - _lastTime;
+
+				if (value != null)
+					time = value(time);
+
+				_lastTime = time - prevDeltaT;
+			}
+
 			_timeFunction = value;
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 2796
Author:   jimurphy@adobe.com
Date:     2008-08-11T14:31:56.866734Z

Log Message:
-----------
Merged 3.0.x revisions [2767,2780,2784] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.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/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/Compc.java</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/airframework/src/mx/managers/NativeDragManagerImpl.as</path>

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

--- frameworks/projects/mx/src/mx/controls/Menu.as
+++ frameworks/projects/mx/src/mx/controls/Menu.as
@@ -49,9 +49,12 @@
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
 import mx.events.FlexEvent;
+import mx.events.FlexMouseEvent;
 import mx.events.ListEvent;
+import mx.events.MarshalMouseEvent;
 import mx.events.MenuEvent;
 import mx.managers.IFocusManagerContainer;
+import mx.managers.ISystemManager2;
 import mx.managers.PopUpManager;

 use namespace mx_internal;
@@ -1471,7 +1474,9 @@
         supposedToLoseFocus = true;

         // If the user clicks outside the menu, then hide the menu
-        systemManager.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownOutsideHandler, false, 0, true);
+        var sbRoot:DisplayObject = ISystemManager2(systemManager).getSandboxRoot();
+        sbRoot.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownOutsideHandler, false, 0, true);
+        addEventListener(MarshalMouseEvent.MOUSE_DOWN, mouseDownOutsideHandler, false, 0, true);
     }

     /**
@@ -1517,8 +1522,9 @@

             // Now that the menu is no longer visible, it doesn't need
             // to listen to mouseDown events anymore.
-            systemManager.removeEventListener(MouseEvent.MOUSE_DOWN,
-                                                   mouseDownOutsideHandler);
+            var sbRoot:DisplayObject = ISystemManager2(systemManager).getSandboxRoot();
+            sbRoot.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownOutsideHandler);
+            removeEventListener(MarshalMouseEvent.MOUSE_DOWN, mouseDownOutsideHandler);

             // Fire an event
             var menuEvent:MenuEvent = new MenuEvent(MenuEvent.MENU_HIDE);
@@ -1575,9 +1581,15 @@
     /**
      *  @private
      */
-    private function mouseDownOutsideHandler(event:MouseEvent):void
-    {
-        if (!isMouseOverMenu(event) && !isMouseOverMenuBarItem(event))
+    private function mouseDownOutsideHandler(event:Event):void
+    {
+        if (event is MouseEvent)
+        {
+            var mouseEvent:MouseEvent = MouseEvent(event);
+            if (!isMouseOverMenu(mouseEvent) && !isMouseOverMenuBarItem(mouseEvent))
+                hideAllMenus();
+        }
+        else if (event is MarshalMouseEvent)
             hideAllMenus();
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12061
Author:   jszeto@adobe.com
Date:     2009-11-20T20:17:21.636565Z

Log Message:
-----------
Moving DropDownListBase from spark.components to spark.components.supportClasses

http://bugs.adobe.com/jira/browse/SDK-24316

QE notes: None
Doc notes: None
Bugs: SDK-24316
Reviewer: Corey
Tests run: DropDownList, ComboBox
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownListBase.as" copyfrom-rev="12024" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/DropDownListBaseAccImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
@@ -10,7 +10,7 @@
 ////////////////////////////////////////////////////////////////////////////////

-package spark.components
+package spark.components.supportClasses
 {

 import flash.display.DisplayObject;
@@ -25,9 +25,7 @@
 import mx.events.CollectionEvent;
 import mx.events.FlexEvent;

-import spark.components.supportClasses.ButtonBase;
-import spark.components.supportClasses.DropDownController;
-import spark.components.supportClasses.TextBase;
+import spark.components.List;
 import spark.core.NavigationUnit;
 import spark.events.DropDownEvent;
 import spark.events.IndexChangeEvent;
@@ -176,7 +174,7 @@
  */
 public class DropDownListBase extends List
 {
-    include "../core/Version.as";
+    include "../../core/Version.as";

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 3892
Author:   egeorgie@adobe.com
Date:     2008-10-24T23:33:52.238868Z

Log Message:
-----------
Add constraint properties and unify IVisualItem, UIComponent, GraphicElement, change percentSize to percentWidth, percentHeight in ILayoutItem. Remove IGraphicElementHost and GraphicElementHostImpl. Change GraphicElement constraint properties to take in Object instead of Number to enable advanced constraints later on.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Ryan
tests: checkintests, Mustella (canvas, gumbo layout)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxMoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElementHostImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualItem.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/IGraphicElementHost.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemFDO.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutElementHelper.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutElementHelper.as
@@ -15,6 +15,7 @@
 import mx.layout.ILayoutItem;

 import mx.core.IConstraintClient;
+import mx.core.IVisualItem;

 /**
  *  Documentation is not currently available.
@@ -43,20 +44,20 @@
     // TODO EGeorgie: this currently works only for constraints specified to
     // the parent. Add constraintRow and constraintColumn support.
     /**
-     *  @param item The item whose constraint is returned.
-     *  @param name The name of the constraint, i.e. "left", "right", "top",
-     *  "bottom", "baseline", "horizontalCenter", "verticalCenter"
-     *  @return returns the number for the specified constraint.
+     *  @return returns the number for the passed in constraint value. Constraint value
+     *  can be a Number, or a string in the format "col1:10".
      */
-    public static function getConstraint(item:ILayoutItem, name:String):Number
+    public static function parseConstraintValue(value:Object):Number
     {
-        var constraintClient:IConstraintClient = item.target as IConstraintClient;
-        if (!constraintClient)
+        if (value is Number)
+            return Number(value);
+
+        var str:String = value as String;
+        if (!str)
             return NaN;
-
-        var value:String = constraintClient.getConstraintValue(name);
-        var result:Array = parseConstraintExp(value);
-        if (!result || result.length != 1)
+
+        var result:Array = parseConstraintExp(str);
+        if (!result || result.length < 1)
             return NaN;

         return result[0];


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/advancedgrids/src/mx/olap/aggregators/SumAggregator.as
+++ frameworks/projects/advancedgrids/src/mx/olap/aggregators/SumAggregator.as
@@ -0,0 +1,135 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.olap.aggregators
+{
+import mx.olap.IOLAPCustomAggregator;
+import mx.formatters.NumberBase;
+
+/**
+ *  The SumAggregator class  implements the sum aggregator.
+ *  The sum aggregator returns the sum of all measures.
+ *  Flex uses this aggregator when you set the OLAPMeasure.aggregator property
+ *  to "SUM".
+ *
+ *  @see mx.olap.OLAPMeasure
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class SumAggregator implements IOLAPCustomAggregator
+{
+	//--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    // sum functions
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeBegin(dataField:String):Object
+    {
+        var newObj:Object = {};
+        newObj[dataField] = 0;
+        return newObj;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeLoop(data:Object, dataField:String, rowData:Object):void
+    {
+    	var value:Number = rowData[dataField];
+    	if (typeof(value) == "xml")
+			value = Number(value.toString());
+
+        if (!data.hasOwnProperty(dataField))
+            data[dataField] = value ;
+        else
+            data[dataField] += value;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeEnd(data:Object, dataField:String):Number
+    {
+        return data[dataField];
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeObjectBegin(value:Object):Object
+    {
+        var newObj:Object = {};
+        for (var p:String in value)
+        {
+            newObj[p] = value[p];
+        }
+        return newObj;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeObjectLoop(oldValue:Object, newValue:Object):void
+    {
+        for (var p:String in newValue)
+        {
+            oldValue[p] += newValue[p];
+        }
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeObjectEnd(oldValue:Object, dataField:String):Number
+    {
+        return oldValue[dataField];
+    }
+}
+}


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

--- frameworks/projects/automation/src/mx/automation/events/AutomationEvent.as
+++ frameworks/projects/automation/src/mx/automation/events/AutomationEvent.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.automation.events
 {


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

--- frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.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.controls.listClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 16260
Author:   jszeto@adobe.com
Date:     2010-05-20T18:41:19.598936Z

Log Message:
-----------
Revert GroupBase.baselinePositionElement support

Still needs some work and it breaks some tests.

QE notes: none
Doc notes: none
Bugs: SDK-26487
Reviewer: none
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -304,8 +304,6 @@
     //  baselinePosition
     //----------------------------------

-    [Bindable ("baselinePositionChanged")]
-
     /**
      *  @inheritDoc
      *
@@ -328,20 +326,8 @@
         // is vertically centered.
         // At the crossover height, these two calculations
         // produce the same result.
-
-        var bElement:IVisualElement = baselinePositionElement;
-
-        if (bElement == null && numElements > 0)
-        {
-            bElement = getElementAt(0);
-        }
-
-        if (bElement)
-            return bElement.baselinePosition + bElement.y;
-        else
-            return NaN;
-
-        //return FTETextUtil.calculateFontBaseline(this, height, moduleFactory);
+
+        return FTETextUtil.calculateFontBaseline(this, height, moduleFactory);
     }

     //----------------------------------
@@ -410,40 +396,6 @@
     //
     //--------------------------------------------------------------------------

-    //----------------------------------
-    //  baselinePositionElement
-    //----------------------------------
-
-    private var _baselinePositionElement:IVisualElement;
-
-    /**
-     *  The element used to calculate the GroupBase's baselinePosition
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get baselinePositionElement():IVisualElement
-    {
-        return _baselinePositionElement;
-    }
-
-    /**
-     *  @private
-     */
-    public function set baselinePositionElement(value:IVisualElement):void
-    {
-        if (value === _baselinePositionElement)
-            return;
-
-        _baselinePositionElement = value;
-        invalidateSize();
-        invalidateDisplayList();
-        // TODO (jszeto) Figure out what to invalidate. We want the parent to remeasure
-    }
-
-
     //----------------------------------
     //  layout
     //----------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 3419
Author:   chaase@adobe.com
Date:     2008-09-30T17:29:13.742964Z

Log Message:
-----------
Fix for sdk-16496. Now transitions on targets that are not included in the 'to' state can be simple <Fade> effects, without requiring a Sequence that also has RemoveAction. We add back the target objects into the initial state for the duration of the effect, then remove it when finished. RemoveAction will still work if removal needs to be explicitly choreographed, but a simple Fade will at least do the job now.

reviewed by Glenn
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/NewEffects.mxml</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
@@ -28,6 +28,9 @@
     public function FadeInstance(target:Object)
     {
         super(target);
+
+        // Automatically keep disappearing targets around during this effect
+        autoRemoveTarget = true;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/automation/src/mx/automation/events/AutomationEvent.as
+++ frameworks/projects/automation/src/mx/automation/events/AutomationEvent.as
@@ -0,0 +1,146 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.automation.events
+{
+
+	import flash.events.Event;
+
+	/**
+	 *  The AutomationEvent class represents event objects that are dispatched
+	 *  by the AutomationManager. Used by the functional testing classes
+	 *  and any other classes that must record user interactions.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class AutomationEvent extends Event
+	{
+		include "../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class constants
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  The AutomationEvent.BEGIN_RECORD constant defines the value of the
+		 *  type property of the event object for a beginRecord event.
+		 *
+		 *
The properties of the event object have the following values:

+		 *

+		 *
Property	Value

+		 *
bubbles	true

+		 *
cacheable	true if the event
+		 *       should be saved in the event cache, and false if not.

+		 *
cancelable	true

+		 *
currentTarget	The Object that defines the
+		 *       event listener that handles the event. For example, if you use
+		 *       myButton.addEventListener() to register an event listener,
+		 *       myButton is the value of the currentTarget.

+		 *
target	The Object that dispatched the event;
+		 *       it is not always the Object listening for the event.
+		 *       Use the currentTarget property to always access the
+		 *       Object listening for the event.

+		 *

+		 *
+		 *  @eventType record
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public static const BEGIN_RECORD:String = "beginRecord";
+
+		/**
+		 *  The AutomationEvent.BEGIN_RECORD constant defines the value of the
+		 *  type property of the event object for a endRecord event.
+		 *
+		 *
The properties of the event object have the following values:

+		 *

+		 *
Property	Value

+		 *
bubbles	true

+		 *
cacheable	true if the event
+		 *       should be saved in the event cache, and false if not.

+		 *
cancelable	true

+		 *
currentTarget	The Object that defines the
+		 *       event listener that handles the event. For example, if you use
+		 *       myButton.addEventListener() to register an event listener,
+		 *       myButton is the value of the currentTarget.

+		 *
target	The Object that dispatched the event;
+		 *       it is not always the Object listening for the event.
+		 *       Use the currentTarget property to always access the
+		 *       Object listening for the event.

+		 *

+		 *
+		 *  @eventType record
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public static const END_RECORD:String = "endRecord";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 *
+		 *  @param type The event type; indicates the action that caused the event.
+		 *
+		 *  @param bubbles Whether the event can bubble up the display list hierarchy.
+		 *
+		 *  @param cancelable Whether the behavior associated with the event can be prevented.
+		 *
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function AutomationEvent(type:String = "beginRecord",
+										bubbles:Boolean = true,
+										cancelable:Boolean = true)
+		{
+			super(type, bubbles, cancelable);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Properties
+		//
+		//--------------------------------------------------------------------------
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods: Event
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function clone():Event
+		{
+			return new AutomationEvent(type, bubbles, cancelable);
+		}
+	}
+
+}