Transferred from the Adobe Open Source Subversion Repository

Revision: 22480
Author:   chiedozi@adobe.com
Date:     2011-09-09T22:24:02.098478Z

Log Message:
-----------
Layout is now disabled immediately after prepareForPlay() is called on a ViewTransition to fix some layout interaction bugs

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
@@ -305,18 +305,13 @@
             navigatorProps.tabBarCacheAsBitmap = tabBar.cacheAsBitmap;
         }

-        // Save navigator bounds
-        navigatorProps.endViewIncludeInLayout = endView.includeInLayout;
-
         if (startView)
         {
-            startViewProps = {  includeInLayout: startView.includeInLayout,
-                                visible: startView.visible,
+            startViewProps = {  visible: startView.visible,
                                 cacheAsBitmap: startView.cacheAsBitmap,
                                 opaqueBackground: startView.opaqueBackground };

             cachedStartViewGlobalPosition = getTargetNavigatorCoordinates(startView);
-            startView.includeInLayout = false;
         }
     }

@@ -352,10 +347,6 @@
             if (startView.getStyle("backgroundAlpha") >= 1)
                 startView.opaqueBackground = startView.getStyle("backgroundColor");

-            // Have the startView included in layout so that SplitViewNavigator knows
-            // how to maintain the layout
-            startView.includeInLayout = true;
-
             if (startView.contentGroup)
             {
                 startViewProps.cgIncludeInLayout = startView.contentGroup.includeInLayout;
@@ -372,11 +363,9 @@

         if (endView)
         {
-            endViewProps = { includeInLayout:endView.includeInLayout,
-                cacheAsBitmap:endView.cacheAsBitmap,
-                opaqueBackground:endView.opaqueBackground};
-
-            endView.includeInLayout = false;
+            endViewProps = { cacheAsBitmap:endView.cacheAsBitmap,
+                             opaqueBackground:endView.opaqueBackground};
+
             endView.cacheAsBitmap = true;

             // If the endView has an opaque background color, set that as the
@@ -582,9 +571,6 @@

         if (endView)
         {
-            navigatorProps.endViewIncludeInLayout = endView.includeInLayout;
-            endView.includeInLayout = false;
-
             navigatorProps.endViewCacheAsBitmap = endView.contentGroup.cacheAsBitmap;
             endView.contentGroup.cacheAsBitmap = true;
         }
@@ -716,7 +702,6 @@

         if (startView)
         {
-            startView.includeInLayout = startViewProps.includeInLayout;
             startView.visible = startViewProps.visible;
             startView.cacheAsBitmap = startViewProps.cacheAsBitmap;
             startView.opaqueBackground = startViewProps.opaqueBackground;
@@ -736,7 +721,6 @@

             if (endView)
             {
-                endView.includeInLayout = endViewProps.includeInLayout;
                 endView.cacheAsBitmap = endViewProps.cacheAsBitmap;
                 endView.opaqueBackground = endViewProps.opaqueBackground;

@@ -773,7 +757,6 @@

             if (endView)
             {
-                endView.includeInLayout = navigatorProps.endViewIncludeInLayout;
                 endView.contentGroup.cacheAsBitmap = navigatorProps.endViewCacheAsBitmap;
             }


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

--- frameworks/projects/rpc/src/mx/messaging/Channel.as
+++ frameworks/projects/rpc/src/mx/messaging/Channel.as
@@ -44,6 +44,12 @@
  *  Dispatched after the channel has connected to its endpoint.
  *
  *  @eventType mx.messaging.events.ChannelEvent.CONNECT
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 [Event(name="channelConnect", type="mx.messaging.events.ChannelEvent")]

@@ -51,6 +57,12 @@
  *  Dispatched after the channel has disconnected from its endpoint.
  *
  *  @eventType mx.messaging.events.ChannelEvent.DISCONNECT
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 [Event(name="channelDisconnect", type="mx.messaging.events.ChannelEvent")]

@@ -58,6 +70,12 @@
  *  Dispatched after the channel has faulted.
  *
  *  @eventType mx.messaging.events.ChannelFaultEvent.FAULT
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 [Event(name="channelFault", type="mx.messaging.events.ChannelFaultEvent")]

@@ -65,6 +83,12 @@
  *  Dispatched when a channel receives a message from its endpoint.
  *
  *  @eventType mx.messaging.events.MessageEvent.MESSAGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 [Event(name="message", type="mx.messaging.events.MessageEvent")]

@@ -72,6 +96,12 @@
  *  Dispatched when a property of the channel changes.
  *
  *  @eventType mx.events.PropertyChangeEvent.PROPERTY_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 [Event(name="propertyChange", type="mx.events.PropertyChangeEvent")]

@@ -98,6 +128,12 @@
  *
Note: This class is for advanced use only.
  *  Use this class for creating custom channels like the existing RTMPChannel,
  *  AMFChannel, and HTTPChannel.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 public class Channel extends EventDispatcher implements IMXMLObject
 {
@@ -133,6 +169,12 @@
      *  @param id The id of this channel.
      *
      *  @param uri The endpoint URI for this channel.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function Channel(id:String = null, uri:String = null)
     {
@@ -273,6 +315,12 @@

     /**
      *  Provides access to the ChannelSets connected to the Channel.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get channelSets():Array
     {
@@ -292,6 +340,12 @@
     /**
      *  Indicates whether this channel has established a connection to the
      *  remote destination.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get connected():Boolean
     {
@@ -333,6 +387,12 @@
      *  time to wait for a connection to be established.
      *  It is not reset for each failover URI that the channel may attempt
      *  to connect to.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get connectTimeout():int
     {
@@ -360,6 +420,12 @@
      *  Provides access to the endpoint for this channel.
      *  This value is calculated based on the value of the uri
      *  property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get endpoint():String
     {
@@ -394,6 +460,12 @@
     /**
      * Channel property determines the level of performance information injection - whether
      * we inject timestamps or not.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get recordMessageTimes():Boolean
     {
@@ -412,6 +484,12 @@
     /**
      * Channel property determines the level of performance information injection - whether
      * we inject message sizes or not.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get recordMessageSizes():Boolean
     {
@@ -431,6 +509,12 @@
     /**
      *  Indicates whether this channel is in the process of reconnecting to an
      *  alternate endpoint.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get reconnecting():Boolean
     {
@@ -459,6 +543,12 @@
     /**
      *  Provides access to the set of endpoint URIs that this channel can
      *  attempt to failover to if the endpoint is clustered.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get failoverURIs():Array
     {
@@ -488,6 +578,12 @@

     /**
      *  Provides access to the id of this channel.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get id():String
     {
@@ -509,6 +605,12 @@
     [Bindable(event="propertyChange")]
     /**
      *  Indicates if this channel is authenticated.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get authenticated():Boolean
     {
@@ -544,6 +646,12 @@
      *  a string that represents their supported protocol.
      *  Examples of supported protocol strings are "rtmp", "http" or "https".
      *

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get protocol():String
     {
@@ -580,6 +688,12 @@
      *  never be timed out on the client.
      *
Request timeouts are most useful for RPC style messaging that
      *  requires a response from the remote destination.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get requestTimeout():int
     {
@@ -607,6 +721,12 @@
      *  Indicates whether this channel should be connected to its endpoint.
      *  This flag is used to control when fail over should be attempted and when disconnect
      *  notification is sent to the remote endpoint upon disconnect or fault.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function get shouldBeConnected():Boolean
     {
@@ -625,6 +745,12 @@
     /**
      *  Provides access to the URI used to create the whole endpoint URI for this channel.
      *  The URI can be a partial path, in which case the full endpoint URI is computed as necessary.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function get uri():String
     {
@@ -710,6 +836,12 @@
      *    </properties>
      *  </channel>
      *

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function applySettings(settings:XML):void
     {
@@ -741,6 +873,12 @@
      *
      *  @param props The properties section of the XML fragment of the services-config.xml
      *  file for this channel.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function applyClientLoadBalancingSettings(props:XML):void
     {
@@ -778,6 +916,12 @@
      *  underlying connection is established.
      *
      *  @param channelSet The ChannelSet to connect to the Channel.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     final public function connect(channelSet:ChannelSet):void
     {
@@ -857,6 +1001,12 @@
      *  has been terminated.

      *
      *  @param channelSet The ChannelSet to disconnect from the Channel.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     final public function disconnect(channelSet:ChannelSet):void
     {
@@ -901,6 +1051,12 @@
      *  Current credentials are cleared.
      *
      *  @param agent The MessageAgent to logout.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function logout(agent:MessageAgent):void
     {
@@ -925,6 +1081,12 @@
      *
      *  @throws mx.messaging.errors.InvalidDestinationError If neither the MessageAgent nor the
      *                                  message specify a destination.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function send(agent:MessageAgent, message:IMessage):void
     {
@@ -966,6 +1128,12 @@
      *  have already been set and an authentication is in progress with the remote
      *  detination, or if authenticated and the credentials specified don't match
      *  the currently authenticated credentials.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function setCredentials(credentials:String, agent:MessageAgent=null, charset:String=null):void
     {
@@ -1043,6 +1211,12 @@
      *  a connection is established or the available values are exhausted.
      *
      *  @param event The ChannelFaultEvent for the failed connect.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function connectFailed(event:ChannelFaultEvent):void
     {
@@ -1070,6 +1244,12 @@
     /**
      *  Processes a successful internal connect and dispatches the
      *  CONNECT event for the Channel.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function connectSuccess():void
     {
@@ -1106,6 +1286,12 @@
      *  call super.connectTimeoutHandler(event).
      *
      *  @param event The timer event indicating that the connect timeout has been reached.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function connectTimeoutHandler(event:TimerEvent):void
     {
@@ -1131,6 +1317,12 @@
      *  @param rejected True if the disconnect should skip any
      *         failover processing that would otherwise be attempted; false
      *         if failover processing should be allowed to run.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function disconnectSuccess(rejected:Boolean = false):void
     {
@@ -1158,6 +1350,12 @@
      *  FAULT event for the channel.
      *
      *  @param event The ChannelFaultEvent for the failed disconnect.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function disconnectFailed(event:ChannelFaultEvent):void
     {
@@ -1180,6 +1378,12 @@
      *  When this is invoked it means that this Channel is waiting to attempt to connect.
      *
      *  @param event The PropertyChangeEvent dispatched by the FlexClient singleton.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function flexClientWaitHandler(event:PropertyChangeEvent):void
     {
@@ -1211,6 +1415,12 @@
      *
      *  @throws flash.errors.IllegalOperationError If the Channel subclass does not override
      *                                this method.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function getMessageResponder(agent:MessageAgent,
                                             message:IMessage):MessageResponder
@@ -1222,6 +1432,12 @@
     /**
      *  Connects the Channel to its endpoint.
      *  Must be overridden.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function internalConnect():void {}

@@ -1231,6 +1447,12 @@
      *
      *  @param rejected True if the disconnect was due to a connection rejection or timeout
      * 					and reconnection should not be attempted automatically; otherwise false.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function internalDisconnect(rejected:Boolean = false):void {}

@@ -1240,6 +1462,12 @@
      *  Must be overridden.
      *
      *  @param messageResponder The MessageResponder to handle the response.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     protected function internalSend(messageResponder:MessageResponder):void {}

@@ -1624,6 +1852,12 @@
      *  Handles an authentication result.
      *
      *  @param msg The result Message.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     override protected function resultHandler(msg:IMessage):void
     {
@@ -1652,6 +1886,12 @@
      *  Handles an authentication failure.
      *
      *  @param msg The failure Message.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     override protected function statusHandler(msg:IMessage):void
     {


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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewMenuItem.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewMenuItem.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 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.components


Transferred from the Adobe Open Source Subversion Repository

Revision: 6350
Author:   cframpto@adobe.com
Date:     2009-04-28T19:57:53.758954Z

Log Message:
-----------
Remove sharing restriction on display object container being a group with BasicLayout.

QE Notes: Ella ran tests on this
Doc Notes:
Bugs:
Reviewers: Gordon/Evtim

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -522,50 +522,7 @@
     		invalidateDisplayList();
     	}
     }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden methods: GraphicElement - to implement shared display objects
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override public function canDrawToShared(sharedDisplayObject:DisplayObject):Boolean
-    {
-        if (!super.canDrawToShared(sharedDisplayObject))
-            return false;
-
-        // Make sure it is a container that will work for sharing text.
-        return isDisplayObjectShareable(sharedDisplayObject);
-    }
-
-    /**
-     *  @private
-     */
-    override public function closeSequence():Boolean
-    {
-        if (super.closeSequence())
-            return true;
-
-        return !isDisplayObjectShareable(displayObject);
-
-    }
-
-    /**
-     *  @private
-     *  Can't share any group that does automatic placement of display objects.
-     *  We're using a backdoor into the code since text isn't an IVisualElement
-     *  and  can't be directly managed.
-     */
-    private function isDisplayObjectShareable(displayObj:DisplayObject):Boolean
-    {
-        return (displayObj is Group &&
-                Group(displayObj).layout != null &&
-                Group(displayObj).layout is BasicLayout);
-    }
-
+
     //--------------------------------------------------------------------------
     //
     //  Overridden methods: GraphicElement


play background music if paused on resumption

--- Assets/GameLogic/Scripts/LevelManager.as
+++ Assets/GameLogic/Scripts/LevelManager.as
@@ -281,6 +281,10 @@
             {
 		        scene.updateEnabled =  true;
             }
+            else
+            {
+                PlayBackgroundMusic();
+            }

             if( displayRoot_ !is null )
             {


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

--- frameworks/projects/framework/src/mx/effects/effectClasses/RotateInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/RotateInstance.as
@@ -62,6 +62,11 @@
  *
  *  @see mx.effects.Rotate
  *  @see mx.events.TweenEvent
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class RotateInstance extends TweenEffectInstance
 {
@@ -77,6 +82,11 @@
 	 *  Constructor.
 	 *
 	 *  @param target The Object to animate with this effect.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function RotateInstance(target:Object)
 	{
@@ -139,6 +149,11 @@
 	 *  Valid values range from 0 to 360.
 	 *
 	 *  @default 0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var angleFrom:Number = 0;

@@ -161,6 +176,11 @@
 	 *  set this value to a large positive or small negative number.</p>
 	 *
 	 *  @default 360
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var angleTo:Number = 360;

@@ -174,6 +194,11 @@
 	 *  The valid values are between 0 and the width of the target.
 	 *
 	 *  @default 0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var originX:Number;

@@ -187,6 +212,11 @@
 	 *  The valid values are between 0 and the height of the target.
 	 *
 	 *  @default 0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var originY:Number;


Transferred from the Adobe Open Source Subversion Repository

Revision: 17973
Author:   dloverin@adobe.com
Date:     2010-09-30T22:28:57.338114Z

Log Message:
-----------
First delivery of DataGrid editor code.

Still a ways to go to get it ready for testing and get the APIs correct.

QE notes: Not ready for testing.
Doc notes: None.
Bugs:
Reviewer: Hans, Alex (FocusManager)
Tests run: cyclone server
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/IGridItemEditor.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/DataGridEditEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/TextGridItemEditor.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DataGridEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DataGridSkin.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/ComboBoxGridItemEditor.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as
@@ -0,0 +1,1455 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+import flash.display.DisplayObjectContainer;
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+import flash.ui.Keyboard;
+import flash.utils.describeType;
+
+import mx.core.EventPriority;
+import mx.core.IFactory;
+import mx.core.IFlexModuleFactory;
+import mx.core.IInvalidating;
+import mx.core.IIMESupport;
+import mx.core.IUIComponent;
+import mx.core.IVisualElement;
+import mx.core.IVisualElementContainer;
+import mx.core.mx_internal;
+import mx.core.UIComponent;
+import mx.controls.listClasses.IDropInListItemRenderer;
+import mx.events.SandboxMouseEvent;
+import mx.managers.FocusManager;
+import mx.managers.IFocusManager;
+import mx.managers.IFocusManagerComponent;
+
+import spark.components.IGridItemEditor;
+import spark.components.DataGrid;
+import spark.components.Grid;
+import spark.components.Group;
+import spark.components.IGridItemRenderer;
+import spark.events.DataGridEditEvent;
+import spark.events.GridEvent;
+
+use namespace mx_internal;
+
+[ExcludeClass]
+
+//--------------------------------------------------------------------------
+//
+//  Constructor
+//
+//--------------------------------------------------------------------------
+
+/**
+ *  Constructor
+ *
+ *  @param dataGrid The owner of this editor.
+ */
+public class DataGridEditor
+{
+    include "../../core/Version.as";
+
+    public function DataGridEditor(dataGrid:DataGrid)
+    {
+        _dataGrid = dataGrid;
+
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+    private var previouslySelectedIndices:Vector.<int>;
+    private var previouslySelectedCells:Vector.<CellPosition>;
+
+    private var lastEvent:Event;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    private var _dataGrid:DataGrid;
+
+    public function get dataGrid():DataGrid
+    {
+        return _dataGrid;
+    }
+
+    public function get grid():Grid
+    {
+        return _dataGrid.grid;
+    }
+
+    // properties that control how the cell editor behaves. This can be based on item editor properties.
+
+    //----------------------------------
+    //  editedItemPosition
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var bEditedItemPositionChanged:Boolean = false;
+
+    /**
+     *  @private
+     *  undefined means we've processed it
+     *  null means don't put up an editor
+     *  {} is the coordinates for the editor
+     */
+    private var _proposedEditedItemPosition:*;
+
+    /**
+     *  @private
+     */
+    private var lastItemDown:IVisualElement;
+
+    /**
+     *  @private
+     */
+    private var lastItemFocused:DisplayObject;
+
+    /**
+     *  @private
+     *  the last editedItemPosition and the last
+     *  position where editing was attempted if editing
+     *  was cancelled.  We restore editing
+     *  to this point if we get focus from the TAB key
+     */
+    private var lastEditedItemPosition:*;
+
+    /**
+     *  @private
+     */
+    private var _editedItemPosition:Object;
+
+    /**
+     *  @private
+     */
+    private var itemEditorPositionChanged:Boolean = false;
+
+
+    [Bindable("itemFocusIn")]
+
+    /**
+     *  The column and row index of the item renderer for the
+     *  data provider item being edited, if any.
+     *
+     *
This Object has two fields, columnIndex and
+     *  rowIndex,
+     *  the zero-based column and row indexes of the item.
+     *  For example: {columnIndex:2, rowIndex:3}

+     *
+     *
Setting this property scrolls the item into view and
+     *  dispatches the itemEditBegin event to
+     *  open an item editor on the specified item renderer.

+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get editedItemPosition():Object
+    {
+        if (_editedItemPosition)
+            return {rowIndex: _editedItemPosition.rowIndex,
+                columnIndex: _editedItemPosition.columnIndex};
+        else
+            return _editedItemPosition;
+    }
+
+    /**
+     *  @private
+     */
+    public function set editedItemPosition(value:Object):void
+    {
+        if (!value)
+        {
+            setEditedItemPosition(null);
+            return;
+        }
+
+        var newValue:Object = {rowIndex: value.rowIndex,
+            columnIndex: value.columnIndex};
+
+        setEditedItemPosition(newValue);
+    }
+
+    /**
+     *  @private
+     */
+    private function setEditedItemPosition(coord:Object):void
+    {
+//            bEditedItemPositionChanged = true;
+//            _proposedEditedItemPosition = coord;
+//            dataGrid.invalidateDisplayList();
+
+        commitEditedItemPosition(coord);
+    }
+
+// TODO (dloverin): investigate why imeMode is needed and how it is used
+//    //----------------------------------
+//    //  imeMode
+//    //----------------------------------
+//
+//    /**
+//     *  @private
+//     */
+//    private var _imeMode:String = null;
+//
+//    [Inspectable(environment="none")]
+//
+//    /**
+//     *  Specifies the IME (input method editor) mode.
+//     *  The IME enables users to enter text in Chinese, Japanese, and Korean.
+//     *  Flex sets the specified IME mode when the control gets the focus,
+//     *  and sets it back to the previous value when the control loses the focus.
+//     *
+//     *
The flash.system.IMEConversionMode class defines constants for the
+//     *  valid values for this property.
+//     *  You can also specify null to specify no IME.

+//     *
+//     *  @see flash.system.IMEConversionMode
+//     *
+//     *  @default null
+//     *
+//     *  @langversion 3.0
+//     *  @playerversion Flash 9
+//     *  @playerversion AIR 1.1
+//     *  @productversion Flex 3
+//     */
+//    public function get imeMode():String
+//    {
+//        return _imeMode;
+//    }
+//
+//    /**
+//     *  @private
+//     */
+//    public function set imeMode(value:String):void
+//    {
+//        _imeMode = value;
+//    }
+//
+    /**
+     *  @private
+     *  true if we want to block editing on mouseUp
+     */
+    private var dontEdit:Boolean = false;
+
+    /**
+     *  @private
+     *  true if we want to block editing on mouseUp
+     */
+    private var losingFocus:Boolean = false;
+
+    /**
+     *  @private
+     *  true if we're in the endEdit call.  Used to handle
+     *  some timing issues with collection updates
+     */
+    private var inEndEdit:Boolean = false;
+
+    /**
+     *  A reference to the currently active instance of the item editor,
+     *  if it exists.
+     *
+     *
To access the item editor instance and the new item value when an
+     *  item is being edited, you use the itemEditorInstance
+     *  property. The itemEditorInstance property
+     *  is not valid until after the event listener for
+     *  the itemEditBegin event executes. Therefore, you typically
+     *  only access the itemEditorInstance property from within
+     *  the event listener for the itemEditEnd event.

+     *
+     *
The DataGridColumn.itemEditor property defines the
+     *  class of the item editor
+     *  and, therefore, the data type of the item editor instance.

+     *
+     *
You do not set this property in MXML.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var itemEditorInstance:IGridItemEditor;
+
+
+    /**
+     *  @private
+     */
+    private var _editedItemRenderer:IVisualElement;
+
+    /**
+     *  A reference to the item renderer
+     *  in the DataGrid control whose item is currently being edited.
+     *
+     *
From within an event listener for the itemEditBegin
+     *  and itemEditEnd events,
+     *  you can access the current value of the item being edited
+     *  using the editedItemRenderer.data property.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get editedItemRenderer():IVisualElement
+    {
+        return _editedItemRenderer;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Called by the data grid after construction to initialize the editor. No
+     *  item editors can be created until after this method is called.
+     */
+    public function initialize():void
+    {
+        // add listeners to enable cell editing
+        var grid:Grid = dataGrid.grid;
+
+        dataGrid.addEventListener(KeyboardEvent.KEY_DOWN, dataGrid_keyboardDownHandler);
+
+        // make sure we get first shot at mouse events before selection is changed. We use
+        // this is test if you are clicking on a selected row or not.
+        grid.addEventListener(MouseEvent.MOUSE_DOWN, grid_mouseDownHandler, false, 1000);
+        grid.addEventListener(GridEvent.GRID_MOUSE_DOWN, grid_gridMouseDownHandler);
+        grid.addEventListener(GridEvent.GRID_MOUSE_UP, grid_gridMouseUpHandler);
+
+        dataGrid.addEventListener(DataGridEditEvent.START_GRID_ITEM_EDITOR_SESSION,
+            dataGrid_startItemEditorSessionHandler,
+            false, EventPriority.DEFAULT_HANDLER);
+    }
+
+    /**
+     *  @private
+     *
+     *  The method is called to disable item editing on the data grid.
+     */
+    public function uninitialize():void
+    {
+        // remove listeners to disable cell editing
+
+        grid.removeEventListener(KeyboardEvent.KEY_DOWN, dataGrid_keyboardDownHandler);
+        grid.removeEventListener(MouseEvent.MOUSE_DOWN, grid_mouseDownHandler);
+        grid.removeEventListener(GridEvent.GRID_MOUSE_DOWN, grid_gridMouseDownHandler);
+        grid.removeEventListener(GridEvent.GRID_MOUSE_UP, grid_gridMouseUpHandler);
+    }
+
+    /**
+     *  @private
+     *
+     *  This method closes an item editor currently open on an item renderer.
+     *  You typically only call this method from within the event listener
+     *  for the itemEditEnd event, after
+     *  you have already called the preventDefault() method to
+     *  prevent the default event listener from executing.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    mx_internal function destroyItemEditor():void
+    {
+        // trace("destroyItemEditor");
+        if (grid.root)
+            grid.systemManager.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
+
+        grid.systemManager.getSandboxRoot().
+            removeEventListener(MouseEvent.MOUSE_DOWN, sandBoxRoot_mouseDownHandler, true);
+        grid.systemManager.getSandboxRoot().
+            removeEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE, sandBoxRoot_mouseDownHandler);
+        grid.systemManager.removeEventListener(Event.RESIZE, editorAncestorResizeHandler);
+        dataGrid.removeEventListener(Event.RESIZE, editorAncestorResizeHandler);
+
+        if (itemEditorInstance || editedItemRenderer)
+        {
+            if (itemEditorInstance)
+                itemEditorInstance.discard();
+
+            var o:DisplayObject = (itemEditorInstance ?
+                                  itemEditorInstance : editedItemRenderer) as DisplayObject;
+
+            o.removeEventListener(KeyboardEvent.KEY_DOWN, itemEditorInstance_keyDownHandler);
+            o.removeEventListener(FocusEvent.FOCUS_OUT, itemEditorInstance_FocusOutHandler);
+            o.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
+
+            if (grid.focusManager)
+                grid.focusManager.defaultButtonEnabled = true;
+
+//                var event:DataGridEvent =
+//                    new DataGridEvent(DataGridEvent.ITEM_FOCUS_OUT);
+//                event.columnIndex = _editedItemPosition.columnIndex;
+//                event.rowIndex = _editedItemPosition.rowIndex;
+//                //event.itemRenderer = itemEditorInstance;
+//                dataGrid.dispatchEvent(event);
+
+                //            if (! columns.getItemAt(_editedItemPosition.columnIndex).rendererIsEditor)
+                //            {
+                // FocusManager.removeHandler() does not find
+                // itemEditors in focusableObjects[] array
+                // and hence does not remove the focusRectangle
+//                 if (itemEditorInstance && itemEditorInstance is UIComponent)
+//                    UIComponent(itemEditorInstance).drawFocus(false);
+//
+            // setfocus back to us so something on stage has focus
+            deferFocus();
+
+            // defer focus can cause focusOutHandler to destroy the editor
+            // and make itemEditorInstance null
+            if (itemEditorInstance)
+                dataGrid.itemEditorLayer.removeElement(itemEditorInstance);
+
+            dataGrid.hasFocusableChildren = false; // TODO (dloverin): restore to last value not always false
+            if (dataGrid.grid)
+                dataGrid.grid.hasFocusableChildren = false; // TODO (dloverin): restore to last value not always false
+
+
+            itemEditorInstance = null;
+            _editedItemRenderer = null;
+            _editedItemPosition = null;
+        }
+    }
+
+    /**
+     *  @private
+     *
+     *  Creates the item editor for the item renderer at the
+     *  editedItemPosition using the editor
+     *  specified by the itemEditor property.
+     *
+     *
This method sets the editor instance as the
+     *  itemEditorInstance property.

+     *
+     *
You may only call this method from within the event listener
+     *  for the itemEditBegin event.
+     *  To create an editor at other times, set the
+     *  editedItemPosition property to generate
+     *  the itemEditBegin event.

+     *
+     *  @param rowIndex The row index in the data provider of the item to be edited.
+     *
+     *  @param columnIndex The column index in the data provider of the item to be edited.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    mx_internal function createItemEditor(rowIndex:int, columnIndex:int):void
+    {
+        // check for bad values
+        if (columnIndex >= grid.columns.length)
+            return;
+
+        var col:GridColumn = grid.columns.getItemAt(columnIndex) as GridColumn;
+        //        if (rowIndex >= lockedRowCount)
+        //            rowIndex -= verticalScrollPosition + lockedRowCount;
+        //
+        //        if (colIndex >= lockedColumnCount)
+        //            colIndex -= horizontalScrollPosition + lockedColumnCount;
+        //
+        var item:IVisualElement = grid.getItemRendererAt(rowIndex, columnIndex);
+        var cellBounds:Rectangle = grid.getCellBounds(rowIndex,columnIndex);
+
+        // convert the row origin from the grid to the editor layer.
+        var globalCellOrigin:Point = grid.localToGlobal(new Point(cellBounds.x, cellBounds.y));
+        cellBounds.topLeft = DisplayObject(dataGrid.itemEditorLayer).globalToLocal(globalCellOrigin);
+
+        _editedItemRenderer = item;
+
+        if (!col.renderIsEditable)
+        {
+            var dx:Number = 0;
+            var dy:Number = 0; // TODO: (dloverin) why was this -2;
+            var dw:Number = 0;
+            var dh:Number = 0 // TODO: (dloverin) whay was this 4;
+
+            // if this isn't implemented, use an input control as editor
+            if (!itemEditorInstance)
+            {
+                // First use the column's itemEditor.
+                // If that is unspecified try the dataGrid's itemEditor.
+                // If that is unspecified then use the default itemEditor
+                // set on the column.
+                var itemEditor:IFactory = col.itemEditor;
+                if (!itemEditor)
+                    itemEditor = dataGrid.itemEditor;
+                if (!itemEditor)
+                    itemEditor = GridColumn.defaultItemEditorFactory;
+
+
+                //                if (itemEditor == DataGridColumn.defaultItemEditorFactory)
+                //                {
+                //                    // if it is the default factory, see if someone
+                //                    // overrode it with this style
+                //                    var c:Class = getStyle("defaultDataGridItemEditor");
+                //                    if (c)
+                //                    {
+                //                        var fontName:String =
+                //                            StringUtil.trimArrayElements(col.getStyle("fontFamily"), ",");
+                //                        var fontWeight:String = col.getStyle("fontWeight");
+                //                        var fontStyle:String = col.getStyle("fontStyle");
+                //                        var bold:Boolean = (fontWeight == "bold");
+                //                        var italic:Boolean = (fontStyle == "italic");
+                //
+                //                        var flexModuleFactory:IFlexModuleFactory =
+                //                            getFontContext(fontName, bold, italic);
+                //
+                //                        itemEditor = col.itemEditor = new ContextualClassFactory(
+                //                            c, flexModuleFactory);
+                //                    }
+                //                }
+
+                //                // TODO: (dloverin) do we need this properties?
+                //                dx = col.editorXOffset;
+                //                dy = col.editorYOffset;
+                //                dw = col.editorWidthOffset;
+                //                dh = col.editorHeightOffset;
+
+                itemEditorInstance = itemEditor.newInstance();
+                itemEditorInstance.owner = dataGrid;
+                itemEditorInstance.data = IGridItemRenderer(item).data;
+                itemEditorInstance.value = itemEditorInstance.data[col.dataField];
+                itemEditorInstance.rowIndex = rowIndex;
+                itemEditorInstance.columnIndex = columnIndex;
+                itemEditorInstance.column = col;
+                itemEditorInstance.hasFocusableChildren = true;
+
+                UIComponent(itemEditorInstance).styleName = col;
+                if (dataGrid.itemEditorLayer)
+                {
+                    dataGrid.itemEditorLayer.addElement(itemEditorInstance);
+                    dataGrid.hasFocusableChildren = true;
+                }
+            }
+
+            // give it the right size, look and placement
+            if (itemEditorInstance is IInvalidating)
+                IInvalidating(itemEditorInstance).validateNow();
+
+            // TODO (dloverin): Should IGridItemEditor implement IUIComponent? Why isn't IVisualElement enough?
+            if (itemEditorInstance is IUIComponent)
+            {
+                // position and set the size of the editor.
+                IUIComponent(itemEditorInstance).move(cellBounds.x + dx, cellBounds.y + dy);
+                IUIComponent(itemEditorInstance).setActualSize(
+                    Math.min(item.width + dw,
+                        grid.width - 1 - itemEditorInstance.x),
+                    Math.min(item.height + dh,
+                        grid.height - itemEditorInstance.y));
+
+                // set the min width and height of the editor to the cell bounds.
+                // set the max widht and height of the editor not to exceed the
+                // bounds of the application.
+                if (itemEditorInstance is UIComponent)
+                {
+                    UIComponent(itemEditorInstance).minWidth = cellBounds.width;
+                    UIComponent(itemEditorInstance).minHeight = cellBounds.height;
+
+                    // TODO (dloverin): set max width/height not to exceed the width
+                    // of the application.
+                }
+
+
+            }
+            itemEditorInstance.prepare();
+            DisplayObject(dataGrid.itemEditorLayer).visible = true;
+            itemEditorInstance.visible = true;
+
+            itemEditorInstance.addEventListener(FocusEvent.FOCUS_OUT, itemEditorInstance_FocusOutHandler);
+
+            // listen for keyStrokes on the itemEditorInstance (which lets the grid supervise for ESC/ENTER)
+            itemEditorInstance.addEventListener(KeyboardEvent.KEY_DOWN, itemEditorInstance_keyDownHandler);
+            itemEditorInstance.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 1000);
+        }
+        else
+        {
+            // if the item renderer is editable
+            // add the itemRenderer to focus manager to get the
+            // focusable objects under its control. Next set focus
+            // to the first item that should get focus.
+            if (grid.focusManager && grid.focusManager is FocusManager)
+            {
+                var fm:FocusManager = grid.focusManager as FocusManager;
+
+                dataGrid.hasFocusableChildren = true;
+                if (dataGrid.scroller)
+                    dataGrid.scroller.hasFocusableChildren = true;
+
+                var o:DisplayObject = item as DisplayObject;
+                var found:Boolean = false;
+                do
+                {
+                    fm.fauxFocus = o;
+                    o = fm.getNextFocusManagerComponent(false) as DisplayObject;
+                    if (o == item ||
+                        item is DisplayObjectContainer &&
+                        DisplayObjectContainer(item).contains(o))
+                    {
+                        found = true;
+                        break;
+                    }
+                } while (o && dataGrid.contains(o));
+
+                if (lastEvent && lastEvent.type == KeyboardEvent.KEY_DOWN &&
+                    KeyboardEvent(lastEvent).keyCode == Keyboard.TAB &&
+                    KeyboardEvent(lastEvent).shiftKey)
+                {
+                    // put focus on last item in cell editor instead of first.
+                    var lastItem:DisplayObject = o;
+                    do
+                    {
+                        fm.fauxFocus = o;
+                        lastItem = o;
+                        o = fm.getNextFocusManagerComponent(false) as DisplayObject;
+                    } while (o && DisplayObjectContainer(item).contains(o));
+
+                    o = lastItem;
+                }
+
+                fm.fauxFocus = null;
+
+                if (found)
+                    fm.setFocus(IFocusManagerComponent(o));
+
+                editedItemRenderer.addEventListener(FocusEvent.FOCUS_OUT, itemEditorInstance_FocusOutHandler);
+
+                // listen for keyStrokes on the itemEditorInstance (which lets the grid supervise for ESC/ENTER)
+                editedItemRenderer.addEventListener(KeyboardEvent.KEY_DOWN, itemEditorInstance_keyDownHandler);
+                editedItemRenderer.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 1000);
+
+                // It would be nice to hide the selection on the cell while it is
+                // being edited to provide better contrast for the focus rect
+                // around the controls.
+
+            }
+        }
+
+        if (grid.focusManager)
+            grid.focusManager.defaultButtonEnabled = false;
+
+        if (grid.root)
+            grid.systemManager.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
+
+        // we disappear on any mouse down outside the editor
+        grid.systemManager.getSandboxRoot().
+            addEventListener(MouseEvent.MOUSE_DOWN, sandBoxRoot_mouseDownHandler, true, 0, true);
+        grid.systemManager.getSandboxRoot().
+            addEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE, sandBoxRoot_mouseDownHandler, false, 0, true);
+        // we disappear if stage or our grid is resized
+        grid.systemManager.addEventListener(Event.RESIZE, editorAncestorResizeHandler);
+        grid.addEventListener(Event.RESIZE, editorAncestorResizeHandler);
+
+        // Dispatch our item editor created event
+        // TODO (dloverin): should we create an equivalent event?
+
+//            var event:DataGridEvent =
+//                new DataGridEvent(DataGridEvent.ITEM_EDITOR_CREATE, false, true, colIndex, null, rowIndex);
+//            dataGrid.dispatchEvent(event);
+    }
+
+    /**
+     *  @private
+     *
+     *  Start editing a cell for a specified row and column index.
+     *
+     *  Dispatches a DataGridEditEvent.START_GRID_ITEM_EDITOR_SESSION
+     *   event.
+     *
+     *  @param rowIndex The zero-based row index of the cell to edit.
+     *
+     *  @param columnIndex The zero-based column index of the cell to edit.
+     */
+    public function startItemEditorSession(rowIndex:int, columnIndex:int):Boolean
+    {
+
+        var dataGridEvent:DataGridEditEvent =
+            new DataGridEditEvent(DataGridEditEvent.START_GRID_ITEM_EDITOR_SESSION, false, true);
+
+        // The BEGIN_GRID_ITEM_EDITOR_CREATION event is cancelable
+        dataGridEvent.rowIndex = Math.min(rowIndex, grid.dataProvider.length - 1);
+        dataGridEvent.columnIndex = Math.min(columnIndex, grid.columns.length - 1);
+        dataGridEvent.column = grid.columns.getItemAt(columnIndex) as GridColumn;
+
+        //dataGridEvent.dataField = grid.columns.getItemAt(columnIndex).dataField;
+        //dataGridEvent.itemRenderer = itemRenderer;
+        if (!dataGrid.dispatchEvent(dataGridEvent))
+        {
+            lastEditedItemPosition = { columnIndex: columnIndex, rowIndex: rowIndex };
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     *  @private
+     *
+     *  Ends a currently active editor.
+     *
+     *  @param cancel If false the data in the editor is saved into the item.
+     *  Otherwise the data in the editor is discarded.
+     */
+    public function endItemEditorSession(cancel:Boolean = false):Boolean
+    {
+        if (cancel)
+        {
+            cancelEdit();
+            return false;
+        }
+        else
+        {
+            return endEdit("");
+        }
+    }
+
+    /**
+     *  @private
+     *
+     *  Close the item editor without saving the data.
+     */
+    mx_internal function cancelEdit():void
+    {
+        if (itemEditorInstance)
+        {
+            // Notify event that the editor session is cancelled.
+            // This event cannot be cancelled.
+            var dataGridEvent:DataGridEditEvent =
+                new DataGridEditEvent(DataGridEditEvent.CANCEL_GRID_ITEM_EDITOR_SESSION);
+
+            dataGridEvent.columnIndex = editedItemPosition.columnIndex;
+            dataGridEvent.column = itemEditorInstance.column;
+            dataGridEvent.rowIndex = editedItemPosition.rowIndex;
+            dataGrid.dispatchEvent(dataGridEvent);
+
+            destroyItemEditor();
+        }
+        else if (editedItemRenderer)
+        {
+            dataGrid.setFocus();
+        }
+
+    }
+
+    /**
+     *  @private
+     *  When the user finished editing an item, this method is called.
+     *
+     *
+     */
+    // TODO (dloverin): remove reason from this function
+
+    private function endEdit(reason:String):Boolean
+    {
+        if (!itemEditorInstance && editedItemRenderer)
+        {
+            inEndEdit = true;
+            destroyItemEditor();
+            inEndEdit = false;
+            return true;
+        }
+
+        // this happens if the renderer is removed asynchronously ususally with FDS
+        if (!itemEditorInstance)
+            return true;
+
+        inEndEdit = true;
+
+        var itemPosition:Object = editedItemPosition;
+        if (!saveItemEditorSession())
+        {
+            // TODO (dloverin): need to dispatch a cancel event in this case
+            inEndEdit = false;
+            return false;
+        }
+
+        var dataGridEvent:DataGridEditEvent =
+            new DataGridEditEvent(DataGridEditEvent.SAVE_GRID_ITEM_EDITOR_SESSION, false, true);
+
+        // SAVE_GRID_ITEM_EDITOR_SESSION events are cancelable
+        dataGridEvent.columnIndex = itemPosition.columnIndex;
+        dataGridEvent.column = dataGrid.columns.getItemAt(itemPosition.columnIndex) as GridColumn;
+        dataGridEvent.rowIndex = itemPosition.rowIndex;
+        dataGrid.dispatchEvent(dataGridEvent);
+
+        inEndEdit = false;
+
+        return true;
+    }
+
+    /**
+     *  @private
+     *  focus an item renderer in the grid
+     */
+    private function commitEditedItemPosition(coord:Object):void
+    {
+        if (!grid.enabled || !dataGrid.editable)
+            return;
+
+        if (!grid.dataProvider || grid.dataProvider.length == 0)
+            return;
+
+        // just give focus back to the itemEditorInstance
+        if (itemEditorInstance && coord &&
+            itemEditorInstance is IFocusManagerComponent &&
+            _editedItemPosition.rowIndex == coord.rowIndex &&
+            _editedItemPosition.columnIndex == coord.columnIndex)
+        {
+            IFocusManagerComponent(itemEditorInstance).setFocus();
+            return;
+        }
+
+        // dispose of any existing editor, saving away its data first
+        if (itemEditorInstance)
+        {
+            var reason:String;
+            if (!coord)
+            {
+                reason = "DataGridEventReason.OTHER";
+            }
+            else
+            {
+                reason = (!editedItemPosition || coord.rowIndex == editedItemPosition.rowIndex) ?
+                    "DataGridEventReason.NEW_COLUMN" :
+                    "DataGridEventReason.NEW_ROW";
+            }
+            if (!endEdit(reason) && reason != "DataGridEventReason.OTHER")
+                return;
+        }
+
+        // store the value
+        _editedItemPosition = coord;
+
+        // allow setting of undefined to dispose item editor instance
+        if (!coord)
+            return;
+
+        if (dontEdit)
+        {
+            return;
+        }
+
+        var rowIndex:int = coord.rowIndex;
+        var columnIndex:int = coord.columnIndex;
+        //        if (displayableColumns.length != _columns.length)
+        //        {
+        //            for (var i:int = 0; i < displayableColumns.length; i++)
+        //            {
+        //                if (displayableColumns[i].colNum >= columnIndex)
+        //                {
+        //                    columnIndex = i;
+        //                    break;
+        //                }
+        //            }
+        //            if (i == displayableColumns.length)
+        //                columnIndex = 0;
+        //        }
+
+        // trace("commitEditedItemPosition ", coord.rowIndex, selectedIndex);
+
+        //        var needChangeEvent:Boolean = false;
+        //        if (selectedIndex != coord.rowIndex)
+        //        {
+        //            commitSelectedIndex(coord.rowIndex);
+        //            needChangeEvent = true;
+        //        }
+        //
+
+        dataGrid.ensureCellIsVisible(rowIndex, columnIndex);
+
+        // get the actual references for the column, row, and item
+        var item:IVisualElement = grid.getItemRendererAt(rowIndex, columnIndex);
+        if (!item)
+        {
+            // assume that editing was cancelled
+            commitEditedItemPosition(null);
+            return;
+        }
+        //        if (!isItemEditable(item.data))
+        //        {
+        //            // assume that editing was cancelled
+        //            commitEditedItemPosition(null);
+        //            return;
+        //        }
+
+        //        if (needChangeEvent)
+        //        {
+        //            var evt:ListEvent = new ListEvent(ListEvent.CHANGE);
+        //            evt.columnIndex = coord.columnIndex;
+        //            evt.rowIndex = coord.rowIndex;;
+        //            evt.itemRenderer = item;
+        //            dataGrid.dispatchEvent(evt);
+        //        }
+
+        createItemEditor(rowIndex, columnIndex);
+
+        // if rendererIsEditor, don't apply the data as the data may have already changed in some way.
+        // This can happen if clicking on a checkbox rendererIsEditor as the checkbox will try to change
+        // its value as we try to stuff in an old value here.
+        //if (!columns.getItemAt(event.columnIndex).rendererIsEditor)
+        //            itemEditorInstance = editedItemRenderer;
+
+        if (itemEditorInstance is IInvalidating)
+            IInvalidating(itemEditorInstance).validateNow();
+
+        //            if (itemEditorInstance is IIMESupport)
+        //                IIMESupport(itemEditorInstance).imeMode =
+        //                    (columns.getItemAt(event.columnIndex).imeMode == null) ? _imeMode : columns[event.columnIndex].imeMode;
+
+        var fm:IFocusManager = grid.focusManager;
+        // trace("setting focus to item editor");
+        if (itemEditorInstance is IFocusManagerComponent)
+            fm.setFocus(IFocusManagerComponent(itemEditorInstance));
+
+        lastEditedItemPosition = _editedItemPosition;
+
+        // Notify event that a new editor is starting.
+        var dataGridEvent:DataGridEditEvent =
+            new DataGridEditEvent(DataGridEditEvent.OPEN_GRID_ITEM_EDITOR_SESSION);
+
+        dataGridEvent.columnIndex = editedItemPosition.columnIndex;
+        dataGridEvent.column = dataGrid.columns.getItemAt(columnIndex) as GridColumn;
+        dataGridEvent.rowIndex = editedItemPosition.rowIndex;
+        dataGrid.dispatchEvent(dataGridEvent);
+    }
+
+    /**
+     *  @private
+     *  Sets focus back to the grid so default handler will move it to the
+     *  next component.
+     */
+    private function deferFocus():void
+    {
+        losingFocus = true;
+        dataGrid.setFocus();
+        losingFocus = false;
+    }
+
+    /**
+     *  @private
+     */
+    private function saveItemEditorSession():Boolean
+    {
+        var dataSaved:Boolean = false;
+
+        if (itemEditorInstance)
+        {
+            dataSaved = itemEditorInstance.save();
+
+            if (dataSaved)
+            {
+                destroyItemEditor();
+            }
+            else
+            {
+                if (itemEditorInstance && _editedItemPosition)
+                {
+                    // edit session is continued so restore focus and selection
+                    if (grid.selectedIndex != _editedItemPosition.rowIndex)
+                        grid.selectedIndex = _editedItemPosition.rowIndex;
+                    var fm:IFocusManager = grid.focusManager;
+                    // trace("setting focus to itemEditorInstance", selectedIndex);
+                    if (itemEditorInstance is IFocusManagerComponent)
+                        fm.setFocus(IFocusManagerComponent(itemEditorInstance));
+                }
+            }
+        }
+
+        return dataSaved;
+    }
+
+    /**
+     *  @private
+     *  Find the next editable cell.
+     *
+     *  @param backward - if true move backward column by column and then row by row.
+     *  If false, then move forward column by column, row by row.
+     *
+     *  @return If an editable cell was found then return a Point with the x property
+     *  containing the rowIndex and the y property containing the column index. If no
+     *  editable cell was found then null is returned.
+     */
+    private function getNextEditableCell(rowIndex:int, columnIndex:int, backward:Boolean):Point
+    {
+        // what is the next cell?
+        // increment is -1 if we are moving backward and 1 if moving
+        // forward.
+        const increment:int = backward ? -1 : 1;
+        var rowIndex:int = rowIndex;
+        var columnIndex:int = columnIndex;
+        do {
+            var nextColumn:int = columnIndex + increment;
+            if (nextColumn >= 0 && nextColumn < dataGrid.columns.length)
+            {
+                columnIndex += increment;
+            }
+            else
+            {
+                // move to next row.
+                columnIndex = backward ? dataGrid.grid.columns.length - 1: 0;
+                var nextRow:int = rowIndex + increment;
+                if (nextRow < dataGrid.dataProvider.length)
+                    rowIndex += increment;
+                else
+                    return null;
+            }
+        } while (!canEditColumn(columnIndex));
+
+        return new Point(rowIndex, columnIndex);
+    }
+
+
+    /**
+     *  @private
+     *
+     *  @param columnIndex
+     *
+     *  @return true if the column can be edited, false otherwise.
+     */
+    private function canEditColumn(columnIndex:int):Boolean
+    {
+        return (dataGrid.editable && GridColumn(grid.columns.getItemAt(columnIndex)).editable);
+    }
+
+    /**
+     *  @private
+     *
+     *  Test if the cell was selected at the last selection snapshot.
+     */
+    private function wasCellPreviouslySelected(rowIndex:int, columnIndex:int):Boolean
+    {
+        if (dataGrid.isRowSelectionMode())
+            return (dataGrid.isCellSelectionMode() || previouslySelectedIndices.indexOf(rowIndex) >= 0);
+        else
+        {
+            // loop thru the previously selected cells to compare
+            for each (var cp:CellPosition in previouslySelectedCells)
+            {
+                if (cp.rowIndex == rowIndex &&
+                    cp.columnIndex == columnIndex)
+                    return true;
+            }
+        }
+
+        return false;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *
+     *  Handle the F2 key to start editing a cell.
+     */
+    private function dataGrid_keyboardDownHandler(event:KeyboardEvent):void
+    {
+        lastEvent = event;
+
+        if (event.keyCode == dataGrid.editKey)
+        {
+            // Edit the last column edited. If now last column then try to
+            // edit the first column.
+            var nextCell:Point = null;
+            if (dataGrid.isRowSelectionMode())
+            {
+                var lastColumn:int = lastEditedItemPosition ? lastEditedItemPosition.columnIndex : 0;
+                nextCell = getNextEditableCell(dataGrid.grid.caretRowIndex,
+                    lastColumn - 1,
+                    false);
+            }
+            else
+            {
+                nextCell = new Point(grid.caretRowIndex, grid.caretColumnIndex);
+            }
+
+            if (nextCell)
+                startItemEditorSession(nextCell.x, nextCell.y);
+        }
+    }
+
+    /**
+     *  @private
+     *
+     *  Get a selection snapshot on mouse down before the grid's selection is
+     *  changed. This is how we can telll if we have clicked on a selected cell
+     *  or not.
+     */
+    private function grid_mouseDownHandler(event:MouseEvent):void
+    {
+        lastEvent = event;
+
+        if (dataGrid.isRowSelectionMode())
+        {
+            previouslySelectedIndices = dataGrid.selectedIndices.slice(0, dataGrid.selectedIndices.length);
+            previouslySelectedCells = null;
+        }
+        else
+        {
+            previouslySelectedIndices = null;
+            previouslySelectedCells = dataGrid.selectedCells.slice(0, dataGrid.selectedCells.length);
+        }
+    }
+
+    /**
+     *  @private
+     *
+     */
+    private function grid_gridMouseDownHandler(event:GridEvent):void
+    {
+        lastEvent = event;
+
+        const rowIndex:int = event.rowIndex; //gridDimensions.getRowIndexAt(eventGridXY.x, eventGridXY.y);
+        const columnIndex:int = event.columnIndex; //gridDimensions.getColumnIndexAt(eventGridXY.x, eventGridXY.y);
+
+//        trace("grid_gridMouseDownHandler: (rowIndex, columnIndex) = (" + rowIndex + "," + columnIndex + ")");
+
+        // item editor handling
+        var r:IVisualElement;
+
+        r = event.itemRenderer; // grid.getItemRendererAt(rowIndex, columnIndex);
+
+        lastItemDown = null;
+
+        // if selection is being modified with shift or ctrl keys then
+        // don't start up an editor session.
+        if (event.shiftKey || event.ctrlKey)
+            return;
+
+        //            var isItemEditor:Boolean = itemEditorInstance && grid.contains(DisplayObject(itemEditorInstance));
+        //
+        //            // If it isn't an item renderer, or an item editor do default behavior
+        //            if (!isItemEditor)
+        //            {
+       // trace("mouseDown rowIndex is selected = " + priorSelectedIndices.indexOf(rowIndex));
+
+        var pos:Point;
+        if (r && wasCellPreviouslySelected(rowIndex, columnIndex))
+        {
+            lastItemDown = r;
+
+            //                pos = itemRendererToIndices(r);
+
+            var bEndedEdit:Boolean = true;
+
+            if (itemEditorInstance)
+            {
+                if (grid.columns[columnIndex].editable == false)
+                {
+                    endEdit("DataGridEventReason.OTHER");
+                    bEndedEdit = true;
+                }
+                else
+                {
+                    //Possible to get here and not have an editedItemPosition
+                    if (editedItemPosition)
+                    {
+                        bEndedEdit = endEdit(editedItemPosition.rowIndex == pos.y ?
+                            "DataGridEventReason.NEW_COLUMN" :
+                            "DataGridEventReason.NEW_ROW");
+                    }
+                    else
+                    {
+                        bEndedEdit = false;
+                    }
+                }
+            }
+
+            // if we didn't end edit session, don't do default behavior (call super)
+            if (!bEndedEdit)
+                return;
+        }
+        else
+        {
+            // trace("end edit?");
+            if (itemEditorInstance)
+                endEdit("DataGridEventReason.OTHER");
+        }
+        //            }
+
+    }
+
+    /**
+     *  @private
+     *
+     *  If clicked on a the same cell as mouse down then start editing the cell.
+     */
+    private function grid_gridMouseUpHandler(event:GridEvent):void
+    {
+        //            const eventStageXY:Point = new Point(event.stageX, event.stageY);
+        //            const eventGridXY:Point = grid.globalToLocal(eventStageXY);
+        //            const gridDimensions:GridDimensions = GridLayout(grid.layout).gridDimensions;
+        lastEvent = event;
+
+        const eventRowIndex:int = event.rowIndex; //gridDimensions.getRowIndexAt(eventGridXY.x, eventGridXY.y);
+        const eventColumnIndex:int = event.columnIndex; //gridDimensions.getColumnIndexAt(eventGridXY.x, eventGridXY.y);
+
+        // Only start an edit if the row is the only selected row.
+        // Only start editing when one row is selected.
+        if (dataGrid.selectionLength != 1)
+            return;
+
+        const rowIndex:int = eventRowIndex;
+        var columnIndex:int = eventColumnIndex;
+        var pos:Point;
+
+        var r:IVisualElement = event.itemRenderer; // grid.getItemRendererAt(rowIndex, eventColumnIndex);
+        //trace("grid_gridMouseUpHandler: itemRenderer = " + event.itemRenderer);
+        if (r && r != itemEditorInstance &&
+            (lastItemDown == r || (lastItemDown && grid.contains(DisplayObject(lastItemDown)))))
+        {
+            // if lastItemDown != r, we clicked in one cell and dragged to another.
+            // if lastItemFocused is in that cell, then we give lastItemDown the
+            // edit session
+            if (lastItemDown != r)
+                r = lastItemDown;
+
+            lastItemFocused = null;
+            pos = new Point(rowIndex, columnIndex);
+
+            if (pos && pos.y >= 0 && dataGrid.editable && !dontEdit)
+            {
+                if (grid.columns.getItemAt(pos.x).editable)
+                {
+                    startItemEditorSession(pos.x, pos.y);
+                }
+                else
+                    // if the item is not editable, set lastPosition to it anyways
+                    // so future tabbing starts from there
+                    lastEditedItemPosition = { columnIndex: pos.x, rowIndex: pos.y };
+            }
+        }
+        else if (lastItemDown && lastItemDown != itemEditorInstance)
+        {
+            pos = new Point(rowIndex, columnIndex);
+
+            if (pos && pos.y >= 0 && dataGrid.editable && !dontEdit)
+            {
+                if (grid.columns.getItemAt(pos.x).editable)
+                {
+                    startItemEditorSession(pos.x, pos.y);
+                }
+                else
+                    // if the item is not editable, set lastPosition to it anyways
+                    // so future tabbing starts from there
+                    lastEditedItemPosition = { columnIndex: pos.x, rowIndex: pos.y };
+            }
+        }
+
+        lastItemDown = null;
+    }
+
+   /**
+     *  @private
+     *  Closes the itemEditorInstance.
+     */
+    private function itemEditorInstance_FocusOutHandler(event:FocusEvent):void
+    {
+        trace("itemEditorInstance_FocusOutHandler " + event.relatedObject);
+        if (event.relatedObject &&
+           ((itemEditorInstance && DisplayObjectContainer(itemEditorInstance).contains(event.relatedObject)) ||
+           (editedItemRenderer && DisplayObjectContainer(editedItemRenderer).contains(event.relatedObject))) )
+            return;
+
+        // ignore textfields losing focus on mousedowns
+        if (!event.relatedObject)
+            return;
+
+        // trace("endEdit from itemEditorFocusOut");
+        if (itemEditorInstance || editedItemRenderer)
+            endEdit("DataGridEventReason.OTHER");
+        else
+            destroyItemEditor();
+
+    }
+
+    /**
+     *  @private
+     *
+     *  Default handler for the startItemEditorSession event.
+     */
+    private function dataGrid_startItemEditorSessionHandler(event:DataGridEditEvent):void
+    {
+        // trace("itemEditorItemEditBeginningHandler");
+        if (!event.isDefaultPrevented())
+            setEditedItemPosition({columnIndex: event.column.columnIndex, rowIndex: event.rowIndex});
+        else if (!itemEditorInstance)
+        {
+            _editedItemPosition = null;
+            // return focus to the grid w/o selecting an item
+            dataGrid.editable = false;
+            dataGrid.setFocus();
+            dataGrid.editable = true;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function deactivateHandler(event:Event):void
+    {
+        // if stage losing activation, set focus to DG so when we get it back
+        // we popup an editor again
+        if (itemEditorInstance || editedItemRenderer)
+        {
+            endEdit("DataGridEventReason.OTHER");
+            deferFocus();
+        }
+    }
+
+    /**
+     *  @private
+     *
+     *  Handle keys on the editor to stop the editing session.
+     */
+    private function itemEditorInstance_keyDownHandler(event:KeyboardEvent):void
+    {
+        // ESC just kills the editor, no new data
+        if (event.keyCode == Keyboard.ESCAPE)
+        {
+            cancelEdit(); //endEdit(DataGridEventReason.CANCELLED);
+        }
+        else if (event.ctrlKey && event.charCode == 46)
+        {   // Check for Ctrl-.
+            cancelEdit(); //endEdit(DataGridEventReason.CANCELLED);
+        }
+        else if (event.charCode == Keyboard.ENTER && event.keyCode != 229)
+        {
+            // multiline editors can take the enter key.
+            if (!_editedItemPosition)
+                return;
+
+            //            if (columns.getItemAt(_editedItemPosition.columnIndex).editorUsesEnterKey)
+            //                return;
+
+            // Enter edits the item, moves down a row
+            // The 229 keyCode is for IME compatability. When entering an IME expression,
+            // the enter key is down, but the keyCode is 229 instead of the enter key code.
+            // Thanks to Yukari for this little trick...
+            if (endEdit("DataGridEventReason.NEW_ROW"))
+            {
+                //                findNextEnterItemRenderer(event);
+                if (grid.focusManager)
+                    grid.focusManager.defaultButtonEnabled = false;
+
+                if (event.ctrlKey || (event.ctrlKey && event.shiftKey))
+                {
+                    var lastRow:int = lastEditedItemPosition ? lastEditedItemPosition.rowIndex : 0;
+                    var lastColumn:int = lastEditedItemPosition ? lastEditedItemPosition.columnIndex : 0;
+
+                    if (event.shiftKey)
+                        lastRow -= 1;
+                    else
+                        lastRow += 1;
+
+                    var nextCell:Point = getNextEditableCell(lastRow,
+                                                             lastColumn - 1,
+                                                             false);
+                    if (nextCell)
+                        startItemEditorSession(nextCell.x, nextCell.y);
+                }
+            }
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function editorAncestorResizeHandler(event:Event):void
+    {
+        endEdit("DataGridEventReason.OTHER");
+    }
+
+    /**
+     *  @private
+     */
+    private function sandBoxRoot_mouseDownHandler(event:Event):void
+    {
+        // check if the mouse was clicked outside of the editor. If it was
+        // then end the editing session.
+        if (event is MouseEvent &&
+            (itemEditorInstance &&
+            (itemEditorInstance == event.target ||
+            IUIComponent(itemEditorInstance).owns(DisplayObject(event.target)))) ||
+            (editedItemRenderer == event.target ||
+                IUIComponent(editedItemRenderer).owns(DisplayObject(event.target))))
+        {
+            return;
+        }
+
+        endEdit("DataGridEventReason.OTHER");
+        // set focus back to the grid so grid logic will deal if focus doesn't
+        // end up somewhere else
+        deferFocus();
+    }
+
+
+    /**
+     *  @private
+     *  handle focus changes generated from keyboard keys.
+     */
+    private function keyFocusChangeHandler(event:FocusEvent):void
+    {
+        // if we tabbed out of the edit then prevent the tab and
+        // save the edit. Next start up a new edit session in the
+        // next cell.
+        // TODO (dloverin): do I need to add the TAB key check here.
+        //                  look at flash bug (workaround in focus managere
+        //                  and handle it if so.
+        trace("keyFocusChangeHandler");
+        if (itemEditorInstance || editedItemRenderer)
+        {
+            var nextObject:IFocusManagerComponent = grid.focusManager.getNextFocusManagerComponent(event.shiftKey);
+            if (nextObject == itemEditorInstance ||
+                (itemEditorInstance && !DisplayObjectContainer(itemEditorInstance).contains(DisplayObject(nextObject))) ||
+                nextObject == editedItemRenderer ||
+                (editedItemRenderer && !DisplayObjectContainer(editedItemRenderer).contains(DisplayObject(nextObject))))
+            {
+                event.preventDefault();
+                endEdit("");
+
+                var nextCellPosition:Point = getNextEditableCell(lastEditedItemPosition.rowIndex,
+                                                                 lastEditedItemPosition.columnIndex,
+                                                                 event.shiftKey);
+                if (nextCellPosition)
+                    startItemEditorSession(nextCellPosition.x, nextCellPosition.y);
+            }
+        }
+    }
+
+}
+}


fix flexjsstore by allowing children to initiate resizing only when not laying out

--- frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as
+++ frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as
@@ -354,10 +354,12 @@
 				}
 			}

+            resizingChildren = true;
 			if (layout) {
 				layout.layout();
 				determineContentSizeFromChildren();
 			}
+            resizingChildren = false;

 			adjustSizeAfterLayout();
 		}
@@ -519,7 +521,7 @@
 			resizingChildren = true;

 			var child:UIBase = event.target as UIBase;
-//			performLayout(event);
+			performLayout(event);
 			resizingChildren = false;
 		}


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

--- frameworks/projects/framework/src/mx/collections/errors/ItemPendingError.as
+++ frameworks/projects/framework/src/mx/collections/errors/ItemPendingError.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.collections.errors
 {


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

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


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/mx/src/mx/controls/VRule.as
+++ frameworks/projects/mx/src/mx/controls/VRule.as
@@ -31,6 +31,11 @@
  *  </ul>
  *
  *  @default 0xEEEEEE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="shadowColor", type="uint", format="Color", inherit="yes")]

@@ -46,6 +51,11 @@
  *  </ul>
  *
  *  @default 0xC4CCCC
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="strokeColor", type="uint", format="Color", inherit="yes")]

@@ -61,6 +71,11 @@
  *  </ul>
  *
  *  @default 2
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="strokeWidth", type="Number", format="Length", inherit="yes")]
     // Note: stroke-width is inheriting in SVG,
@@ -118,6 +133,11 @@
  *  @includeExample examples/SimpleVRule.mxml
  *
  *  @see mx.controls.HRule
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class VRule extends UIComponent
 {
@@ -142,6 +162,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function VRule()
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 7918
Author:   chaase@adobe.com
Date:     2009-06-17T16:55:30.271215Z

Log Message:
-----------
Round 2 of effects PARB changes. Some renames and removals of properties/functions, including:
AnimateTransform: removed 18 MotionPath properties, added applyChangesPostLayout property (replaces affectLayout property in subclasses), removed addMotionPath/addPostLayoutMotionPath protected functions
Animation: removed seek(), reverse()
SimpleMotionPath: removed 'duration' arg in constructor

QE Notes: Mustella will break on some of these changes (no surprise, just needs minor updates)
Doc Notes: API updates
Bugs: none
Reviewer: Jason
Tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RotateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>

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

--- frameworks/projects/spark/src/spark/effects/animation/SimpleMotionPath.as
+++ frameworks/projects/spark/src/spark/effects/animation/SimpleMotionPath.as
@@ -52,19 +52,17 @@
      *
      *  @param valueTo The final value of the property.
      *
-     *  @param duration The time, in milliseconds, of the animation.
-     *
      *  @param valueBy An optional parameter that specifies the delta with
      *  which to calculate either the from or to values, if one is omitted.
      */
     public function SimpleMotionPath(property:String = null,
         valueFrom:Object = null, valueTo:Object = null,
-        duration:Number = NaN, valueBy:Object = null)
+        valueBy:Object = null)
     {
         super();
         this.property = property;
         keyframes = new <Keyframe>[new Keyframe(0, valueFrom),
-            new Keyframe(duration, valueTo, valueBy)];
+            new Keyframe(NaN, valueTo, valueBy)];
         if (valueFrom is Array && valueTo is Array)
         {
             if (!numberArrayInterpolator)


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

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