Transferred from the Adobe Open Source Subversion Repository

Revision: 7221
Author:   dsubrama@adobe.com
Date:     2009-05-22T16:27:26.493658Z

Log Message:
-----------
-Use Drawing API-2 to render caps for every Line graphic element's strokes. As part of this, GradientStroke now implements IStroke and IStroke has a new method, generateGraphicsStroke() which returns a GraphicsStroke object representing this stroke. More refactoring to share graphics stroke logic between LinearGradientStroke and RadialGradientStroke.
-Removed some un-used imports.
-Added some comments to ItemRenderer and had modified List to use static constants for event listeners.

Fixes: SDK-17661, SDK-21353, SDK-21251

Checkintests: Pass
FXG Tests: Passed (cyclone ran by Joan)
Doc: Added ASDoc for ItemRenderer and IStroke, a glance-over would be swell.
Reviewer: Jason for SDK-17661 me for the others.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ErrorSkin.as</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/ErrorSkin.as
+++ frameworks/projects/spark/src/spark/skins/spark/ErrorSkin.as
@@ -25,7 +25,6 @@
 import spark.components.supportClasses.SkinnableComponent;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
-import flash.utils.Dictionary;

 /**
  *  Error skin for Spark components.


Transferred from the Adobe Open Source Subversion Repository

Revision: 3222
Author:   jimurphy@adobe.com
Date:     2008-09-16T14:09:08.134976Z

Log Message:
-----------
Merged 3.0.x revisions 3157,3162,3165-3166,3168,3177,3180-3183,3185,3187,3189,3199 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TileList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/build_framework.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterManagerRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -2473,7 +2473,7 @@
                     }
                     else if (o is ISystemManager)
                     {
-                    	_systemManager = o as ISystemManager;	// VERSION_SKEW
+                    	_systemManager = o as ISystemManager;
                     	break;
                     }
                     o = o.parent;
@@ -5116,7 +5116,8 @@

         // systemManager getter tries to set the internal _systemManager varaible
         // if it is null. Hence a call to the getter is necessary.
-		// TODODJL: stage is null for bridged applications
+		// Stage can be null when an untrusted application is loaded by an application
+		// that isn't on stage yet.
         if (systemManager && (_systemManager.stage || _systemManager.useSWFBridge()))
         {
             if (methodQueue.length > 0 && !listeningForRender)
@@ -5571,7 +5572,6 @@
         }
     }

-    // VERSION_SKEW
     private function isOnDisplayList():Boolean
     {
     	var p:DisplayObjectContainer;
@@ -5713,7 +5713,8 @@
         // just before the next rasterization.
         var sm:ISystemManager = systemManager;

-        // TODODJL: stage is null for bridge applications
+        // Stage can be null when an untrusted application is loaded by an application
+        // that isn't on stage yet.
         if (sm && (sm.stage || sm.useSWFBridge()))
         {
             if (!listeningForRender)
@@ -5740,7 +5741,8 @@
     {
         var sm:ISystemManager = systemManager;

-        // TODODJL: stage is null for bridge applications
+        // Stage can be null when an untrusted application is loaded by an application
+        // that isn't on stage yet.
         if (sm && (sm.stage || sm.useSWFBridge()))
         {
             if (listeningForRender)
@@ -6295,7 +6297,6 @@
             var sm:ISystemManager = parent as ISystemManager;
             if (sm)
             {
-            	// VERSION_SKEW
                 if (sm is SystemManagerProxy || (sm == systemManager.topLevelSystemManager &&
                     sm.document != this))
                 {
@@ -8351,7 +8352,8 @@
         // trace("  >>calllaterdispatcher2");
         var sm:ISystemManager = systemManager;

-        // TODODJL: stage is null for bridge applications
+        // Stage can be null when an untrusted application is loaded by an application
+        // that isn't on stage yet.
         if (sm && (sm.stage || sm.useSWFBridge()) && listeningForRender)
         {
             // trace("  removed");


Transferred from the Adobe Open Source Subversion Repository

Revision: 7743
Author:   clucier@adobe.com
Date:     2009-06-11T13:53:10.203664Z

Log Message:
-----------
Moving away from using namespace qualifiers in most cases in the SDK.  We've run into a few cases now where the use of qualifiers in code that is called excessively can slow things down.
Bugs: SDK-21337
Reviewer: Ryan, Paul
QE Notes: None
Tests: Ran several random Mustella test groups, checkintests.

Modified Paths:
--------------
106 paths were modified

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

--- frameworks/projects/mx/src/mx/containers/utilityClasses/CanvasLayout.as
+++ frameworks/projects/mx/src/mx/containers/utilityClasses/CanvasLayout.as
@@ -206,14 +206,14 @@
 		for (i = 0; i < IConstraintLayout(target).constraintColumns.length; i++)
 		{
 			var col:ConstraintColumn = IConstraintLayout(target).constraintColumns[i];
-			if (col.mx_internal::contentSize)
-				col.mx_internal::_width = NaN;
+			if (col.contentSize)
+				col._width = NaN;
 		}
 		for (i = 0; i < IConstraintLayout(target).constraintRows.length; i++)
 		{
 			var row:ConstraintRow = IConstraintLayout(target).constraintRows[i];
-			if (row.mx_internal::contentSize)
-				row.mx_internal::_height = NaN;
+			if (row.contentSize)
+				row._height = NaN;
 		}

 		measureColumnsAndRows();
@@ -242,9 +242,9 @@
 		// during measure. In order to avoid a race condition when the
 		// scrollable area is within a scrollbar's width of the view metrics,
 		// we use the non-update viewMetrics, which don't include scrollbars.
-		target.mx_internal::doingLayout = false;
+		target.doingLayout = false;
 		var vm:EdgeMetrics = target.viewMetrics;
-		target.mx_internal::doingLayout = true;
+		target.doingLayout = true;

 		var viewableWidth:Number = unscaledWidth - vm.left - vm.right;
 		var viewableHeight:Number = unscaledHeight - vm.top - vm.bottom;
@@ -265,14 +265,14 @@
 			for (i = 0; i < IConstraintLayout(target).constraintColumns.length; i++)
 			{
 				var col:ConstraintColumn = IConstraintLayout(target).constraintColumns[i];
-				if (col.mx_internal::contentSize)
-					col.mx_internal::_width = NaN;
+				if (col.contentSize)
+					col._width = NaN;
 			}
 			for (i = 0; i < IConstraintLayout(target).constraintRows.length; i++)
 			{
 				var row:ConstraintRow = IConstraintLayout(target).constraintRows[i];
-				if (row.mx_internal::contentSize)
-					row.mx_internal::_height = NaN;
+				if (row.contentSize)
+					row._height = NaN;
 			}

 			measureColumnsAndRows();
@@ -1020,7 +1020,7 @@
  		for (i = 0; i < IConstraintLayout(target).constraintColumns.length; i++)
  		{
  			var col:ConstraintColumn = IConstraintLayout(target).constraintColumns[i];
- 			if (col.mx_internal::contentSize)
+ 			if (col.contentSize)
  			{
  				if (col.id == leftBoundary)
  				{
@@ -1086,7 +1086,7 @@
 		for (i = 0; i < IConstraintLayout(target).constraintRows.length; i++)
 		{
 			var row:ConstraintRow = IConstraintLayout(target).constraintRows[i];
-			if (row.mx_internal::contentSize)
+			if (row.contentSize)
 			{
 				if (row.id == topBoundary)
 				{
@@ -1220,12 +1220,12 @@
 				cc = cols[i];
 				if (!isNaN(cc.percentWidth))
 					percentageSize.push(cc);
-				else if (!isNaN(cc.width) && !cc.mx_internal::contentSize)
+				else if (!isNaN(cc.width) && !cc.contentSize)
 					fixedSize.push(cc);
 				else
 				{
 					contentSize.push(cc);
-					cc.mx_internal::contentSize = true;
+					cc.contentSize = true;
 				}
 			}
 			//fixed size columns
@@ -1331,12 +1331,12 @@
 				{
 					percentageSize.push(cr);
 				}
-				else if (!isNaN(cr.height) && !cr.mx_internal::contentSize)
+				else if (!isNaN(cr.height) && !cr.contentSize)
 					fixedSize.push(cr);
 				else
 				{
 					contentSize.push(cr);
-					cr.mx_internal::contentSize = true;
+					cr.contentSize = true;
 				}
 			}
 			//fixed size rows


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

--- frameworks/projects/framework/src/mx/utils/LoaderUtil.as
+++ frameworks/projects/framework/src/mx/utils/LoaderUtil.as
@@ -17,6 +17,11 @@

   /**
    *  The LoaderUtil class defines a utility method for use with Flex RSLs.
+   *
+   *  @langversion 3.0
+   *  @playerversion Flash 9
+   *  @playerversion AIR 1.1
+   *  @productversion Flex 3
    */
     public class LoaderUtil
     {
@@ -31,6 +36,11 @@
      *  @param loaderInfo A LoaderInfo instance.
      *
      *  @return A normalized LoaderInfo.url property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function normalizeURL(loaderInfo:LoaderInfo):String
     {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls.richTextEditorClasses
 {


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

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

 package mx.utils
 {


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

--- frameworks/projects/spark/src/spark/core/ContentCache.as
+++ frameworks/projects/spark/src/spark/core/ContentCache.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Added event handlers

Added event handlers

--- frameworks/as/src/org/apache/flex/html/staticControls/beads/ComboBoxBead.as
+++ frameworks/as/src/org/apache/flex/html/staticControls/beads/ComboBoxBead.as
@@ -20,7 +20,7 @@
 {
 	import flash.display.DisplayObjectContainer;
 	import flash.display.Sprite;
-	import flash.events.EventDispatcher;
+	import flash.events.Event;
 	import flash.events.IEventDispatcher;

 	import org.apache.flex.binding.ConstantBinding;
@@ -105,6 +105,12 @@
 				list.addBead(cb);
 			}
 			list.initSkin();
+
+			// listen for events on the list and take those selections to the text input
+			list.addEventListener("change", listChangeHandler,false,0,true);
+
+			// listen for events on the text input and modify the list and selection
+			textInput.addEventListener("change", textChangeHandler,false,0,true);
 		}

 		private var upSprite:Sprite;
@@ -130,5 +136,23 @@
 			sprite.graphics.lineTo(4,4);
 			sprite.graphics.endFill();
 		}
+
+		private function listChangeHandler( event:Event ) : void
+		{
+			var item:Object = list.selectedItem;
+			textInput.text = item.toString();
+
+			var newEvent:Event = new Event(Event.CHANGE);
+			IEventDispatcher(strand).dispatchEvent(newEvent);
+		}
+
+		private function textChangeHandler( event:Event ) : void
+		{
+			list.selectedItem = textInput.text;
+			list.selectedIndex = -1;
+
+			var newEvent:Event = new Event(Event.CHANGE);
+			IEventDispatcher(strand).dispatchEvent(newEvent);
+		}
 	}
 }


