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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
@@ -14,6 +14,7 @@
 import flash.events.TimerEvent;
 import flash.utils.Timer;

+import flex.core.Group;
 import flex.effects.Animation;
 import flex.effects.PropertyValuesHolder;
 import flex.effects.easing.IEaser;
@@ -62,6 +63,8 @@

     private var reverseAnimation:Boolean;

+    private var needsRemoval:Boolean;
+
     //--------------------------------------------------------------------------
     //
     // Properties
@@ -92,6 +95,22 @@
      * when the animation is complete.
      */
     protected var affectsConstraints:Boolean;
+
+    /**
+     * This flag indicates whether a subclass would like their target to
+     * be automatically kept around during a transition and removed when it
+     * finishes. This capability applies specifically to effects like
+     * Fade which act on targets that go away at the end of the
+     * transition and removes the need to supply a RemoveAction or similar
+     * effect to manually keep the item around and remove it when the
+     * transition completes. In order to use this capability, subclasses
+     * should set this variable to true and also expose the "parent"
+     * and "elementHost" properties in their affectedProperties array so
+     * that the effect instance has enough information about the target
+     * and container to do the job.
+     */
+    protected var autoRemoveTarget:Boolean = false;
+

     private var _easer:IEaser;
     public function set easer(value:IEaser):void
@@ -397,6 +416,8 @@
      */
     protected function startHandler(event:AnimationEvent):void
     {
+        if (autoRemoveTarget)
+            addDisappearingTarget();
         dispatchEvent(event);
     }

@@ -435,8 +456,89 @@
         finishEffect();
         if (affectsConstraints)
             reenableConstraints();
-    }
-
+        if (autoRemoveTarget)
+            removeDisappearingTarget();
+    }
+
+    /**
+     * Adds a target which is not in the state we are transitioning
+     * to. This is the partner of removeDisappearingTarget(), which removes
+     * the target when this effect is finished if necessary.
+     * Note that if a RemoveAction effect is playing in a CompositeEffect,
+     * then the adding/removing is already happening and this function
+     * will noop the add.
+     */
+    private function addDisappearingTarget():void
+    {
+        needsRemoval = false;
+        if (propertyChanges)
+        {
+            // Check for non-null parent ensures that we won't double-remove
+            // items, such as if there is a RemoveAction effect working on
+            // the same target
+            if ("parent" in target && !target.parent)
+            {
+                var parentStart:* = propertyChanges.start["parent"];;
+                var parentEnd:* = propertyChanges.end["parent"];;
+                if (parentStart && !parentEnd)
+                {
+                    if (parentStart is Group)
+                        parentStart.addItem(target);
+                    else
+                        parentStart.addChild(target);
+                    needsRemoval = true;
+                }
+            }
+            else if ("elementHost" in target && !target.elementHost)
+            {
+                var hostStart:* = propertyChanges.start["elementHost"];
+                var hostEnd:* = propertyChanges.end["elementHost"];
+                if (hostStart && !hostEnd)
+                {
+                    hostStart.addItem(target);
+                    needsRemoval = true;
+                }
+            }
+        }
+    }
+
+    /**
+     * Removes a target which is not in the state we are transitioning
+     * to. This is the partner of addDisappearingTarget(), which re-adds
+     * the target when this effect is played if necessary.
+     * Note that if a RemoveAction effect is playing in a CompositeEffect,
+     * then the adding/removing is already happening and this function
+     * will noop the removal.
+     */
+    private function removeDisappearingTarget():void
+    {
+        if (needsRemoval && propertyChanges)
+        {
+            // Check for non-null parent ensures that we won't double-remove
+            // items, such as if there is a RemoveAction effect working on
+            // the same target
+            if ("parent" in target && target.parent)
+            {
+                var parentStart:* = propertyChanges.start["parent"];;
+                var parentEnd:* = propertyChanges.end["parent"];;
+                if (parentStart && !parentEnd)
+                {
+                    if (parentStart is Group)
+                        parentStart.removeItem(target);
+                    else
+                        parentStart.removeChild(target);
+                }
+            }
+            else if ("elementHost" in target && target.elementHost)
+            {
+                var hostStart:* = propertyChanges.start["elementHost"];
+                var hostEnd:* = propertyChanges.end["elementHost"];
+                if (hostStart && !hostEnd)
+                    hostStart.removeItem(target);
+            }
+        }
+    }
+
     private var constraintsHolder:Object;

     private function reenableConstraint(name:String):void


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

--- frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as
+++ frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as
@@ -0,0 +1,502 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 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.managers
+{
+
+import flash.desktop.Clipboard;
+import flash.desktop.NativeDragManager;
+import flash.desktop.NativeDragOptions;
+import flash.display.BitmapData;
+import flash.display.DisplayObject;
+import flash.display.InteractiveObject;
+import flash.events.MouseEvent;
+import flash.events.NativeDragEvent;
+import flash.geom.Point;
+import flash.system.Capabilities;
+
+import mx.core.DragSource;
+import mx.core.IFlexDisplayObject;
+import mx.core.IUIComponent;
+import mx.core.UIComponent;
+import mx.core.UIComponentGlobals;
+import mx.core.mx_internal;
+import mx.events.DragEvent;
+import mx.events.FlexEvent;
+import mx.managers.dragClasses.DragProxy;
+import mx.styles.CSSStyleDeclaration;
+import mx.styles.StyleManager;
+
+use namespace mx_internal;
+
+[ExcludeClass]
+
+/**
+ *  @private
+ */
+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);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  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;
+
+	//--------------------------------------------------------------------------
+	//
+	//  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;
+		}
+
+		_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;
+			var data:Object = dragSource.dataForFormat(format);
+			_clipboard.setData(format, data);
+		}
+
+		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 && !UIComponent(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 UIComponent)
+				(dragImage as UIComponent).validateNow();
+		}
+		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
+	{
+		// trace("NativeDragMgr.acceptDragDrop targ",target);
+		var dispObj:InteractiveObject = target as InteractiveObject;
+		if (dispObj)
+			flash.desktop.NativeDragManager.acceptDragDrop(dispObj);
+	}
+
+	/**
+	 *  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 (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;
+	}
+
+	/**
+	 *  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
+	{
+		return flash.desktop.NativeDragManager.dropAction;
+	}
+
+	/**
+	 *  @Review
+	 *  Not Supported by NativeDragManagerImpl
+	 */
+	public function endDrag():void
+	{
+	}
+
+	/**
+	 *  @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;
+
+		_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 != null)
+			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))
+				{
+					data = clipboard.getData(format);
+					dragSource.addData(data,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;
+		// Resend the event as a DragEvent.
+		target.dispatchEvent(dragEvent);
+	}
+}
+
+}
+


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 13013
Author:   gosmith@adobe.com
Date:     2009-12-16T23:05:06.067124Z

Log Message:
-----------
Added ASDoc for the Spark ListBaseAccImpl, ListAccImpl, DropDownListAccImpl, ComboBoxAccImpl, ButtonBarBaseAccImpl, and TabBarAccImpl, based on the opensource specs.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/DropDownListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonBarBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ListAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TabBarAccImpl.as</path>

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

--- frameworks/projects/spark/src/spark/accessibility/ButtonBarBaseAccImpl.as
+++ frameworks/projects/spark/src/spark/accessibility/ButtonBarBaseAccImpl.as
@@ -25,8 +25,109 @@
 use namespace mx_internal;

 /**
- *  ButtonBarBaseAccImpl is a subclass of AccessibilityImplementation
- *  which implements accessibility for the ButtonBarBase class.
+ *  ButtonBarBaseAccImpl is the accessibility implementation class
+ *  for spark.components.ButtonBarBase.
+ *
+ *
Although TabBar has its own accessibility implementation subclass,
+ *  ButtonBar simply uses the one for ButtonBarBase.
+ *  Therefore, the rest of this description refers to the commonly-used
+ *  ButtonBar class rather than the ButtonBarBase base class.

+ *
+ *
When a Spark ButtonBar is created,
+ *  its accessibilityImplementation property
+ *  is set to an instance of this class.
+ *  The Flash Player then uses this class to allow MSAA clients
+ *  such as screen readers to see and manipulate the ButtonBar.
+ *  See the mx.accessibility.AccImpl and
+ *  flash.accessibility.AccessibilityImplementation classes
+ *  for background information about accessibility implementation
+ *  classes and MSAA.

+ *
+ *
Children

+ *
+ *
The MSAA children of a ButtonBar are its buttons.
+ *  As described below, the accessibility of these Buttons
+ *  is managed by the ButtonBar;
+ *  their own accessibilityImplementation
+ *  and accessibilityProperties are ignored
+ *  by the Flash Player.

+ *
+ *
Role

+ *
+ *
The MSAA Role of a ButtonBar is ROLE_SYSTEM_TOOLBAR.

+ *
+ *
The Role of each Button in the ButtonBar is ROLE_SYSTEM_PUSHBUTTON.

+ *
+ *
Name

+ *
+ *
The MSAA Name of a ButtonBar is, by default, an empty string.
+ *  When wrapped in a FormItem element, the Name is the FormItem's label.
+ *  To override this behavior,
+ *  set the ButtonBar's accessibilityName property.

+ *
+ *
The Name of each Button is determined by the ButtonBar's
+ *  itemToLabel() method.

+ *
+ *
When the Name of the ButtonBar or one of its Buttons changes,
+ *  a ButtonBar dispatches the MSAA event EVENT_OBJECT_NAMECHANGE
+ *  with the proper childID for the Button or 0 for itself.

+ *
+ *
Description

+ *
+ *
The MSAA Description of a ButtonBar is, by default, an empty string,
+ *  but you can set the ButtonBar's accessibilityDescription
+ *  property.

+ *
+ *
The Description of each Button is the empty string.

+ *
+ *
State

+ *
+ *
The MSAA State of a ButtonBar is a combination of:
+ *

+ *
STATE_SYSTEM_UNAVAILABLE (when enabled is false)

+ *
STATE_SYSTEM_FOCUSABLE (when enabled is true)

+ *
STATE_SYSTEM_FOCUSED (when enabled is true
+ *    and the ButtonBar has focus)

+ *

+ *
+ *
The State of a Button in a ButtonBar is a combination of:
+ *

+ *
STATE_SYSTEM_FOCUSED (when it has focus)

+ *
STATE_SYSTEM_PRESSED (when it is selected)

+ *

+ *
+ *
When the State of the ButtonBar or one of its Buttons changes,
+ *  a ButtonBar dispatches the MSAA event EVENT_OBJECT_STATECHANGE
+ *  with the proper childID for the Button or 0 for itself.

+ *
+ *
Value

+ *
+ *
A ButtonBar, or a Button in a ButtonBar, does not have an MSAA Value.

+ *
+ *
Location

+ *
+ *
The MSAA Location of a ButtonBar, or a Button in a ButtonBar,
+ *  is its bounding rectangle.

+ *
+ *
Default Action

+ *
+ *
A ButtonBar does not have an MSAA DefaultAction.

+ *
+ *
The DefaultAction for a Button in a ButtonBar is "Press".

+ *
+ *
Focus

+ *
+ *
Both the ButtonBar and its individual buttons accept focus.
+ *  When they do so it dispatches the MSAA event EVENT_OBJECT_FOCUS.
+ *  A button is not automatically selected when focused
+ *  through arrow key navigation.
+ *  To select a focused button, the user must press the spacebar.

+ *
+ *
Selection

+ *
+ *
MSAA Selection will press the button
+ *  corresponding to the specified childID.
+ *  Only one button can be pressed at a time.

  *
  *  @langversion 3.0
  *  @playerversion Flash 10


Avoid var-args in actionscript, because they're pretty broken.
If you pass an array as the varargs argument, it doesn't supply the
varargs like it would in java, instead the whole array becomes the first
argument.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4621 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/crowd/data/ManagerCaller.as
+++ src/as/com/threerings/crowd/data/ManagerCaller.as
@@ -31,7 +31,7 @@
     /**
      * Called to call a method on the manager.
      */
