Transferred from the Adobe Open Source Subversion Repository

Revision: 13693
Author:   hmuller@adobe.com
Date:     2010-01-21T20:25:54.403160Z

Log Message:
-----------
Initial version of the mirroring layout code.  Only Spark is supported.  API revisions for this feature are very likely to follow.

QE notes:
Doc notes:
Bugs:
Reviewer: Evtim
Tests run: All Mustella tests pass
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutDirection.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/PanelSkin.mxml</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/spark/src/spark/utils/BitmapUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/components/HSlider.as
+++ frameworks/projects/spark/src/spark/components/HSlider.as
@@ -17,8 +17,12 @@
 import flash.geom.Rectangle;

 import mx.core.IDataRenderer;
+import mx.core.IVisualElement;
+import mx.core.mx_internal;

 import spark.components.supportClasses.SliderBase;
+
+use namespace mx_internal;

 //--------------------------------------
 //  Other metadata
@@ -148,7 +152,6 @@
         thumb.setLayoutBoundsPosition(Math.round(thumbPosParentX), thumb.getLayoutBoundsY());
     }

-
     /**
      *  @private
      */
@@ -158,10 +161,16 @@

         if (tipAsDisplayObject && thumb)
         {
-            var relX:Number = thumb.getLayoutBoundsX() -
-                                (tipAsDisplayObject.width - thumb.getLayoutBoundsWidth()) / 2;
+			const tipWidth:Number = tipAsDisplayObject.width;
+            var relX:Number = thumb.getLayoutBoundsX() - (tipWidth - thumb.getLayoutBoundsWidth()) / 2;
+
+			// If this component's coordinate system is RTL (x increases to the right), then
+			// getLayoutBoundsX() returns the right edge, not the left.
+			if (layoutDirection == "rtl")
+				relX += tipAsDisplayObject.width;
+
             var o:Point = new Point(relX, initialPosition.y);
-            var r:Point = thumb.parent.localToGlobal(o);
+            var r:Point = thumb.parent.localToGlobal(o);

             // Get the screen bounds
             var screenBounds:Rectangle = systemManager.getVisibleApplicationRect();


Transferred from the Adobe Open Source Subversion Repository

Revision: 4205
Author:   clucier@adobe.com
Date:     2008-12-01T19:48:53.571431Z

Log Message:
-----------
Initial baselinePosition support for our new skinnable components.
QE Notes: Please wait until Evtim completes his baseline support in our new layouts to test.
Doc Notes: None
Reviewer: Glenn, Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxNumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/HSlider.as
+++ frameworks/projects/spark/src/spark/components/HSlider.as
@@ -43,7 +43,7 @@
     {
         super();
     }
-
+
     //--------------------------------------------------------------------------
     //
     //  Overridden properties: Slider


Transferred from the Adobe Open Source Subversion Repository

Revision: 3599
Author:   smgilson@adobe.com
Date:     2008-10-13T21:16:10.875718Z

Log Message:
-----------
ASDoc updates

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxSlider.as</path>

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

--- frameworks/projects/spark/src/spark/components/VSlider.as
+++ frameworks/projects/spark/src/spark/components/VSlider.as
@@ -19,7 +19,7 @@
 import mx.components.baseClasses.FxSlider;

 /**
- *  VSlider
+ *  The FxVSlider class defines a vertical slider component.
  */
 public class FxVSlider extends FxSlider
 {
@@ -46,8 +46,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  The size of the track on an VSlider equals the height
-     *  of the track.
+     *  The size of the track, which equals the height of the track.
      */
     override protected function get trackSize():Number
         {
@@ -62,7 +61,7 @@
     }

     /**
-     *  The size of the thumb is equal to the height of the thumb.
+     *  The size of the thumb button, which equals the height of the thumb button.
      */
     override protected function calculateThumbSize():Number
     {
@@ -78,9 +77,9 @@
     //--------------------------------------------------------------------------

     /**
-     *  Position the thumb button according to the given thumbPos
-     *  parameter, relative to the current y location of the track
-     *  in the VSlider control.
+     *  Position the thumb button based on the specified thumb position,
+     *  relative to the current Y location of the track
+     *  in the control.
      *
      *  @param thumbPos A number representing the new position of
      *  the thumb button in the control.
@@ -111,14 +110,16 @@
     }

     /**
-     *  The position of the thumb on a VSlider is equal to the
-     *  track height subtracted by the y position of the thumb
-     *  (relative to the track) and the height of the thumb.
-     *  This is because we want the thumb to start at the
-     *  bottom by default.
+     *  Return the position of the thumb button on a FxVSlider component.
+     *  This value is equal to the
+     *  track height subtracted by the Y position of the thumb button
+     *  relative to the track, and subtracted by the height of the thumb button.
      *
-     *  @param localX The x position relative to the track
-     *  @param localY The y position relative to the track
+     *  @param localX The x position relative to the track.
+     *
+     *  @param localY The y position relative to the track.
+     *
+     *  @return The position of the thumb button.
      */
     override protected function pointToPosition(localX:Number,
                                                 localY:Number):Number
@@ -135,8 +136,7 @@
     }

     /**
-     *  We adjust the position to center the thumb when clicking
-     *  on the track.
+     *  @inheritDoc
      */
     override protected function pointClickToPosition(localX:Number,
                                                      localY:Number):Number


Transferred from the Adobe Open Source Subversion Repository

Revision: 5098
Author:   gauravj@adobe.com
Date:     2009-02-27T02:21:27.489350Z

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:
--------------
151 paths were modified

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

--- frameworks/projects/spark/src/spark/effects/CallAction.as
+++ frameworks/projects/spark/src/spark/effects/CallAction.as
@@ -31,6 +31,11 @@
  * with other effects.
  *
  * @see mx.effects.effectClasses.CallFunctionActionInstance
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class CallAction extends Effect
 {
@@ -46,6 +51,11 @@
      *  Constructor.
      *
      *  @param target The Object to animate with this effect.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function CallAction(target:Object = null)
     {
@@ -66,6 +76,11 @@

     /**
      * Name of the function that will be called on the target when this effect plays
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public var functionName:String;

@@ -76,6 +91,11 @@
     /**
      * Parameters that will be supplied to the function that is called
      * by this effect
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public var parameters:Array;


Add a little padding on BOSH polling; sacrifices a tiny bit of responsiveness for some safety, HOPEFULLY fixing XIFF-31. r=Daniel

--- src/org/jivesoftware/xiff/core/XMPPBOSHConnection.as
+++ src/org/jivesoftware/xiff/core/XMPPBOSHConnection.as
@@ -127,13 +127,14 @@
 			var attributes:Object = responseBody.attributes;
 			sid = attributes.sid;
 	        boshPollingInterval = attributes.polling * 1000;
-	        // if we have a polling interval of 1, we want to add an extra second for a little bit of
-	        // padding.
-	        if(boshPollingInterval <= 1000 && boshPollingInterval > 0)
-	            boshPollingInterval += 1000;

 	        wait = attributes.wait;
-	        inactivity = attributes.inactivity;
+	        inactivity = attributes.inactivity * 1000;
+	        if(inactivity - 2000 >= boshPollingInterval || (boshPollingInterval <= 1000 && boshPollingInterval > 0))
+	        {
+	        	boshPollingInterval += 1000;
+	        }
+
 	        var serverRequests:int = attributes.requests;
 	        if (serverRequests)
 	            maxConcurrentRequests = Math.min(serverRequests, maxConcurrentRequests);


Transferred from the Adobe Open Source Subversion Repository

Revision: 17997
Author:   jszeto@adobe.com
Date:     2010-10-01T23:51:16.437475Z

Log Message:
-----------
ViewMenu appearance and layout update

Changed ViewMenuItem appearance
ViewMenuItem now subclasses ButtonSkin and uses fxg files for the three states
Changed ViewMenuSkin appearance
Implemented a new brick style layout for ViewMenuLayout

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/layouts/ViewMenuLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ViewMenuItem_showsCaret.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ViewMenuItem_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ViewMenuItem_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as
@@ -2,60 +2,54 @@
 {
 import flash.display.Graphics;

+import mx.core.mx_internal;
+
+import spark.skins.mobile.assets.ViewMenuItem_down;
+import spark.skins.mobile.assets.ViewMenuItem_showsCaret;
+import spark.skins.mobile.assets.ViewMenuItem_up;
 import spark.skins.mobile.supportClasses.ButtonSkinBase;
+
+use namespace mx_internal;

 /**
  *  Default skin for ViewMenuItem. Supports a label, icon and iconPlacement and draws a background.
  */
-public class ViewMenuItemSkin extends ButtonSkinBase
+public class ViewMenuItemSkin extends ButtonSkin
 {
     public function ViewMenuItemSkin()
     {
         super();
+
+        upBorderSkin = ViewMenuItem_up;
+        downBorderSkin = ViewMenuItem_down;
+        showsCaretBorderSkin = ViewMenuItem_showsCaret;
     }

     /**
-     *  @private
-     */
-    override protected function commitCurrentState():void
+     *  Class to use for the border in the showsCaret state.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     *
+     *  @default Button_down
+     */
+    protected var showsCaretBorderSkin:Class;
+
+    override protected function getBorderClassForCurrentState():Class
     {
-        super.commitCurrentState();
-        invalidateDisplayList();
+        var borderClass:Class = super.getBorderClassForCurrentState();
+
+        if (currentState == "showsCaret")
+            borderClass = showsCaretBorderSkin;
+
+        return borderClass;
     }
-
-    /**
-     *  @private
-     */
-    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+
+    override protected function drawBackground(unscaledWidth:Number, unscaledHeight:Number):void
     {
-        super.updateDisplayList(unscaledWidth, unscaledHeight);
-
-        // Draw the background
-        graphics.clear();
-
-        // No border. The ViewMenuLayout will draw separators
-        graphics.lineStyle(0,0,0);
-
-        // TODO (jszeto) Need to figure out which styles are supported
-        var bgColor:uint = getStyle("backgroundColor");
-        var bgAlpha:Number = 1
-
-        if (currentState == "down")
-        {
-            bgColor = getStyle("selectionColor");
-        }
-        else if (currentState == "showsCaret")
-        {
-            bgColor = 0xCC6600;
-        }
-        else
-        {
-            bgAlpha = getStyle("backgroundAlpha");
-        }
-
-        graphics.beginFill(bgColor, bgAlpha);
-        graphics.drawRect(0,0,unscaledWidth, unscaledHeight);
-        graphics.endFill();
+        // Don't do anything. The fxg files contain the background
     }
 }
 }


Verification of actual localToWorld transform change before executing localToWorldChange Signal

--- src/aerys/minko/scene/controller/TransformController.as
+++ src/aerys/minko/scene/controller/TransformController.as
@@ -43,6 +43,7 @@
 		private var _numChildren			: Vector.<uint>;
 		private var _firstChildId			: Vector.<uint>;
 		private var _parentId				: Vector.<int>;
+		private var _prevLocalToWorld		: Matrix4x4;

 		public function TransformController()
 		{
@@ -61,6 +62,7 @@
 			_firstChildId = new <uint>[];
 			_idToNode = new <ISceneNode>[];
 			_parentId = new <int>[];
+			_prevLocalToWorld = new Matrix4x4();

 			targetAdded.add(targetAddedHandler);
 			targetRemoved.add(targetRemovedHandler);
@@ -80,13 +82,15 @@

 		private function updateRootLocalToWorld(nodeId : uint = 0) : void
 		{
-			var rootLocalToWorld	: Matrix4x4		= _localToWorldTransforms[nodeId];
-			var rootTransform		: Matrix4x4		= _transforms[nodeId];
-			var root				: ISceneNode	= _idToNode[nodeId];
-			var rootFlags           : uint          = _flags[nodeId];
+			var rootLocalToWorld		: Matrix4x4		= _localToWorldTransforms[nodeId];
+			var rootTransform			: Matrix4x4		= _transforms[nodeId];
+			var root					: ISceneNode	= _idToNode[nodeId];
+			var rootFlags           	: uint			= _flags[nodeId];

 			if (rootTransform._hasChanged || !(rootFlags & FLAG_INIT_LOCAL_TO_WORLD))
 			{
+				_prevLocalToWorld.copyFrom(rootLocalToWorld);
+
 				if (rootFlags & FLAG_LOCK_TRANSFORMS)
 					rootLocalToWorld.lock();

@@ -120,15 +124,15 @@

 				var localToWorldTransformChanged : Signal = root.localToWorldTransformChanged;

-				if (root.localToWorldTransformChanged.enabled)
+				if (root.localToWorldTransformChanged.enabled && !_prevLocalToWorld.compareTo(rootLocalToWorld))
 					root.localToWorldTransformChanged.execute(root, rootLocalToWorld);
 			}
 		}

 		private function updateLocalToWorld(nodeId : uint = 0) : void
 		{
-			var numNodes 	: uint 	= _transforms.length;
-			var subtreeMax  : uint  = nodeId;
+			var numNodes 				: uint			= _transforms.length;
+			var subtreeMax  			: uint			= nodeId;

 			updateRootLocalToWorld(nodeId);

@@ -152,9 +156,11 @@
 					var childFlags          : uint          = _flags[childId];
 					var childIsDirty		: Boolean		= isDirty || childTransform._hasChanged
 						|| !(childFlags & FLAG_INIT_LOCAL_TO_WORLD);
-
+
 					if (childIsDirty)
 					{
+						_prevLocalToWorld.copyFrom(childLocalToWorld);
+
 						var child	: ISceneNode	= _idToNode[childId];

 						if (childFlags & FLAG_LOCK_TRANSFORMS)
@@ -190,7 +196,7 @@

 						var localToWorldTransformChanged : Signal = child.localToWorldTransformChanged;

-						if (localToWorldTransformChanged.enabled)
+						if (localToWorldTransformChanged.enabled && !_prevLocalToWorld.compareTo(childLocalToWorld))
 							localToWorldTransformChanged.execute(child, childLocalToWorld);
 					}
 				}
@@ -204,7 +210,6 @@
 			var numNodes				: uint		= path.length;
 			var nodeId					: uint		= path[uint(numNodes - 1)];
 			var localToWorld 			: Matrix4x4	= _localToWorldTransforms[nodeId];
-			var prevChildLocalToWorld	: Matrix4x4	= new Matrix4x4();

 			updateRootLocalToWorld(nodeId);

@@ -216,7 +221,7 @@
 				var childFlags          : uint          = _flags[childId];
 				var child	            : ISceneNode	= _idToNode[childId];

-				prevChildLocalToWorld.copyFrom(childLocalToWorld);
+				_prevLocalToWorld.copyFrom(childLocalToWorld);

 				if (childFlags & FLAG_LOCK_TRANSFORMS)
 					childLocalToWorld.lock();
@@ -252,7 +257,7 @@

 				var localToWorldTransformChanged : Signal = child.localToWorldTransformChanged;

-				if (localToWorldTransformChanged.enabled && !prevChildLocalToWorld.compareTo(childLocalToWorld))
+				if (localToWorldTransformChanged.enabled && !_prevLocalToWorld.compareTo(childLocalToWorld))
 					localToWorldTransformChanged.execute(child, childLocalToWorld);

 				localToWorld = childLocalToWorld;


remove dead code

remove dead code

--- src/aerys/minko/scene/controller/TransformController.as
+++ src/aerys/minko/scene/controller/TransformController.as
@@ -115,16 +115,13 @@
             }
         }

-        private function updateLocalToWorld(nodeId : uint = 0, targetNodeId : int = -1) : void
+        private function updateLocalToWorld(nodeId : uint = 0) : void
         {
             var numNodes 	: uint 	= _transforms.length;
             var subtreeMax  : uint  = nodeId;

             updateRootLocalToWorld(nodeId);

-            if (nodeId == targetNodeId)
-                return;
-
             while (nodeId < numNodes)
             {
                 var localToWorld 	: Matrix4x4	= _localToWorldTransforms[nodeId];
@@ -185,28 +182,10 @@

                         if (localToWorldTransformChanged.enabled)
                             localToWorldTransformChanged.execute(child, childLocalToWorld);
-
-                        if (childId == targetNodeId)
-                            return;
                     }
                 }
-
-                if (targetNodeId >= 0 && nodeId && nodeId >= subtreeMax)
-                {
-                    // jump to the first brother who has children
-                    var parentId : uint = _parentId[nodeId];
-
-                    nodeId = _firstChildId[parentId];
-                    while (!_numChildren[nodeId] && nodeId < subtreeMax)
-                        ++nodeId;
-
-                    if (nodeId >= subtreeMax)
-                        return ;
-
-                    nodeId = _firstChildId[nodeId];
-                }
-                else
-                    ++nodeId;
+
+				++nodeId;
             }
         }


