Transferred from the Adobe Open Source Subversion Repository

Revision: 9358
Author:   dsubrama@adobe.com
Date:     2009-08-17T23:51:20.104007Z

Log Message:
-----------
More work to support FXG 2.0 in the MXML Graphics library.

1. Switch blendMode default from layer to normal. Before, we did some trickery under the covers, where even though the default blendMode was layer, we actually only set it to layer when it resulted in a rendering difference (ie: when alpha was > 0 < 1 and other overlapping cases). Now, FXG 2.0 mandates blendMode default is normal – and we don’t have to do that trickery because the FXG exporters are smarter and will set blendMode explicitly to layer when necessary. This change is for Group and all graphic primitives.

2. I’ve added new enumerations to blendMode and maskType as well as a couple of new properties as mandated by FXG 2.0. There is additional work that needs to happen there that I’ll be doing next week.

3. I’ve renamed Group’s resizeMode enumerations from ‘normal’, ‘scale’ to ‘noScale’, ‘scale’.

4. I’ve renamed BitmapImage’s resizeMode enumerations from ‘normal’, ‘scale’, ‘repeat’ to ‘noScale’, ‘scale’, ‘repeat’. The default value for BitmapImage.resizeMode went from ‘repeat’ to ‘scale’. Additionally, BitmapImage.repeat property has now been eliminated - use resizeMode="repeat".

5. I’ve deprecated BitmapFill’s ‘repeat’ property. I’ve added a ‘resizeMode’ property to BitmapFill with the same enumerations, defaults and behavior as BitmapImage. I’ve also moved BitmapImageResizeMode from spark.primitives to mx.graphics. I’ve also renamed BitmapImageResizeMode.as to BitmapResizeMode.as (a PARB-approved rename).

QE notes:  Yes! Joan and I have cycloned numerous times and QA in on-board with the changes.
Doc notes: Yes
Bugs: Several
Reviewer: Evtim/Glenn
Tests run: Pretty much the entire mustella run for Halo and Spark components
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/sparkskins/src/mx/skins/spark/StepperIncrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VScrollBarSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/primitives/examples/BitmapImageExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ScrollBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ResizeMode.as</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/airframework/src/spark/skins/spark/windowChrome/GripperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/StepperDecrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MinimizeButtonSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImageResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/RestoreButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MaximizeButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/halo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacCloseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacMinimizeButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacMaximizeButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/MaskType.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/CloseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ScrollBarDownButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/TitleBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ComboBoxSkin.mxml</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/airframework/spark-air-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/HScrollBarSkin.mxml</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/spark/src/spark/skins/spark/ButtonBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ScrollBarUpButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacTitleBarSkin.mxml</path>

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

--- frameworks/projects/framework/src/mx/graphics/BitmapFill.as
+++ frameworks/projects/framework/src/mx/graphics/BitmapFill.as
@@ -274,11 +274,10 @@
 	//  repeat
 	//----------------------------------

-	private var _repeat:Boolean = true;
-
 	[Bindable("propertyChange")]
-    [Inspectable(category="General")]
-
+	[Inspectable(category="General")]
+
+	[Deprecated(replacement="resizeMode", since="4.0")]

 	/**
 	 *  Whether the bitmap is repeated to fill the area.
@@ -295,18 +294,69 @@
 	 */
 	public function get repeat():Boolean
 	{
-		return _repeat;
+		return _resizeMode == BitmapResizeMode.REPEAT;
 	}

 	public function set repeat(value:Boolean):void
 	{
-		var oldValue:Boolean = _repeat;
+		var oldValue:Boolean = (_resizeMode == BitmapResizeMode.REPEAT);
 		if (value != oldValue)
 		{
-			_repeat = value;
+			//Setting repeat just sets resizeMode to repeat
+			resizeMode = value ? BitmapResizeMode.REPEAT : BitmapResizeMode.SCALE;
 			dispatchFillChangedEvent("repeat", oldValue, value);
 		}
 	}
+
+	//----------------------------------
+    //  resizeMode
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    protected var _resizeMode:String = BitmapResizeMode.SCALE;
+
+    [Inspectable(category="General", enumeration="noScale,repeat,scale", defaultValue="scale")]
+
+    /**
+     *  The resizeMode determines how the bitmap fills in the dimensions. If you set the value
+     *  of this property in a tag, use the string (such as "repeat"). If you set the value of
+     *  this property in ActionScript, use the constant (such as BitmapResizeMode.NOSCALE).
+     *
+     *  When set to BitmapResizeMode.NOSCALE ("noScale"), the bitmap
+     *  ends at the edge of the region.
+     *
+     *  When set to BitmapResizeMode.REPEAT ("repeat"), the bitmap
+     *  repeats to fill the region.
+     *
+     *  When set to BitmapResizeMode.SCALE ("scale"), the bitmap
+     *  stretches to fill the region.
+     *
+     *  @default BitmapResizeMode.SCALE
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get resizeMode():String
+    {
+        return _resizeMode;
+    }
+
+    /**
+     *  @private
+     */
+    public function set resizeMode(value:String):void
+    {
+    	var oldValue:String = _resizeMode;
+        if (value != _resizeMode)
+        {
+            _resizeMode = value;
+            dispatchFillChangedEvent("resizeMode", oldValue, value);
+        }
+    }

 	//----------------------------------
 	//  rotation
@@ -730,8 +780,10 @@
 		if (!source)
 			return;

-        var bd:BitmapData;
         var sourceAsBitmapData:BitmapData = source as BitmapData;