Fixed issue (RTEs) with editable data grid when it has an array of simple values (Number, String etc)

--- frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
+++ frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
@@ -3397,7 +3397,7 @@
                     ObjectUtil.getClassInfo(iterator.current,
                                             ["uid", "mx_internal_uid"]);

-                if(info)
+                if (info)
                     cols = info.properties;
             }

@@ -3420,15 +3420,21 @@
                 // this is an old recordset - use its columns
                 var n:int = cols.length;
                 var colName:Object;
-                for (var i:int = 0; i < n; i++)
-                {
-                    colName = cols[i];
-                    if (colName is QName)
-                        colName = QName(colName).localName;
-                    col = new AdvancedDataGridColumn();
-                    col.dataField = String(colName);
-                    newCols.push(col);
-                }
+				if  (n == 0) {
+					col = new AdvancedDataGridColumn();
+					newCols.push(col);
+				}
+				else {
+	                for (var i:int = 0; i < n; i++)
+	                {
+	                    colName = cols[i];
+	                    if (colName is QName)
+	                        colName = QName(colName).localName;
+	                    col = new AdvancedDataGridColumn();
+	                    col.dataField = String(colName);
+	                    newCols.push(col);
+	                }
+				}
             }
             columns = newCols;
             generatedColumns = true;
@@ -4017,7 +4023,7 @@
         var g:Graphics = background.graphics;
         g.clear();