Drive by change: use for each loops.

Drive by change: use for each loops.

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

--- src/as/com/threerings/presents/client/ClientDObjectMgr.as
+++ src/as/com/threerings/presents/client/ClientDObjectMgr.as
@@ -248,8 +248,7 @@
         }
         // log.debug("Got object: pendReq=" + req);

-        for (var ii :int = 0; ii < req.targets.length; ii++) {
-            var target :Subscriber = (req.targets[ii] as Subscriber);
+        for each (var target :Subscriber in req.targets) {
             // log.debug("Notifying subscriber: " + target);
             // add them as a subscriber
             obj.addSubscriber(target);
@@ -271,8 +270,7 @@
             return;
         }

-        for (var ii :int = 0; ii < req.targets.length; ii++) {
-            var target :Subscriber = req.targets[ii];
+        for each (var target :Subscriber in req.targets) {
             // and let them know that the object is in
             target.requestFailed(oid, new ObjectAccessError(message));
         }


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

--- frameworks/projects/automation/src/mx/automation/delegates/controls/TileListItemRendererAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/TileListItemRendererAutomationImpl.as
@@ -0,0 +1,113 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.automation.delegates.controls
+{
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+	import mx.automation.Automation;
+	import mx.automation.delegates.core.UIComponentAutomationImpl;
+	import mx.controls.listClasses.TileListItemRenderer;
+	import mx.core.mx_internal;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  TileListItemRenderer class.
+	 *
+	 *  @see mx.controls.listClasses.TileListItemRenderer
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class TileListItemRendererAutomationImpl extends UIComponentAutomationImpl
+	{
+		include "../../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(TileListItemRenderer, TileListItemRendererAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 * @param obj TileList object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function TileListItemRendererAutomationImpl(obj:TileListItemRenderer)
+		{
+			super(obj);
+		}
+
+		/**
+		 *  @private
+		 *  storage for the owner component
+		 */
+		protected function get itemRenderer():TileListItemRenderer
+		{
+			return uiComponent as TileListItemRenderer;
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden properties
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		//----------------------------------
+		//  automationName
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function get automationName():String
+		{
+			return itemRenderer.getLabel().text || super.automationName;
+		}
+
+	}
+}


fix TriangleIterator to use IVertexStream.deleteTriangle()

--- src/aerys/minko/render/geometry/stream/iterator/TriangleIterator.as
+++ src/aerys/minko/render/geometry/stream/iterator/TriangleIterator.as
@@ -89,7 +89,7 @@
 		{
 			var index 	: uint 	= uint(name);

-			_ib.deleteTriangleByIndex(index);
+			_ib.deleteTriangle(index);

 			return true;
 		}


Added support for missing and/or duplicate column names in CSVDataSource

--- WeaveData/src/weave/data/DataSources/CSVDataSource.as
+++ WeaveData/src/weave/data/DataSources/CSVDataSource.as
@@ -106,7 +106,7 @@
 			if (url.value)
 			{
 				// when using url, we don't want to set session state of csvData
-				parsedRows = asyncParser.parseResult;
+				handleParsedRows(asyncParser.parseResult);
 			}
 			else
 			{
@@ -126,7 +126,7 @@
 				// clear url value when we specify csvData session state
 				if (url.value)
 					url.value = null;
-				this.parsedRows = rows;
+				handleParsedRows(rows);
 			}
 		}

@@ -134,6 +134,22 @@
 		 * Contains the csv data that should be used elsewhere in the code
 		 */
 		private var parsedRows:Array;
+		private var columnIds:Array;
+
+		private function handleParsedRows(rows:Array):void
+		{
+			parsedRows = rows;
+			columnIds = rows[0] ? (rows[0] as Array).concat() : [];
+			// make sure column names are unique - if not, use index values for columns with duplicate names
+			var nameLookup:Object = {};
+			for (var i:int = 0; i < columnIds.length; i++)
+			{
+				if (!columnIds[i] || nameLookup.hasOwnProperty(columnIds[i]))
+					columnIds[i] = i;
+				else
+					nameLookup[columnIds[i]] = true;
+			}
+		}

 		/**
 		 * Convenience function for setting session state of csvData.
@@ -158,8 +174,7 @@
 		}

 		/**
-		 * This will get a list of column names in the CSV data.
-		 * @return A list of column names in the CSV data.
+		 * This will get a list of column names in the data, which are taken directly from the header row and not guaranteed to be unique.
 		 */
 		public function getColumnNames():Array
 		{
@@ -167,19 +182,46 @@
 				return parsedRows[0].concat();
 			return [];
 		}
-
-		/**
-		 * This function will get a column by name.
-		 * @param csvColumnName The name of the CSV column to get.
+
+		/**
+		 * A unique list of identifiers for columns which may be a mix of Strings and Numbers, depending on the uniqueness of column names.
+		 */
+		public function getColumnIds():Array
+		{
+			return columnIds ? columnIds.concat() : [];
+		}
+
+		private function getAttrTagFromColumnId(id:Object):XML
+		{
+			if (!parsedRows)
+				return null;
+			var attr:XML = <attribute keyType={ keyType.value || DataTypes.STRING }/>;
+			if (typeof id == 'number')
+			{
+				attr['@title'] = parsedRows[0] ? parsedRows[0][id] : '';
+				attr['@csvColumnIndex'] = id;
+			}
+			else
+			{
+				attr['@title'] = id;
+				attr['@csvColumn'] = id;
+			}
+			return attr;
+		}
+
+		/**
+		 * This function will get a column by name or index.
+		 * @param columnNameOrIndex The name or index of the CSV column to get.
 		 * @return The column.
 		 */
-		public function getColumnByName(csvColumnName:String):IAttributeColumn
+		public function getColumnById(columnNameOrIndex:Object):IAttributeColumn
 		{
 			var sourceOwner:ILinkableHashMap = getLinkableOwner(this) as ILinkableHashMap;
 			if (!sourceOwner)
 				return null;
-			_reusableReference.hierarchyPath.value = <attribute title={csvColumnName} csvColumn={ csvColumnName }/>;
+
 			_reusableReference.dataSourceName.value = sourceOwner.getName(this);
+			_reusableReference.hierarchyPath.value = getAttrTagFromColumnId(columnNameOrIndex);
 			return WeaveAPI.AttributeColumnCache.getColumn(_reusableReference);
 		}

@@ -224,11 +266,11 @@

 		/**
 		 * This function will create a column in an ILinkableHashMap that references a column from this CSVDataSource.
-		 * @param csvColumnName The name of the CSV column to put in the hash map.
+		 * @param columnNameOrIndex Either a column name or zero-based column index.
 		 * @param destinationHashMap The hash map to put the column in.
 		 * @return The column that was created in the hash map.
 		 */
-		public function putColumnInHashMap(csvColumnName:String, destinationHashMap:ILinkableHashMap):IAttributeColumn
+		public function putColumnInHashMap(columnNameOrIndex:Object, destinationHashMap:ILinkableHashMap):IAttributeColumn
 		{
 			var sourceOwner:ILinkableHashMap = getLinkableOwner(this) as ILinkableHashMap;
 			if (!sourceOwner)
@@ -239,8 +281,8 @@
 			var hcr:HierarchyColumnReference =  refCol.dynamicColumnReference.requestLocalObject(HierarchyColumnReference, false);

 			getCallbackCollection(hcr).delayCallbacks();
-			hcr.hierarchyPath.value = <attribute title={csvColumnName} csvColumn={ csvColumnName }/>;
 			hcr.dataSourceName.value = sourceOwner.getName(this);
+			hcr.hierarchyPath.value = getAttrTagFromColumnId(columnNameOrIndex);
 			getCallbackCollection(hcr).resumeCallbacks();

 			getCallbackCollection(destinationHashMap).resumeCallbacks();
@@ -259,7 +301,6 @@
 			var sourceOwner:ILinkableHashMap = getLinkableOwner(this) as ILinkableHashMap;
 			if (!sourceOwner)
 				return false;
-			var columnName:String = columnNameOrIndex as String || getColumnNames()[columnNameOrIndex] as String;
 			var essi:ExternalSessionStateInterface = WeaveAPI.ExternalSessionStateInterface as ExternalSessionStateInterface;
 			var dc:DynamicColumn = dynamicColumnOrPath as DynamicColumn;
 			if (!dc)
@@ -267,7 +308,7 @@
 				essi.requestObject(dynamicColumnOrPath as Array, getQualifiedClassName(DynamicColumn));
 				dc = essi.getObject(dynamicColumnOrPath as Array) as DynamicColumn;
 			}
-			if (!columnName || !dc)
+			if (!dc)
 				return false;

 			getCallbackCollection(dc).delayCallbacks();
@@ -275,8 +316,8 @@
 			var hcr:HierarchyColumnReference =  refCol.dynamicColumnReference.requestLocalObject(HierarchyColumnReference, false);

 			getCallbackCollection(hcr).delayCallbacks();
-			hcr.hierarchyPath.value = <attribute title={columnName} csvColumn={columnName}/>;
 			hcr.dataSourceName.value = sourceOwner.getName(this);
+			hcr.hierarchyPath.value = getAttrTagFromColumnId(columnNameOrIndex);
 			getCallbackCollection(hcr).resumeCallbacks();

 			getCallbackCollection(dc).resumeCallbacks();
@@ -342,7 +383,7 @@
 				reportError('Result from servlet is not a two-dimensional Array');
 				return;
 			}
-			parsedRows = data;
+			handleParsedRows(data);
 			getCallbackCollection(this).triggerCallbacks();
 		}
 		private function handleServletError(event:FaultEvent, sessionState:Object):void