+
+        var repeatFill:Boolean = (resizeMode == BitmapResizeMode.REPEAT);
+

         if (compoundTransform)
         {
@@ -742,14 +794,19 @@
         {
             transformMatrix.identity();
             transformMatrix.translate(-transformX, -transformY);
+
+            // If resizeMode is scale and our bitmapdata width and height are > 0, scale to fill the content area
+            if (resizeMode == BitmapResizeMode.SCALE && sourceAsBitmapData.width > 0 && sourceAsBitmapData.height > 0)
+                transformMatrix.scale((bounds.width/sourceAsBitmapData.width), (bounds.height/sourceAsBitmapData.height));
+
             transformMatrix.scale(scaleX, scaleY);
             transformMatrix.rotate(rotation * RADIANS_PER_DEGREES);
             transformMatrix.translate(x + bounds.left + transformX, y + bounds.top + transformY);
         }

-        // If repeat is true or if the source bitmap size equals or exceeds the bounds,
-        // just use the source bitmap
-        if (repeat ||
+        // If repeat is true, resizeMode is repeat, or if the source bitmap size
+        // equals or exceeds the bounds, just use the source bitmap
+        if (repeatFill ||
             (MatrixUtil.isDeltaIdentity(transformMatrix) &&
              transformMatrix.tx == bounds.left &&
              transformMatrix.ty == bounds.top &&
@@ -758,10 +815,8 @@
         {
             if (nonRepeatSource)
                 nonRepeatSource.dispose();
-
-            bd = sourceAsBitmapData;
-        }
-        else
+        }
+        else if (resizeMode == BitmapResizeMode.NOSCALE)
         {
             // Regenerate the nonRepeatSource if it wasn't previously created or if the bounds
             // dimensions have changed.
@@ -798,7 +853,7 @@

                 // Draw the transformed bitmapData into a new bitmapData that is the size of the bounds
                 // This will prevent the edge pixels getting repeated to fill the empty space
-                nonRepeatSource = new BitmapData(newW, newY);
+                nonRepeatSource = new BitmapData(newW, newY, true, 0xFFFFFF);
                 nonRepeatSource.draw(sourceAsBitmapData, transformMatrix);

                 // The transform matrix has already been applied to the source, so just use identity
@@ -811,10 +866,10 @@
                 lastBoundsHeight = bounds.height;
             }

-            bd = nonRepeatSource;
-        }
-
-		target.beginBitmapFill(bd, transformMatrix, repeat, smooth);
+            sourceAsBitmapData = nonRepeatSource;
+        }
+
+		target.beginBitmapFill(sourceAsBitmapData, transformMatrix, repeatFill, smooth);
 	}

 	/**


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/framework/src/mx/styles/CSSCondition.as
+++ frameworks/projects/framework/src/mx/styles/CSSCondition.as
@@ -17,6 +17,11 @@
  *  components based on a particular property.
  *
  *  @see mx.styles.CSSConditionKind
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class CSSCondition
 {
@@ -32,6 +37,11 @@
      *  @param kind The kind of condition. For valid values see the
      *  CSSConditionKind enumeration.
      *  @param value The condition value (without CSS syntax).
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function CSSCondition(kind:uint, value:String)
     {
@@ -60,6 +70,11 @@
      *  id and pseudo.
      *
      *  @see mx.styles.CSSConditionKind
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get kind():uint
     {
@@ -94,6 +109,11 @@
     /**
      *  The value of this condition without any CSS syntax. To get a String
      *  representation that includes CSS syntax, call the toString() method.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get value():String
     {
@@ -111,6 +131,11 @@
      *
      *  @param object The component to which the condition may apply.
      *  @return true if component is a match, otherwise false.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function isMatch(object:IAdvancedStyleClient):Boolean
     {
@@ -148,6 +173,11 @@

     /**
      *  @return A String representation of this condition, including CSS syntax.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function toString():String
     {


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

--- frameworks/projects/framework/src/mx/styles/IStyleClient.as
+++ frameworks/projects/framework/src/mx/styles/IStyleClient.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
+//  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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 5119
Author:   smgilson@adobe.com
Date:     2009-03-01T15:19:39.936226Z

Log Message:
-----------
Clean up some ASDoc tags from the addition of the @productversion/@playerversion tags

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/HTTPRequestMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/NCManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/Base64Encoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/StringValidator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SchemaMarshaller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IInteractiveObjectInterface.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/framework/src/mx/core/ContainerRawChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/FaultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDL.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/SparkSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/HistoryManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/Schema.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/utils/HexEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDisplayObjectInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDisplayObjectContainerInterface.as</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/framework/src/mx/effects/effectClasses/SoundEffectInstance.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/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISpriteInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/haloclassic/src/haloclassic/HaloRectBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/Operation.as</path>

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 10651
Author:   smgilson@adobe.com
Date:     2009-09-28T18:15:02.205799Z

Log Message:
-----------
Fix typos in ASdoc comments

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

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

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

--- frameworks/projects/spark/src/mx/controls/MXFTETextInput.as
+++ frameworks/projects/spark/src/mx/controls/MXFTETextInput.as
@@ -35,7 +35,7 @@
  *  You can listen for this event and update the component
  *  when the data property changes.

  *
- *  @eventType mx.events..DATA_CHANGE
+ *  @eventType mx.events.DATA_CHANGE
  *
  *  @langversion 3.0
  *  @playerversion Flash 9
@@ -65,13 +65,13 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  Constructor.
-	 */
-	public function TLFTextInput()
-	{
-		super();
-	}
+    /**
+     *  Constructor.
+     */
+    public function TLFTextInput()
+    {
+        super();
+    }

     //--------------------------------------------------------------------------
     //
@@ -159,25 +159,25 @@
     }

-	//----------------------------------
-	//  fontContext
-	//----------------------------------
-
-	/**
-	 *  Documentation is not currently available.
-	 */
-	public function get fontContext():IFlexModuleFactory
-	{
-		return null;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set fontContext(value:IFlexModuleFactory):void
-	{
+    //----------------------------------
+    //  fontContext
+    //----------------------------------
+
+    /**
+     *  Documentation is not currently available.
+     */
+    public function get fontContext():IFlexModuleFactory
+    {
+        return null;
+    }
+
+    /**
+     *  @private
+     */
+    public function set fontContext(value:IFlexModuleFactory):void
+    {
         // not used for DefineFont4
-	}
+    }

     //----------------------------------
     //  horizontalScrollPosition
@@ -242,29 +242,29 @@
         _listData = value;
     }

-	//----------------------------------
-	//  parentDrawsFocus
-	//----------------------------------
+    //----------------------------------
+    //  parentDrawsFocus
+    //----------------------------------

     private var _parentDrawsFocus:Boolean = false;

-	/**
-	 *  Documentation is not currently available.
-	 */
-	public function get parentDrawsFocus():Boolean
-	{
-		return _parentDrawsFocus;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set parentDrawsFocus(value:Boolean):void
-	{
-	    _parentDrawsFocus = value;
-	}
-
-	//--------------------------------------------------------------------------
+    /**
+     *  Documentation is not currently available.
+     */
+    public function get parentDrawsFocus():Boolean
+    {
+        return _parentDrawsFocus;
+    }
+
+    /**
+     *  @private
+     */
+    public function set parentDrawsFocus(value:Boolean):void
+    {
+        _parentDrawsFocus = value;
+    }
+
+    //--------------------------------------------------------------------------
     //
     //  Methods
     //


Transferred from the Adobe Open Source Subversion Repository

Revision: 20149
Author:   klin@adobe.com
Date:     2011-02-04T21:39:31.000080Z

Log Message:
-----------
Add and update [Inspectable] metadata across spark components.

QE notes: No
Doc notes: No
Bugs: SDK-28942
Reviewer: Carol
Tests run: cyclone server, checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TileGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/modules/ModuleLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/mediaClasses/DynamicStreamingVideoItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -224,6 +224,8 @@
     private var typicalItemChanged:Boolean = false;
     private var typicalLayoutElement:ILayoutElement = null;

+    [Inspectable(category="Data")]
+
     /**
      *  Layouts use the preferred size of the typicalItem
      *  when fixed row or column sizes are required, but a specific
@@ -548,6 +550,8 @@
     private var dataProviderChanged:Boolean;

     [Bindable("dataProviderChanged")]
+    [Inspectable(category="Data")]
+
     /**
      *  The data provider for this DataGroup.
      *  It must be an IList.


Transferred from the Adobe Open Source Subversion Repository

Revision: 4866
Author:   hmuller@adobe.com
Date:     2009-02-05T22:14:08.037552Z

Log Message:
-----------
Bug fixes, notably support for "canceling" keyboard events that drive scrolling.  Added mouse-wheel scrolling to FxScroller.

QE Notes:
Doc Notes: None
Bugs: sdk-19027, sdk-19028, sdk-18903, sdk-18673
Reviewer: Evtim, Alex

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxRange.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.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/skins/spark/FxDefaultItemRenderer.mxml</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/DataGroup.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/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -147,6 +147,25 @@
         setTypicalLayoutElement(obj);
         super.removeChild(obj);
     }
+
+    /**
+     *  @private
+     *  Called before measure/updateDisplayList() if layout is virtual to guarantee that
+     *  the typicalLayoutElement has been defined.  If it hasn't, typicalItem is
+     *  initialized to dataProvider[0] and layout.typicalLayoutElement is set.
+     */
+    private function ensureTypicalLayoutElement():void
+    {
+        if (layout.typicalLayoutElement == null)
+        {
+            var list:IList = dataProvider;
+            if (list && (list.length > 0))
+            {
+                _typicalItem = list.getItemAt(0);
+                initializeTypicalItem();
+            }
+        }
+    }

     //----------------------------------
     //  layout
@@ -166,7 +185,14 @@
         if (oldLayout)
             oldLayout.typicalLayoutElement = null;
         if (value)
-            value.typicalLayoutElement = typicalLayoutElement;
+        {
+            // If typicalLayoutElement was specified for this DataGroup, then use
+            // it, otherwise use the layout's typicalLayoutElement, if any.
+            if (typicalLayoutElement)
+                value.typicalLayoutElement = typicalLayoutElement;
+            else
+                typicalLayoutElement = value.typicalLayoutElement;
+        }
     }

     //----------------------------------