-        if(columnIndex >= lockedColumnCount &&
+        if (columnIndex >= lockedColumnCount &&
            columnIndex < lockedColumnCount + horizontalScrollPosition)
             return;

@@ -4035,8 +4041,9 @@

         // Height is usually as tall is the items in the row, but not if
         // it would extend below the bottom of listContent
-        var height:Number = Math.min(lastRow.y + lastRow.height,
-                                     listContent.height - yy);
+		var height:Number = 0;
+		if (lastRow)
+        	height = Math.min(lastRow.y + lastRow.height, listContent.height - yy);

         g.drawRect(xx, yy, headerInfo.headerItem.width, height);
         g.endFill();
@@ -8002,8 +8009,8 @@
                 var newData:Object = itemEditorInstance[_columns[event.columnIndex].editorDataField];
                 var property:String = _columns[event.columnIndex].dataField;
                 var data:Object = event.itemRenderer.data;
-                var typeInfo:String = "";
-                for each(var variable:XML in describeType(data).variable)
+                var typeInfo:String = describeType(data).@name;
+                for each (var variable:XML in describeType(data).variable)
                 {
                     if (property == variable.@name.toString())
                     {
@@ -8032,11 +8039,23 @@
                     if (!(newData is int))
                         newData = Number(newData);
                 }
-                if (data[property] != newData)
-                {
-                    bChanged = true;
-                    data[property] = newData;
-                }
+				if (property == null)
+				{
+					if (data != newData)
+					{
+						bChanged = true;
+						data = newData;
+					}
+				}
+				else
+				{
+					if (data[property] != newData)
+					{
+						bChanged = true;
+						data[property] = newData;
+					}
+				}
+
                 if (bChanged && !(data is IPropertyChangeNotifier))
                 {
                     collection.itemUpdated(data, property);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls
 {


rename ParticleModel2D to ParticleEffect2D in AttributeEditor.as.

--- Bin/Data/Scripts/Editor/AttributeEditor.as
+++ Bin/Data/Scripts/Editor/AttributeEditor.as
@@ -894,7 +894,7 @@
     resourcePickers.Push(ResourcePicker("Sound", soundFilters));
     resourcePickers.Push(ResourcePicker("Sprite2D", textureFilters, ACTION_PICK | ACTION_OPEN));
     resourcePickers.Push(ResourcePicker("Animation2D", anmFilters, ACTION_PICK | ACTION_OPEN));
-    resourcePickers.Push(ResourcePicker("ParticleModel2D", pexFilters, ACTION_PICK | ACTION_OPEN));
+    resourcePickers.Push(ResourcePicker("ParticleEffect2D", pexFilters, ACTION_PICK | ACTION_OPEN));
 }

 ResourcePicker@ GetResourcePicker(ShortStringHash resourceType)


bugfix for Marco

bugfix for Marco

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@140 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/ui/UIComponent.as
+++ src/reprise/ui/UIComponent.as
@@ -483,7 +483,7 @@
 		public function hasClass(className : String) : Boolean
 		{
 			return StringUtil.delimitedStringContainsSubstring(
-				m_cssClasses, name, ' ');
+				m_cssClasses, className, ' ');
 		}

 		public function setStyle(name : String, value : String = null) : void


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/charts/src/mx/charts/Legend.as
+++ frameworks/projects/charts/src/mx/charts/Legend.as
@@ -0,0 +1,1190 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.charts
+{
+
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.events.MouseEvent;
+
+import mx.charts.chartClasses.ChartBase;
+import mx.charts.events.LegendMouseEvent;
+import mx.charts.styles.HaloDefaults;
+import mx.collections.ArrayCollection;
+import mx.collections.ICollectionView;
+import mx.collections.IList;
+import mx.collections.ListCollectionView;
+import mx.containers.Tile;
+import mx.core.EdgeMetrics;
+import mx.core.IUIComponent;
+import mx.core.ScrollPolicy;
+import mx.core.mx_internal;
+import mx.styles.CSSStyleDeclaration;
+import mx.core.IFlexModuleFactory;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the user clicks on a LegendItem in the Legend control.
+ *
+ *  @eventType mx.charts.events.LegendMouseEvent.ITEM_CLICK
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Event(name="itemClick", type="mx.charts.events.LegendMouseEvent")]
+
+/**
+ *  Dispatched when the user presses the mouse button
+ *  while over a LegendItem in the Legend control.
+ *
+ *  @eventType mx.charts.events.LegendMouseEvent.ITEM_MOUSE_DOWN
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Event(name="itemMouseDown", type="mx.charts.events.LegendMouseEvent")]
+
+/**
+ *  Dispatched when the user moves the mouse off of a LegendItem in the Legend.
+ *
+ *  @eventType mx.charts.events.LegendMouseEvent.ITEM_MOUSE_OUT
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Event(name="itemMouseOut", type="mx.charts.events.LegendMouseEvent")]
+
+/**
+ *  Dispatched when the user moves the mouse over a LegendItem in the Legend control.
+ *
+ *  @eventType mx.charts.events.LegendMouseEvent.ITEM_MOUSE_OVER
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Event(name="itemMouseOver", type="mx.charts.events.LegendMouseEvent")]
+
+/**
+ *  Dispatched when the user releases the mouse button
+ *  while over a LegendItem in the Legend.
+ *
+ *  @eventType mx.charts.events.LegendMouseEvent.ITEM_MOUSE_UP
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Event(name="itemMouseUp", type="mx.charts.events.LegendMouseEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+include "../styles/metadata/GapStyles.as"
+include "../styles/metadata/PaddingStyles.as"
+
+/**
+ *  Background color of the component.
+ *  You can either have a backgroundColor
+ *  or a backgroundImage, but not both.
+ *  Note that some components, like a Button, do not have a background
+ *  because they are completely filled with the button face or other graphics.
+ *  The DataGrid control also ignores this style.
+ *  The default value is undefined.
+ *  If both this style and the backgroundImage style are undefined,
+ *  the control has a transparent background.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="backgroundColor", type="uint", format="Color", inherit="no")]
+
+/**
+ *  Bounding box style.
+ *  The possible values are "none", "solid",
+ *  "inset" and "outset".
+ *
+ *
Note: The borderStyle style is not supported by the
+ *  Button control or the Panel container.
+ *  To make solid border Panels, set the borderThickness
+ *  property, and set the dropShadow property to
+ *  false if desired.

+ *
+ *  @default "inset"
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="borderStyle", type="String", enumeration="inset,outset,solid,none", inherit="no")]
+
+/**
+ *  Specifies the label placement of the legend element.
+ *  Valid values are "top", "bottom",
+ *  "right", and "left".
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="labelPlacement", type="String", enumeration="top,bottom,right,left", inherit="yes")]
+
+/**
+ *  Specifies the height of the legend element.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="markerHeight", type="Number", format="Length", inherit="yes")]
+
+/**
+ *  Specifies the width of the legend element.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="markerWidth", type="Number", format="Length", inherit="yes")]
+
+/**
+ *  Specifies the line stroke for the legend element.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="stroke", type="Object", inherit="no")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="defaultButton", kind="property")]
+[Exclude(name="horizontalScrollPolicy", kind="property")]
+[Exclude(name="icon", kind="property")]
+[Exclude(name="label", kind="property")]
+[Exclude(name="tileHeight", kind="property")]
+[Exclude(name="tileWidth", kind="property")]
+[Exclude(name="verticalScrollPolicy", kind="property")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[DefaultBindingProperty(destination="dataProvider")]
+
+[DefaultTriggerEvent("itemClick")]
+
+[IconFile("Legend.png")]
+
+/**
+ *  The Legend control adds a legend to your charts,
+ *  where the legend displays the label for each data series in the chart
+ *  and a key showing the chart element for the series.
+ *
+ *
You can initialize a Legend control by binding a chart control
+ *  identifier to the Legend control's dataProvider property,
+ *  or you can define an Array of LegendItem objects.

+ *
+ *  @mxml
+ *
+ *
The <mx:Legend> tag inherits all the propertie
+ *  of its parent classes and adds the following properties:

+ *
+ *

+ *  <mx:Legend
+ *    Properties
+ *    dataProvider="No default"
+ *    legendItemClass="No default"
+ *
+ *    Styles
+ *    backgroundColor="undefined"
+ *    borderStyle="inset|none|solid|outset"
+ *    horizontalGap="8"
+ *    labelPlacement="right|left|top|bottom"
+ *    markerHeight="15"
+ *    markerWidth="10"
+ *    paddingLeft="0"
+ *    paddingRight="0"
+ *    stroke="IStroke; no default"
+ *    verticalGap="6"
+ *
+ *    Events
+ *    itemClick="Event; no default"
+ *    itemMouseDown="Event; no default"
+ *    itemMouseOut="Event; no default"
+ *    itemMouseOver="Event; no default"
+ *    itemMouseUp="Event; no default"
+ *  />
+ *

+ *
+ *  @see mx.charts.LegendItem
+ *
+ *  @includeExample examples/PlotChartExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class Legend extends Tile
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class initialization
+    //
+    //--------------------------------------------------------------------------
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function Legend()
+    {
+        super();
+
+        direction = "vertical";
+
+        addEventListener(MouseEvent.CLICK, childMouseEventHandler);
+        addEventListener(MouseEvent.MOUSE_OVER, childMouseEventHandler);
+        addEventListener(MouseEvent.MOUSE_OUT, childMouseEventHandler);
+        addEventListener(MouseEvent.MOUSE_UP, childMouseEventHandler);
+        addEventListener(MouseEvent.MOUSE_DOWN, childMouseEventHandler);
+
+        _dataProvider = new ArrayCollection();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _moduleFactoryInitialized:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var _preferredMajorAxisLength:Number;
+
+    /**
+     *  @private
+     */
+    private var _actualMajorAxisLength:Number;
+
+    /**
+     *  @private
+     */
+    private var _childrenDirty:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var _unscaledWidth:Number;
+
+    /**
+     *  @private
+     */
+    private var _unscaledHeight:Number;
+
+    /**
+     *  @private
+     */
+    private static var legendItemLinkage:LegendItem = null;
+
+    /**
+     *  @private
+     */
+    private var _dataProviderChanged:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: Container
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  horizontalScrollPolicy
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function get horizontalScrollPolicy():String
+    {
+        return ScrollPolicy.OFF;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set horizontalScrollPolicy(value:String):void
+    {
+    }
+
+    //----------------------------------
+    //  verticalScrollPolicy
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function get verticalScrollPolicy():String
+    {
+        return ScrollPolicy.OFF;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set verticalScrollPolicy(value:String):void
+    {
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  dataProvider
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dataProvider property.
+     */
+    private var _dataProvider:Object;
+
+    [Bindable("collectionChange")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  Set of data to be used in the Legend.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get dataProvider():Object
+    {
+        return _dataProvider;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dataProvider(
+                            value:Object /* String, ViewStack or Array */):void
+    {
+        if (_dataProvider is ChartBase)
+        {
+            _dataProvider.removeEventListener("legendDataChanged",
+                                              legendDataChangedHandler);
+        }
+
+        _dataProvider = value ? value : [];
+
+        if (_dataProvider is ChartBase)
+        {
+            // weak listeners to collections and dataproviders
+            _dataProvider.addEventListener("legendDataChanged",
+                                           legendDataChangedHandler, false, 0, true);
+        }
+        else if (_dataProvider is ICollectionView)
+        {
+        }
+        else if (_dataProvider is IList)
+        {
+            _dataProvider = new ListCollectionView(IList(_dataProvider));
+        }
+        else if (_dataProvider is Array)
+        {
+            _dataProvider = new ArrayCollection(_dataProvider as Array);
+        }
+        else if (_dataProvider != null)
+        {
+            _dataProvider = new ArrayCollection([_dataProvider]);
+        }
+        else
+        {
+            _dataProvider = new ArrayCollection();
+        }
+
+        invalidateProperties();
+        invalidateSize();
+        _childrenDirty = true;
+
+        dispatchEvent(new Event("collectionChange"));
+    }
+
+    //----------------------------------
+    //  legendItemClass
+    //----------------------------------
+
+    /**
+     *  The class used to instantiate LegendItem objects.
+     *  When a legend's content is derived from the chart or data,
+     *  it instantiates one instance of legendItemClass
+     *  for each item described by the dataProvider.
+     *  If you want custom behavior in your legend items,
+     *  you can assign a subclass of LegendItem to this property
+     *  to have the Legend create instances of their derived type instead.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var legendItemClass:Class = LegendItem;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private function initStyles():Boolean
+	{
+		HaloDefaults.init(styleManager);
+
+		var o:CSSStyleDeclaration = HaloDefaults.createSelector("mx.charts.Legend", styleManager);
+
+		o.defaultFactory = function():void
+		{
+			this.borderStyle = "none";
+			this.horizontalGap = 20;
+			this.maintainAspectRatio = true;
+			this.paddingBottom = 5;
+			this.paddingLeft = 5;
+			this.paddingRight = 5;
+			this.paddingTop = 5;
+			this.verticalGap = 7;
+		}
+
+		return true;
+	}
+
+	/**
+	 *  @inheritDoc
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	override public function set moduleFactory(factory:IFlexModuleFactory):void
+	{
+		super.moduleFactory = factory;
+
+		if (_moduleFactoryInitialized)
+			return;
+
+		_moduleFactoryInitialized = true;
+
+		// our style settings
+		initStyles();
+	}
+
+    /**
+     *  Processes the properties set on the component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (_childrenDirty)
+        {
+            populateFromArray(_dataProvider);
+            _childrenDirty = false;
+        }
+    }
+
+    /**
+     *  Calculates the preferred, minimum, and maximum sizes of the Legend.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        var minWidth:Number;
+        var minHeight:Number;
+        var preferredWidth:Number;
+        var preferredHeight:Number;
+        var vm:EdgeMetrics;
+        var colCount:int;
+        var i:int;
+        var n:int;
+
+        // Determine the size of each tile cell
+        findCellSize();
+
+        // Min width and min height are large enough to display a single child
+        minWidth = cellWidth;
+        minHeight = cellHeight;
+
+        // Determine the width and height necessary to display the tiles in an
+        // N-by-N grid (with number of rows equal to number of columns).
+        var numChildren:int = this.numChildren;
+        if (numChildren > 0)
+        {
+            var horizontalGap:Number = getStyle("horizontalGap");
+            var verticalGap:Number = getStyle("verticalGap");
+            var columns:Array /* of Number */;
+            vm = viewMetricsAndPadding;
+            var rowCount:int;
+
+            // If an explicit dimension or flex is set for the majorAxis,
+            // set as many children as possible along the axis.
+            if (direction == "vertical")
+            {
+                var bCalcColumns:Boolean = false;
+
+                if (!isNaN(explicitHeight))
+                {
+                    preferredHeight = explicitHeight - vm.top - vm.bottom;
+                    bCalcColumns = true;
+                }
+                else if (!isNaN(_actualMajorAxisLength))
+                {
+                    preferredHeight = _actualMajorAxisLength * cellHeight +
+                        (_actualMajorAxisLength - 1) * verticalGap;
+                    _actualMajorAxisLength = NaN;
+                    bCalcColumns = true;
+                }
+
+                if (bCalcColumns)
+                {
+                    columns = calcColumnWidthsForHeight(preferredHeight);
+                    preferredWidth = 0;
+                    colCount = columns.length;
+                    n = colCount;
+                    for (i = 0; i < n; i++)
+                    {
+                        preferredWidth += columns[i];
+                    }
+                    preferredWidth += (colCount - 1) * horizontalGap;
+
+                    rowCount = Math.min(numChildren,
+                        Math.max(1, Math.floor(
+                        (preferredHeight + verticalGap) /
+                        (cellHeight + verticalGap))));
+                    preferredHeight = rowCount * cellHeight +
+                                      (rowCount - 1) * verticalGap;
+                    _preferredMajorAxisLength = rowCount;
+                }
+                else
+                {
+                    // If we have flex,
+                    // our majorAxis can contain all our children
+                    preferredHeight = numChildren * cellHeight +
+                                      (numChildren - 1) * verticalGap;
+                    preferredWidth = cellWidth;
+                    _preferredMajorAxisLength = numChildren;
+                }
+            }
+            else
+            {
+                if (!isNaN(explicitWidth))
+                {
+                    // If we have an explicit height set,
+                    // see how many children can fit in the given height.
+                    preferredWidth = explicitWidth - vm.left - vm.right;
+                }
+                else if (!isNaN(_actualMajorAxisLength))
+                {
+                    preferredWidth = _actualMajorAxisLength - vm.left - vm.right;
+                    _actualMajorAxisLength = NaN;
+                }
+                else
+                {
+                    preferredWidth = screen.width - vm.left - vm.right;
+                }
+
+                columns = calcColumnWidthsForWidth(preferredWidth);
+                preferredWidth = 0;
+                colCount = columns.length;
+				n = colCount;
+                for (i = 0; i < n; i++)
+                {
+                    preferredWidth += columns[i];
+                }
+
+                preferredWidth += (colCount - 1) * horizontalGap;
+                rowCount = Math.ceil(numChildren / colCount);
+                preferredHeight = rowCount * cellHeight +
+                                  (rowCount - 1) * verticalGap;
+                _preferredMajorAxisLength = colCount;
+            }
+
+        }
+        else
+        {
+            preferredWidth = minWidth;
+            preferredHeight = minHeight;
+        }
+
+        // Add extra for borders and margins.
+        vm = viewMetricsAndPadding;
+        var hExtra:Number = vm.left + vm.right;
+        var vExtra:Number = vm.top + vm.bottom;
+        minWidth += hExtra;
+        preferredWidth += hExtra;
+        minHeight += vExtra;
+        preferredHeight += vExtra;
+
+        measuredMinWidth = minWidth;
+        measuredMinHeight = minHeight;
+        measuredWidth = preferredWidth;
+        measuredHeight = preferredHeight;
+    }
+
+    /**
+     *  Sets the size and position of each child of the Legend.
+     *  This is an advanced method for use in subclassing.
+     *  If you override this method, your implementation should call
+     *  the super.updateDisplayList() method.
+     *
+     *  @param unscaledWidth Specifies the width of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleX property of the component.
+     *
+     *  @param unscaledHeight Specifies the height of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleY property of the component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        _unscaledWidth = unscaledWidth;
+        _unscaledHeight = unscaledHeight;
+
+        // The measure function isn't called if the width and height of
+        // the Tile are hard-coded.  In that case, we compute the cellWidth
+        // and cellHeight now.
+        if (isNaN(cellWidth))
+            findCellSize();
+
+        if (direction == "vertical")
+            layoutVertical();
+        else
+            layoutHorizontal();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function addLegendItem(legendData:Object):void
+    {
+        var c:Class = legendItemClass;
+        var newItem:LegendItem = new c();
+
+        newItem.marker = legendData.marker;
+
+        if (legendData.label != "")
+            newItem.label = legendData.label;
+
+        if (legendData.element)
+            newItem.element = legendData.element;
+
+        if ("fill" in legendData)
+            newItem.setStyle("fill",legendData["fill"]);
+
+        newItem.markerAspectRatio = legendData.aspectRatio;
+        newItem.legendData = legendData;
+        newItem.percentWidth = 100;
+        newItem.percentHeight = 100;
+
+        addChild(newItem);
+
+        newItem.setStyle("backgroundColor", 0xEEEEFF);
+    }
+
+    /**
+     *  @private
+     */
+    private function populateFromArray(dp:Object):void
+    {
+        if (dp is ChartBase)
+            dp = dp.legendData;
+
+        removeAllChildren();
+
+        var curItem:Object;
+		var n:int = dp.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var curList:Array /* of LegendData */ = (dp[i] as Array);
+            if (!curList)
+            {
+                curItem = dp[i];
+                addLegendItem(curItem);
+            }
+            else
+            {
+                var m:int = curList.length;
+                for (var j:int = 0; j < m; j++)
+                    {
+                    curItem = curList[j];
+                    addLegendItem(curItem);
+                }
+            }
+        }
+
+        _actualMajorAxisLength = NaN;
+    }
+
+    /**
+     *  @private
+     *  Returns a numeric value for the align setting.
+     *  0 = left/top, 0.5 = center, 1 = right/bottom
+     */
+    private function findHorizontalAlignValue():Number
+    {
+        var horizontalAlign:String = getStyle("horizontalAlign");
+
+        if (horizontalAlign == "center")
+            return 0.5;
+
+        else if (horizontalAlign == "right")
+            return 1;
+
+        // default = left
+        return 0;
+    }
+
+    /**
+     *  @private
+     *  Returns a numeric value for the align setting.
+     *  0 = left/top, 0.5 = center, 1 = right/bottom
+     */
+    private function findVerticalAlignValue():Number
+    {
+        var verticalAlign:String = getStyle("verticalAlign");
+
+        if (verticalAlign == "middle")
+            return 0.5;
+
+        else if (verticalAlign == "bottom")
+            return 1;
+
+        // default = top
+        return 0;
+    }
+
+    /**
+     *  @private
+     */
+    private function widthPadding(numChildren:Number):Number
+    {
+        var vm:EdgeMetrics = viewMetricsAndPadding;
+        var padding:Number = vm.left + vm.right;
+
+        if (numChildren > 1 && direction == "horizontal")
+            padding += getStyle("horizontalGap") * (numChildren - 1);
+
+        return padding;
+    }
+
+    /**
+     *  @private
+     */
+    private function heightPadding(numChildren:Number):Number
+    {
+        var vm:EdgeMetrics = viewMetricsAndPadding;
+        var padding:Number = vm.top + vm.bottom;
+
+        if (numChildren > 1 && direction == "vertical")
+            padding += getStyle("verticalGap") * (numChildren - 1);
+
+        return padding;
+    }
+
+    /**
+     *  @private
+     */
+    private function calcColumnWidthsForHeight(h:Number):Array /* of Number */
+    {
+        var n:Number = numChildren;
+
+        var verticalGap:Number = getStyle("verticalGap");
+        if (isNaN(verticalGap))
+            verticalGap = 0;
+
+        var rowCount:int = Math.min(n, Math.max(
+            1, Math.floor((h + verticalGap) / (cellHeight + verticalGap))));
+
+        var nColumns:int = rowCount == 0 ? 0: Math.ceil(n / rowCount);
+
+        var columnSizes:Array /* of Number */;
+        if (nColumns <= 1)
+        {
+            columnSizes = [cellWidth];
+        }
+        else
+        {
+            columnSizes = [];
+            for (var i:int = 0; i < nColumns; i++)
+            {
+                columnSizes[i] = 0;
+            }
+
+            for (i = 0; i < n; i++)
+            {
+                var child:IUIComponent = IUIComponent(getChildAt(i));
+                var col:int = Math.floor(i / rowCount);
+                columnSizes[col] = Math.max(columnSizes[col],
+                                            child.getExplicitOrMeasuredWidth());
+            }
+        }
+
+        return columnSizes;
+    }
+
+    /**
+     *  @private
+     *  Bound the layout in the vertical direction
+     *  and let it grow horizontally.
+     */
+    private function layoutVertical():void
+    {
+        var n:Number = numChildren;
+
+        var vm:EdgeMetrics = viewMetricsAndPadding;
+
+        var horizontalGap:Number = getStyle("horizontalGap");
+        var verticalGap:Number = getStyle("verticalGap");
+
+        var horizontalAlign:String = getStyle("horizontalAlign");
+        var verticalAlign:String = getStyle("verticalAlign");
+
+        var xPos:Number = vm.left;
+        var yPos:Number = vm.top;
+        var yEnd:Number = unscaledHeight - vm.bottom;
+
+        var rowCount:int = Math.min(n, Math.max(1, Math.floor(
+            (yEnd - yPos + verticalGap) / (cellHeight + verticalGap))));
+
+        var columnSizes:Array /* of Number */ = [];
+
+        columnSizes = calcColumnWidthsForHeight(yEnd - yPos);
+        var nColumns:int = columnSizes.length;
+
+        for (var i:Number = 0; i < n; i++)
+        {
+            var child:IUIComponent = IUIComponent(getChildAt(i));
+
+            var col:int = Math.floor(i / rowCount);
+            var colWidth:Number = columnSizes[col];
+
+            var childWidth:Number;
+            var childHeight:Number;
+
+            if (child.percentWidth > 0)
+            {
+                childWidth = Math.min(colWidth,
+                                      colWidth * child.percentWidth / 100);
+            }
+            else
+            {
+                childWidth = child.getExplicitOrMeasuredWidth();
+            }
+
+            if (child.percentHeight > 0)
+            {
+                childHeight = Math.min(cellHeight,
+                                       cellHeight * child.percentHeight / 100);
+            }
+            else
+            {
+                childHeight = child.getExplicitOrMeasuredHeight();
+            }
+
+            child.setActualSize(childWidth, childHeight);
+
+            //  Align the child in the cell.
+            var xOffset:Number =
+                Math.floor(calcHorizontalOffset(child.width, horizontalAlign));
+            var yOffset:Number =
+                Math.floor(calcVerticalOffset(child.height, verticalAlign));
+            child.move(xPos + xOffset, yPos + yOffset);
+
+            if ((i % rowCount) == rowCount - 1)
+            {
+                yPos = vm.top;
+                xPos += (colWidth + horizontalGap);
+            }
+            else
+            {
+                yPos += (cellHeight + verticalGap);
+            }
+        }
+
+        if (rowCount != _preferredMajorAxisLength)
+        {
+            _actualMajorAxisLength = rowCount;
+            invalidateSize();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function calcColumnWidthsForWidth(w:Number):Array /* of Number */
+    {
+        var n:Number = numChildren;
+
+        var horizontalGap:Number = getStyle("horizontalGap");
+
+        var xPos:Number = 0;
+        var xEnd:Number = w;
+
+        // first determine the max number of columns we can have;
+        var nColumns:int = 0;
+        var columnSizes:Array /* of Number */;
+
+        for (var i:Number = 0; i < n; i++)
+        {
+            var child:IUIComponent = IUIComponent(getChildAt(i));
+            var childPreferredWidth:Number = child.getExplicitOrMeasuredWidth();
+
+            // start a new row?
+            if (xPos + childPreferredWidth > xEnd)
+            {
+                break;
+            }
+            xPos += (childPreferredWidth + horizontalGap);
+
+            nColumns++;
+        }
+
+        var columnsTooWide:Boolean = true;
+
+        while (nColumns > 1 && columnsTooWide)
+        {
+            columnSizes = [];
+            for (i = 0; i < nColumns; i++)
+            {
+                columnSizes[i] = 0;
+            }
+            for (i = 0; i < n; i++)
+            {
+                var col:int = i % nColumns;
+                columnSizes[col] = Math.max(columnSizes[col],
+                    IUIComponent(getChildAt(i)).getExplicitOrMeasuredWidth());
+            }
+            xPos = 0;
+
+            for (i = 0; i < nColumns; i++)
+            {
+                if (xPos + columnSizes[i] > xEnd)
+                    break;
+                xPos += columnSizes[i] + horizontalGap;
+            }
+            if (i == nColumns)
+                columnsTooWide = false;
+            else
+                nColumns--;
+        }
+
+        if (nColumns <= 1)
+        {
+            nColumns = 1;
+            columnSizes = [cellWidth];
+        }
+
+        return columnSizes;
+    }
+
+    /**
+     *  @private
+     */
+    private function layoutHorizontal():void
+    {
+        var n:Number = numChildren;
+
+        var vm:EdgeMetrics = viewMetricsAndPadding;
+
+        var horizontalGap:Number = getStyle("horizontalGap");
+        var verticalGap:Number = getStyle("verticalGap")
+
+        var horizontalAlign:String = getStyle("horizontalAlign");
+        var verticalAlign:String = getStyle("verticalAlign");
+
+        var xPos:Number = vm.left;
+        var xEnd:Number = _unscaledWidth - vm.right;
+        var yPos:Number = vm.top;
+
+        // First determine the max number of columns we can have.
+        var nColumns:int = 0;
+        var columnSizes:Array /* of Number */;
+
+        columnSizes = calcColumnWidthsForWidth(xEnd - xPos);
+        nColumns = columnSizes.length;
+
+        for (var i:Number = 0; i < n; i++)
+        {
+            var child:IUIComponent = IUIComponent(getChildAt(i));
+
+            var col:int = i % nColumns;
+            var colWidth:Number = columnSizes[col];
+
+            var childWidth:Number;
+            var childHeight:Number;
+
+            if (child.percentWidth > 0)
+            {
+                childWidth = Math.min(colWidth,
+                                      colWidth * child.percentWidth / 100);
+            }
+            else
+            {
+                childWidth = child.getExplicitOrMeasuredWidth();
+            }
+
+            if (child.percentHeight > 0)
+            {
+                childHeight = Math.min(cellHeight,
+                                       cellHeight * child.percentHeight / 100);
+            }
+            else
+            {
+                childHeight = child.getExplicitOrMeasuredHeight();
+            }
+
+            child.setActualSize(childWidth, childHeight);
+
+            // Align the child in the cell.
+            var xOffset:Number =
+                Math.floor(calcHorizontalOffset(child.width, horizontalAlign));
+            var yOffset:Number =
+                Math.floor(calcVerticalOffset(child.height, verticalAlign));
+            child.move(xPos + xOffset, yPos + yOffset);
+
+            if (col == nColumns - 1)
+            {
+                xPos = vm.left;
+                yPos += (cellHeight + verticalGap);
+            }
+            else
+            {
+                xPos += (columnSizes[col] + horizontalGap);
+            }
+        }
+
+        if (nColumns != _preferredMajorAxisLength)
+        {
+            _actualMajorAxisLength = _unscaledWidth;
+            invalidateSize();
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function legendDataChangedHandler(event:Event = null):void
+    {
+        invalidateProperties();
+        invalidateSize();
+        _childrenDirty = true;;
+    }
+
+    /**
+     *  @private
+     */
+    private function childMouseEventHandler(event:MouseEvent):void
+    {
+        var p:DisplayObject = DisplayObject(event.target);
+
+        while (p != this && p.parent != this)
+        {
+            p = p.parent;
+        }
+
+        if (p is LegendItem)
+            dispatchEvent(new LegendMouseEvent(event.type, event, LegendItem(p)));
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 9177
Author:   jimurphy@adobe.com
Date:     2009-08-07T21:15:07.894169Z

Log Message:
-----------
Merged 3.4 revisions 8630,8660,8683,8735,8750,8753,8755,8757,8759,8764,8776,8798,8821,8824,8837,8862,8911,8946,8949,8962,8965,9026,9109,9131,9138-9139,9147 -> trunk

integrates:
player: 10.0.32.18
AIR kit: 1.5.2.8870 (20090721ap)

checkintests: pass

(btw: I'm not happy about doing this on a Friday PM!)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/air/air_version.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/BrowserManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/mac/Install Flash Player 10 UB.dmg</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/player/10/playerglobal.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLDecoder.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/flashplayer.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/libflashplayer.so.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/FlashPlayer.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/mac/Flash Player.app.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/Install Flash Player 10 Plugin.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/Install Flash Player 10 ActiveX.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanceUtils.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageAgent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/mxml/IMXMLSupport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/ISOAPDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/install_flash_player_10_linux.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLSchemaInstance.as</path>

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

--- frameworks/projects/mx/src/mx/controls/DataGrid.as
+++ frameworks/projects/mx/src/mx/controls/DataGrid.as
@@ -1329,6 +1329,13 @@
             var column:DataGridColumn = _columns[i];
             column.owner = this;
             column.colNum = i;
+            if (column.cachedHeaderRenderer)
+            {
+                var item:DisplayObject = column.cachedHeaderRenderer as DisplayObject
+                if (item.parent)
+                    item.parent.removeChild(item);
+                column.cachedHeaderRenderer = null;
+            }
         }

         updateSortIndexAndDirection();
@@ -1437,7 +1444,9 @@

     /**
      *  @private
-     *  the last editedItemPosition.  We restore editing
+     *  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:*;
@@ -1810,9 +1819,11 @@
         {
             actualContentHolder.setChildIndex(DisplayObject(itemEditorInstance),
                                       actualContentHolder.numChildren - 1);
-            var col:DataGridColumn = editedItemPosition.columnIndex < lockedColumnCount ?
-                                        visibleLockedColumns[actualColIndex] :
-                                        visibleColumns[actualColIndex];
+            var col:DataGridColumn;
+            if (lockedColumnCount && editedItemPosition.columnIndex && visibleLockedColumns[lockedColumnCount - 1].colNum)
+                col = visibleLockedColumns[actualColIndex];
+            else
+                col = visibleColumns[actualColIndex];

             var item:IListItemRenderer = actualContentHolder.listItems[actualRowIndex][actualColIndex];
             var rowData:ListRowInfo = actualContentHolder.rowInfo[actualRowIndex];
@@ -4327,13 +4338,7 @@
                 if (!itemEditorInstance || endEdit(reason))
                 {
                     // send event to create the new one
-                    var dataGridEvent:DataGridEvent =
-                        new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true);
-                        // ITEM_EDIT events are cancelable
-                    dataGridEvent.columnIndex = colIndex;
-                    dataGridEvent.dataField = _columns[colIndex].dataField;
-                    dataGridEvent.rowIndex = index;
-                    dispatchEvent(dataGridEvent);
+                    beginningEdit(colIndex, index);
                 }
             }
         }
@@ -4388,6 +4393,24 @@
             itemEditorInstance = null;
             _editedItemPosition = null;
         }
+    }
+
+    /**
+     *  @private
+     *  dispatch an ITEM_EDIT_BEGINNING event;
+     */
+    private function beginningEdit(columnIndex:int, rowIndex:int, itemRenderer:IListItemRenderer = null):void
+    {
+        var dataGridEvent:DataGridEvent =
+            new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true);
+            // ITEM_EDIT events are cancelable
+        dataGridEvent.columnIndex = columnIndex;
+        dataGridEvent.dataField = _columns[columnIndex].dataField;
+        dataGridEvent.rowIndex = rowIndex;
+        dataGridEvent.itemRenderer = itemRenderer;
+        if (!dispatchEvent(dataGridEvent))
+            lastEditedItemPosition = { columnIndex: columnIndex, rowIndex: rowIndex };
+
     }

     /**
@@ -4504,6 +4527,11 @@
             }
         }

+        item = c.cachedHeaderRenderer as DisplayObject;
+        if (item && item.parent)
+            item.parent.removeChild(item);
+        c.cachedHeaderRenderer = null;
+
         rendererChanged = true;
         invalidateDisplayList();
     }
@@ -4742,18 +4770,12 @@
             {
                 if (displayableColumns[pos.x].editable)
                 {
-                    dataGridEvent = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true);
-                    // ITEM_EDIT events are cancelable
-                    dataGridEvent.columnIndex = displayableColumns[pos.x].colNum;
-                    dataGridEvent.dataField = displayableColumns[pos.x].dataField;
-                    dataGridEvent.rowIndex = pos.y;
-                    dataGridEvent.itemRenderer = r;
-                    dispatchEvent(dataGridEvent);
+                    beginningEdit(displayableColumns[pos.x].colNum, pos.y, r);
                 }
                 else
-                    // if the item is not editable, set lastPosition to it any
+                    // if the item is not editable, set lastPosition to it anyways
                     // so future tabbing starts from there
-                    lastEditedItemPosition = { columnIndex: pos.x, rowIndex: pos.y };
+                    lastEditedItemPosition = { columnIndex: displayableColumns[pos.x].colNum, rowIndex: pos.y };
             }
         }
         else if (lastItemDown && lastItemDown != itemEditorInstance)
@@ -4764,18 +4786,12 @@
             {
                 if (displayableColumns[pos.x].editable)
                 {
-                    dataGridEvent = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true);
-                    // ITEM_EDIT events are cancelable
-                    dataGridEvent.columnIndex = displayableColumns[pos.x].colNum;
-                    dataGridEvent.dataField = displayableColumns[pos.x].dataField;
-                    dataGridEvent.rowIndex = pos.y;
-                    dataGridEvent.itemRenderer = lastItemDown;
-                    dispatchEvent(dataGridEvent);
+                    beginningEdit(displayableColumns[pos.x].colNum, pos.y, lastItemDown);
                 }
                 else
-                    // if the item is not editable, set lastPosition to it any
+                    // if the item is not editable, set lastPosition to it anyways
                     // so future tabbing starts from there
-                    lastEditedItemPosition = { columnIndex: pos.x, rowIndex: pos.y };
+                    lastEditedItemPosition = { columnIndex: displayableColumns[pos.x].colNum, rowIndex: pos.y };
             }
         }

@@ -4833,13 +4849,7 @@
                 var pos:Point = itemRendererToIndices(IListItemRenderer(target));
                 if (pos && pos.y >= 0 && editable && displayableColumns[pos.x].editable && !dontEdit)
                 {
-                    dataGridEvent = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true);
-                    // ITEM_EDIT events are cancelable
-                    dataGridEvent.columnIndex = displayableColumns[pos.x].colNum;
-                    dataGridEvent.dataField = displayableColumns[pos.x].dataField;
-                    dataGridEvent.rowIndex = pos.y;
-                    dataGridEvent.itemRenderer = IListItemRenderer(target);
-                    dispatchEvent(dataGridEvent);
+                    beginningEdit(displayableColumns[pos.x].colNum, pos.y, IListItemRenderer(target));
                 }
             }
             // trace("subcomponent got focus ignoring");
@@ -4880,12 +4890,7 @@
             if (foundOne)
             {
                 // trace("setting focus", _editedItemPosition.columnIndex, _editedItemPosition.rowIndex);
-                dataGridEvent = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true);
-                // ITEM_EDIT events are cancelable
-                dataGridEvent.columnIndex = _editedItemPosition.columnIndex;
-                dataGridEvent.dataField = _columns[_editedItemPosition.columnIndex].dataField;
-                dataGridEvent.rowIndex = _editedItemPosition.rowIndex;
-                dispatchEvent(dataGridEvent);
+                beginningEdit(_editedItemPosition.columnIndex, _editedItemPosition.rowIndex);
             }

         }
@@ -5089,13 +5094,7 @@
             rowIndex = newIndex;

         // send event to create the new one
-        var dataGridEvent:DataGridEvent =
-            new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true);
-            // ITEM_EDIT events are cancelable
-        dataGridEvent.columnIndex = columnIndex;
-        dataGridEvent.dataField = _columns[columnIndex].dataField;
-        dataGridEvent.rowIndex = rowIndex;
-        dispatchEvent(dataGridEvent);
+        beginningEdit(columnIndex, rowIndex);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 8721
Author:   aharui@adobe.com
Date:     2009-07-21T22:11:37.692397Z

Log Message:
-----------
Hopefully final implementation of IME support.

QE Notes: None
Doc Notes: new API in IIMESupport
Bugs: SDK-22267, SDK-18516
Reviewer: Gordon
API Change: Yes
Is noteworthy for integration: Yes, new API in IIMESupport
tests: checkintests mustella/gumbo/components/TextInput mustella/gumbo/components/TextArea

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IIMESupport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>

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

--- frameworks/projects/mx/src/mx/controls/TextArea.as
+++ frameworks/projects/mx/src/mx/controls/TextArea.as
@@ -990,6 +990,24 @@
     }

     //----------------------------------
+    //  enableIME
+    //----------------------------------
+
+    /**
+     *  A flag that indicates whether the IME should
+     *  be enabled when the component receives focus.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get enableIME():Boolean
+    {
+        return editable;
+    }
+
+    //----------------------------------
     //  htmlText
     //----------------------------------


fixed crash bug in CollaborationService.as

Change-Id: I1b9ed220d1c4d3fa597947574fc41419b9e24019

--- WeaveData/src/weave/services/collaboration/CollaborationService.as
+++ WeaveData/src/weave/services/collaboration/CollaborationService.as
@@ -288,6 +288,8 @@
 			if (connectedToRoom && stateLog != null)
 			{
 				var log:Array = stateLog.undoHistory;
+				if (log.length == 0)
+					return;
 				if (synchronizingIncomingDiff)
 				{
 					log.pop(); // suppress the outgoing diff that results from an incoming diff


Added in an alert box for when the user disconnects. This allows the user to re-connect or decide to disconnect completely. Typing in the Collaboration Tool after results in an error being thrown. We have to decide what should be done in this instance, as the error doesn't exactly seem appropriate.

--- WeaveData/src/weave/services/collaboration/CollaborationService.as
+++ WeaveData/src/weave/services/collaboration/CollaborationService.as
@@ -30,6 +30,7 @@
 	import com.modestmaps.extras.ui.FullScreenButton;

 	import flash.events.ErrorEvent;
+	import flash.events.Event;
 	import flash.events.EventDispatcher;
 	import flash.net.registerClassAlias;
 	import flash.text.engine.BreakOpportunity;
@@ -451,7 +452,15 @@
 		private function onTimeout(e:RoomEvent):void
 		{
 			postMessageToUser( "You've timed out from the server.\n" );
-			disconnect();
+			Alert.show( "Would you like to reconnect to the room?", "Disconnection Alert", Alert.YES | Alert.NO, null, disconnectHandler );
+		}
+
+		private function disconnectHandler( e:CloseEvent ):void
+		{
+			if( e.detail == 1 )
+				connect( this.serverIP, this.serverName, this.port, this.roomToJoin, this.username );
+			else
+				disconnect();
 		}

 		//handled whenever any user joins the same room as this


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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2011 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.skins.mobile
 {


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

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

 package mx.controls.treeClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17632
Author:   cframpto@adobe.com
Date:     2010-09-09T17:21:50.205953Z

Log Message:
-----------
CHB and DataGrid - remove unnecessay code

DataGroup - fix RTE in removeRendererAt which can happen if the renderer has already been recycled

Grid - fix interaction of generatedColumns with typicalItem and/or dataProvider changing, fix interaction of variableRowHeight and rowHeight, selection methods need to force validation before they can be done since pending dataProvider or column changes will reset the selection, update CHB when dp changes

GridDimension - add comment

QE notes:
Doc notes:
Bugs: sDK-27691, SDK-27393, SDK-27592, SDK-27590 SDK-27529
Reviewer:  Hans
Tests run: many many cyclones
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridDimensions.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ColumnHeaderBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
@@ -256,7 +256,10 @@
     //----------------------------------
     //  defaultRowHeight
     //----------------------------------
-
+
+    /**
+     *  If this changes, update the ASDoc for GridLayout/getItemRendererAt().
+     */
     private var _defaultRowHeight:Number = 26;

     /**
@@ -289,6 +292,7 @@

     /**
      *  The default width of a column.
+     *  If this changes, update the ASDoc for GridLayout/getItemRendererAt().
      */
     public var defaultColumnWidth:Number = 150;


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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 18109
Author:   dloverin@adobe.com
Date:     2010-10-08T21:29:52.633486Z

Log Message:
-----------
Another round of item editor changes, ASDoc updates, and bug fixes.

QE notes: Not ready for testing.
Doc notes: None.
Bugs:
Reviewer: Hans
Tests run: checkintests
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/IGridItemEditor.as</path>
<path kind="file" action="D">/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/projects/spark/src/spark/components/gridClasses/DataGridEditor.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/DataGridEditEvent.as" copyfrom-rev="18071" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/GridItemEditorEvent.as</path>
<path kind="file" action="M">/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="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="M">/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="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/ComboBoxGridItemEditor.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as
@@ -135,6 +135,30 @@
     public function get dataGrid():DataGrid
     {
         return DataGrid(owner);
+    }
+
+    //----------------------------------
+    //  editorUsesEnterKey
+    //----------------------------------
+
+    private var _editorUsesEnterKey:Boolean = false;
+
+    [Inspectable(category="General", defaultValue="false")]
+
+    /**
+     *  @inheritdoc
+     */
+    public function get editorUsesEnterKey():Boolean
+    {
+        return _editorUsesEnterKey;
+    }
+
+    /**
+     *  @private
+     */
+    public function set editorUsesEnterKey(value:Boolean):void
+    {
+        _editorUsesEnterKey = value;
     }

     //----------------------------------
@@ -326,6 +350,20 @@
             }
         }

+        if (typeInfo == "")
+        {
+            if (data[property] is String)
+                typeInfo = "String";
+            else if (data[property] is uint)
+                typeInfo = "uint";
+            else if (data[property] is int)
+                typeInfo = "int";
+            else if (data[property] is Number)
+                typeInfo = "Number";
+            else if (data[property] is Boolean)
+                typeInfo = "Boolean";
+        }
+
         if (typeInfo == "String")
         {
             if (!(newData is String))
@@ -343,8 +381,13 @@
         }
         else if (typeInfo == "Number")
         {
-            if (!(newData is int))
+            if (!(newData is Number))
                 newData = Number(newData);
+        }
+        else if (typeInfo == "Boolean")
+        {
+            if (!(newData is Boolean))
+                newData = Boolean(newData);
         }

         if (property && data[property] != newData)


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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 3509
Author:   jimurphy@adobe.com
Date:     2008-10-07T18:19:17.646255Z

Log Message:
-----------
Rename of flex -> mx.

For compatibility reasons it was decided that the new functionality remain integrated with the old framework, although we will continue to build two separate SWCs, one with primarily existing framework classes, and one with new Flex 4 classes. This change removes duplicate names from the Flex 4 framework to avoid class name overlapping with the old framework code.  The naming overlap consists of two major areas:  New Components, and New Effects

Modified Paths:
--------------
386 paths were modified

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
@@ -9,7 +9,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package flex.component
+package mx.components.baseClasses
 {

 import flash.events.Event;
@@ -23,9 +23,9 @@
 /**
  *  Slider
  */
-public class Slider extends TrackBase implements IFocusManagerComponent
+public class FxSlider extends FxTrackBase implements IFocusManagerComponent
 {
-    include "../core/Version.as";
+    include "../../core/Version.as";

     //--------------------------------------------------------------------------
     //
@@ -36,7 +36,7 @@
     /**
      *  Constructor.
      */
-    public function Slider():void
+    public function FxSlider():void
     {
         super();
     }


ImageGlyphPlotter now sorts records by color and size

--- WeaveUISpark/src/weave/visualization/plotters/ImageGlyphPlotter.as
+++ WeaveUISpark/src/weave/visualization/plotters/ImageGlyphPlotter.as
@@ -25,6 +25,8 @@
 	import mx.rpc.events.ResultEvent;

 	import weave.Weave;
+	import weave.api.getCallbackCollection;
+	import weave.api.newDisposableChild;
 	import weave.api.newLinkableChild;
 	import weave.api.registerLinkableChild;
 	import weave.api.reportError;
@@ -34,8 +36,12 @@
 	import weave.api.ui.IPlotter;
 	import weave.core.LinkableBoolean;
 	import weave.core.LinkableNumber;
+	import weave.core.LinkableWatcher;
 	import weave.data.AttributeColumns.AlwaysDefinedColumn;
-	import weave.data.AttributeColumns.DynamicColumn;
+	import weave.data.AttributeColumns.BinnedColumn;
+	import weave.data.AttributeColumns.ColorColumn;
+	import weave.data.AttributeColumns.DynamicColumn;
+	import weave.data.AttributeColumns.FilteredColumn;

 	/**
 	 * ImagePlotter
@@ -52,8 +58,13 @@

 		public function ImageGlyphPlotter()
 		{
+			super();
+
 			color.internalDynamicColumn.target = Weave.defaultColorColumn;
-			alpha.defaultValue.value = 1;
+			alpha.defaultValue.value = 1;
+
+			color.internalDynamicColumn.addImmediateCallback(this, handleColor, true);
+			getCallbackCollection(colorDataWatcher).addImmediateCallback(this, updateKeySources, true);
 		}

 		public const color:AlwaysDefinedColumn = newLinkableChild(this, AlwaysDefinedColumn);
@@ -74,6 +85,34 @@
 		private static var _missingImageClass:Class;
 		private static const _missingImage:BitmapData = Bitmap(new _missingImageClass()).bitmapData;

+		private const colorDataWatcher:LinkableWatcher = newDisposableChild(this, LinkableWatcher);
+
+		private function handleColor():void
+		{
+			var cc:ColorColumn = color.getInternalColumn() as ColorColumn;
+			var bc:BinnedColumn = cc ? cc.getInternalColumn() as BinnedColumn : null;
+			var fc:FilteredColumn = bc ? bc.getInternalColumn() as FilteredColumn : null;
+			var dc:DynamicColumn = fc ? fc.internalDynamicColumn : null;
+			colorDataWatcher.target = dc || fc || bc || cc;
+		}
+
+		private function updateKeySources():void
+		{
+			var columns:Array = [imageSize];
+			var sortDirections:Array = [-1];
+
+			if (colorDataWatcher.target)
+			{
+				columns.push(colorDataWatcher.target);
+				sortDirections.push(1);
+			}
+
+			columns.push(dataX, dataY);
+			sortDirections.push(1, 1);
+
+			setColumnKeySources(columns, sortDirections);
+		}
+
 		/**
 		 * Draws the graphics onto BitmapData.
 		 */


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

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

 package mx.styles
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12909
Author:   cframpto@adobe.com
Date:     2009-12-14T18:33:13.575050Z

Log Message:
-----------
Pre-FP10.1, set default tab stops in TLF.  Without this, if there is a tab and TLF is measuring width, the tab will measure as the rest of the remaining width up to 10000.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -448,19 +448,20 @@
         if (classInitialized)
             return;

-		/**
-		 *  Set the TLF hook used for localizing runtime error messages.
-		 *  TLF itself has English-only messages,
-		 *  but higher layers like Flex can provide localized versions.
-		 */
-		GlobalSettings.resourceStringFunction = TextUtil.getResourceString;
-
-        /**
-         *  Set the TLF hook used to specify the callback used for changing
-         *  the FontLookup based on SWFContext.
-         */
+        // Set the TLF hook used for localizing runtime error messages.
+        // TLF itself has English-only messages,
+        // but higher layers like Flex can provide localized versions.
+        GlobalSettings.resourceStringFunction = TextUtil.getResourceString;
+
+        // Set the TLF hook used to specify the callback used for changing
+        // the FontLookup based on SWFContext.
         GlobalSettings.resolveFontLookupFunction = TextUtil.resolveFontLookup;

+        // Pre-FP10.1, set default tab stops in TLF.  Without this, if there
+        // is a tab and TLF is measuring width, the tab will
+        // measure as the rest of the remaining width up to 10000.
+        GlobalSettings.enableDefaultTabStops = !Configuration.playerEnablesArgoFeatures;
+
         staticConfiguration =
             Configuration(TextContainerManager.defaultConfiguration).clone();
         staticConfiguration.manageEnterKey = false; // default is true