@@ -362,16 +403,9 @@
 			if (_attributeHierarchy.value == null && parsedRows)
 			{
 				// loop through column names, adding indicators to hierarchy
-				var firstRow:Array = parsedRows[0];
 				var root:XML = <hierarchy title={ WeaveAPI.globalHashMap.getName(this) }/>;
-				for each (var colName:String in firstRow)
-				{
-					var attr:XML = <attribute
-						title={ colName }
-					csvColumn={ colName }
-					keyType={ keyType.value || DataTypes.STRING }/>;
-					root.appendChild(attr);
-				}
+				for each (var id:Object in columnIds)
+					root.appendChild(getAttrTagFromColumnId(id));
 				_attributeHierarchy.value = root;
 			}
 			// recalculate all columns previously requested because CSV data may have changed.
@@ -389,19 +423,19 @@
 			{
 				for each (var tag:XML in _attributeHierarchy.value.descendants('attribute'))
 				{
-					var title:String = String(tag.@title);
+					var title:String = String(tag['@title']);
 					if (!title)
 					{
-						var name:String = String(tag.@name);
-						var year:String = String(tag.@year);
+						var name:String = String(tag['@name']);
+						var year:String = String(tag['@year']);
 						if (name && year)
 							title = name + ' (' + year + ')';
 						else if (name)
 							title = name;
 						else
-							title = String(tag.@csvColumn) || 'untitled';
+							title = String(tag['@csvColumn']) || 'untitled';

-						tag.@title = title;
+						tag['@title'] = title;
 					}
 				}
 			}
@@ -455,19 +489,37 @@
 			var leafNode:XML = HierarchyUtils.getLeafNodeFromPath(pathInHierarchy);
 			proxyColumn.setMetadata(leafNode);