@@ -499,20 +525,32 @@
     }

     private var itemToRenderer:Dictionary = new Dictionary(true);
-    private var virtualLayoutOffset:int = 0;
+
+    /**
+     *  @private
+     *  The first and last layout element indices requested via
+     *  getLayoutElementAt().   Used by finishVirtualLayout()
+     *  to distinguish IRs that can be recycled or discarded.
+     */
+    private var virtualLayoutStartIndex:int = -1;
+    private var virtualLayoutEndIndex:int = -1;
+
+    /**
+     *  @private
+     *  During a virtual layout, virtualLayoutUnderway is true.  This flag is used
+     *  to defeat calls to invalidateSize(), which occur when IRs are lazily validated.
+     *  See invalidateSize() and updateDisplayList().
+     */
     private var virtualLayoutUnderway:Boolean = false;
+
+    /**
+     *  @private
+     *  freeRenderers - IRs that were created by getLayoutElementAt() but
+     *  are no longer in view.   They'll be reused by getLayoutElementAt().
+     *  The list is updated by finishVirtualLayout().
+     */
     private var freeRenderers:Array = new Array();

-    /**
-     *  @private
-     *  Update virtualLayoutOffset and clear the virtualLayoutUnderway flag.
-     */
-    override public function beginVirtualLayout(startIndex:int):void
-    {
-        virtualLayoutOffset = startIndex;
-        virtualLayoutUnderway = true;
-    }
-
     /**
      *  @private
      *  Discard the ItemRenderers that aren't needed anymore, i.e. the ones
@@ -522,15 +560,15 @@
      *  not equal to the item they represent, i.e. if
      *  renderersInView[item] != item.   More about item recycling
      *  in the getLayoutElementAt() doc.
-     *
-     *  Clear the virtualLayoutUnderway flag.
-     */
-    override public function endVirtualLayout(startIndex:int, endIndex:int):void
-    {
+     */
+    private function finishVirtualLayout():void
+    {
+        var lastValidChildIndex:int = virtualLayoutEndIndex - virtualLayoutStartIndex;
+
         // At this point, insertion of new IRs has pushed all of the unneeded IRs
         // past endIndex-startIndex.  Remove or recycle them without invalidating
         // this DataGroup's size or display list.
-        for(var i:int = super.numChildren - 1; i > (endIndex - startIndex); i--)
+        for(var i:int = super.numChildren - 1; i > lastValidChildIndex; i--)
         {
             var elt:IVisualElement = IVisualElement(super.getChildAt(i));

@@ -559,17 +597,53 @@
                 super.removeChild(DisplayObject(elt));
             }
         }
-        virtualLayoutUnderway = false;
-    }
-
-    /**
-     *  @private
+    }
+
+    /**
+     *  @private
+     *  During virtual layout getLayoutElementAt() eagerly validates lazily
+     *  created (or recycled) IRs.   We don't want changes to those IRs to
+     *  invalidate the size of this UIComponent.
      */
     override public function invalidateSize():void
     {
         if (!virtualLayoutUnderway)
             super.invalidateSize();
     }