-    public function invoke (method :String, ... args) :void
+    public function invoke (method :String, args :Array = null) :void
     {
         _plobj.postMessage(method, args);
     }


--- src/flash/geom/Utils3D.as
+++ src/flash/geom/Utils3D.as
@@ -8,7 +8,11 @@
          super();
       }

-     public static function projectVector(param1:Matrix3D, param2:Vector3D) : Vector3D{return null}
+     public static function projectVector(param1:Matrix3D, param2:Vector3D) : Vector3D{
+		var ret:Vector3D = param1.transformVector(param2);
+		ret.scaleBy(1 / ret.z);
+		return ret;
+	 }

      public static function projectVectors(param1:Matrix3D, param2:Vector.<Number>, param3:Vector.<Number>, param4:Vector.<Number>) : void{}


Score should only be added when drone is destroyed

--- DroneAnarchy/Resources/Scripts/DroneAnarchy.as
+++ DroneAnarchy/Resources/Scripts/DroneAnarchy.as
@@ -402,7 +402,6 @@
 	SubscribeToEvent("MouseButtonDown", "HandleMouseClick");
 	SubscribeToEvent("PlayerHit","HandlePlayerHit");
 	SubscribeToEvent("DroneDestroyed", "HandleDroneDestroyed");
-	SubscribeToEvent("DroneHit", "HandleDroneHit");
 	SubscribeToEvent("CountFinished", "HandleCountFinished");
 	SubscribeToEvent(scene_.physicsWorld, "PhysicsPreStep", "HandleFixedUpdate");

@@ -628,11 +627,6 @@
 	}
 }

-void HandleDroneHit(StringHash eventType, VariantMap& eventData)
-{
-	playerScore_ += SCORE_ADDITION_RATE;
-	UpdateScoreDisplay();
-}

 void HandleDroneDestroyed(StringHash eventType, VariantMap& eventData)
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 20539
Author:   deeptika@adobe.com
Date:     2011-03-02T06:44:29.219169Z

Log Message:
-----------
While calculating position of labels, we were using same logic for inverted and normal labels. Fixing that in this revision.

QE notes:
Doc notes:
Bugs: FLEXDMV-2231 (DateTimeAxis renders labels in reverse order)
Reviewer: Sunil Bannur
Tests run: Checkin tests, cyclone tests
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/DateTimeAxis.as

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

--- frameworks/projects/charts/src/mx/charts/DateTimeAxis.as
+++ frameworks/projects/charts/src/mx/charts/DateTimeAxis.as
@@ -1502,7 +1502,7 @@
                             	lfunc(labelDate, previousValue, this)));
                         else
                         	labelCache.push(new AxisLabel(
-                            	1 - (dTime - computedMinimum) / r, new Date(dTime),
+                            	(dTime - computedMinimum) / r, new Date(dTime),
                         		lfunc(labelDate, previousValue, this)));

                     if (previousValue == null)


Transferred from the Adobe Open Source Subversion Repository

Revision: 9537
Author:   clucier@adobe.com
Date:     2009-08-24T20:34:38.393453Z

Log Message:
-----------
Addressing API change request from Catalyst. Exposing 'parent' property so tooling can properly obtain reference to a DLs parent when removing DL nodes from the runtime DOM.

QE notes: None
Doc notes:  None
Bugs: N/A
Reviewer: Chet
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/DesignLayer.as

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

--- frameworks/projects/framework/src/mx/core/DesignLayer.as
+++ frameworks/projects/framework/src/mx/core/DesignLayer.as
@@ -103,7 +103,6 @@
         private var _parent:DesignLayer;

         /**
-         *  @private
          *  This layer's parent layer.
          *
          *  @default null
@@ -113,15 +112,24 @@
          *  @playerversion AIR 1.5
          *  @productversion Flex 4
          */