-			var colName:String = proxyColumn.getMetadata("csvColumn");
-
-			// backwards compatibility
-			if (!colName)
-				colName = proxyColumn.getMetadata("name");
+			var columnId:Object = proxyColumn.getMetadata("csvColumnIndex");
+			if (columnId)
+			{
+				columnId = int(columnId);
+			}
+			else
+			{
+				columnId = proxyColumn.getMetadata("csvColumn");
+
+				// backwards compatibility
+				if (!columnId)
+					columnId = proxyColumn.getMetadata("name");
+			}
+
+			var colNames:Array = parsedRows[0] || [];
+			var colIndex:int, colName:String;
+			if (typeof columnId == 'number')
+			{
+				colIndex = int(columnId);
+				colName = colNames[columnId];
+			}
+			else
+			{
+				colIndex = colNames.indexOf(columnId);
+				colName = String(columnId);
+			}
+
 			if (!proxyColumn.getMetadata(ColumnMetadata.TITLE))
 				leafNode['@' + ColumnMetadata.TITLE] = colName;
-			if (parsedRows.length == 0)
-			{
-				throw new Error('no rows!');
-			}
-			var colIndex:int = (parsedRows[0] as Array).indexOf(colName);
-			var keyColIndex:int = (parsedRows[0] as Array).indexOf(keyColName.value); // it is ok if this is -1 because getColumnValues supports -1
+			// it is ok if keyColIndex is -1 because getColumnValues supports -1
+			var keyColIndex:int = keyColName.value ? colNames.indexOf(keyColName.value) : -1;

 			var i:int;
 			var csvDataColumn:Vector.<String> = new Vector.<String>();
@@ -587,5 +639,7 @@
 		{
 			asyncParser.parseCSV(value);
 		}
+
+		[Deprecated(replacement="getColumnById")] public function getColumnByName(name:String):IAttributeColumn { return getColumnById(name); }
 	}
 }


use _columns instead of columns to save splicing columns array

--- frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
+++ frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
@@ -1962,7 +1962,7 @@

         var o:EdgeMetrics = viewMetrics;