+
+
+    /**
+     *  @private
+     *  Make sure there's a typicalLayoutElement for virtual layout.
+     */
+    override protected function measure():void
+    {
+        if (layout && layout.virtualLayout)
+            ensureTypicalLayoutElement();
+        super.measure();
+    }
+
+    /**
+     *  @private
+     *  Manages the state required by virtual layout.
+     */
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        if (layout && layout.virtualLayout)
+        {
+            virtualLayoutUnderway = true;
+            virtualLayoutStartIndex = -1;
+            ensureTypicalLayoutElement();
+        }
+
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        if (virtualLayoutUnderway)
+        {
+            finishVirtualLayout();
+            virtualLayoutUnderway = false;
+        }
+    }

     /**
      *  @private
@@ -601,9 +675,13 @@

         if (virtualLayoutUnderway)
         {
+            if (virtualLayoutStartIndex == -1)
+                virtualLayoutStartIndex = index;
+            virtualLayoutEndIndex = index;
+
             var createdIR:Boolean = false;
             var recycledIR:Boolean = false;
-
+
             if (!elt)
             {
                 var recyclingOK:Boolean = (itemRendererFunction == null) && (itemRenderer != null);
@@ -624,7 +702,7 @@
                 itemToRenderer[item] = elt;  // weak reference
             }

-            addItemRendererToDisplayList(DisplayObject(elt), index - virtualLayoutOffset);
+            addItemRendererToDisplayList(DisplayObject(elt), index - virtualLayoutStartIndex);

             if ((createdIR || recycledIR) && (elt is IInvalidating))
                 IInvalidating(elt).validateNow();
@@ -777,7 +855,11 @@
             else
                 insertIndex = index;

-            super.setChildIndex(child, insertIndex);
+            // Quietly ignore invalid indices since they're typically caused
+            // by duplicate data items and Halo quietly ignore those
+            if ((insertIndex > 0) && (insertIndex < super.numChildren))
+                super.setChildIndex(child, insertIndex);
+
             return child;
         }
         else if (child.parent && child.parent is DataGroup)


Transferred from the Adobe Open Source Subversion Repository

Revision: 20357
Author:   rfrishbe@adobe.com
Date:     2011-02-17T22:17:33.718238Z

Log Message:
-----------
Fixing up some documentation: clarifying itemRendererFunction's effect on performance and cleaning up some old StyleableTextField documentation around its usage.

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

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

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -476,6 +476,12 @@
      *

      *    function myItemRendererFunction(item:Object):IFactory

      *
+     *
Currently, when using itemRendererFunction with a virtual layout
+     *  (useVirtualLayout=true), item renderer recycling
+     *  is turned off.  Because of this, using itemRendererFunction
+     *  can cause a performance degredation and is not recommended for mobile.
+     *  This may be fixed in future versions of Flex.

+     *
      *  @default null
      *
      *  @langversion 3.0


Transferred from the Adobe Open Source Subversion Repository

Revision: 3031
Author:   chaase@adobe.com
Date:     2008-08-28T21:17:21.801208Z

Log Message:
-----------
Fixed SDK-16615, SDK-16576, SDK-16631, SDK-16635, TH-1507, SDK-16622. This is another round of Animation/effect changes. Some are API improvements (such as adding proper event dispatching to Animate), most are fixes for various SDK and Thermo bugs that have been filed. Here's an explanation of the changes per file:

Animate.as: (sdk-16622)
All of the changes here are to add AnimationEvent dispatching to this class, similar to what we had in TweenEffect for TweenEvent. Note that we have a new event now, ANIMATION_REPEAT, and that ANIMATION_END only gets sent out once for each animation (instead of after each repetition, which is what the Flex3 effects did)

Animation.as: (sdk-16635)
We were noop'ing 0-duration animations. We now handle this correctly by sending out a START event, then send out UPDATE/END events with the final value

AnimateInstance.as:
These changes relate to two problems/fixes:
- Dispatching events correctly (sdk-16622)
- Handling styles correctly before effects are completely set up (sdk-16615)

MoveInstance.as: (sdk-16631)
We didn't handle the situation where the user supplied only one of left/right or one of bottom/top.

TintInstance.as: (sdk-16615)
We weren't correctly detecting that colors were not being set by the user, which messed up assumptions for transition from/to values

ColorInterpolator.as (sdk-16576)
Removed redundant line of code

Tint.as: (sdk-16615)
Fixes to support property coloring during transitions

Effect.as:
Removed trace() statements that crept in there in an earlier checkin

Reviewed by Glenn
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/TintInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Tint.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/interpolation/ColorInterpolator.as</path>

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

--- frameworks/projects/spark/src/spark/effects/AnimateColor.as
+++ frameworks/projects/spark/src/spark/effects/AnimateColor.as
@@ -13,6 +13,7 @@
 import flex.effects.effectClasses.TintInstance;

 import mx.effects.IEffectInstance;
+import mx.styles.StyleManager;

 /**
  * This effect animates a change in color over time, interpolating
@@ -20,15 +21,30 @@
  */
 public class Tint extends Animate
 {
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static var AFFECTED_PROPERTIES:Array = ["color"];
+    // Some objects have a 'color' style instead
+    private static var RELEVANT_STYLES:Array = ["color"];
+
     /**
      * The starting color
      */
-    public var colorFrom:uint;
+    public var colorFrom:uint = StyleManager.NOT_A_COLOR;

     /**
      * The ending color
      */
-    public var colorTo:uint;
+    public var colorTo:uint = StyleManager.NOT_A_COLOR;

     /**
      * The name of the color property on the target object affected
@@ -48,6 +64,22 @@
     }

     /**
+     *  @private
+     */
+    override public function getAffectedProperties():Array /* of String */
+    {
+        return AFFECTED_PROPERTIES;
+    }
+
+    /**
+     *  @private
+     */
+    override public function get relevantStyles():Array /* of String */
+    {
+        return RELEVANT_STYLES;
+    }
+
+    /**
      * @inheritDoc
      */
     override protected function initInstance(instance:IEffectInstance):void


Minor changes with whitespaces

Minor changes with whitespaces

--- activities/module-2/series-measuring/DragIt.as
+++ activities/module-2/series-measuring/DragIt.as
@@ -1,4 +1,4 @@
-package
+package
 {
 	import flash.display.MovieClip;
 	import flash.events.MouseEvent;
@@ -9,6 +9,7 @@

 		public function DragIt()
 		{
+            //trace('ENTER DragIt#DragIt');
 			this.buttonMode = true;
 			if (m_dragEnable)
 			{
@@ -41,13 +42,13 @@
 			}
 		}

-		private function drag(event:MouseEvent):void
+		public function drag(event:MouseEvent):void
 		{
 			this.startDrag();
 			//this.removeEventListener(MouseEvent.MOUSE_DOWN, drag);
 		}

-		private function drop(event:MouseEvent):void
+		public function drop(event:MouseEvent):void
 		{
 			this.stopDrag();
 			//this.removeEventListener(MouseEvent.MOUSE_UP, drop);


Now checking if a branch has children before click-to-expand happens.

Change-Id: I732406b5da8818feef7d2bd66d6d0187a4ea2972

--- WeaveUI/src/weave/ui/CustomTree.as
+++ WeaveUI/src/weave/ui/CustomTree.as
@@ -363,7 +363,9 @@
 		{
 			var item:* = event.itemRenderer ? event.itemRenderer.data : null;
 			// only expand if this item was not selected prior to mouseDown
-			if (item && item != _preMouseDownSelectedItem && dataDescriptor.isBranch(item, iterator.view))
+			if (item && item != _preMouseDownSelectedItem
+				&& dataDescriptor.isBranch(item, iterator.view)
+				&& dataDescriptor.hasChildren(item, iterator.view))
 				expandItem(item, true);
 		}
 		private function handleDoubleClickExpand(event:ListEvent):void


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

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 15855
Author:   klin@adobe.com
Date:     2010-04-30T20:37:13.071924Z

Log Message:
-----------
Initial ConstraintLayout and FormItemLayout checkin.

-I had to modify LayoutElementHelper to correctly parse column/row based constraints. parseConstraintExp now takes an Object. It returns only a number if there's no column/row based constraints and an array of [boundary, constraint].
-ConstraintLayout currently supports left, right, top, bottom for single spanning elements.
-FormItemLayout extends from ConstraintLayout now.
-Modified manifest so you can use ConstraintColumn and ConstraintRow in the spark namespace.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/layouts/FormItemLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/flex4_5/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
+++ frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
@@ -0,0 +1,1188 @@
+package spark.layouts
+{
+import flash.geom.Point;
+import flash.utils.Dictionary;
+
+import mx.containers.errors.ConstraintError;
+import mx.containers.utilityClasses.ConstraintColumn;
+import mx.containers.utilityClasses.ConstraintRow;
+import mx.core.ILayoutElement;
+import mx.core.mx_internal;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+
+import spark.components.supportClasses.GroupBase;
+import spark.layouts.supportClasses.LayoutBase;
+import spark.layouts.supportClasses.LayoutElementHelper;
+
+use namespace mx_internal;
+
+public class ConstraintLayout extends LayoutBase
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *
+     *  @return true if the constraints determine the element's width;
+     */
+    private static function constraintsDetermineWidth(elementInfo:ElementConstraintInfo):Boolean
+    {
+        return !isNaN(elementInfo.left) && !isNaN(elementInfo.right);
+    }
+
+    private static function constraintsDetermineHeight(elementInfo:ElementConstraintInfo):Boolean
+    {
+        return !isNaN(elementInfo.top) && !isNaN(elementInfo.bottom);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    public function ConstraintLayout()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    // for throwing errors
+    private var resourceManager:IResourceManager =
+        ResourceManager.getInstance();
+
+    // Arrays that keep track of children spanning
+    // content size columns or rows or whether the elements don't
+    // use columns or rows at all
+    private var colSpanElements:Vector.<ElementConstraintInfo> = null;
+    private var rowSpanElements:Vector.<ElementConstraintInfo> = null;
+    private var otherElements:Vector.<ElementConstraintInfo> = null;
+
+    private var constraintCache:Dictionary = new Dictionary(true);
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  constraintColumns
+    //----------------------------------
+
+    private var _constraintColumns:Vector.<ConstraintColumn> = new Vector.<ConstraintColumn>(0, true);
+
+    public function get constraintColumns():Vector.<ConstraintColumn>
+    {
+        // make defensive copy
+        return Vector.<ConstraintColumn>(_constraintColumns);
+    }
+
+    public function set constraintColumns(value:Vector.<ConstraintColumn>):void
+    {
+        // clear constraintColumns
+        if (value == null)
+        {
+            _constraintColumns = new Vector.<ConstraintColumn>(0, true);
+            return;
+        }
+
+        var n:int = value.length;
+        var temp:Vector.<ConstraintColumn> = new Vector.<ConstraintColumn>(n, true);
+        for (var i:int = 0; i < n; i++)
+        {
+            value[i].container = this.target;
+            temp[i] = value[i];
+        }
+
+        _constraintColumns = temp;
+
+        if (target)
+        {
+            target.invalidateSize();
+            target.invalidateDisplayList();
+        }
+    }
+
+    //----------------------------------
+    //  constraintRows
+    //----------------------------------
+
+    private var _constraintRows:Vector.<ConstraintRow> = new Vector.<ConstraintRow>(0, true);
+
+    public function get constraintRows():Vector.<ConstraintRow>
+    {
+        return Vector.<ConstraintRow>(_constraintRows);
+    }
+
+    public function set constraintRows(value:Vector.<ConstraintRow>):void
+    {
+        // clear constraintRows
+        if (value == null)
+        {
+            _constraintRows = new Vector.<ConstraintRow>(0, true);
+            return;
+        }
+
+        var n:int = value.length;
+        var temp:Vector.<ConstraintRow> = new Vector.<ConstraintRow>(n, true);
+        for (var i:int = 0; i < n; i++)
+        {
+            value[i].container = this.target;
+            temp[i] = value[i];
+        }
+
+        _constraintRows = temp;
+
+        if (target)
+        {
+            target.invalidateSize();
+            target.invalidateDisplayList();
+        }
+    }
+
+    /**
+     *  @private
+     *
+     *  resets the columns'/rows' targets.
+     */
+    override public function set target(value:GroupBase):void
+    {
+        super.target = value;
+
+        // setting a new target means we need to reset the targets of
+        // our columns and rows
+        var i:int;
+        var n:int = _constraintColumns.length;
+
+        for (i = 0; i < n; i++)
+        {
+            _constraintColumns[i].container = this.target;
+        }
+
+        n = _constraintRows.length;
+        for (i = 0; i < n; i++)
+        {
+            _constraintRows[i].container = this.target
+        }
+    }
+
+    mx_internal function checkUseVirtualLayout():void
+    {
+        if (useVirtualLayout)
+            throw new Error(ResourceManager.getInstance().getString("layout", "basicLayoutNotVirtualized"));
+    }
+
+    /**
+     *  @private
+     *
+     *  1) Parse each element constraint and populate the constraintCache
+     *  2) Measure the columns and rows based on only the elements that use them
+     *     and get the sum of the column widths and row heights.
+     *  3) Measure the size of this container based on elements that don't use
+     *     either columns or rows or both.
+     *  4) Take the max of 2 and 3 to find the measuredWidth.
+     */
+    override public function measure():void
+    {
+        checkUseVirtualLayout();
+        super.measure();
+
+        var layoutTarget:GroupBase = target;
+        if (!layoutTarget)
+            return;
+
+        parseConstraints();
+
+        var width:Number = measureAndPositionColumns();
+        var height:Number = measureAndPositionRows();
+
+        if (otherElements)
+        {
+            var p:Point = measureOtherContent();
+
+            width = Math.max(width, p.x);
+            height = Math.max(height, p.y);
+        }
+
+        layoutTarget.measuredWidth = Math.ceil(width);
+        layoutTarget.measuredHeight = Math.ceil(height);
+
+        // FIXME (klin): measuredMinWidth/Height?
+
+        colSpanElements = null;
+        rowSpanElements = null;
+        otherElements = null;
+        constraintCache = null;
+    }
+
+    /**
+     *  @private
+     *
+     *  1) Reparse element constraints because they may have changed.
+     *  2) Resize the columns and rows based on this information
+     *  3) Size and position the elements based on the available space.
+     */
+    override public function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        checkUseVirtualLayout();
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        var layoutTarget:GroupBase = target;
+        if (!layoutTarget)
+            return;
+
+        // Need to measure in case of explicit width and height on target.
+        // Also need to reparse constraints in case of something changing.
+        measureAndPositionColumnsAndRows();
+
+        layoutContent(unscaledWidth, unscaledHeight);
+    }
+
+    /**
+     *  Lays out the elements of the layoutTarget using the current
+     *  widths and heights of the columns and rows. Used by FormItemLayout
+     *  to set new column widths and then lay elements using those new widths.
+     */
+    protected function layoutContent(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        var layoutTarget:GroupBase = target;
+        if (!layoutTarget)
+            return;
+
+        var count:int = layoutTarget.numElements;
+        var layoutElement:ILayoutElement;
+
+        var maxX:Number = 0;
+        var maxY:Number = 0;
+
+        // update children
+        for (var i:int = 0; i < count; i++)
+        {
+            layoutElement = layoutTarget.getElementAt(i);
+            if (!layoutElement || !layoutElement.includeInLayout)
+                continue;
+
+            applyConstraintsToElement(unscaledWidth, unscaledHeight, layoutElement);
+
+            // update content limits
+            maxX = Math.max(maxX, layoutElement.getLayoutBoundsX() + layoutElement.getLayoutBoundsWidth());
+            maxY = Math.max(maxY, layoutElement.getLayoutBoundsY() + layoutElement.getLayoutBoundsHeight());
+        }
+
+        // Make sure that if the content spans partially over a pixel to the right/bottom,
+        // the content size includes the whole pixel.
+        layoutTarget.setContentSize(Math.ceil(maxX), Math.ceil(maxY));
+
+        // clear out cache
+        colSpanElements = null;
+        rowSpanElements = null;
+        otherElements = null;
+        constraintCache = null;
+    }
+
+    /**
+     *  Used by FormItemLayout to measure and set new column widths
+     *  before laying out the elements.
+     */
+    protected function measureAndPositionColumnsAndRows():void
+    {
+        parseConstraints();
+        measureAndPositionColumns();
+        measureAndPositionRows();
+    }
+
+    /**
+     *  wrapper for parsing all the element constraints
+     */
+    private function parseConstraints():void
+    {
+        var layoutTarget:GroupBase = target;
+        if (!layoutTarget)
+            return;
+
+        var count:Number = layoutTarget.numElements;
+        var layoutElement:ILayoutElement;
+
+        constraintCache = new Dictionary(true);
+
+        for (var i:int = 0; i < count; i++)
+        {
+            layoutElement = layoutTarget.getElementAt(i);
+            if (!layoutElement || !layoutElement.includeInLayout)
+                continue;
+
+            parseElementConstraints(layoutElement);
+        }
+    }
+
+    /**
+     *  @private
+     *  This function parses the constraints of a single element, creates an
+     *  ElementConstraintInfo object for the element, and throws errors if the
+     *  columns or rows are not found.
+     */
+    private function parseElementConstraints(layoutElement:ILayoutElement):void
+    {
+        // parse constraint values
+        //Variables to track the offsets
+        var left:Number;
+        var right:Number;
+        var top:Number;
+        var bottom:Number;
+
+        //Variables to track the boundaries from which
+        //the offsets are calculated from. If null, the
+        //boundary is the parent container edge.
+        var leftBoundary:String;
+        var rightBoundary:String;
+        var topBoundary:String;
+        var bottomBoundary:String;
+
+        var message:String;
+
+        var temp:Array;
+        temp = LayoutElementHelper.parseConstraintExp(layoutElement.left);
+        if (!temp)
+            left = NaN;
+        else if (temp.length == 1)
+            left = Number(temp[0]);
+        else
+        {
+            leftBoundary = temp[0];
+            left = temp[1];
+        }
+
+        temp = LayoutElementHelper.parseConstraintExp(layoutElement.right);
+        if (!temp)
+            right = NaN;
+        else if (temp.length == 1)
+            right = Number(temp[0]);
+        else
+        {
+            rightBoundary = temp[0];
+            right = temp[1];
+        }
+
+        temp = LayoutElementHelper.parseConstraintExp(layoutElement.top);
+        if (!temp)
+            top = NaN;
+        else if (temp.length == 1)
+            top = Number(temp[0]);
+        else
+        {
+            topBoundary = temp[0];
+            top = temp[1];
+        }
+
+        temp = LayoutElementHelper.parseConstraintExp(layoutElement.bottom);
+        if (!temp)
+            bottom = NaN;
+        else if (temp.length == 1)
+            bottom = Number(temp[0]);
+        else
+        {
+            bottomBoundary = temp[0];
+            bottom = temp[1];
+        }
+
+        // save values into a Dictionary based on element name.
+        var elementInfo:ElementConstraintInfo = new ElementConstraintInfo(layoutElement, left, right, top, bottom,
+            leftBoundary, rightBoundary,
+            topBoundary, bottomBoundary);
+        constraintCache[layoutElement] = elementInfo;
+
+        // put into either column/row buckets or no column/row constraints buckets.
+        var i:Number;
+        if (!(leftBoundary || rightBoundary) || !(topBoundary || bottomBoundary))
+        {
+            if (!otherElements)
+                otherElements = new Vector.<ElementConstraintInfo>();
+
+            otherElements.push(elementInfo);
+        }
+
+        if (leftBoundary || rightBoundary)
+        {
+            var numColumns:Number = _constraintColumns.length;
+            var colid:String;
+
+            if (!colSpanElements)
+                colSpanElements = new Vector.<ElementConstraintInfo>();
+
+            colSpanElements.push(elementInfo);
+
+            if (leftBoundary)
+            {
+                for (i = 0; i < numColumns; i++)
+                {
+                    colid = _constraintColumns[i].id;
+
+                    if (leftBoundary == colid)
+                    {
+                        elementInfo.colSpanLeftIndex = i;
+                        break;
+                    }
+                }
+
+                // throw error if no match.
+                if (elementInfo.colSpanLeftIndex < 0)
+                {
+                    message = resourceManager.getString(
+                        "containers", "columnNotFound", [ leftBoundary ]);
+                    throw new ConstraintError(message);
+                }
+            }
+
+
+            // can we assume rightIndex >= leftIndex?
+            if (rightBoundary)
+            {
+                for (i = 0; i < numColumns; i++)
+                {
+                    colid = _constraintColumns[i].id;
+
+                    if (rightBoundary == colid)
+                    {
+                        elementInfo.colSpanRightIndex = i;
+                        break;
+                    }
+                }
+
+                // throw error if no match.
+                if (elementInfo.colSpanRightIndex < 0)
+                {
+                    message = resourceManager.getString(
+                        "containers", "columnNotFound", [ rightBoundary ]);
+                    throw new ConstraintError(message);
+                }
+            }
+        }
+
+        if (topBoundary || bottomBoundary)
+        {
+            var numRows:Number = _constraintRows.length;
+            var rowid:String;
+
+            if (!rowSpanElements)
+                rowSpanElements = new Vector.<ElementConstraintInfo>();
+
+            rowSpanElements.push(elementInfo);
+
+            if (topBoundary)
+            {
+                for (i = 0; i < numRows; i++)
+                {
+                    rowid = _constraintRows[i].id;
+
+                    if (topBoundary == rowid)
+                    {
+                        elementInfo.rowSpanTopIndex = i;
+                        break;
+                    }
+                }
+
+                // throw error if no match.
+                if (elementInfo.rowSpanTopIndex < 0)
+                {
+                    message = resourceManager.getString(
+                        "containers", "columnNotFound", [ topBoundary ]);
+                    throw new ConstraintError(message);
+                }
+            }
+
+            if (bottomBoundary)
+            {
+                for (i = 0; i < numRows; i++)
+                {
+                    rowid = _constraintRows[i].id;
+
+                    if (bottomBoundary == rowid)
+                    {
+                        elementInfo.rowSpanBottomIndex = i;
+                        break;
+                    }
+                }
+
+                // throw error if no match.
+                if (elementInfo.rowSpanBottomIndex < 0)
+                {
+                    message = resourceManager.getString(
+                        "containers", "columnNotFound", [ bottomBoundary ]);
+                    throw new ConstraintError(message);
+                }
+            }
+        }
+    }
+
+    /**
+     *  @private
+     *  This function measures the ConstraintColumns and
+     *  and ConstraintRows partitioning the target and
+     *  sets their x/y positions.
+     *
+     *  The algorithm works like this (in the horizontal
+     *  direction):
+     *  1. Fixed columns honor their pixel values.
+     *
+     *  2. Content sized columns whose children span
+     *  only that column assume the width of the widest child.
+     *
+     *  3. (not implemented) Those Content sized columns that span multiple
+     *  columns do the following:
+     *    a. Sort the children by order of how many columns they
+     *    are spanning.
+     *    b. For children spanning a single column, make each
+     *    column as wide as the preferred size of the child.
+     *    c. For subsequent children, divide the remainder space
+     *    equally between shared columns.
+     *
+     *  4. (not implemented) Remaining space is shared between the percentage size
+     *  columns.
+     *
+     *  5. x positions are set based on the column widths
+     *
+     *  6. Sum the column widths to get the total measured width of the target.
+     *
+     *  @return measuredWidth of the columns.
+     */
+    private function measureAndPositionColumns():Number
+    {
+        if (_constraintColumns.length <= 0)
+            return 0;
+
+        var measuredWidth:Number = 0;
+        var i:Number;
+        var numCols:Number = _constraintColumns.length;
+        var col:ConstraintColumn;
+        var hasContentSize:Boolean = false;
+
+        // Reset content size columns to 0.
+        for (i = 0; i < numCols; i++)
+        {
+            col = _constraintColumns[i];
+            if (col.contentSize)
+            {
+                hasContentSize = true;
+
+                if (!isNaN(col.minWidth))
+                    col.setActualWidth(Math.ceil(Math.max(col.minWidth, 0)));
+                else
+                    col.setActualWidth(0);
+            }
+        }
+
+        // Assumption: elements in colSpanElements have one or more constraints touching a column.
+        // This is enforced in parseElementConstraints().
+        if (colSpanElements && hasContentSize)
+        {
+            var numColSpanElements:Number = colSpanElements.length;
+
+            // Measure content size columns only single span for now.
+            // If multiple span, do nothing yet.
+            for (i = 0; i < numColSpanElements; i++)
+            {
+                var elementInfo:ElementConstraintInfo = colSpanElements[i];
+                var layoutElement:ILayoutElement = elementInfo.layoutElement;
+                var leftIndex:int = -1;
+                var rightIndex:int = -1;
+                var span:int;
+
+                var extX:Number = 0;
+                var preferredWidth:Number = layoutElement.getPreferredBoundsWidth();
+                var maxExtent:Number;
+
+                var j:int;
+                var colWidth:Number = 0;
+
+                // Determine how much space the element needs to satisfy its
+                // constraints and be at its preferred width.
+                if (!isNaN(elementInfo.left))
+                {
+                    extX += elementInfo.left;
+                    if (elementInfo.leftBoundary)
+                        leftIndex = elementInfo.colSpanLeftIndex;
+                    else
+                        leftIndex = 0; // constrained to parent
+                }
+
+                if (!isNaN(elementInfo.right))
+                {
+                    extX += elementInfo.right;
+                    if (elementInfo.rightBoundary)
+                        rightIndex = elementInfo.colSpanRightIndex;
+                    else
+                        rightIndex = numCols - 1; // constrained to parent
+                }
+
+                maxExtent = extX + preferredWidth;
+
+                // if there is no left or no right constraint, there must be
+                // a corresponding column constraint on the other side. We
+                // calculate the last column that this element touches to
+                // find the other column that the element spans to.
+                if (leftIndex < 0)
+                {
+                    leftIndex = 0; // defaults to first column
+
+                    // subtract fixed rows
+                    for (j = rightIndex; j >= 0; j--)
+                    {
+                        col = _constraintColumns[j];
+                        if (col.contentSize)
+                        {
+                            leftIndex = j;
+                            break;
+                        }
+                        else if (!isNaN(col.explicitWidth))
+                        {
+                            maxExtent -= col.width;
+                            if (maxExtent < 0)
+                            {
+                                leftIndex = j;
+                                break;
+                            }
+                        }
+                    }
+                }
+                else if (rightIndex < 0)
+                {
+                    rightIndex = numCols - 1; // defaults to last column
+
+                    // subtract fixed rows
+                    for (j = leftIndex; j < numCols; j++)
+                    {
+                        col = _constraintColumns[j];
+                        if (col.contentSize)
+                        {
+                            rightIndex = j;
+                            break;
+                        }
+                        else if (!isNaN(col.explicitWidth))
+                        {
+                            maxExtent -= col.width;
+                            if (maxExtent < 0)
+                            {
+                                rightIndex = j;
+                                break;
+                            }
+                        }
+                    }
+                }
+
+                // always 0 or positive.
+                span = rightIndex - leftIndex;
+                //trace(span);
+
+                // span of 0 means the element spans one column
+                if (span == 0)
+                {
+                    col = _constraintColumns[leftIndex];
+
+                    // only measure with when dealing with content size
+                    if (col.contentSize)
+                    {
+                        colWidth = Math.max(col.width, extX + preferredWidth);
+
+                        if (constraintsDetermineWidth(elementInfo))
+                            colWidth = Math.max(colWidth, extX + layoutElement.getMinBoundsWidth());
+
+                        col.setActualWidth(Math.ceil(colWidth));
+                    }
+                }
+                else
+                {
+                    // multiple spanning stuff.
+                }
+            }
+        }
+
+        // Position columns and add up widths.
+        for (i = 0; i < numCols; i++)
+        {
+            col = _constraintColumns[i];
+            col.x = measuredWidth;
+            measuredWidth += col.width;
+        }
+
+        return measuredWidth;
+    }
+
+    /**
+     *  @private
+     *  synonymous to measureAndPositionColumns(), but with added baseline constraint.
+     */
+    private function measureAndPositionRows():Number
+    {
+        if (_constraintRows.length <= 0)
+            return 0;
+
+        var measuredHeight:Number = 0;
+        var i:Number;
+        var numRows:Number = _constraintRows.length;
+        var row:ConstraintRow;
+        var hasContentSize:Boolean = false;
+
+        // Reset content size rows to 0.
+        for (i = 0; i < numRows; i++)
+        {
+            row = _constraintRows[i];
+            if (row.contentSize)
+            {
+                hasContentSize = true;
+
+                if (!isNaN(row.minHeight))
+                    row.setActualHeight(Math.ceil(Math.max(row.minHeight, 0)));
+                else
+                    row.setActualHeight(0);
+            }
+        }
+
+        // Assumption: elements in rowSpanElements have one or more constraints touching a row.
+        // This is enforced in parseElementConstraints().
+        if (rowSpanElements && hasContentSize)
+        {
+            var numRowSpanElements:Number = rowSpanElements.length;
+
+            // Measure content size rows only single span for now.
+            // If multiple span, do nothing yet.
+            for (i = 0; i < numRowSpanElements; i++)
+            {
+                var elementInfo:ElementConstraintInfo = rowSpanElements[i];
+                var layoutElement:ILayoutElement = elementInfo.layoutElement;
+                var topIndex:int = -1;
+                var bottomIndex:int = -1;
+                var span:int;
+
+                var extY:Number = 0;
+                var preferredHeight:Number = layoutElement.getPreferredBoundsHeight();
+                var maxExtent:Number;
+
+                var j:int;
+                var rowHeight:Number = 0;
+
+                // Determine how much space the element needs to satisfy its
+                // constraints and be at its preferred height.
+                if (!isNaN(elementInfo.top))
+                {
+                    extY += elementInfo.top;
+                    if (elementInfo.topBoundary)
+                        topIndex = elementInfo.rowSpanTopIndex;
+                    else
+                        topIndex = 0; // constrained to parent
+                }
+
+                if (!isNaN(elementInfo.bottom))
+                {
+                    extY += elementInfo.bottom;
+                    if (elementInfo.bottomBoundary)
+                        bottomIndex = elementInfo.rowSpanBottomIndex;
+                    else
+                        bottomIndex = numRows - 1; // constrained to parent
+                }
+
+                maxExtent = extY + preferredHeight;
+
+                // if there is no top or no bottom constraint, there must be
+                // a corresponding row constraint on the other side. We
+                // calculate the last row that this element touches to
+                // find the real span of the element.
+                if (topIndex < 0)
+                {
+                    topIndex = 0; // defaults to first row
+
+                    // subtract fixed rows
+                    for (j = bottomIndex; j >= 0; j--)
+                    {
+                        row = _constraintRows[j];
+                        if (row.contentSize)
+                        {
+                            topIndex = j;
+                            break;
+                        }
+                        else if (!isNaN(row.explicitHeight))
+                        {
+                            maxExtent -= row.height;
+                            if (maxExtent < 0)
+                            {
+                                topIndex = j;
+                                break;
+                            }
+                        }
+                    }
+                }
+                else if (bottomIndex < 0)
+                {
+                    bottomIndex = numRows - 1; // defaults to last row
+
+                    // subtract fixed rows
+                    for (j = topIndex; j < numRows; j++)
+                    {
+                        row = _constraintRows[j];
+                        if (row.contentSize)
+                        {
+                            bottomIndex = j;
+                            break;
+                        }
+                        else if (!isNaN(row.explicitHeight))
+                        {
+                            maxExtent -= row.height;
+                            if (maxExtent < 0)
+                            {
+                                bottomIndex = j;
+                                break;
+                            }
+                        }
+                    }
+                }
+
+                // always 0 or positive.
+                span = bottomIndex - topIndex;
+                //trace(span);
+
+                // span of 0 means the element spans one row
+                if (span == 0)
+                {
+                    row = _constraintRows[topIndex];
+
+                    // only measure with when dealing with content size
+                    if (row.contentSize)
+                    {
+                        rowHeight = Math.max(row.height, extY + preferredHeight);
+
+                        if (constraintsDetermineHeight(elementInfo))
+                            rowHeight = Math.max(rowHeight, extY + layoutElement.getMinBoundsHeight());
+
+                        row.setActualHeight(Math.ceil(rowHeight));
+                    }
+                }
+                else
+                {
+                    // multiple spanning stuff.
+                }
+            }
+        }
+
+        // Position rows and add up heights.
+        for (i = 0; i < numRows; i++)
+        {
+            row = _constraintRows[i];
+            row.y = measuredHeight;
+            measuredHeight += row.height;
+        }
+
+        return measuredHeight;
+    }
+
+    /**
+     *  Measures the size of target based on content not included in the columns and rows.
+     *  Basically, applies BasicLayout to other content to determine measured size.
+     */
+    private function measureOtherContent():Point
+    {
+        var width:Number = 0;
+        var height:Number = 0;
+        var minWidth:Number = 0;
+        var minHeight:Number = 0;
+        var count:int = otherElements.length;
+
+        for (var i:int = 0; i < count; i++)
+        {
+            var elementInfo:ElementConstraintInfo = otherElements[i];
+            var layoutElement:ILayoutElement = elementInfo.layoutElement;
+
+            // Only measure if not constrained to columns
+            if (!(elementInfo.leftBoundary || elementInfo.rightBoundary))
+            {
+                var left:Number      = elementInfo.left;
+                var right:Number     = elementInfo.right;
+                var extX:Number;
+
+                if (!isNaN(left) && !isNaN(right))
+                {
+                    // If both left & right are set, then the extents is always
+                    // left + right so that the element is resized to its preferred
+                    // size (if it's the one that pushes out the default size of the container).
+                    extX = left + right;
+                }
+                else if (!isNaN(left) || !isNaN(right))
+                {
+                    extX = isNaN(left) ? 0 : left;
+                    extX += isNaN(right) ? 0 : right;
+                }
+                else
+                {
+                    extX = layoutElement.getBoundsXAtSize(NaN, NaN);
+                }
+
+                var preferredWidth:Number = layoutElement.getPreferredBoundsWidth();
+                width = Math.max(width, extX + preferredWidth);
+
+                // Find the minimum default extents, we take the minimum height only
+                // when the element size is determined by the parent size
+                var elementMinWidth:Number =
+                    constraintsDetermineWidth(elementInfo) ? layoutElement.getMinBoundsWidth() :
+                    preferredWidth;
+                minWidth = Math.max(minWidth, extX + elementMinWidth);
+            }
+
+            // only measure if not constrained to rows.
+            if (!(elementInfo.topBoundary || elementInfo.bottomBoundary))
+            {
+                var top:Number       = elementInfo.top;
+                var bottom:Number    = elementInfo.bottom;
+                var extY:Number;
+
+                if (!isNaN(top) && !isNaN(bottom))
+                {
+                    // If both top & bottom are set, then the extents is always
+                    // top + bottom so that the element is resized to its preferred
+                    // size (if it's the one that pushes out the default size of the container).
+                    extY = top + bottom;
+                }
+                else if (!isNaN(top) || !isNaN(bottom))
+                {
+                    extY = isNaN(top) ? 0 : top;
+                    extY += isNaN(bottom) ? 0 : bottom;
+                }
+                else
+                {
+                    extY = layoutElement.getBoundsYAtSize(NaN, NaN);
+                }
+
+                var preferredHeight:Number = layoutElement.getPreferredBoundsHeight();
+                height = Math.max(height, extY + preferredHeight);
+
+                // Find the minimum default extents, we take the minimum height only
+                // when the element size is determined by the parent size
+                var elementMinHeight:Number =
+                    constraintsDetermineHeight(elementInfo) ? layoutElement.getMinBoundsHeight() :
+                    preferredHeight;
+
+                minHeight = Math.max(minHeight, extY + elementMinHeight);
+            }
+        }
+
+        return new Point(Math.max(width, minWidth), Math.max(height, minHeight));
+    }
+
+    private function applyConstraintsToElement(unscaledWidth:Number, unscaledHeight:Number, layoutElement:ILayoutElement):void
+    {
+        //-------------------
+        // Fixed Width
+        //
+        // To layout children:
+        //        grab constraints from filled out cache
+        //         Assuming constraints are good...
+        //        Size the child based on constraints.
+        //         Position the child based on left and top constraint
+        //-------------------
+        var elementInfo:ElementConstraintInfo = constraintCache[layoutElement];
+
+        var left:Number = elementInfo.left;
+        var right:Number = elementInfo.right;
+        var top:Number = elementInfo.top;
+        var bottom:Number = elementInfo.bottom;
+
+        var leftBoundary:String = elementInfo.leftBoundary;
+        var rightBoundary:String = elementInfo.rightBoundary;
+        var topBoundary:String = elementInfo.topBoundary;
+        var bottomBoundary:String = elementInfo.bottomBoundary;
+
+        var availableWidth:Number;
+        var availableHeight:Number;
+
+        var elementWidth:Number = NaN;
+        var elementHeight:Number = NaN;
+        var elementMaxWidth:Number = NaN;
+        var elementMaxHeight:Number = NaN;
+        var elementX:Number = 0;
+        var elementY:Number = 0;
+
+        var leftHolder:Number = 0;
+        var rightHolder:Number = unscaledWidth;
+        var topHolder:Number = 0;
+        var bottomHolder:Number = unscaledHeight;
+
+        var i:Number;
+
+        var col:ConstraintColumn;
+        var row:ConstraintRow;
+
+        if (leftBoundary)
+        {
+            col = _constraintColumns[elementInfo.colSpanLeftIndex];
+            leftHolder = col.x;
+        }
+
+        if (rightBoundary)
+        {
+            col = _constraintColumns[elementInfo.colSpanRightIndex];
+            rightHolder = col.x + col.width;
+        }
+
+        if (topBoundary)
+        {
+            row = _constraintRows[elementInfo.rowSpanTopIndex];
+            topHolder = row.y;
+        }
+
+        if (bottomBoundary)
+        {
+            row = _constraintRows[elementInfo.rowSpanBottomIndex];
+            bottomHolder = row.y + row.height;
+        }
+
+
+        // available width
+        availableWidth = Math.round(rightHolder - leftHolder);
+        availableHeight = Math.round(bottomHolder - topHolder);
+
+        // set width
+        if (!isNaN(left) && !isNaN(right))
+        {
+            elementWidth = availableWidth - left - right;
+        }
+        // set height
+        if (!isNaN(top) && !isNaN(bottom))
+        {
+            elementHeight = availableHeight - top - bottom;
+        }
+
+        // Apply min and max constraints, make sure min is applied last. In the cases
+        // where elementWidth and elementHeight are NaN, setLayoutBoundsSize will use preferredSize
+        // which is already constrained between min and max.
+        if (!isNaN(elementWidth))
+        {
+            elementMaxWidth = layoutElement.getMaxBoundsWidth();
+            elementWidth = Math.max(layoutElement.getMinBoundsWidth(), Math.min(elementMaxWidth, elementWidth));
+        }
+        if (!isNaN(elementHeight))
+        {
+            elementMaxHeight = layoutElement.getMaxBoundsHeight();
+            elementHeight = Math.max(layoutElement.getMinBoundsHeight(), Math.min(elementMaxHeight, elementHeight));
+        }
+
+        layoutElement.setLayoutBoundsSize(elementWidth, elementHeight);
+        // update temp variables
+        elementWidth = layoutElement.getLayoutBoundsWidth();
+        elementHeight = layoutElement.getLayoutBoundsHeight();
+
+        // Horizontal Position
+        if (!isNaN(left))
+            elementX = leftHolder + left;
+        else if (!isNaN(right))
+            elementX = rightHolder - right - elementWidth;
+        else
+            elementX = layoutElement.getLayoutBoundsX();
+
+        // Vertical Position
+        if (!isNaN(top))
+            elementY = topHolder + top;
+        else if (!isNaN(bottom))
+            elementY = bottomHolder - bottom - elementHeight;
+        else
+            elementY = layoutElement.getLayoutBoundsY();
+
+        layoutElement.setLayoutBoundsPosition(elementX, elementY);
+    }
+}
+}
+
+import mx.core.ILayoutElement;
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Helper class: ElementConstraintInfo
+//
+////////////////////////////////////////////////////////////////////////////////
+
+class ElementConstraintInfo
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public function ElementConstraintInfo(
+        layoutElement:ILayoutElement,
+        left:Number, right:Number, //hc:Number,
+        top:Number, bottom:Number, //vc:Number,
+        /*baseline:Number, */leftBoundary:String = null,
+        rightBoundary:String = null, //hcBoundary:String = null,
+        topBoundary:String = null, bottomBoundary:String = null,
+        /*vcBoundary:String = null, baselineBoundary:String = null*/
+        colSpanLeftIndex:int = -1, colSpanRightIndex:int = -1,
+        rowSpanTopIndex:int = -1, rowSpanBottomIndex:int = -1):void
+    {
+        super();
+
+        // pointer to element
+        this.layoutElement = layoutElement;
+
+        // offsets
+        this.left = left;
+        this.right = right;
+/*        this.hc = hc;*/
+        this.top = top;
+        this.bottom = bottom;
+/*        this.vc = vc;*/
+/*        this.baseline = baseline;*/
+
+        // boundaries (ie: parent, column or row edge)
+        this.leftBoundary = leftBoundary;
+        this.rightBoundary = rightBoundary;
+/*        this.hcBoundary = hcBoundary;*/
+        this.topBoundary = topBoundary;
+        this.bottomBoundary = bottomBoundary;
+/*        this.vcBoundary = vcBoundary;*/
+/*        this.baselineBoundary = baselineBoundary;*/
+
+        this.colSpanLeftIndex = colSpanLeftIndex;
+        this.colSpanRightIndex = colSpanRightIndex;
+        this.rowSpanTopIndex = rowSpanTopIndex;
+        this.rowSpanBottomIndex = rowSpanBottomIndex;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    public var layoutElement:ILayoutElement;
+
+    public var left:Number;
+    public var right:Number;
+/*    public var hc:Number;*/
+    public var top:Number;
+    public var bottom:Number;
+/*    public var vc:Number;*/
+    public var baseline:Number;
+    public var leftBoundary:String;
+    public var rightBoundary:String;
+/*    public var hcBoundary:String;*/
+    public var topBoundary:String;
+    public var bottomBoundary:String;
+/*    public var vcBoundary:String;*/
+/*    public var baselineBoundary:String;*/
+
+    public var colSpanLeftIndex:int;
+    public var colSpanRightIndex:int;
+    public var rowSpanTopIndex:int;
+    public var rowSpanBottomIndex:int;
+}