-        protected function get parent():DesignLayer
+        public function get parent():DesignLayer
         {
             return _parent;
         }

         /**
          *  @private
-         */
-        protected function set parent(value:DesignLayer):void
+         *  Called when a DesignLayer instance is added to or removed from a parent.
+         *  Developers typically never need to call this method.
+         *
+         *  @param p The new parent layer of this DesignLayer instance.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        protected function parentChanged(value:DesignLayer):void
         {
             _parent = value;
             effectiveVisibilityChanged(_visible);
@@ -150,7 +158,7 @@
          *  The visibility for this design layer instance.
          *
          *
When updated, the appropriate change event for effectiveVisibility
-         *  will be dispatched to all layerPropertyChange listeners for
+         *  will be dispatched to all layerPropertyChange listeners for
          *  this layer, as well as those of affected descendant layers if any.

          *
          *  @default true
@@ -351,7 +359,7 @@
          */
         public function addLayer(value:DesignLayer):void
         {
-            value.parent = this;
+            value.parentChanged(this);
             layerChildren.push(value);
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19853
Author:   klin@adobe.com
Date:     2011-01-20T23:54:04.334266Z

Log Message:
-----------
Additional fix for http://bugs.adobe.com/jira/browse/SDK-28925. fitBounds() was miscalculating the area of the bounds by using actualSize1.y instead of actualSize2.y.

QE notes: No
Doc notes: No
Bugs: SDK-28925
Reviewer: Evtim
Tests run: checkintests
Is noteworthy for integration: Yes

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

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

--- frameworks/projects/framework/src/mx/utils/MatrixUtil.as
+++ frameworks/projects/framework/src/mx/utils/MatrixUtil.as
@@ -628,7 +628,7 @@
                 if (actualSize1 && actualSize2)
                 {
                     // Pick a solution
-                    actualSize = ((actualSize1.x * actualSize1.y) > (actualSize2.x * actualSize1.y)) ? actualSize1 : actualSize2;
+                    actualSize = ((actualSize1.x * actualSize1.y) > (actualSize2.x * actualSize2.y)) ? actualSize1 : actualSize2;
                 }
                 else if (actualSize1)
                 {


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

--- frameworks/projects/rpc/src/mx/rpc/events/InvokeEvent.as
+++ frameworks/projects/rpc/src/mx/rpc/events/InvokeEvent.as
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006-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.rpc.events
+{
+
+import flash.events.Event;
+import mx.messaging.messages.IMessage;
+import mx.rpc.AsyncToken;
+
+/**
+ * The event that indicates an RPC operation has been invoked.
+ */
+public class InvokeEvent extends AbstractEvent
+{
+    /**
+     * The INVOKE event type.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
bubbles	false

+     *
token	 The token that represents the indiviudal call
+     *     to the method. Used in the asynchronous completion token pattern.

+     *
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.

+     *
message	 The request Message associated with this event.

+     *
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 invoke
+     */
+    public static const INVOKE:String = "invoke";
+
+    /**
+     * Create a new InvokeEvent.
+     * @param type The event type; indicates the action that triggered the event.
+     * @param bubbles Specifies whether the event can bubble up the display list hierarchy.
+     * @param cancelable Specifies whether the behavior associated with the event can be prevented.
+     * @param token Token that represents the call to the method. Used in the asynchronous
+     *     completion token pattern.
+     * @param message Source Message of the request.
+     */
+    public function InvokeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false,
+            token:AsyncToken = null, message:IMessage = null)
+    {
+        super(type, bubbles, cancelable, token, message);
+    }
+
+    /**
+     * @private
+     */
+    public static function createEvent(token:AsyncToken = null, message:IMessage = null):InvokeEvent
+    {
+        return new InvokeEvent(InvokeEvent.INVOKE, false, false, token, message);
+    }
+
+    /**
+     * Because this event can be re-dispatched we have to implement clone to
+     * return the appropriate type, otherwise we will get just the standard
+     * event type.
+     * @private
+     */
+    override public function clone():Event
+    {
+        return new InvokeEvent(type, bubbles, cancelable, token, message);
+    }
+   /**
+    * Returns a string representation of the InvokeEvent.
+    *
+    * @return String representation of the InvokeEvent.
+    */
+    override public function toString():String
+    {
+        return formatToString("InvokeEvent", "messageId", "type", "bubbles", "cancelable", "eventPhase");
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/rpc/wsdl/WSDLConstants.as
+++ frameworks/projects/rpc/src/mx/rpc/wsdl/WSDLConstants.as
@@ -189,6 +189,11 @@
      * The namespace representing the version of SOAP used by a WSDL,
      * currently 1.1 is supported.
      * FIXME: Need SOAP 1.2 support.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     private var _soapNS:Namespace;

@@ -196,6 +201,11 @@
      * The namespace representing the version of WSDL, currently only 1.1 is
      * supported.
      * TODO: Need WSDL 2.0 support.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     private var _wsdlNS:Namespace;


Transferred from the Adobe Open Source Subversion Repository

Revision: 8486
Author:   smgilson@adobe.com
Date:     2009-07-09T18:42:45.734868Z

Log Message:
-----------
Third checkin to update the namespace in ASDoc MXML syntax descriptions for Spark components

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/HGroup.as
+++ frameworks/projects/spark/src/spark/components/HGroup.as
@@ -26,7 +26,7 @@
  *
  *  @mxml
  *
- *
The <HGroup> tag inherits all of the tag
+ *
The <s:HGroup> tag inherits all of the tag
  *  attributes of its superclass and adds the following tag attributes:

  *
  *


Handle Ref types without recursing the refd instances on encode

--- as3/xobjas3/src/com/rpath/xobj/XObjXMLEncoder.as
+++ as3/xobjas3/src/com/rpath/xobj/XObjXMLEncoder.as
@@ -224,7 +224,7 @@
         return xmlDocument;
     }

-    public function encodeValue(obj:Object, q:*, parentNode:XMLNode):XMLNode
+    public function encodeValue(obj:Object, q:*, parentNode:XMLNode, recurse:Boolean=true):XMLNode
     {
         var qname:XObjQName = new XObjQName();;

@@ -274,11 +274,24 @@
             newNode.nodeName = XObjUtils.encodeElementTag(qname, newNode);
             return newNode;
         }
+        else if (recurse)
+        {
+            if (obj is IXObjReference)
+            {
+                // don't recurse refs
+                return internal_encodeValue(obj, qname, parentNode, false);
+            }
+            else
+                return internal_encodeValue(obj, qname, parentNode);
+        }
         else
-            return internal_encodeValue(obj, qname, parentNode);
-    }
-
-    protected function internal_encodeValue(obj:Object, qname:XObjQName, parentNode:XMLNode):XMLNode
+        {
+            // else skip it - likely an XObjRef from earlier
+            return null;
+        }
+    }
+
+    protected function internal_encodeValue(obj:Object, qname:XObjQName, parentNode:XMLNode, recurse:Boolean=true):XMLNode
     {
         var myElement:XMLNode;

@@ -367,7 +380,7 @@
                     continue;

                 var propQName:XObjQName = new XObjQName("", fieldName);
-                encodeValue(obj[fieldName], propQName, myElement);
+                encodeValue(obj[fieldName], propQName, myElement, recurse);
             }
         }
         else if (typeType == XObjXMLEncoder.ARRAY_TYPE)


Exclude .atlas file type from resource browser XML parsing attempt.

--- bin/Data/Scripts/Editor/EditorResourceBrowser.as
+++ bin/Data/Scripts/Editor/EditorResourceBrowser.as
@@ -1235,7 +1235,7 @@
 bool GetXmlType(String path, StringHash &out fileType, bool useCache = false)
 {
     String extension = GetExtension(path);
-    if (extension == ".txt" || extension == ".json" || extension == ".icns")
+    if (extension == ".txt" || extension == ".json" || extension == ".icns" || extension == ".atlas")
         return false;

     String name;


Instruction values never output null; output unknown instead

--- src/Values/InstructionValue.as
+++ src/Values/InstructionValue.as
@@ -8,20 +8,26 @@
 	public class InstructionValue extends Value {

 		public var operation:OpcodeValue;
-		public var sourceArg:NumericValue;
-		public var targetArg:NumericValue;
-		public var destArg:NumericValue;
+		public var sourceArg:Value;
+		public var targetArg:Value;
+		public var destArg:Value;
 		public var comment:String;
 		public var commentFormat:HighlightFormat;
 		public function InstructionValue(Operation:OpcodeValue, SourceArg:int, TargetArg:int, DestArg:int,
 										 Comment:String = null, CommentFormat:HighlightFormat = null) {
 			operation = Operation;
-			sourceArg = new NumericValue(SourceArg);
-			targetArg = new NumericValue(TargetArg);
-			destArg = new NumericValue(DestArg);
+			sourceArg = numberToValue(SourceArg);
+			targetArg = numberToValue(TargetArg);
+			destArg = numberToValue(DestArg);

 			comment = Comment;
 			commentFormat = CommentFormat;
+		}
+
+		private function numberToValue(n:int):Value {
+			if (n == C.INT_NULL)
+				return U.V_UNKNOWN;
+			return new NumericValue(n);
 		}

 		override public function toString():String {


Add removeAllCallback method for Signal

Add removeAllCallback method for Signal

--- src/aerys/minko/type/Signal.as
+++ src/aerys/minko/type/Signal.as
@@ -21,6 +21,12 @@
 		public function Signal(name : String)
 		{
 			_name = name;
+		}
+
+		public function removeAllCallback() : void
+		{
+			for (var callbackIndex : int = _numCallbacks - 1; callbackIndex >= 0; --callbackIndex)
+				remove(_callbacks[callbackIndex]);
 		}

 		public function add(callback : Function) : void


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/skins/Border.as
+++ frameworks/projects/framework/src/mx/skins/Border.as
@@ -27,6 +27,11 @@
  *
  *  @tiptext
  *  @helpid 3321
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class Border extends ProgrammaticSkin implements IBorder
 {
@@ -40,6 +45,11 @@

 	/**
 	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function Border()
 	{
@@ -60,6 +70,11 @@
 	 *  The thickness of the border edges.
 	 *
 	 *  @return EdgeMetrics with left, top, right, bottom thickness in pixels
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get borderMetrics():EdgeMetrics
 	{


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

--- frameworks/projects/mx/src/mx/containers/FormItem.as
+++ frameworks/projects/mx/src/mx/containers/FormItem.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.containers
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3534
Author:   smgilson@adobe.com
Date:     2008-10-09T12:26:47.131069Z

Log Message:
-----------
Update ASDoc comments

Checkin Test Passed: Yes
QA: No
Bug:
Doc: No

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -51,7 +51,12 @@
 include "../../styles/metadata/AdvancedCharacterFormatTextStyles.as"

 /**
- *  The GroupBase class.
+ *  The GroupBase class defines the base class for components that display visual elements.
+ *  A group component does not control the layout of the visual items that it contains.
+ *  Instead, the layout is handled by a separate layout component.
+ *
+ *  @see mx.layout.LayoutBase
+ *  @see mx.components.ResizeMode
  */
 public class GroupBase extends UIComponent implements IGraphicElementHost, IViewport
 {
@@ -61,7 +66,10 @@
     //
     //--------------------------------------------------------------------------

-    public function GroupBase()
+    /**
+     * Constructor.
+     */
+     public function GroupBase()
     {
         super();
         tabChildren = true;
@@ -84,8 +92,8 @@
     private var _layout:LayoutBase;  // initialized in the ctor

     /**
-     *  The layout object for this container.  This object determines
-     *  how the items are laid out.
+     *  The layout object for this container.
+     *  This object determines how the visual elements are laid out in the container.
      */
     public function get layout():LayoutBase
     {
@@ -111,17 +119,15 @@

     /**
      *  The ResizeMode for this container.  If the resize mode
-     *  is set to ResizeMode.NORMAL, resizing is done by laying
+     *  is set to ResizeMode.NORMAL, resizing is done by laying
      *  out the children with our new width and height.  If the
-     *  resize mode is set to ResizeMode.SCALE, all of the children
-     *  will keep their unscaled width and height and the children
-     *  will be scaled to change size.
-     *
-     *
For more info, check out the ResizeMode class.

+     *  resize mode is set to ResizeMode.SCALE, all of the children
+     *  keep their unscaled width and height and the children
+     *  are scaled to change size.
      *
      * @default ResizeMode.NORMAL
      *
-     * @see flex.core.ResizeMode
+     * @see mx.components.ResizeMode
      */
     public function get resizeMode():String
     {
@@ -176,7 +182,15 @@
     }

     /**
-     *  Make sure we return 1 whenever resizeMode is set to scale.
+     *  The scaling factor of the container in the X direction.
+     *
+     *
If resizeMode is set to ResizeMode.SCALE,
+     *  reading this property always returns 1.0, and setting it does nothing.

+     *
+     *
If resizeMode is set to anything other than ResizeMode.SCALE,
+     *  reading this property returns the current scaling factor.

+     *
+     *  @copy mx.core.UIComponent#scaleX
      */
     override public function get scaleX():Number
     {
@@ -187,7 +201,7 @@
     }

     /**
-     *  Make sure setting scale is no-op when resizeMode is set to scale.
+     *  @private
      */
     override public function set scaleX(value:Number):void
     {
@@ -198,7 +212,15 @@
     }

     /**
-     *  Make sure we return 1 whenever resizeMode is set to scale.
+     *  The scaling factor of the container in the Y direction.
+     *
+     *
If resizeMode is set to ResizeMode.SCALE,
+     *  reading this property always returns 1.0, and setting it does nothing.

+     *
+     *
If resizeMode is set to anything other than ResizeMode.SCALE,
+     *  reading this property returns the current scaling factor.

+     *
+     *  @copy mx.core.UIComponent#scaleY
      */
     override public function get scaleY():Number
     {
@@ -209,7 +231,7 @@
     }

     /**
-     *  Make sure setting scale is no-op when resizeMode is set to scale.
+     *  @private
      */
     override public function set scaleY(value:Number):void
     {
@@ -219,10 +241,10 @@
         super.scaleY = value;
     }

-    /**
-     *  Override so that we can return correct width when in scale mode.
+    [PercentProxy("percentWidth")]
+    /**
+     *  The width of the container, in pixels.
      */
-    [PercentProxy("percentWidth")]
     override public function get width():Number
     {
         if (_resizeMode == ResizeMode._SCALE_UINT)
@@ -231,10 +253,10 @@
         return super.width;
     }

-    /**
-     *  Override so that we can return correct height when in scale mode.
+    [PercentProxy("percentHeight")]
+    /**
+     *  The height of the container, in pixels.
      */
-    [PercentProxy("percentHeight")]
     override public function get height():Number
     {
         if (_resizeMode == ResizeMode._SCALE_UINT)
@@ -346,6 +368,9 @@
         return (layout) ? layout.horizontalScrollPosition : 0;
     }

+    /**
+     *  @private
+     */
     public function set horizontalScrollPosition(value:Number):void
     {
         if (layout)
@@ -366,6 +391,9 @@
         return (layout) ? layout.verticalScrollPosition : 0;
     }

+    /**
+     *  @private
+     */
     public function set verticalScrollPosition(value:Number):void
     {
         if (layout)
@@ -385,7 +413,7 @@
     }

     /**
-     *  @copy mx.core.IViewport#verticalScrollPositionDelta
+     *  @copy mx.core.IViewport#verticalScrollPositionDelta()
      */
     public function verticalScrollPositionDelta(unit:uint):Number
     {
@@ -415,11 +443,14 @@
         return _contentWidth;
     }

+    /**
+     *  @private
+     */
     private function setContentWidth(value:Number):void
     {
         if (value == _contentWidth)
             return;
-    	var oldValue:Number = _contentWidth;
+        var oldValue:Number = _contentWidth;
         _contentWidth = value;
         dispatchPropertyChangeEvent("contentWidth", oldValue, value);
     }
@@ -441,6 +472,9 @@
         return _contentHeight;
     }

+    /**
+     *  @private
+     */
     private function setContentHeight(value:Number):void
     {
         if (value == _contentHeight)
@@ -451,14 +485,15 @@
     }

     /**
-     *  Sets this Group's contentWidth and contentHeight
+     *  Sets the contentWidth and contentHeight
      *  properties.
      *
      *  This method is is intended for layout class developers who should
-     *  call it from measure() and updateDisplayList().
-     *
-     *  @param w The new value of contentWidth.
-     *  @param h The new value of contentHeight.
+     *  call it from the measure() and updateDisplayList() methods.
+     *
+     *  @param w The new value of contentWidth.
+     *
+     *  @param h The new value of contentHeight.
      */
     public function setContentSize(w:Number, h:Number):void
     {
@@ -480,6 +515,9 @@
         return (layout) ? layout.clipContent : false;
     }

+    /**
+     *  @private
+     */
     public function set clipContent(value:Boolean):void
     {
         if (layout)
@@ -517,6 +555,9 @@
         return _focusPane;
     }

+    /**
+     *  @private
+     */
     override public function set focusPane(value:Sprite):void
     {
         if (value)
@@ -551,7 +592,7 @@
     //  so that layouts can use these methods.
     //--------------------------------------------------------------------------

-     /**
+    /**
      *  The number of layout items in this container. Typically this is the same
      *  as the number of items in the container.
      */
@@ -587,14 +628,19 @@
     private var maskChanged:Boolean;

     [Inspectable(category="General")]
+    /**
+     *  Sets the mask. The mask will be added to the display list. The mask must
+     *  not already on a display list nor in the elements array.
+     *
+     *  @see flash.display.DisplayObject#mask
+     */
     override public function get mask():DisplayObject
     {
         return _mask;
     }

-    /*
-     *  sets the mask. The mask will be added to the display list. The mask must
-     *  not already on a display list nor in the elements array.
+    /**
+     *  @private
      */
     override public function set mask(value:DisplayObject):void
     {
@@ -621,13 +667,19 @@
     private var originalMaskFilters:Array;

     /**
-     *  Documentation is not currently available.
+     *  The mask type.
+     *  Possible values are MaskType.CLIP and MaskType.ALPHA.
+     *
+     *  @see  mx.graphics.MaskType
      */
     public function get maskType():String
     {
         return _maskType;
     }

+    /**
+     *  @private
+     */
     public function set maskType(value:String):void
     {
         if (_maskType != value)
@@ -646,7 +698,9 @@
     //--------------------------------------------------------------------------

     /**
-     *  Documentation is not currently available.
+     *  Notify the host that an element has changed and needs to be redrawn.
+     *
+     *  @param e The element that has changed.
      */
     public function elementChanged(e:IGraphicElement):void
     {
@@ -656,7 +710,9 @@
     }

     /**
-     *  Documentation is not currently available.
+     *  Notify the host that an element size has changed.
+     *
+     *  @param e The element that has changed size.
      */
     public function elementSizeChanged(e:IGraphicElement):void
     {
@@ -666,7 +722,9 @@
     }

     /**
-     *  Documentation is not currently available.
+     *  Notify the host that an element layer has changed.
+     *
+     *  @param e The element that has layers size.
      */
     public function elementLayerChanged(e:IGraphicElement):void
     {
@@ -677,7 +735,7 @@
     }

     /**
-     *  Documentation is not currently available.
+     *  The Graphic tag that contains this host.
      */
     public function get parentGraphic():Graphic
     {
@@ -685,7 +743,9 @@
     }

     /**
-     *  Documentation is not currently available.
+     *  Adds a mask to a particular GraphicElement.
+     *  This is needed because the
+     *  Group is managing the GraphicElement's DisplayObject.
      */
     public function addMaskElement(mask:DisplayObject, target:IGraphicElement):void
     {
@@ -693,7 +753,8 @@
     }

     /**
-     *  Documentation is not currently available.
+     *  Removes a mask to a particular GraphicElement.  This is needed because the
+     *  Group is managing the GraphicElement's DisplayObject.
      */
     public function removeMaskElement(mask:DisplayObject, target:IGraphicElement):void
     {
@@ -701,11 +762,14 @@
     }

     /**
-     *  Helper method to wrap up the changes in a propertyChangeEvent and dispatch it.
-     *
-     *  @param prop Property that's changed
-     *  @param oldValue Old value of the property
-     *  @param value New value of the property
+     *  Helper method to wrap up the changes in a PropertyChangeEvent event object,
+     *  and dispatch the event.
+     *
+     *  @param prop Property that's changed.
+     *
+     *  @param oldValue Old value of the property.
+     *
+     *  @param value New value of the property.
      */
     protected function dispatchPropertyChangeEvent(prop:String, oldValue:*, value:*):void
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5545
Author:   jimurphy@adobe.com
Date:     2009-03-25T19:00:52.330680Z

Log Message:
-----------
1st pass of rename according to the spec http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix

Flex now requires CSS Style declarations to declare @namespace rules and disambiguate between halo and spark components using CSS 3 namespace prefixes on type selectors. At compile time, this namespace information will be used to map type names to qualified ActionScript class names. At runtime, type selectors are matched on qualified ActionScript class name (for example mx.controls.Button rather than just Button). Flex 3 applications must be compiled with -compatibility-version=3.0.0 to get unqualified CSS type selector behavior.

QE: Yes, this build may help in updating test cases to use the new namespaces and class names.
Dev: Not yet
Doc: Not yet

Modified Paths:
--------------
748 paths were modified

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

--- frameworks/projects/spark/src/spark/effects/interpolation/IInterpolator.as
+++ frameworks/projects/spark/src/spark/effects/interpolation/IInterpolator.as
@@ -8,7 +8,7 @@
 //  in accordance with the terms of the license agreement accompanying it.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package mx.effects.interpolation
+package spark.effects.interpolation
 {
 /**
  * The IInterpolator interface is used by classes that calculate


Transferred from the Adobe Open Source Subversion Repository

Revision: 17075
Author:   hmuller@adobe.com
Date:     2010-07-27T18:38:24.747319Z

Log Message:
-----------
Added spark.skins.spark.DefaultGridItemRenderer but have not yet changed DataGridSkin.mxml to use it.

Fixed a typo in the SET_ROWS clause of Grid/commitInteractiveSelection().

QE notes: changes apply to Spark DataGrid only
Doc notes:
Bugs:
Reviewer: Carol
Tests run: none
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as
+++ frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as
@@ -0,0 +1,374 @@
+package spark.skins.spark
+{
+
+import flash.display.DisplayObject;
+import flash.events.Event;
+
+import mx.core.LayoutElementUIComponentUtils;
+import mx.core.UIComponent;
+import mx.core.UITextField;
+
+import spark.components.IGridItemRenderer;
+import spark.components.supportClasses.GridColumn;
+
+/**
+ *  TBD
+ */
+public class DefaultGridItemRenderer extends UIComponent implements IGridItemRenderer
+{
+    public function DefaultGridItemRenderer()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    private function dispatchChangeEvent(type:String):void
+    {
+        if (hasEventListener(type))
+            dispatchEvent(new Event(type));
+    }
+
+    //----------------------------------
+    //  column
+    //----------------------------------
+
+    private var _column:GridColumn = null;
+
+    [Bindable("columnChanged")]
+
+    /**
+     *  @inheritDoc
+     *
+     *
The Grid's updateDisplayList() method sets this property
+     *  before calling preprare()
.
+     *
+     *  @default null
+     */
+    public function get column():GridColumn
+    {
+        return _column;
+    }
+
+    /**
+     *  @private
+     */
+    public function set column(value:GridColumn):void
+    {
+        if (_column == value)
+            return;
+
+        _column = value;
+        dispatchChangeEvent("columnChanged");
+    }
+
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    private var _data:Object = null;
+
+    [Bindable("dataChange")]  // compatible with FlexEvent.DATA_CHANGE
+
+    /**
+     *  The value of the dataProvider "item" for this row, i.e. dataProvider.getItemAt(itemIndex).
+     *  Item renderers often bind visual element attributes to data properties.  Note
+     *  that, despite its name, this property does not depend on the column's "dataField".
+     *
+     *  @default null
+     */
+    public function get data():Object
+    {
+        return _data;
+    }
+
+    /**
+     *  @private
+     */
+    public function set data(value:Object):void
+    {
+        if (_data == value)
+            return;
+
+        _data = value;
+        dispatchChangeEvent("dataChange");
+    }
+
+    //----------------------------------
+    //  rowIndex
+    //----------------------------------
+
+    private var _rowIndex:int = -1;
+
+    [Bindable("rowIndexChanged")]
+
+    /**
+     *  @inheritDoc
+     *
+     *
The Grid's updateDisplayList() method sets this property
+     *  before calling prepare()
.
+     *
+     *  @default -1
+     */
+    public function get rowIndex():int
+    {
+        return _rowIndex;
+    }
+
+    /**
+     *  @private
+     */
+    public function set rowIndex(value:int):void
+    {
+        if (_rowIndex == value)
+            return;
+
+        _rowIndex = value;
+        dispatchChangeEvent("rowIndexChanged");
+    }
+
+    //----------------------------------
+    //  showsCaret
+    //----------------------------------
+
+    private var _showsCaret:Boolean = false;
+
+    [Bindable("showsCaretChanged")]
+
+    /**
+     *  @inheritDoc
+     *
+     *
The Grid's updateDisplayList() method sets this property
+     *  before calling preprare()
.
+     *
+     *  @default false
+     */
+    public function get showsCaret():Boolean
+    {
+        return _showsCaret;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showsCaret(value:Boolean):void
+    {
+        if (_showsCaret == value)
+            return;
+
+        // TBD(hmuller): state change
+        _showsCaret = value;
+        dispatchChangeEvent("labelDisplayChanged");
+    }
+
+    //----------------------------------
+    //  selected
+    //----------------------------------
+
+    private var _selected:Boolean = false;
+
+    [Bindable("selectedChanged")]
+
+    /**
+     *  @inheritDoc
+     *
+     *
The Grid's updateDisplayList() method sets this property
+     *  before calling preprare()
.
+     *
+     *  @default false
+     */
+    public function get selected():Boolean
+    {
+        return _selected;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selected(value:Boolean):void
+    {
+        if (_selected == value)
+            return;
+
+        // TBD(hmuller): state change
+        _selected = value;
+        dispatchChangeEvent("selectedChanged");
+    }
+
+    //----------------------------------
+    //  dragging
+    //----------------------------------
+
+    private var _dragging:Boolean = false;
+
+    [Bindable("draggingChanged")]
+
+    /**
+     *  @inheritDoc
+     *
+     *  @default false
+     */
+    public function get dragging():Boolean
+    {
+        return _dragging;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dragging(value:Boolean):void
+    {
+        if (_dragging == value)
+            return;
+
+        // TBD(hmuller): state change
+        _dragging = value;
+        dispatchChangeEvent("draggingChanged");
+    }
+
+    //----------------------------------
+    //  label
+    //----------------------------------
+
+    private var _label:String = "";
+
+    [Bindable("labelChanged")]
+
+    /**
+     *  @inheritDoc
+     *
+     *
The Grid sets this property to the value of the column's itemToLabel() method, before
+     *  calling preprare().

+     *
+     *  @default ""
+     */
+    public function get label():String
+    {
+        return _label;
+    }
+
+    /**
+     *  @private
+     */
+    public function set label(value:String):void
+    {
+        if (_label == value)
+            return;
+
+        _label = value;
+
+        if (labelDisplay)
+            labelDisplay.text = _label;
+
+        dispatchChangeEvent("labelChanged");
+    }
+
+    //----------------------------------
+    //  labelDisplay
+    //----------------------------------
+
+    private var _labelDisplay:UITextField = null;
+
+    [Bindable("labelDisplayChanged")]
+
+    /**
+     *  An optional component for displaying the label property.   If specified, this component's
+     *  text will be kept in sync with this renderer's label.
+     *
+     *  @default null
+     */
+    public function get labelDisplay():UITextField
+    {
+        return _labelDisplay
+    }
+
+    /**
+     *  @private
+     */
+    public function set labelDisplay(value:UITextField):void
+    {
+        if (_labelDisplay == value)
+            return;
+
+        _labelDisplay = value;
+        dispatchChangeEvent("labelDisplayChanged");
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @inheritDoc
+     */
+    public function prepare(willBeRecycled:Boolean):void
+    {
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function discard(hasBeenRecycled:Boolean):void
+    {
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        if (!labelDisplay)
+        {
+            labelDisplay = new UITextField();
+            addChild(DisplayObject(labelDisplay));
+            if (_label != "")
+                labelDisplay.text = _label;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        // labelDisplay layout: padding of 3 on left and right and padding of 5 on top and bottom.
+
+        measuredWidth = LayoutElementUIComponentUtils.getPreferredBoundsWidth(labelDisplay, null) + 6;
+        measuredHeight = LayoutElementUIComponentUtils.getPreferredBoundsHeight(labelDisplay, null) + 10;
+
+        measuredMinWidth = measuredWidth;
+        measuredMinHeight = measuredHeight;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(width:Number, height:Number):void
+    {
+        super.updateDisplayList(width, height);
+
+        // labelDisplay layout: padding of 3 on left and right and padding of 5 on top and bottom.
+
+        labelDisplay.setActualSize(width-6, height-10);
+        labelDisplay.truncateToFit();
+        labelDisplay.move(3, 5);
+    }
+
+}
+}