-        var n:int = columns.length;
+        var n:int = _columns.length;
         if (n == 0)
         {
             measuredWidth = DEFAULT_MEASURED_WIDTH;
@@ -1974,11 +1974,11 @@
         var columnMinWidths:Number = 0;
         for (var i:int = 0; i < n; i++)
         {
-            if (columns[i].visible)
-            {
-                columnWidths += columns[i].preferredWidth;
+            if (_columns[i].visible)
+            {
+                columnWidths += _columns[i].preferredWidth;
                 if (isNaN(_minColumnWidth))
-                    columnMinWidths += columns[i].minWidth;
+                    columnMinWidths += _columns[i].minWidth;
             }
         }

@@ -2244,7 +2244,7 @@
         else if (shiftKey && code == Keyboard.PAGE_DOWN)
         {
             // We don't want to exceed the max scroll value or the last column's index
-            maxPosition = Math.min(maxHorizontalScrollPosition, columns.length-1);
+            maxPosition = Math.min(maxHorizontalScrollPosition, _columns.length-1);
             newHorizontalScrollPosition = Math.min(
                 horizontalScrollPosition + (visibleColumns.length - lockedColumnCount)
                 , maxPosition);
@@ -2365,11 +2365,11 @@
     {
         var w:Number = 0;

-        var n:int = columns ? columns.length : 0;
+        var n:int = _columns ? _columns.length : 0;
         for (var i:int = 0; i < n; i++)
         {
-            if (columns[i].visible)
-                w += columns[i].width;
+            if (_columns[i].visible)
+                w += _columns[i].width;
         }

         return w;
@@ -2391,7 +2391,7 @@
         var item:IListItemRenderer;
         var c:AdvancedDataGridColumn;

-        var n:int = columns.length;
+        var n:int = _columns.length;
         var i:int;
         var j:int = 0;

@@ -2407,12 +2407,12 @@
         for (i = 0; i < n; i++)
         {
             // skip any columns that are visible
-            if (skipVisible && j < visibleColumns.length && visibleColumns[j].colNum == columns[i].colNum)
+            if (skipVisible && j < visibleColumns.length && visibleColumns[j].colNum == _columns[i].colNum)
             {
                 j++;
                 continue;
             }
-            c = columns[i];
+            c = _columns[i];

             if (!c.visible)
                 continue;
@@ -2878,10 +2878,10 @@
     protected function initializeHeaderInfo(columns:Array):Array
     {
         var newArray:Array = [];
-        var n:int = columns.length;
+        var n:int = _columns.length;
         for(var i:int = 0; i < n; i++)
         {
-            var headerInfo:AdvancedDataGridHeaderInfo = new AdvancedDataGridHeaderInfo(columns[i],null,i, 0) ;
+            var headerInfo:AdvancedDataGridHeaderInfo = new AdvancedDataGridHeaderInfo(_columns[i],null,i, 0) ;
             newArray.push(headerInfo);
         }
         return newArray;
@@ -2948,7 +2948,7 @@
      */
     mx_internal function measureHeightOfItemsUptoMaxHeight(index:int = -1, count:int = 0, maxHeight:Number = -1):Number
     {
-        if (!columns.length)
+        if (!_columns.length)
             return rowHeight * count;

         var h:Number = 0;
@@ -3014,10 +3014,10 @@
             {
                 data = (lockedCount > 0) ? collectionIterator.current : iterator.current;
                 ch = 0;
-                n = columns.length;
+                n = _columns.length;
                 for (j = 0; j < n; j++)
                 {
-                    c = columns[j];
+                    c = _columns[j];

                     if (!c.visible)
                         continue;
@@ -3085,7 +3085,7 @@
      */
     protected function calculateHeaderHeight():Number
     {
-        if (!columns.length)
+        if (!_columns.length)
             return rowHeight;

         var item:IListItemRenderer;
@@ -3104,7 +3104,7 @@
         if (headerVisible)
         {
             ch = 0;
-            n = columns.length;
+            n = _columns.length;

             if (_headerWordWrapPresent)
             {
@@ -3114,7 +3114,7 @@

             for (j = 0; j < n; j++)
             {
-                c = columns[j];
+                c = _columns[j];

                 if (!c.visible)
                     continue;
@@ -3264,10 +3264,10 @@
             {
                 data = iterator.current;
                 ch = 0;
-                n = columns.length;
+                n = _columns.length;
                 for (j = 0; j < n; j++)
                 {
-                    c = columns[j];
+                    c = _columns[j];

                     if (!c.visible)
                         continue;
@@ -3441,7 +3441,7 @@
     private function generateColumnsPendingResultHandler(data:Object, info:ListBaseSeekPending):void
     {
         // generate cols if we haven't successfully generated them
-        if (columns.length == 0)
+        if (_columns.length == 0)
             generateCols();
         seekPendingResultHandler(data, info);
     }
@@ -3489,7 +3489,7 @@
         var col:AdvancedDataGridColumn;
         var cw:Number;

-        if (columns.length == 0)
+        if (_columns.length == 0)
         {
             visibleColumns = [];
             return;
@@ -3504,10 +3504,10 @@

             if (minColumnWidthInvalid)
             {
-                n = columns.length;
+                n = _columns.length;
                 for (i = 0; i < n; i++)
                 {
-                    columns[i].minWidth = minColumnWidth;
+                    _columns[i].minWidth = minColumnWidth;
                 }
                 minColumnWidthInvalid = false;
             }
@@ -3749,22 +3749,22 @@
         // that someone can set width in AS
         if (!visibleColumns || visibleColumns.length == 0)
         {
-            columns[col].setWidth(w);
-            columns[col].preferredWidth = w;
+            _columns[col].setWidth(w);
+            _columns[col].preferredWidth = w;
             return;
         }

-        if (w < columns[col].minWidth)
-            w = columns[col].minWidth;
+        if (w < _columns[col].minWidth)
+            w = _columns[col].minWidth;

         // hScrollBar is present
         if (_horizontalScrollPolicy == ScrollPolicy.ON ||
             _horizontalScrollPolicy == ScrollPolicy.AUTO)
         {
             // adjust the column's width
-            columns[col].setWidth(w);
-            columns[col].explicitWidth = w;
-            columns[col].preferredWidth = w;
+            _columns[col].setWidth(w);
+            _columns[col].explicitWidth = w;
+            _columns[col].preferredWidth = w;
             columnsInvalid = true;
         }
         else
@@ -5591,8 +5591,8 @@
                     var lockedWidth:Number = 0;
                     if(lockedColumnCount > 0)
                     {
-                        var lastLockedInfo:AdvancedDataGridHeaderInfo = getHeaderInfo(columns[lockedColumnCount-1]);
-                        lockedWidth = lastLockedInfo.headerItem.x + columns[lockedColumnCount - 1].width;
+                        var lastLockedInfo:AdvancedDataGridHeaderInfo = getHeaderInfo(_columns[lockedColumnCount-1]);
+                        lockedWidth = lastLockedInfo.headerItem.x + _columns[lockedColumnCount - 1].width;
                     }
                     else
                         lockedWidth = 0;
@@ -6064,7 +6064,7 @@
                                     columnNumber:int,
                                     collection:ICollectionView):void
     {
-        var column:AdvancedDataGridColumn = columns[columnNumber];
+        var column:AdvancedDataGridColumn = _columns[columnNumber];

         if (!column.sortable)
             return;
@@ -6135,7 +6135,7 @@
                                     columnNumber:int,
                                     collection:ICollectionView):void
     {
-        var column:AdvancedDataGridColumn = columns[columnNumber];
+        var column:AdvancedDataGridColumn = _columns[columnNumber];

         if (!collection || !collection.sort || !collection.sort.fields
                 || !collection.sort.fields.length)
@@ -6170,7 +6170,7 @@
     {
         if (collection.sort)
         {
-            var column:AdvancedDataGridColumn = columns[columnNumber];
+            var column:AdvancedDataGridColumn = _columns[columnNumber];

             collection.sort.fields[findSortField(columnName)]["descending"]
                 = ! collection.sort.fields[findSortField(columnName)]["descending"];
@@ -6319,7 +6319,7 @@
 			var obj:Object = itemRenderer;
             if (isNaN(explicitRowHeight))
             {
-                if (iterator && columns.length > 0)
+                if (iterator && _columns.length > 0)
                 {
                     if (!measuringObjects)
                         measuringObjects = new Dictionary(false);
@@ -6336,10 +6336,10 @@
                     var item:IListItemRenderer;
                     var c:AdvancedDataGridColumn;
                     var ch:Number = 0;
-                    var n:int = columns.length;
+                    var n:int = _columns.length;
                     for (var i:int = 0; i < n; i++)
                     {
-                        c = columns[i];
+                        c = _columns[i];

                         if (!c.visible)
                             continue;
@@ -6387,7 +6387,7 @@
             if (columnIndex == -1)
                 columnIndex = visibleColumns[0].colNum;

-            selectedHeaderInfo = getHeaderInfo(columns[columnIndex]);
+            selectedHeaderInfo = getHeaderInfo(_columns[columnIndex]);
             headerIndex = columnIndex;
             selectColumnHeader(headerIndex);
         }
@@ -6683,7 +6683,7 @@
             }

             var newAbsoluteColumnIndex:int = displayToAbsoluteColumnIndex(newDisplayColumnIndex);
-            if (newAbsoluteColumnIndex < 0 || newAbsoluteColumnIndex > columns.length-1)
+            if (newAbsoluteColumnIndex < 0 || newAbsoluteColumnIndex > _columns.length-1)
                 return -1;

             if (scroll)
@@ -7005,8 +7005,8 @@
                                 var lockedWidth:Number = 0;
                                 if(lockedColumnCount > 0)
                                 {
-                                    var lastLockedInfo:AdvancedDataGridHeaderInfo = getHeaderInfo(columns[lockedColumnCount-1]);
-                                    lockedWidth = lastLockedInfo.headerItem.x + columns[lockedColumnCount - 1].width;
+                                    var lastLockedInfo:AdvancedDataGridHeaderInfo = getHeaderInfo(_columns[lockedColumnCount-1]);
+                                    lockedWidth = lastLockedInfo.headerItem.x + _columns[lockedColumnCount - 1].width;
                                 }
                                 else
                                     lockedWidth = 0;
@@ -7146,8 +7146,8 @@
                                 var lockedWidth:Number = 0;
                                 if(lockedColumnCount > 0)
                                 {
-                                    var lastLockedInfo:AdvancedDataGridHeaderInfo = getHeaderInfo(columns[lockedColumnCount-1]);
-                                    lockedWidth = lastLockedInfo.headerItem.x + columns[lockedColumnCount - 1].width;
+                                    var lastLockedInfo:AdvancedDataGridHeaderInfo = getHeaderInfo(_columns[lockedColumnCount-1]);
+                                    lockedWidth = lastLockedInfo.headerItem.x + _columns[lockedColumnCount - 1].width;
                                 }
                                 else
                                 {
@@ -7525,7 +7525,7 @@
         if (isKeyPressed && headerIndex != -1)
         {
             isKeyPressed = false;
-            selectedHeaderInfo = getHeaderInfo(columns[headerIndex]);
+            selectedHeaderInfo = getHeaderInfo(_columns[headerIndex]);
             selectColumnHeader(headerIndex);
         }
     }
@@ -7814,7 +7814,7 @@
         else if (event.charCode == Keyboard.ENTER && event.keyCode != 229)
         {
             // multiline editors can take the enter key.
-            if (columns[_editedItemPosition.columnIndex].editorUsesEnterKey)
+            if (_columns[_editedItemPosition.columnIndex].editorUsesEnterKey)
                 return;

             // Enter edits the item, moves down a row
@@ -7922,7 +7922,7 @@
             // if rendererIsEditor, don't apply the data as the data may have already changed in some way.
             // This can happen if clicking on a checkbox rendererIsEditor as the checkbox will try to change
             // its value as we try to stuff in an old value here.
-            if (!columns[event.columnIndex].rendererIsEditor)
+            if (!_columns[event.columnIndex].rendererIsEditor)
                 itemEditorInstance.data = editedItemRenderer.data;

             if (itemEditorInstance is IInvalidating)
@@ -7930,7 +7930,7 @@

             if (itemEditorInstance is IIMESupport)
                 IIMESupport(itemEditorInstance).imeMode =
-                    (columns[event.columnIndex].imeMode == null) ? _imeMode : columns[event.columnIndex].imeMode;
+                    (_columns[event.columnIndex].imeMode == null) ? _imeMode : _columns[event.columnIndex].imeMode;

             var fm:IFocusManager = focusManager;
             // trace("setting focus to item editor");
@@ -8092,12 +8092,12 @@
         var sortFields:Array;
         var sort:ISort;

-        if (!sortableColumns || !columns[columnNumber].sortable)
+        if (!sortableColumns || !_columns[columnNumber].sortable)
             return;

         //In case there is no dataField we will use the unique column uid to identify if the column is sorted
         if (columnName == null)
-            columnName = itemToUID(columns[columnNumber]);
+            columnName = itemToUID(_columns[columnNumber]);

         // If normal click for single column sort
         // or
@@ -8159,7 +8159,7 @@
         // to that column header.
         if (headerIndex != -1)
         {
-            selectedHeaderInfo = getHeaderInfo(columns[event.columnIndex]);
+            selectedHeaderInfo = getHeaderInfo(_columns[event.columnIndex]);
             headerIndex = event.columnIndex;
             selectColumnHeader(headerIndex);
         }
@@ -8208,7 +8208,7 @@
             {
                 unselectColumnHeader(headerIndex);

-                selectedHeaderInfo = getHeaderInfo(columns[newColumnIndex]);
+                selectedHeaderInfo = getHeaderInfo(_columns[newColumnIndex]);
                 headerIndex = newColumnIndex;
                 selectColumnHeader(headerIndex);
             }
@@ -8219,24 +8219,24 @@
             if (newColumnIndex != -1)
             {
                 unselectColumnHeader(headerIndex);
-                selectedHeaderInfo = getHeaderInfo(columns[newColumnIndex]);
+                selectedHeaderInfo = getHeaderInfo(_columns[newColumnIndex]);
                 headerIndex = newColumnIndex;
                 selectColumnHeader(headerIndex);
             }
         }
         else if (keyCode == Keyboard.SPACE)
         {
-            if (sortableColumns && columns[headerIndex].sortable)
+            if (sortableColumns && _columns[headerIndex].sortable)
             {
                 isKeyPressed = true;
-                selectedHeaderInfo = getHeaderInfo(columns[headerIndex]);
+                selectedHeaderInfo = getHeaderInfo(_columns[headerIndex]);
                 selectColumnHeader(headerIndex);

                 var advancedDataGridEvent:AdvancedDataGridEvent =
                     new AdvancedDataGridEvent(AdvancedDataGridEvent.SORT, false, true);

                 advancedDataGridEvent.columnIndex     = headerIndex;
-                advancedDataGridEvent.dataField       = columns[headerIndex].dataField;
+                advancedDataGridEvent.dataField       = _columns[headerIndex].dataField;
                 advancedDataGridEvent.multiColumnSort      = event.ctrlKey;
                 advancedDataGridEvent.removeColumnFromSort = event.shiftKey;


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

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


Fixes FLEX-33370.  Refactors MAX_DRAG_RATE to be a protected variable so that it is extenable by other components.

--- frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
@@ -125,6 +125,7 @@
  *    dataTipPrecision="2"
  *    maximum="10"
  *    showDataTip="true"
+ *    maxDragRate=30
  *
  *    Styles
  *    alignmentBaseline="USE_DOMINANT_BASELINE"
@@ -232,6 +233,17 @@
     //
     //--------------------------------------------------------------------------

+	/**
+	 *  Maximum number of times per second we will change the slider position
+	 *  and update the display while dragging.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
+	 */
+	protected var maxDragRate:Number = 30;
+
     /**
      *  @private
      */
@@ -288,13 +300,6 @@
      */
     private var dragPending:Boolean = false;

-    /**
-     *  @private
-     *  Maximum number of times per second we will change the slider position
-     *  and update the display while dragging.
-     */
-    private static const MAX_DRAG_RATE:Number = 30;
-
     //--------------------------------------------------------------------------
     //
     //  Overridden properties
@@ -732,7 +737,7 @@
         mostRecentMousePoint = track.globalToLocal(new Point(event.stageX, event.stageY));
         if (!dragTimer)
         {
-            dragTimer = new Timer(1000/MAX_DRAG_RATE, 0);
+            dragTimer = new Timer(1000/maxDragRate, 0);
             dragTimer.addEventListener(TimerEvent.TIMER, dragTimerHandler);
         }


fixed null pointer error

fixed null pointer error

Change-Id: I9d3e608c348cad5d5154b2827ffeb8696f9148ef

--- WeaveData/src/weave/data/DataSources/GraphMLDataSource.as
+++ WeaveData/src/weave/data/DataSources/GraphMLDataSource.as
@@ -436,7 +436,6 @@

     public function getChildren():Array
     {
-        var idx:int;
         if (children == null)
         {
             children = [];
@@ -444,11 +443,9 @@
             var columns:Array = isNodeGroup() ?
                     graph.source.nodeProperties :
                     graph.source.edgeProperties;
-
-            for (idx = columns.length - 1; idx >= 0; idx--)
-            {
-                children.push(new GraphMLColumnNode(this, columns[idx]));
-            }
+
+			for each (var id:String in columns)
+                children.push(new GraphMLColumnNode(this, id));
         }
         return children;
     }


Fix bug with camera follow stopping glitchiness.

--- src/Player.as
+++ src/Player.as
@@ -197,8 +197,8 @@
       // - Handle focus.
       if (this.updateFocus)
       {
-        this.cameraFocus.x += (this.x - this.cameraFocus.x) / this.cameraSpeed;
-        this.cameraFocus.y += (this.y - this.cameraFocus.y) / this.cameraSpeed;
+        this.cameraFocus.x += FlxU.round((this.x - this.cameraFocus.x) / this.cameraSpeed);
+        this.cameraFocus.y += FlxU.round((this.y - this.cameraFocus.y) / this.cameraSpeed);
       }
     }
     // Animations get updated after movement.


updated

updated

git-svn-id: 27326a786375daad9d33dc990c6f272e4c8f567c@1024 fda5f131-174c-0410-8613-e0905860106b

--- org.openwms/trunk/source/org.openwms.client.flex.app/src/main/flex/org/openwms/web/flex/client/view/AppBase.as
+++ org.openwms/trunk/source/org.openwms.client.flex.app/src/main/flex/org/openwms/web/flex/client/view/AppBase.as
@@ -52,6 +52,13 @@
     import org.openwms.web.flex.client.util.DisplayUtility;
     import org.openwms.web.flex.client.view.dialogs.LoginView;

+    /**
+     * An AppBase class is the main Flex Application of the CORE framework. It
+     * cares about all the essential stuff like security and Tide framework initialization
+     * and instantiates the main menu bar and the viw stack.
+     *
+     * @version $Revision$
+     */
     public class AppBase extends Application {

         [In]
@@ -93,13 +100,13 @@
         /**
          * Suppress warnings and add a constructor.
          */
-        public function AppBase() {
-        }
+        public function AppBase() { }

         /**
          * Called in pre-initialize phase of the application.
+         * Put your code here, to initialize 3rd party frameworks.
          *
-         * Put your code here, to initialize 3rd party frameworks.
+         * @param event
          */
         public function preInit(event : Event) : void {
             Spring.getInstance().initApplication();
@@ -108,7 +115,6 @@

         /**
          * Called in initialize phase of the application.
-         *
          * Put your code here, to initialize application specific structures.
          */
         public function init() : void {


hack_updateZoom_callbacks now called from setCheckedZoomDataBounds

--- WeaveUISpark/src/weave/visualization/layers/PlotManager.as
+++ WeaveUISpark/src/weave/visualization/layers/PlotManager.as
@@ -421,6 +421,11 @@
 			else
 				tempDataBounds.setCenter(dataBounds.getXCenter(), dataBounds.getYCenter());
 			zoomBounds.setDataBounds(tempDataBounds);
+
+			// ----------------- hack --------------------
+			for each (var callback:Function in hack_updateZoom_callbacks)
+				callback();
+			// -------------------------------------------

 			cc.resumeCallbacks();
 		}


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

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

 package mx.events
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXHeader.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXHeader.as
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * ADOBE CONFIDENTIAL
+ * __________________
+ *
+ *  [2002] - [2007] Adobe Systems Incorporated
+ *  All Rights Reserved.
+ *
+ * NOTICE:  All information contained herein is, and remains
+ * the property of Adobe Systems Incorporated and its suppliers,
+ * if any.  The intellectual and technical concepts contained
+ * herein are proprietary to Adobe Systems Incorporated
+ * and its suppliers and may be covered by U.S. and Foreign Patents,
+ * patents in process, and are protected by trade secret or copyright law.
+ * Dissemination of this information or reproduction of this material
+ * is strictly forbidden unless prior written permission is obtained
+ * from Adobe Systems Incorporated.
+ */
+package mx.messaging.channels.amfx
+{
+
+[ExcludeClass]
+/**
+ * An AMFX request or response packet can contain headers.
+ *
+ * A Header must have a name, can be marked with a mustUnderstand
+ * boolean flag (the default is false), and the content can be any
+ * Object.
+ * @private
+ */
+public class AMFXHeader
+{
+    public var name:String;
+    public var mustUnderstand:Boolean;
+    public var content:Object;
+
+    public function AMFXHeader()
+    {
+        super();
+    }
+}
+
+}


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

--- frameworks/projects/spark/src/spark/events/TitleWindowBoundsEvent.as
+++ frameworks/projects/spark/src/spark/events/TitleWindowBoundsEvent.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//  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
+//
+//      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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Add a leaky bucket bandwidth limiter.

Add a leaky bucket bandwidth limiter.

--- swfcat.as
+++ swfcat.as
@@ -31,6 +31,11 @@
         // Milliseconds.
         private const FACILITATOR_POLL_INTERVAL:int = 10000;

+        // Bytes per second.
+        public const RATE_LIMIT:Number = 10 * 1024;
+        // Seconds.
+        private const RATE_LIMIT_HISTORY:Number = 5.0;
+
         // Socket to facilitator.
         private var s_f:Socket;

@@ -44,6 +49,8 @@
         private var num_proxy_pairs:int = 0;
         /* Number of proxy pairs ever connected. */
         private var total_proxy_pairs:int = 0;
+
+        public var rate_limit:RateLimit;

         /* Badge with a client counter */
         [Embed(source="badge_con_counter.png")]
@@ -96,6 +103,8 @@
             /* Update the client counter on badge. */
             update_client_count();

+            rate_limit = new RateLimit(RATE_LIMIT * RATE_LIMIT_HISTORY, RATE_LIMIT_HISTORY);
+
             puts("Starting.");
             // Wait until the query string parameters are loaded.
             this.loaderInfo.addEventListener(Event.COMPLETE, loaderinfo_complete);
@@ -221,6 +230,60 @@
 import flash.events.SecurityErrorEvent;
 import flash.net.Socket;
 import flash.utils.ByteArray;
+import flash.utils.clearTimeout;
+import flash.utils.getTimer;
+import flash.utils.setTimeout;
+
+class RateLimit
+{
+    private var amount:Number;
+    private var capacity:Number;
+    private var time:Number;
+    private var last_update:uint;
+
+    public function RateLimit(capacity:Number, time:Number)
+    {
+        this.amount = 0.0;
+        /* capacity / time is the rate we are aiming for. */
+        this.capacity = capacity;
+        this.time = time;
+        this.last_update = getTimer();
+    }
+
+    private function age():void
+    {
+        var now:uint;
+        var delta:Number;
+
+        now = getTimer();
+        delta = (now - last_update) / 1000.0;
+        last_update = now;
+
+        amount -= delta * capacity / time;
+        if (amount < 0.0)
+            amount = 0.0;
+    }
+
+    public function update(n:Number):Boolean
+    {
+        age();
+        amount += n;
+
+        return amount <= capacity;
+    }
+
+    public function when():Number
+    {
+        age();
+        return (amount - capacity) / (capacity / time);
+    }
+
+    public function is_limited():Boolean
+    {
+        age();
+        return amount > capacity;
+    }
+}

 /* An instance of a client-relay connection. */
 class ProxyPair extends EventDispatcher
@@ -235,8 +298,14 @@
     // Socket to relay.
     private var s_r:Socket;

-    // Parent swfcat, for UI updates.
+    // Parent swfcat, for UI updates and rate meter.
     private var ui:swfcat;
+
+    // Pending byte read counts for relay and client sockets.
+    private var r2c_schedule:Array;
+    private var c2r_schedule:Array;
+    // Callback id.
+    private var flush_id:uint;

     public function log(msg:String):void
     {
@@ -255,6 +324,9 @@
         this.ui = ui;
         this.addr_c = addr_c;
         this.addr_r = addr_r;
+
+        this.c2r_schedule = [];
+        this.r2c_schedule = [];
     }

     public function connect():void
@@ -315,21 +387,53 @@
         s_c.connect(addr_c.host, addr_c.port);
     }

+    private function relay_to_client(e:ProgressEvent):void
+    {
+        r2c_schedule.push(e.bytesLoaded);
+        flush();
+    }
+
+    private function client_to_relay(e:ProgressEvent):void
+    {
+        c2r_schedule.push(e.bytesLoaded);
+        flush();
+    }
+
     private function client_connected(e:Event):void
     {
         log("Client: connected.");

-        s_r.addEventListener(ProgressEvent.SOCKET_DATA, function (e:ProgressEvent):void {
-            var bytes:ByteArray = new ByteArray();
-            s_r.readBytes(bytes, 0, e.bytesLoaded);
-            log("Tor: read " + bytes.length + ".");
-            s_c.writeBytes(bytes);
-        });
-        s_c.addEventListener(ProgressEvent.SOCKET_DATA, function (e:ProgressEvent):void {
-            var bytes:ByteArray = new ByteArray();
-            s_c.readBytes(bytes, 0, e.bytesLoaded);
-            log("Client: read " + bytes.length + ".");
-            s_r.writeBytes(bytes);
-        });
+        s_r.addEventListener(ProgressEvent.SOCKET_DATA, relay_to_client);
+        s_c.addEventListener(ProgressEvent.SOCKET_DATA, client_to_relay);
+    }
+
+    private function transfer_chunk(s_from:Socket, s_to:Socket, n:uint,
+        label:String):void
+    {
+        var bytes:ByteArray;
+
+        bytes = new ByteArray();
+        s_from.readBytes(bytes, 0, n);
+        s_to.writeBytes(bytes);
+        ui.rate_limit.update(n);
+        log(label + ": read " + bytes.length + ".");
+    }
+
+    /* Send as much data as the rate limit currently allows. */
+    private function flush():void
+    {
+        while (!ui.rate_limit.is_limited() &&
+               (r2c_schedule.length > 0 || c2r_schedule.length > 0)) {
+            if (r2c_schedule.length > 0)
+                transfer_chunk(s_r, s_c, r2c_schedule.shift(), "Tor");
+            if (c2r_schedule.length > 0)
+                transfer_chunk(s_c, s_r, c2r_schedule.shift(), "Client");
+        }
+        if (flush_id)
+            clearTimeout(flush_id);
+        flush_id = undefined;
+        /* Call again when safe, if necessary. */
+        if (r2c_schedule.length > 0 || c2r_schedule.length > 0)
+            flush_id = setTimeout(flush, ui.rate_limit.when() * 1000);
     }
 }


def: 2895 fix list plugin disabled

def: 2895 fix list plugin disabled

git-svn-id: 3f608e5a9a704dd448217c0a64c508e7f145cfa1@82244 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- plugins/listPlugin/src/listPluginCode.as
+++ plugins/listPlugin/src/listPluginCode.as
@@ -28,6 +28,7 @@
 		private var _itemRendererId:String;
 		public var rowHeight:Number = 80;
 		public var listDisabledAlpha:Number = 0.3;
+		public var excludeFromDisableGUI:Boolean = true;

 		/**
 		 * by fixing hard-coded styles we broke backward compatibility, so if we are using old templates we will


Transferred from the Adobe Open Source Subversion Repository

Revision: 21319
Author:   build@adobe.com
Date:     2011-06-01T17:45:41.136089Z

Log Message:
-----------
Version update to 4.5.2

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/airspark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_air/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/flex-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_spark/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark_dmv/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/rpc/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mx/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_flashflexkit/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_dmv/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/build.properties</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/modules/compiler/src/java/flex2/tools/VersionInfo.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/airframework/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/advancedgrids/src/mx/core/Version.as</path>

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

--- frameworks/projects/automation_dmv/src/mx/core/Version.as
+++ frameworks/projects/automation_dmv/src/mx/core/Version.as
@@ -15,4 +15,4 @@
  *  @private
  *  Version string for this class.
  */
-mx_internal static const VERSION:String = "4.5.1.0";
+mx_internal static const VERSION:String = "4.5.2.0";


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

--- frameworks/projects/framework/src/mx/logging/LogLogger.as
+++ frameworks/projects/framework/src/mx/logging/LogLogger.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.logging
 {


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

--- frameworks/projects/mx/src/mx/skins/halo/LinkSeparator.as
+++ frameworks/projects/mx/src/mx/skins/halo/LinkSeparator.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.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3890
Author:   rfrishbe@adobe.com
Date:     2008-10-24T22:24:17.938205Z

Log Message:
-----------
Various renames for FxComponent, mostly based on PARB recommendations.  Most were just simple name changes or removal of methods.  Because commitSkinState() no longer exists, Button had to be modified pretty extensively so that it didn't key off of that method.

QE Notes: Joann's updated the tests and excluded them pending this checkin
Doc Notes: None
Bugs: SDK-17116
Reviewer: Hans, Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxContainerBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxSpinner.as</path>

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

--- frameworks/projects/spark/src/spark/components/Spinner.as
+++ frameworks/projects/spark/src/spark/components/Spinner.as
@@ -173,7 +173,7 @@
     /**
      *  @inheritDoc
      */
-    override protected function getUpdatedSkinState():String
+    override protected function getCurrentSkinState():String
     {
         return enabled ? "normal" : "disabled";
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 6301
Author:   hmuller@adobe.com
Date:     2009-04-27T22:12:57.280351Z

Log Message:
-----------
Final (hopefully) pass at TileLayout virtualization support.  This version scans the visible (scrollRect) items and recomputes the layout configuration if need be.

QE Notes:
Doc Notes:
Bugs:
Reviewer: Evtim

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileLayout.as

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

--- frameworks/projects/spark/src/spark/layouts/TileLayout.as
+++ frameworks/projects/spark/src/spark/layouts/TileLayout.as
@@ -1187,7 +1187,41 @@
                 visibleStartX = visibleCol0 * cwg;
             }
         }
-    }
+    }
+
+    /**
+     *  @private
+     *  This method is called by updateDisplayList() after initial values for
+     *  visibleStartIndex, visibleEndIndex have been calculated.  We
+     *  re-calculateDisplayParameters() to account for the possibility that
+     *  larger cells may have been exposed.  Since tileWdth,Height can only
+     *  increase, the new visibleStart,EndIndex values will be greater than or
+     *  equal to the old ones.
+     */
+     private function updateVirtualLayout(unscaledWidth:int, unscaledHeight:int):void
+     {
+        var oldVisibleStartIndex:int = visibleStartIndex;
+        var oldVisibleEndIndex:int = visibleEndIndex;
+        calculateDisplayParameters(unscaledWidth, unscaledHeight);
+
+        // We're responsible for the laying *all* of the elements requested
+        // with getVirtualElementAt(), even if they don't fall within the final
+        // visible range.  Hide any extra ones.
+
+        var layoutTarget:GroupBase = target;
+        for(var i:int = oldVisibleStartIndex; i <= oldVisibleEndIndex; i++)
+        {
+            if (i == visibleStartIndex)
+            {
+                i = visibleEndIndex;
+                continue;
+            }
+            var el:ILayoutElement = layoutTarget.getVirtualElementAt(i);
+            if (!el)
+                continue;
+            el.setLayoutBoundsSize(0, 0);
+        }
+     }

     /**
      *  Sets the size and the position of the specified layout element and cell bounds.
@@ -1378,6 +1412,8 @@
             return;

         calculateDisplayParameters(unscaledWidth, unscaledHeight);
+        if (useVirtualLayout)
+            updateVirtualLayout(unscaledWidth, unscaledHeight);  // re-calculateDisplayParameters()

         // Upper right hand corner of first (visibleStartIndex) tile/cell
         var xPos:Number = visibleStartX;  // 0 if useVirtualLayout=false
@@ -1415,7 +1451,7 @@

         for(var index:int = visibleStartIndex; index <= visibleEndIndex; index++)
         {
-            var el:ILayoutElement = layoutTarget.getVirtualElementAt(index);
+            var el:ILayoutElement = (useVirtualLayout) ? layoutTarget.getVirtualElementAt(index) : layoutTarget.getElementAt(index);
             if (!el || !el.includeInLayout)
                 continue;


Transferred from the Adobe Open Source Subversion Repository

Revision: 7826
Author:   gosmith@adobe.com
Date:     2009-06-14T07:10:58.721317Z

Log Message:
-----------
Added a new utility class, spark.util.TextFlowUtil, for importing a TextFlow from TLF markup or exporting a TextFlow to TFL markup.

Since a TextFlow is the central object in the Text Layout Framework, the API for the Spark RichText, RichEditableText, and TextArea components will soon change to focus on representing rich content by a TextFlow rather than by markup. Markup awareness will be removed from these classes, and developers will use TextFlowUtil to do the conversions.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Carol to review

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/TextFlowUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>

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

--- frameworks/projects/spark/src/spark/utils/TextFlowUtil.as
+++ frameworks/projects/spark/src/spark/utils/TextFlowUtil.as
@@ -0,0 +1,367 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.utils
+{
+
+import flashx.textLayout.conversion.ConversionType;
+import flashx.textLayout.conversion.ITextExporter;
+import flashx.textLayout.conversion.ITextImporter;
+import flashx.textLayout.conversion.TextFilter;
+import flashx.textLayout.elements.Configuration;
+import flashx.textLayout.elements.TextFlow;
+import flashx.textLayout.formats.FormatValue;
+import flashx.textLayout.formats.ITextLayoutFormat;
+import flashx.textLayout.formats.TextLayoutFormat;
+import flashx.textLayout.tlf_internal;
+
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+use namespace tlf_internal;
+
+/**
+ *  TextFlowUtil is a utility class which provides methods
+ *  for importing a TextFlow from, and exporting a TextFlow to,
+ *  the markup language used by the Text Layout Framework.
+ */
+public class TextFlowUtil
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static const TEXT_LAYOUT_NAMESPACE:String =
+		"http://ns.adobe.com/textLayout/2008";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static var initialized:Boolean = false;
+
+	/**
+	 *  @private
+	 */
+	private static var collapsingTextLayoutImporter:ITextImporter;
+
+	/**
+	 *  @private
+	 */
+	private static var preservingTextLayoutImporter:ITextImporter;
+
+	/**
+	 *  @private
+	 */
+	private static var textLayoutExporter:ITextExporter;
+
+	/**
+	 *  @private
+	 */
+	private static var configInheritingFormats:Vector.<String>;
+
+		//--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  This method initializes the static vars of this class.
+	 *  Rather than calling it at static initialization time,
+	 *  we call it from every public method.
+	 *  (It does an immediate return if it has already run.)
+	 *  By doing so, we avoid any static initialization issues
+	 *  related to whether this class or the TLF classes
+	 *  that it uses are initialized first.
+	 */
+	private static function initClass():void
+	{
+		if (initialized)
+			return;
+
+		var format:TextLayoutFormat;
+		var config:Configuration;
+
+		// Create an importer for TEXT_LAYOUT_FORMAT
+		// that collapses whitespace.
+		format = new TextLayoutFormat();
+		format.whiteSpaceCollapse = "collapse";
+		config = new Configuration();
+		config.textFlowInitialFormat = format;
+		collapsingTextLayoutImporter = TextFilter.getImporter(
+			TextFilter.TEXT_LAYOUT_FORMAT, config);
+		collapsingTextLayoutImporter.throwOnError = true;
+
+		// Create an importer for TEXT_LAYOUT_FORMAT
+		// that preserves whitespace.
+		format = new TextLayoutFormat();
+		format.whiteSpaceCollapse = "preserve";
+		config = new Configuration();
+		config.textFlowInitialFormat = format;
+		preservingTextLayoutImporter = TextFilter.getImporter(
+			TextFilter.TEXT_LAYOUT_FORMAT, config);
+		preservingTextLayoutImporter.throwOnError = true;
+
+		// Create an exporter for TEXT_LAYOUT_FORMAT.
+		textLayoutExporter = TextFilter.getExporter(
+			TextFilter.TEXT_LAYOUT_FORMAT);
+
+		// Build a list of the formats which are marked "inherit"
+		// a Configuration's textFlowInitialFormat.
+		config = new Configuration();
+		configInheritingFormats = new Vector.<String>();
+		var initialFormat:ITextLayoutFormat = config.textFlowInitialFormat;
+		for (var p:String in TextLayoutFormat.description)
+		{
+			if (initialFormat[p] == FormatValue.INHERIT)
+				configInheritingFormats.push(p);
+		}
+
+		initialized = true;
+	}
+
+    /**
+     *  Creates a TextFlow by importing (i.e., parsing) a String
+     *  containing the markup language used by the Text Layout Framework.
+     *
+     *
An example of a markup string is
+     *

+     *  "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008'>
+     *
Hello, World!
</TextFlow>"
+     *

+     *

+     *
+     *
However, you can use terser markup such as
+     *
"Hello, World!"
.
+     *  It will get wrapped with a TextFlow tag in the proper namespace,
+     *  and span and paragraph tags will get automatically inserted
+     *  where needed to comply with the structure of a TextFlow.

+     *  If you specify the TextFlow tag yourself,
+     *  it must be in the correct XML namespace
+	 *  for runtime Text Layout Framework markup, which is
+     *  "http://ns.adobe.com/textLayout/2008".

+     *
+     *
Incorrect markup will cause this method to throw
+     *  various exceptions.
+     *  The error message will contain information
+     *  about why it could not be parsed.

+     *
+     *  @param markup The markup String to be imported.
+     *
+     *  @param whiteSpaceCollapse A String indicating whether
+     *  the whitespace in the markup should be collapsed or preserved.
+     *  The possible values are
+     *  WhiteSpaceCollapse.COLLAPSE and
+     *  WhiteSpaceCollapse.PRESERVE in the
+     *  flashx.textLayout.formats.WhiteSpaceCollapse class.
+     *  The default value is WhiteSpaceCollapse.COLLAPSE.
+     *
+     *  @return A new TextFlow instance created from the markup.
+     */
+    public static function importFromString(
+    	markup:String, whiteSpaceCollapse:String = "collapse"):TextFlow
+    {
+    	initClass();
+
+    	var markupToImport:Object = markup;
+
+        // If the markup string doesn't contain "TextFlow",
+        // it needs to be wrapped in a <TextFlow> tag
+        // in order for the TEXT_LAYOUT_FORMAT importer
+        // to be able to parse it.
+        // If it does contain "TextFlow", convert it to XML
+        // and check whether the outer tag is <TextFlow>.
+        // If so, don't wrap it and pass the XML to the importer;
+        // if not, wrap it and pass the String to the importer.
+        var wrap:Boolean = true;
+        if (markup.indexOf("TextFlow") != -1)
+        {
+            try
+            {
+                var xml:XML = XML(markup);
+                if (xml.localName() == "TextFlow")
+                {
+					markupToImport = xml;
+					wrap = false;
+                }
+            }
+            catch(e:Error)
+            {
+            }
+        }
+
+        if (wrap)
+        {
+            markupToImport =  "<TextFlow xmlns=\"" + TEXT_LAYOUT_NAMESPACE + "\">" +
+                      		  markupToImport +
+                      		  "</TextFlow>";
+        }
+
+		var importer:ITextImporter = whiteSpaceCollapse == "collapse" ?
+				   					 collapsingTextLayoutImporter :
+				   					 preservingTextLayoutImporter;
+
+		return importer.importToFlow(markupToImport);
+    }
+
+	/**
+	 *  Creates a TextFlow by importing (i.e., parsing) XML
+	 *  containing the markup language used by the Text Layout Framework.
+	 *
+	 *
An example of markup XML is
+	 *

+	 *  <TextFlow xmlns='http://ns.adobe.com/textLayout/2008'>
+	 *
Hello, World!

+	 *  </TextFlow>
+	 *

+	 *

+	 *
+     *
However, you can use terser markup such as
+     *
"Hello, World!"
.
+     *  It will get wrapped with a TextFlow tag in the proper namespace,
+     *  and span and paragraph tags will get automatically inserted
+     *  where needed to comply with the structure of a TextFlow.

+     *  If you specify the TextFlow tag yourself,
+     *  it must be in the correct XML namespace
+	 *  for runtime Text Layout Framework markup, which is
+     *  "http://ns.adobe.com/textLayout/2008".

+     *
+     *
Incorrect markup will cause this method to throw
+     *  various exceptions.
+     *  The error message will contain information
+     *  about why it could not be parsed.

+	 *
+	 *  @param markup The markup XML to be imported.
+	 *
+	 *  @param whiteSpaceCollapse A String indicating whether
+	 *  the whitespace in the markup should be collapsed or preserved.
+	 *  The possible values are
+	 *  WhiteSpaceCollapse.COLLAPSE and
+	 *  WhiteSpaceCollapse.PRESERVE in the
+	 *  flashx.textLayout.formats.WhiteSpaceCollapse class.
+	 *  The default value is WhiteSpaceCollapse.COLLAPSE.
+	 *
+	 *  @return A new TextFlow instance created from the markup.
+	 */
+	    public static function importFromXML(
+    	markup:XML, whiteSpaceCollapse:String = "collapse"):TextFlow
+    {
+    	initClass();
+
+		// If the root tag of the markup isn't a TextFlow tag,
+		// wrap the markup with one, in the proper namespace.
+		if (markup.localName() != "TextFlow")
+        {
+            // Create a root <TextFlow> element.
+            var root:XML = <TextFlow/>;
+            var ns:Namespace = new Namespace(TEXT_LAYOUT_NAMESPACE);
+            root.setNamespace(ns);
+
+            // Add the markup as a child tag.
+            root.setChildren(markup);
+
+            // The namespace of the root node is not inherited by
+            // the children so it needs to be explicitly set on
+            // every element, at every level.  If this is not done
+            // the import will fail with an "Unexpected namespace"
+            // error.
+            for each (var element:XML in root..*::*)
+            {
+               element.setNamespace(ns);
+            }
+
+            markup = root;
+        }
+
+        trace(markup);
+
+		var importer:ITextImporter = whiteSpaceCollapse == "collapse" ?
+			collapsingTextLayoutImporter :
+			preservingTextLayoutImporter;
+
+		return importer.importToFlow(markup);
+    }
+
+    /**
+     *  Exports a TextFlow into the markup language
+     *  used by the Text Layout Framework, in the form of XML.
+     *
+     *
The root tag of the exported XML will be
+     *

+     *  <TextFlow xmlns="http://ns.adobe.com/textLayout/2008" ...>
+     *

+     *

+     *
+     *  @param textFlow The TextFlow to be exported
+     *  in Text Layout Framework markup language.
+     *
+     *  @return XML containing Text Layout Framework
+     *  markup language.
+     */
+    public static function export(textFlow:TextFlow):XML
+    {
+		initClass();
+
+		// Call the exporter for TEXT_LAYOUT_FORMAT to produce
+        // XML markup which is more or less an exact match
+        // for TLF's text object model.
+        var xml:XML = textLayoutExporter.export(
+        	textFlow, ConversionType.XML_TYPE) as XML;
+
+ 		var p:String;
+
+		// The default configuration deliberately specifies "inherit"
+		// for the value of non-inheriting formats,
+		// which causes the importers to set the corresponding
+		// formats on the new TextFlow to "inherit"
+		// if they weren't specified in the markup.
+		// Without this, the TextFlow would use default values
+		// for these non-inheriting formats rather than getting
+		// them from the hostFormat determined by the CSS styles
+		// of the Flex component.
+		// But the result at export time is unexpected attributes
+		// such as verticalAlign="inherit" on the TextFlow tag
+		// which don't come from the original markup.
+		// Therefore, we remove them here.
+
+        // If the TextFlow tag has attributes for non-inheriting formats
+        // with the value "inherit", remove them.
+        var n:int = configInheritingFormats.length;
+        for (var i:int = 0; i < n; i++)
+        {
+        	p = configInheritingFormats[i];
+        	if (xml.@[p] == FormatValue.INHERIT)
+        		delete xml.@[p];
+        }
+
+        // Also remove the annoying whiteSpaceCollapse attribute
+        // which is irrelevant after the flow has been imported.
+        //delete xml.@["whiteSpaceCollapse"];
+
+        return xml;
+    }
+}
+
+}