Transferred from the Adobe Open Source Subversion Repository

Revision: 19931
Author:   jasonsj@adobe.com
Date:     2011-01-25T19:19:28.281950Z

Log Message:
-----------
Part 1 Mobile Theme P-ARB

MobileSkin removes beginChromeColorFill and drawChromeColor. updateDisplayList instead calls layoutContents and drawBackground. Skins implement chromeColor logic in drawBackground.

ActionBar adds defaultButtonAppearance style with values normal|beveled. Use beveled for iOS-styled buttons.

Refactored concrete skins to spark.skins.mobile. All other base/support classes are moved to spark.skins.mobile.supportClasses.

ButtonSkinBase adds useCenterAlignment for ascent and icon centering. Buttons that use iconPlacement top/bottom should disable useCenterAlignment for proper constraining of icons and labels to top and bottom constraints.

CheckBox and RadioButton now left align.

QE notes: Custom skins based on MobileSkin will need to be updated.
Height of Buttons using iconPlacement top/bottom will be shorter.
Height of Buttons with icons greater than the minHeight per DPI at 240 will be 1px taller.
Doc notes: API changes in spark.skins.mobile.MobileSkin and sub-classes
Bugs:
SDK-29167 Adding padding styles to ActionBar for easier platform-specific styling
SDK-29093 CheckBox and RadioButton should always left align
SDK-29187 Incorrect label alignment in mobile Button skin with iconPlacement="top"
SDK-29193 Button label should be ascent centered when using iconPlacement top and bottom when no icon is present
SDK-29167 Adding padding styles to ActionBar for easier platform-specific styling
Reviewer: mcho, gruehle, rfrishbe
Tests run: checkintests, mobile cyclone
Is noteworthy for integration: Yes

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/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBarDefaultButtonAppearance.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -67,7 +67,7 @@
 //
 //   in commitProperties():
 //       tf.text = "...." - if needed
-//
+//
 //   in measure();
 //       if (tf.isTruncated)     // if text may be truncated
 //           tf.text = "...";
@@ -85,22 +85,22 @@
 //       // if you want truncated text:
 //       tf.truncateToFit();
 //
-// Supported styles: textAlign, fontFamily, fontWeight, "colorName", fontSize, fontStyle,
+// Supported styles: textAlign, fontFamily, fontWeight, "colorName", fontSize, fontStyle,
 //                   textDecoration, textIndent, leading, letterSpacing

 /**
  *  The StyleableTextField class is a text primitive for use in ActionScript
  *  skins and item renderers. It cannot be used in MXML markup and is not
  *  compatible with effects.
- *
+ *
  *  @langversion 3.0
  *  @playerversion Flash 10.1
  *  @playerversion AIR 2.0
  *  @productversion Flex 4.5
  */
-public class StyleableTextField extends TextField
+public class StyleableTextField extends TextField
     implements IEditableText, ISimpleStyleClient, IVisualElement
-{
+{

     //--------------------------------------------------------------------------
     //
@@ -115,9 +115,9 @@
      *  But since truncateToFit() can be called frequently,
      *  this class caches this resource value in this variable.
      *  Note that this class does _not_ support runtime local changes to
-     *  the truncation indicator. The dynamic local change code in UITextField
+     *  the truncation indicator. The dynamic local change code in UITextField
      *  can be used here, if needed.
-     */
+     */
     private static var truncationIndicatorResource:String;

     //--------------------------------------------------------------------------
@@ -128,7 +128,7 @@

     /**
      *  Constructor.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5
@@ -143,8 +143,8 @@

         // make our width 400 by default.  this is just a heuristic, but it helps
         // get the right measurement the first time for a multi-line TextField.
-        // The developer should still be setting the textField's width to
-        // the estimatedWidth to get a more accurate representation, but
+        // The developer should still be setting the textField's width to
+        // the estimatedWidth to get a more accurate representation, but
         // sometimes there is no estimated width, and this will be a good
         // heuristic in cases where they forget to do that.
         width = 400;
@@ -159,14 +159,14 @@

         // Add a key down listener to listen for enter key
         addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
-
-		addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_STARTING,
-			touchInteractionStartingHandler);
-		addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_START,
-			touchInteractionStartHandler);
-		addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_END,
-			touchInteractionEndHandler);
-
+
+        addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_STARTING,
+            touchInteractionStartingHandler);
+        addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_START,
+            touchInteractionStartHandler);
+        addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_END,
+            touchInteractionEndHandler);
+
         if (!truncationIndicatorResource)
         {
             truncationIndicatorResource = ResourceManager.getInstance().
@@ -179,19 +179,19 @@
     //  Properties
     //
     //--------------------------------------------------------------------------
-	override public function set width(value:Number): void
-	{
-		super.width = value;
-
-		// If we're multiline we need to invalidate our size since our height
-		// may have changed
-		if (multiline)
-		{
-			invalidateTightTextHeight = true;
-			invalidateTextSizeFlag = true;
-		}
-	}
-
+    override public function set width(value:Number): void
+    {
+        super.width = value;
+
+        // If we're multiline we need to invalidate our size since our height
+        // may have changed
+        if (multiline)
+        {
+            invalidateTightTextHeight = true;
+            invalidateTextSizeFlag = true;
+        }
+    }
+
     public function get measuredTextSize():Point
     {
         // commit style to get an accurate measurement
@@ -201,7 +201,7 @@
         {
             _measuredTextSize = new Point();
             invalidateTextSizeFlag = true;
-			invalidateTightTextHeight = true;
+            invalidateTightTextHeight = true;
         }

         if (invalidateTextSizeFlag)
@@ -216,41 +216,41 @@
                 _measuredTextSize.x = textWidth + textIndent + TEXT_WIDTH_PADDING
                 _measuredTextSize.y = textHeight + TEXT_HEIGHT_PADDING;
             }
-			else
-			{
-	            // when scaling, remove/add to stage for consistent measurement
-	            var originalParent:DisplayObjectContainer = parent;
-	            var index:int = parent.getChildIndex(this);
-
-	            // remove from display list
-	            if (originalParent is UIComponent)
-	                UIComponent(originalParent).$removeChild(this);
-	            else
-	                originalParent.removeChild(this);
-
-	            _measuredTextSize.x = textWidth + textIndent + TEXT_WIDTH_PADDING
-	            _measuredTextSize.y = textHeight + TEXT_HEIGHT_PADDING;
-
-	            // add to display list
-	            if (originalParent is UIComponent)
-	                UIComponent(originalParent).$addChildAt(this, index);
-	            else
-	                originalParent.addChildAt(this, index);
-
-	            // If we use device fonts, then the unscaled sizes are
-	            // textWidth * scaleX / scaleY
-	            // textHeight * scaleX / scaleY
-	            if (m.a != m.d)
-	            {
-	                var scaleFactor:Number = (m.a / m.d);
-
-	                // textIndent and gutter are also scaled
-	                _measuredTextSize.x = Math.abs(_measuredTextSize.x * scaleFactor);
-	                _measuredTextSize.y = Math.abs(_measuredTextSize.y * scaleFactor);
-	            }
-			}
-
-			invalidateTextSizeFlag = false;
+            else
+            {
+                // when scaling, remove/add to stage for consistent measurement
+                var originalParent:DisplayObjectContainer = parent;
+                var index:int = parent.getChildIndex(this);
+
+                // remove from display list
+                if (originalParent is UIComponent)
+                    UIComponent(originalParent).$removeChild(this);
+                else
+                    originalParent.removeChild(this);
+
+                _measuredTextSize.x = textWidth + textIndent + TEXT_WIDTH_PADDING
+                _measuredTextSize.y = textHeight + TEXT_HEIGHT_PADDING;
+
+                // add to display list
+                if (originalParent is UIComponent)
+                    UIComponent(originalParent).$addChildAt(this, index);
+                else
+                    originalParent.addChildAt(this, index);
+
+                // If we use device fonts, then the unscaled sizes are
+                // textWidth * scaleX / scaleY
+                // textHeight * scaleX / scaleY
+                if (m.a != m.d)
+                {
+                    var scaleFactor:Number = (m.a / m.d);
+
+                    // textIndent and gutter are also scaled
+                    _measuredTextSize.x = Math.abs(_measuredTextSize.x * scaleFactor);
+                    _measuredTextSize.y = Math.abs(_measuredTextSize.y * scaleFactor);
+                }
+            }
+
+            invalidateTextSizeFlag = false;
         }

         return _measuredTextSize;
@@ -274,7 +274,7 @@
      *  the setStyle() method
      *  is called on this component to set an inheriting style.
      *  Developers typically never need to access this property directly.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -305,7 +305,7 @@

     /**
      *  The class style used by this component. This should be an IStyleClient.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -335,100 +335,100 @@
         styleChanged("styleName");
     }

-	//----------------------------------
-	//  Text alignment helpers
-	//----------------------------------
-	/**
-	 *  @private
-	 *  The height of the first line of text to the baseline of the bottom line
-	 *  of text.  Handles both single line and multiline text.
-	 */
-	private function get tightTextHeight() :Number
-	{
-		commitStyles();
-
-		// figure out distance from text bottom to last baseline
-		if (invalidateTightTextHeight)
-		{
-			// getLineMetrics() returns strange numbers for an empty string,
-			// so instead we get the metrics for a non-empty string.
-			var isEmpty:Boolean = (text == "");
-
-			if (isEmpty)
-				text = "Wj";
-
-			var metrics:TextLineMetrics = getLineMetrics(0);
-
-			// bottom gutter and descent
-			var bottomOffset:Number = StyleableTextField.TEXT_HEIGHT_PADDING/2 + metrics.descent;
-			if (numLines == 1) // account for the extra leading on single line text
-				bottomOffset += metrics.leading;
-
-			var topOffset:Number = getTextTopOffset(defaultTextFormat);
-			_tightTextHeight = measuredTextSize.y - topOffset - bottomOffset;
-
-			if (isEmpty)
-				text = "";
-
-			invalidateTightTextHeight = false;
-		}
-
-		return _tightTextHeight;
-	}
-
-	/**
-	 *  @private
-	 *  Finds the distance from the top edge of the containing text field to the text for
-	 *  a particular font, size, weight and style combination.  This value accounts for
-	 *  the difference between the metrics.ascent and the true top of the text within the
-	 *  text field and the top gutter
-	 */
-	private static function getTextTopOffset(textFormat:TextFormat):Number
-	{
-		// try to find the top offset for the font, size, weight and style in our table
-		// we only store offets for unique font, size, weight and style combinations
-		// FIXME (mcho)  are there more properties that affect the top offset we should
-		// take into account?
-		var key:String = textFormat.font + "_" + textFormat.size + "_" + textFormat.bold + "_" + textFormat.italic;
-		var topOffset:Number = textTopOffsetTable[key];
-
-		// if we can't find the value in our table let's calculate it
-		if (isNaN(topOffset))
-		{
-			// create sample text field
-			var field:TextField = new TextField();
-			field.defaultTextFormat = textFormat;
-			field.embedFonts = isFontEmbedded(textFormat);
-			field.textColor = 0x000000; // make sure our text is black so it will show up against white
-			field.text = "T"; // use "T" as our standard
-			field.width = field.textWidth;
-			field.height = field.textHeight;
-
-			// draw the field into a bitmap data - note default bg color of bitmapData is white.
-			var bitmapData:BitmapData = new BitmapData(field.width, field.height);
-			bitmapData.draw(field);
-
-			// search vertically for the first non white pixel
-			var col:int = Math.round(bitmapData.width/2);
-			for (var i:int = 0; i < bitmapData.height; i++)
-			{
-				if (bitmapData.getPixel(col, i) != 0xFFFFFF)
-					break;
-			}
-
-			if (i == bitmapData.height)
-				topOffset = StyleableTextField.TEXT_HEIGHT_PADDING/2; // if we didn't find a non white pixel set top offset to top gutter
-			else
-				topOffset = i;
-
-			// store the offset value in our look up table
-			textTopOffsetTable[key] = topOffset;
-		}
-
-		return topOffset;
-	}
-
-
+    //----------------------------------
+    //  Text alignment helpers
+    //----------------------------------
+    /**
+     *  @private
+     *  The height of the first line of text to the baseline of the bottom line
+     *  of text.  Handles both single line and multiline text.
+     */
+    private function get tightTextHeight() :Number
+    {
+        commitStyles();
+
+        // figure out distance from text bottom to last baseline
+        if (invalidateTightTextHeight)
+        {
+            // getLineMetrics() returns strange numbers for an empty string,
+            // so instead we get the metrics for a non-empty string.
+            var isEmpty:Boolean = (text == "");
+
+            if (isEmpty)
+                text = "Wj";
+
+            var metrics:TextLineMetrics = getLineMetrics(0);
+
+            // bottom gutter and descent
+            var bottomOffset:Number = StyleableTextField.TEXT_HEIGHT_PADDING/2 + metrics.descent;
+            if (numLines == 1) // account for the extra leading on single line text
+                bottomOffset += metrics.leading;
+
+            var topOffset:Number = getTextTopOffset(defaultTextFormat);
+            _tightTextHeight = measuredTextSize.y - topOffset - bottomOffset;
+
+            if (isEmpty)
+                text = "";
+
+            invalidateTightTextHeight = false;
+        }
+
+        return _tightTextHeight;
+    }
+
+    /**
+     *  @private
+     *  Finds the distance from the top edge of the containing text field to the text for
+     *  a particular font, size, weight and style combination.  This value accounts for
+     *  the difference between the metrics.ascent and the true top of the text within the
+     *  text field and the top gutter
+     */
+    private static function getTextTopOffset(textFormat:TextFormat):Number
+    {
+        // try to find the top offset for the font, size, weight and style in our table
+        // we only store offets for unique font, size, weight and style combinations
+        // FIXME (mcho)  are there more properties that affect the top offset we should
+        // take into account?
+        var key:String = textFormat.font + "_" + textFormat.size + "_" + textFormat.bold + "_" + textFormat.italic;
+        var topOffset:Number = textTopOffsetTable[key];
+
+        // if we can't find the value in our table let's calculate it
+        if (isNaN(topOffset))
+        {
+            // create sample text field
+            var field:TextField = new TextField();
+            field.defaultTextFormat = textFormat;
+            field.embedFonts = isFontEmbedded(textFormat);
+            field.textColor = 0x000000; // make sure our text is black so it will show up against white
+            field.text = "T"; // use "T" as our standard
+            field.width = field.textWidth;
+            field.height = field.textHeight;
+
+            // draw the field into a bitmap data - note default bg color of bitmapData is white.
+            var bitmapData:BitmapData = new BitmapData(field.width, field.height);
+            bitmapData.draw(field);
+
+            // search vertically for the first non white pixel
+            var col:int = Math.round(bitmapData.width/2);
+            for (var i:int = 0; i < bitmapData.height; i++)
+            {
+                if (bitmapData.getPixel(col, i) != 0xFFFFFF)
+                    break;
+            }
+
+            if (i == bitmapData.height)
+                topOffset = StyleableTextField.TEXT_HEIGHT_PADDING/2; // if we didn't find a non white pixel set top offset to top gutter
+            else
+                topOffset = i;
+
+            // store the offset value in our look up table
+            textTopOffsetTable[key] = topOffset;
+        }
+
+        return topOffset;
+    }
+
+
     //--------------------------------------------------------------------------
     //
     //  IDisplayText implementation
@@ -446,7 +446,7 @@
      *  The supported styles depend on the subclass.

      *
      *  @default ""
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -466,7 +466,7 @@
         super.text = value;
         _isTruncated = false;
         invalidateTextSizeFlag = true;
-		invalidateTightTextHeight = true;
+        invalidateTightTextHeight = true;

         if (hasEventListener(FlexEvent.VALUE_COMMIT))
             dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
@@ -499,9 +499,9 @@
     //----------------------------------

     /**
-     *  Indicates whether the text has been truncated, true,
+     *  Indicates whether the text has been truncated, true,
      *  or not, false.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -516,18 +516,18 @@
     //
     //  IEditableText implementation
     //
-    //--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------

     //----------------------------------
     //  editable
     //----------------------------------

     /**
-     *  Specifies whether the text is editable, true,
+     *  Specifies whether the text is editable, true,
      *  or not, false.
-     *
+     *
      *  @default false
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -551,15 +551,15 @@
     private var _focusEnabled:Boolean = true;

     /**
-     *  Indicates whether the component can receive focus when tabbed to.
-     *  You can set focusEnabled to false when a
-     *  component is used as a subcomponent of another component so that
-     *  the outer component becomes the focusable entity.
-     *  If this property is false, focus is transferred to
-     *  the first parent that has focusEnable set to true.
+     *  Indicates whether the component can receive focus when tabbed to.
+     *  You can set focusEnabled to false when a
+     *  component is used as a subcomponent of another component so that
+     *  the outer component becomes the focusable entity.
+     *  If this property is false, focus is transferred to
+     *  the first parent that has focusEnable set to true.
      *
      *  @default true
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -582,12 +582,12 @@
     private var _enabled:Boolean = true;

     /**
-     *  Whether the component can accept user interaction.
-     *  After setting the enabled property to false,
-     *  some components still respond to mouse interactions such as mouseOver.
-     *  As a result, to fully disable the component, you should also set the value
-     *  of the mouseEnabled property to false.
-     *
+     *  Whether the component can accept user interaction.
+     *  After setting the enabled property to false,
+     *  some components still respond to mouse interactions such as mouseOver.
+     *  As a result, to fully disable the component, you should also set the value
+     *  of the mouseEnabled property to false.
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -609,7 +609,7 @@

     /**
      *  The horizontal scroll position of the text.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -630,16 +630,16 @@
     //----------------------------------

     /**
-     *  Controls word wrapping within the text.
+     *  Controls word wrapping within the text.
      *  This property corresponds to the lineBreak style.
      *
-     *
Text may be set to fit the width of the container (LineBreak.TO_FIT),
+     *
Text may be set to fit the width of the container (LineBreak.TO_FIT),
      *  or can be set to break only at explicit return or line feed characters (LineBreak.EXPLICIT).

      *
-     *
Legal values are flashx.textLayout.formats.LineBreak.EXPLICIT,
-     *  flashx.textLayout.formats.LineBreak.TO_FIT, and
+     *
Legal values are flashx.textLayout.formats.LineBreak.EXPLICIT,
+     *  flashx.textLayout.formats.LineBreak.TO_FIT, and
      *  flashx.textLayout.formats.FormatValue.INHERIT.

-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -663,7 +663,7 @@
      *  The active, or last clicked position, of the selection.
      *  If the implementation does not support selection anchor
      *  this is the last character of the selection.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -683,7 +683,7 @@
      *  The anchor, or first clicked position, of the selection.
      *  If the implementation does not support selection anchor
      *  this is the first character of the selection.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -701,7 +701,7 @@

     /**
      *  The vertical scroll position of the text.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -715,20 +715,20 @@
     public function set verticalScrollPosition(value:Number):void
     {
         scrollV = Math.min(Math.max(0, int(value)), maxScrollV);
-    }
+    }

     //--------------------------------------------------------------------------
     //
     //  IEditableText Methods
     //
-    //--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------

     /**
      *  Scroll so the specified range is in view.
-     *
+     *
      *  @param anchorPosition The anchor position of the selection range.
      *  @param activePosition The active position of the selection range.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -736,7 +736,7 @@
      */
     public function scrollToRange(anchorPosition:int, activePosition:int):void
     {
-        // If either part of the selection is in range (determined by
+        // If either part of the selection is in range (determined by
         // a non-null return value from getCharBoundaries()), we
         // don't need to do anything.
         if (getCharBoundaries(anchorPosition) || getCharBoundaries(activePosition))
@@ -758,7 +758,7 @@
      *  that the insertion point is visible.

      *
      *  @param text The text to be inserted.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -769,7 +769,7 @@
         replaceText(selectionAnchorPosition, selectionActivePosition, text);
         dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
         invalidateTextSizeFlag = true;
-		invalidateTightTextHeight = true;
+        invalidateTightTextHeight = true;
     }

     /**
@@ -781,7 +781,7 @@
      *  that the insertion point is visible.

      *
      *  @param text The text to be appended.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -790,14 +790,14 @@
     override public function appendText(text:String):void
     {
         super.appendText(text);
-
-		// Make sure insertion point is at the end of the text
-		var textLength:int = this.text.length;
-		setSelection(textLength, textLength);
-
+
+        // Make sure insertion point is at the end of the text
+        var textLength:int = this.text.length;
+        setSelection(textLength, textLength);
+
         dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
         invalidateTextSizeFlag = true;
-		invalidateTightTextHeight = true;
+        invalidateTightTextHeight = true;
     }

     /**
@@ -810,12 +810,12 @@
      *
      *  @param activePosition The character position specifying the end
      *  of the selection that moves when the selection is extended.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
     public function selectRange(anchorIndex:int, activeIndex:int):void
     {
         setSelection(Math.min(anchorIndex, activeIndex),
@@ -824,12 +824,12 @@

     /**
      *  Selects all of the text.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
     public function selectAll():void
     {
         setSelection(0, length);
@@ -837,12 +837,12 @@

     /**
      *  Set focus to this text field.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
     public function setFocus():void
     {
         stage.focus = this;
@@ -920,23 +920,23 @@
             if (text == "")
             {
                 // Set the width to the fontSize + padding, which is big enough to hold one
-                // character.
+                // character.
                 width = textFormat.size + TEXT_WIDTH_PADDING;
             }

             invalidateStyleFlag = false;

-            // now that we've pushed the new styles in, our size might have
+            // now that we've pushed the new styles in, our size might have
             // changed
             invalidateTextSizeFlag = true;
             invalidateBaselinePosition = true;
-			invalidateTightTextHeight = true;
+            invalidateTightTextHeight = true;
         }
     }

     /**
      *  @copy mx.core.UIComponent#getStyle()
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -966,7 +966,7 @@
      *  @param styleProp Name of the style property.
      *
      *  @param newValue New value for the style.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.0
@@ -1000,13 +1000,13 @@
         {
             invalidateStyleFlag = true;

-            // invalidateSizeFlag doesn't get set until commitStyles() when
+            // invalidateSizeFlag doesn't get set until commitStyles() when
             // the new styles are actually pushed in and the textWidth/textHeight changes
         }
     }

     /**
-     *  Truncate text to make it fit horizontally in the area defined for the control,
+     *  Truncate text to make it fit horizontally in the area defined for the control,
      *  and append an ellipsis, three periods (...), to the text. This function
      *  only works for single line text.
      *
@@ -1015,7 +1015,7 @@
      *  such as "..." will be used.
      *
      *  @return true if the text needed truncation.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5
@@ -1032,7 +1032,7 @@

         _isTruncated = false;

-        // Need to check if we should truncate, but it
+        // Need to check if we should truncate, but it
         // could be due to rounding error.  Let's check that it's not.
         // Examples of rounding errors happen with "South Africa" and "Game"
         // with verdana.ttf.
@@ -1053,7 +1053,7 @@
             _isTruncated = true;
             invalidateTextSizeFlag = true;
             invalidateBaselinePosition = true;
-			invalidateTightTextHeight = true;
+            invalidateTightTextHeight = true;

             // Make sure all text is visible
             scrollH = 0;
@@ -1106,7 +1106,7 @@
         if (!(event is TextOperationEvent))
         {
             invalidateTextSizeFlag = true;
-			invalidateTightTextHeight = true;
+            invalidateTightTextHeight = true;

             var newEvent:TextOperationEvent = new TextOperationEvent(event.type);

@@ -1147,23 +1147,23 @@
         if (!dispatchEvent(e))
             event.preventDefault();
     }
-
-	/**
-	 *  @private
-	 */
-	private function touchInteractionStartingHandler(event:TouchInteractionEvent):void
-	{
-		// When in text selection mode, tell the Scroller to use the special text
-		// selection auto-scroll mode, and pass the top/bottom of this component as
-		// the scroll range.
-		if (textInteractionMode == TextInteractionMode.SELECTION)
-		{
-			var focusThickness:Number = getStyle("focusThickness");
-			var scroller:Scroller = event.relatedObject as Scroller;
-
-			// Early exit if the event isn't a SCROLL event or doesn't have a Scroller
-			if (event.reason != TouchInteractionReason.SCROLL || !scroller)
-				return;
+
+    /**
+     *  @private
+     */
+    private function touchInteractionStartingHandler(event:TouchInteractionEvent):void
+    {
+        // When in text selection mode, tell the Scroller to use the special text
+        // selection auto-scroll mode, and pass the top/bottom of this component as
+        // the scroll range.
+        if (textInteractionMode == TextInteractionMode.SELECTION)
+        {
+            var focusThickness:Number = getStyle("focusThickness");
+            var scroller:Scroller = event.relatedObject as Scroller;
+
+            // Early exit if the event isn't a SCROLL event or doesn't have a Scroller
+            if (event.reason != TouchInteractionReason.SCROLL || !scroller)
+                return;

             // if already in text selection mode with another scroller, cancel this scroller
             if (scrollerInTextSelectionMode)
@@ -1171,90 +1171,90 @@
                 event.preventDefault();
                 return;
             }
-
-			var minVScrollPos:Number;
-			var maxVScrollPos:Number;
-			var minHScrollPos:Number;
-			var maxHScrollPos:Number;
-
-			var pt:Point = new Point(0, 0);
-
-			// Offset by our position within the skin/component. The scrolling is
-			// constrained by the component boundaries, not by the boundaries of
-			// this text field. We don't have a reliable way to determine the
-			// component boundaries, so we use our x,y position as an estimate.
-			pt.offset(-x, -y);
-
-			// Include the focus thickness in the min/max scroll positions
-			pt.offset(-focusThickness, -focusThickness);
-
-			pt = localToGlobal(pt);
-			pt = DisplayObject(scroller.viewport).globalToLocal(pt);
-			minHScrollPos = Math.max(0, pt.x);
-			minVScrollPos = Math.max(0, pt.y);
-
-			pt.x = width;
-			pt.y = height;
-
-			// We can't reliably find our position relative to the bottom of the skin/
-			// component, so use our top position as an estimate
-			pt.offset(x, y);
-
-			// Include focus thickness
-			pt.offset(focusThickness, focusThickness);
-
-			pt = parent.localToGlobal(pt);
-			pt = DisplayObject(scroller.viewport).globalToLocal(pt);
-			maxHScrollPos = pt.x - scroller.width;
-			maxVScrollPos = pt.y - scroller.height;
-
+
+            var minVScrollPos:Number;
+            var maxVScrollPos:Number;
+            var minHScrollPos:Number;
+            var maxHScrollPos:Number;
+
+            var pt:Point = new Point(0, 0);
+
+            // Offset by our position within the skin/component. The scrolling is
+            // constrained by the component boundaries, not by the boundaries of
+            // this text field. We don't have a reliable way to determine the
+            // component boundaries, so we use our x,y position as an estimate.
+            pt.offset(-x, -y);
+
+            // Include the focus thickness in the min/max scroll positions
+            pt.offset(-focusThickness, -focusThickness);
+
+            pt = localToGlobal(pt);
+            pt = DisplayObject(scroller.viewport).globalToLocal(pt);
+            minHScrollPos = Math.max(0, pt.x);
+            minVScrollPos = Math.max(0, pt.y);
+
+            pt.x = width;
+            pt.y = height;
+
+            // We can't reliably find our position relative to the bottom of the skin/
+            // component, so use our top position as an estimate
+            pt.offset(x, y);
+
+            // Include focus thickness
+            pt.offset(focusThickness, focusThickness);
+
+            pt = parent.localToGlobal(pt);
+            pt = DisplayObject(scroller.viewport).globalToLocal(pt);
+            maxHScrollPos = pt.x - scroller.width;
+            maxVScrollPos = pt.y - scroller.height;
+
             scrollerInTextSelectionMode = scroller;
-			scroller.enableTextSelectionAutoScroll(true, minHScrollPos, maxHScrollPos,
-				minVScrollPos, maxVScrollPos);
-		}
-	}
-
-	/**
-	 *  @private
-	 */
-	private function touchInteractionStartHandler(event:TouchInteractionEvent):void
-	{
-		// During a touch scroll we don't want the keyboard to activate. Add a
-		// "softKeyboardActivating" handler to cancel the event.
-		addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING,
-			softKeyboardActivatingHandler);
-	}
-
-	/**
-	 *  @private
-	 */
-	private function touchInteractionEndHandler(event:TouchInteractionEvent):void
-	{
-		// Remove the soft keyboard activate cancelling handler.
-		removeEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING,
-			softKeyboardActivatingHandler);
-
-		if (textInteractionMode == TextInteractionMode.SELECTION)
-		{
-			var scroller:Scroller = event.relatedObject as Scroller;
-
-			// Turn off text selection auto-scroll.
+            scroller.enableTextSelectionAutoScroll(true, minHScrollPos, maxHScrollPos,
+                minVScrollPos, maxVScrollPos);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function touchInteractionStartHandler(event:TouchInteractionEvent):void
+    {
+        // During a touch scroll we don't want the keyboard to activate. Add a
+        // "softKeyboardActivating" handler to cancel the event.
+        addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING,
+            softKeyboardActivatingHandler);
+    }
+
+    /**
+     *  @private
+     */
+    private function touchInteractionEndHandler(event:TouchInteractionEvent):void
+    {
+        // Remove the soft keyboard activate cancelling handler.
+        removeEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING,
+            softKeyboardActivatingHandler);
+
+        if (textInteractionMode == TextInteractionMode.SELECTION)
+        {
+            var scroller:Scroller = event.relatedObject as Scroller;
+
+            // Turn off text selection auto-scroll.
             scrollerInTextSelectionMode = null;
-			if (scroller)
-				scroller.enableTextSelectionAutoScroll(false);
-		}
-	}
-
-	/**
-	 *  @private
-	 *
-	 *  This handler is only added during touch scroll events. It prevents
-	 *  the onscreen keyboard from activating if a scroll occurred.
-	 */
-	private function softKeyboardActivatingHandler(event:SoftKeyboardEvent):void
-	{
-		event.preventDefault();
-	}
+            if (scroller)
+                scroller.enableTextSelectionAutoScroll(false);
+        }
+    }
+
+    /**
+     *  @private
+     *
+     *  This handler is only added during touch scroll events. It prevents
+     *  the onscreen keyboard from activating if a scroll occurred.
+     */
+    private function softKeyboardActivatingHandler(event:SoftKeyboardEvent):void
+    {
+        event.preventDefault();
+    }

     //--------------------------------------------------------------------------
     //
@@ -1283,16 +1283,16 @@
      */
     public function getLayoutBoundsHeight(postLayoutTransform:Boolean=true):Number
     {
-		if (useTightTextBounds)
-		{
-			// we want to return the text field height without the top and bottom offsets
-			// (measuredTextSize.y - tightTextHeight) gives us the sum of top and bottom offsets
-			return height - (measuredTextSize.y - tightTextHeight);
-		}
-		else
-		{
-			return height;
-		}
+        if (useTightTextBounds)
+        {
+            // we want to return the text field height without the top and bottom offsets
+            // (measuredTextSize.y - tightTextHeight) gives us the sum of top and bottom offsets
+            return height - (measuredTextSize.y - tightTextHeight);
+        }
+        else
+        {
+            return height;
+        }
     }

     /**
@@ -1300,15 +1300,15 @@
      */
     public function getLayoutBoundsWidth(postLayoutTransform:Boolean=true):Number
     {
-		if (useTightTextBounds)
-		{
-			// return the text field width without the left and right gutters
-			return width - StyleableTextField.TEXT_WIDTH_PADDING;
-		}
-		else
-		{
-			return width;
-		}
+        if (useTightTextBounds)
+        {
+            // return the text field width without the left and right gutters
+            return width - StyleableTextField.TEXT_WIDTH_PADDING;
+        }
+        else
+        {
+            return width;
+        }
     }

     /**
@@ -1316,34 +1316,34 @@
      */
     public function getLayoutBoundsX(postLayoutTransform:Boolean=true):Number
     {
-		if (useTightTextBounds)
-		{
-			// return the x position of the text within the text field.  we calculate this value
-			// using text field's x, offset by the left gutter
-			return x + StyleableTextField.TEXT_WIDTH_PADDING/2;
-		}
-		else
-		{
-			return x;
-		}
-    }
-
+        if (useTightTextBounds)
+        {
+            // return the x position of the text within the text field.  we calculate this value
+            // using text field's x, offset by the left gutter
+            return x + StyleableTextField.TEXT_WIDTH_PADDING/2;
+        }
+        else
+        {
+            return x;
+        }
+    }
+

     /**
      * @private
      */
     public function getLayoutBoundsY(postLayoutTransform:Boolean=true):Number
     {
-		if (useTightTextBounds)
-		{
-			// return the y position of the text within the text field.  we calculate this value
-			// using text field's y, offset by the text top offset
-			return y + getTextTopOffset(defaultTextFormat);
-		}
-		else
-		{
-			return y;
-		}
+        if (useTightTextBounds)
+        {
+            // return the y position of the text within the text field.  we calculate this value
+            // using text field's y, offset by the text top offset
+            return y + getTextTopOffset(defaultTextFormat);
+        }
+        else
+        {
+            return y;
+        }
     }

     /**
@@ -1399,17 +1399,17 @@
      */
     public function getPreferredBoundsHeight(postLayoutTransform:Boolean=true):Number
     {
-		if (useTightTextBounds)
-		{
-			// The height from the top of the text to the baseline of the
-			// last line of text.  This is the height used for positioning text
-			// according to its baseline
-			return tightTextHeight;
-		}
-		else
-		{
-			return measuredTextSize.y;
-		}
+        if (useTightTextBounds)
+        {
+            // The height from the top of the text to the baseline of the
+            // last line of text.  This is the height used for positioning text
+            // according to its baseline
+            return tightTextHeight;
+        }
+        else
+        {
+            return measuredTextSize.y;
+        }
     }

     /**
@@ -1417,15 +1417,15 @@
      */
     public function getPreferredBoundsWidth(postLayoutTransform:Boolean=true):Number
     {
-		if (useTightTextBounds)
-		{
-			// The measuredTextSize without the left and right gutters
-			return measuredTextSize.x - StyleableTextField.TEXT_WIDTH_PADDING;
-		}
-		else
-		{
-			return measuredTextSize.x;
-		}
+        if (useTightTextBounds)
+        {
+            // The measuredTextSize without the left and right gutters
+            return measuredTextSize.x - StyleableTextField.TEXT_WIDTH_PADDING;
+        }
+        else
+        {
+            return measuredTextSize.x;
+        }
     }

     /**
@@ -1449,46 +1449,46 @@
      */
     public function setLayoutBoundsPosition(x:Number, y:Number, postLayoutTransform:Boolean=true):void
     {
-		if (useTightTextBounds)
-		{
-			// offset the positions by the left gutters and the top offset
-			this.x = x - StyleableTextField.TEXT_WIDTH_PADDING/2;
-			this.y = y - getTextTopOffset(defaultTextFormat);
-		}
-		else
-		{
-			this.x = x;
-			this.y = y;
-		}
+        if (useTightTextBounds)
+        {
+            // offset the positions by the left gutters and the top offset
+            this.x = x - StyleableTextField.TEXT_WIDTH_PADDING/2;
+            this.y = y - getTextTopOffset(defaultTextFormat);
+        }
+        else
+        {
+            this.x = x;
+            this.y = y;
+        }
     }

     /**
      * @private
      */
     public function setLayoutBoundsSize(width:Number, height:Number, postLayoutTransform:Boolean=true):void
-    {
-		// width
-		var newWidth:Number = width;
-		if (isNaN(newWidth))
-			newWidth = getPreferredBoundsWidth();
-
-		// re-add the left and right gutters
-		if (useTightTextBounds)
-			newWidth += StyleableTextField.TEXT_WIDTH_PADDING;
-
-		this.width = newWidth;
-
-		// height
-		var newHeight:Number = height;
-		if (isNaN(newHeight))
-			newHeight = getPreferredBoundsHeight();
-
-		// re-add the top and bottom offsets.  (measuredTextSize.y - tightTextHeight) gives us
-		// the sum of top and bottom offsets
-		if (useTightTextBounds)
-			newHeight += (measuredTextSize.y - tightTextHeight);
-
-		this.height = newHeight;
+    {
+        // width
+        var newWidth:Number = width;
+        if (isNaN(newWidth))
+            newWidth = getPreferredBoundsWidth();
+
+        // re-add the left and right gutters
+        if (useTightTextBounds)
+            newWidth += StyleableTextField.TEXT_WIDTH_PADDING;
+
+        this.width = newWidth;
+
+        // height
+        var newHeight:Number = height;
+        if (isNaN(newHeight))
+            newHeight = getPreferredBoundsHeight();
+
+        // re-add the top and bottom offsets.  (measuredTextSize.y - tightTextHeight) gives us
+        // the sum of top and bottom offsets
+        if (useTightTextBounds)
+            newHeight += (measuredTextSize.y - tightTextHeight);
+
+        this.height = newHeight;
     }

     /**
@@ -1568,19 +1568,23 @@

         if (invalidateBaselinePosition)
         {
-            // getLineMetrics() returns strange numbers for an empty string,
-            // so instead we get the metrics for a non-empty string.
-            var isEmpty:Boolean = (text == "");
-            if (isEmpty)
-                super.text = "Wj";
-
-            _baselinePosition = getLineMetrics(0).ascent;
-
-            if (isEmpty)
-                super.text = "";
-
-            // baseline = add top gutter
-            _baselinePosition += (StyleableTextField.TEXT_HEIGHT_PADDING / 2)
+            if (useTightTextBounds)
+            {
+                _baselinePosition = tightTextHeight;
+            }
+            else
+            {
+                // getLineMetrics() returns strange numbers for an empty string,
+                // so instead we get the metrics for a non-empty string.
+                var isEmpty:Boolean = (text == "");
+                if (isEmpty)
+                    super.text = "Wj";
+
+                _baselinePosition = getLineMetrics(0).ascent + (StyleableTextField.TEXT_HEIGHT_PADDING / 2);
+
+                if (isEmpty)
+                    super.text = "";
+            }

             invalidateBaselinePosition = false;
         }
@@ -1905,10 +1909,10 @@
     /**
      *  @private
      *  Storage for the inline styles on this StyleableTextField instance
-     *
-     *  There's no real need for _inlineStyleObject because we could
-     *  just piggy-back off of styleDeclaration (and create a new
-     *  CSSStyleDeclaration when setStyle() is called, but this is easier
+     *
+     *  There's no real need for _inlineStyleObject because we could
+     *  just piggy-back off of styleDeclaration (and create a new
+     *  CSSStyleDeclaration when setStyle() is called, but this is easier
      *  and there seems to be less overhead with this approach).
      */
     private var _inlineStyleObject:Object;
@@ -1916,11 +1920,11 @@
     // Name of the style to use for determining the text color
     mx_internal var colorName:String = "color";

-	// Whether or not we want to size and position the text field based upon its
-	// tight text bounds.  Use useTightTextBounds == true when you want precise
-	// text placement.
-	mx_internal var useTightTextBounds:Boolean = true;
-
+    // Whether or not we want to size and position the text field based upon its
+    // tight text bounds.  Use useTightTextBounds == true when you want precise
+    // text placement.
+    mx_internal var useTightTextBounds:Boolean = true;
+
     private static var supportedStyles:String = "textAlign fontFamily fontWeight fontStyle color fontSize textDecoration textIndent leading letterSpacing"

     private var invalidateStyleFlag:Boolean = true;
@@ -1930,14 +1934,14 @@
     private var _isTruncated:Boolean = false;

     private static var embeddedFonts:Array;
-
-
-	/**
-	 *  @private
-	 *  Table of text top offsets for different fonts, sizes, weights and styles
-	 */
-	private static var textTopOffsetTable:Dictionary = new Dictionary();
-
+
+
+    /**
+     *  @private
+     *  Table of text top offsets for different fonts, sizes, weights and styles
+     */
+    private static var textTopOffsetTable:Dictionary = new Dictionary();
+
     /**
      *  @private
      *  Whether this StyleableTextField needs to be measure its unscaled size
@@ -1959,36 +1963,36 @@
      */
     private var _baselinePosition:Number;

-	/**
-	 *  @private
-	 */
-	private var invalidateTightTextHeight:Boolean = true;
-
-	/**
-	 *  @private
-	 */
-	private var _tightTextHeight:Number;
+    /**
+     *  @private
+     */
+    private var invalidateTightTextHeight:Boolean = true;
+
+    /**
+     *  @private
+     */
+    private var _tightTextHeight:Number;

     /**
      *  @private
      *  Used to keep track if this StyleableTextField is already in "scrolling mode"
-     *  and what scroller it is using to scroll.  This is so we can respond appropriately
+     *  and what scroller it is using to scroll.  This is so we can respond appropriately
      *  to other touchInteractionStarting and touchInteractionEnd events.
      */
     private var scrollerInTextSelectionMode:Scroller;
-
+
     /**
      *  @private
      *  The padding to be added to textWidth to get the width
      *  of a TextField that can display the text without clipping.
-     */
+     */
     mx_internal static const TEXT_WIDTH_PADDING:int = 5;

     /**
      *  @private
      *  The padding to be added to textHeight to get the height
      *  of a TextField that can display the text without clipping.
-     */
+     */
     mx_internal static const TEXT_HEIGHT_PADDING:int = 4;
 }
 }


Fixed level cleanup

Fixed level cleanup

--- src/LevelState.as
+++ src/LevelState.as
@@ -798,9 +798,10 @@

 		protected function load(saveString:String = null):void {
-			for each (var module:Module in level.modules)
-				if (module.FIXED)
-					module.deregister(); //cleanup
+			if (wires)
+				for each (var module:Module in level.modules)
+					if (module.FIXED)
+						module.deregister(); //cleanup

 			initLayers();
 			displayWires = new Vector.<DWire>;


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

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

 package spark.components.gridClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5393
Author:   rfrishbe@adobe.com
Date:     2009-03-18T17:43:37.919635Z

Log Message:
-----------
For item renderers, we weren't correctly parsing the color name for alternatingItemColor.

Also, in VGroup/HGroup, we ended up allocating 2 different layout objects.  Now, we only allocate one of them because the GroupBase constructor takes an optional layout parameter.

QE Notes: -
Doc Notes: -
Bugs: SDK-19486, SDK-19976
Reviewer: Deepa
tests: checkintests, datagroup, group, fxdatacontainer, list (some failed, but qa has approved me as they must be Mac issues)

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -17,18 +17,18 @@
 import mx.components.ResizeMode;
 import mx.controls.Label;
 import mx.core.IFactory;
+import mx.core.ILayoutElement;
 import mx.core.IViewport;
 import mx.core.IVisualElement;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.events.CollectionEvent;
 import mx.events.FlexEvent;
-import mx.events.RendererExistenceEvent;
 import mx.events.PropertyChangeEvent;
 import mx.events.PropertyChangeEventKind;
+import mx.events.RendererExistenceEvent;
 import mx.graphics.MaskType;
 import mx.layout.BasicLayout;
-import mx.core.ILayoutElement;
 import mx.layout.LayoutBase;
 import mx.utils.MatrixUtil;

@@ -141,23 +141,26 @@
     //--------------------------------------------------------------------------

     /**
-     * Constructor.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function GroupBase()
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function GroupBase(layout:LayoutBase = null)
     {
         super();
         tabChildren = true;

-        if(_layout == null)
-        {
-	        _layout = new BasicLayout();
-    	    _layout.target = this;
-    	}
+        // our default layout is null.  Otherwise, use the layout
+        // passed in via the constructor
+        if(layout == null)
+            _layout = new BasicLayout();
+        else
+            _layout = layout;
+
+    	_layout.target = this;
     }

     //--------------------------------------------------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 5812
Author:   chaase@adobe.com
Date:     2009-03-31T18:34:56.901097Z

Log Message:
-----------
Fixed a bug where direct use of Animation failed because AnimationProperty was not setting up its internal keyframes with correct duration information, so the animation would skip immediately to the end.

Bugs: SDK-20356
QE Notes: spark/effects Mustella tests currently hosed, couldn't run test suite
Doc Notes: None
Reviewer: Jason
Testing: checkintests, Mustella effects tests could not be run (post-rename issues)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RotateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateShaderTransitionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimationProperty.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/Rotate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/MoveInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/MoveInstance.as
@@ -146,8 +146,8 @@
     override public function play():void
     {
         animationProperties =
-            [new AnimationProperty("x", xFrom, xTo, xBy),
-             new AnimationProperty("y", yFrom, yTo, yBy)];
+            [new AnimationProperty("x", xFrom, xTo, duration, xBy),
+             new AnimationProperty("y", yFrom, yTo, duration, yBy)];

         // TODO (chaase): The Flex3 version of Move had logic for forcing clipping
         // off during the effect. We probably need something like this


junit style report correction

junit style report correction

git-svn-id: 4969af7a11582c80b682e8a73ed7b35a57fe0a9c@128325 3e83ccf1-c6ce-0310-9054-8fdb33cf0640

--- zucchini.lib/src/pl/ydp/automation/execution/report/ReportExporter.as
+++ zucchini.lib/src/pl/ydp/automation/execution/report/ReportExporter.as
@@ -56,7 +56,7 @@

 				for each( var target:IReportTarget in reportModel.reportsTargets ){
 					injector.injectInto( target );
-					target.send( reportData.reportXML.@name, report ).addOnce( onReportSent );
+					target.send( reportData.reportXML.testsuite.@name, report ).addOnce( onReportSent );
 				}

 			}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkNumericStepperAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkNumericStepperAutomationImpl.as
@@ -0,0 +1,292 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.automation.delegates.components
+{
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+	import flash.events.KeyboardEvent;
+	import flash.events.MouseEvent;
+	import flash.events.TextEvent;
+	import flash.ui.Keyboard;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationObjectHelper;
+	import mx.automation.events.AutomationRecordEvent;
+	import mx.automation.events.TextSelectionEvent;
+	import mx.core.EventPriority;
+	import mx.core.mx_internal;
+	import mx.events.FlexEvent;
+
+	import spark.automation.events.SparkValueChangeAutomationEvent;
+	import spark.components.NumericStepper;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  NumericStepper control.
+	 *
+	 *  @see spark.components.NumericStepper
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 4
+	 */
+	public class SparkNumericStepperAutomationImpl extends SparkSpinnerAutomationImpl
+	{
+
+		include "../../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(spark.components.NumericStepper, SparkNumericStepperAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 * @param obj NumericStepper object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function SparkNumericStepperAutomationImpl(obj:spark.components.NumericStepper)
+		{
+			super(obj);
+			obj.addEventListener(MouseEvent.CLICK, mouseClickHandler,false,0,true);
+
+		}
+
+
+		/**
+		 *  @private
+		 *
+		 */
+		private function mouseClickHandler(event:MouseEvent):void
+		{
+			// we dont want to record click on the numeric stepper
+			;
+		}
+		/**
+		 *  @private
+		 *
+		 */
+		protected function get ns():spark.components.NumericStepper
+		{
+			return uiComponent as spark.components.NumericStepper;
+		}
+
+		//----------------------------------
+		//  automationValue
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function get automationValue():Array
+		{
+			return [ ns.value.toString() ];
+
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function replayAutomatableEvent(event:Event):Boolean
+		{
+
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			// we have tried to do this in the numeric stepper instead of the spinner
+			//http://bugs.adobe.com/jira/browse/FLEXENT-1072
+			// it was observed that if the previous operation was a string maninpulation
+			// on the textField of the numeric stepper, the changes made to the string
+			// is not reflected even to the RichEditableText's text property. so setting
+			// a value to the numeric stepper using the new string never happens. Hence
+			// before the next change event replay, instead of using the value of the numeric stepper
+			// we need to use the text value to compare the current vs new value.
+			if (event is SparkValueChangeAutomationEvent)
+			{
+				var nsEvent:SparkValueChangeAutomationEvent = SparkValueChangeAutomationEvent(event);
+				// here we need a Button Down event to be replayed, as the mouse down does not trigger
+				// button down. However we are still replaying the mouse events also to make the
+				//  handlers for those events to happen.
+				var buttonDownEvent:FlexEvent = new FlexEvent(FlexEvent.BUTTON_DOWN);
+
+				var number:Number = Number(ns.textDisplay.textDisplay.text);
+				if(nsEvent.value > number)
+				{
+					nSpinner.incrementButton.dispatchEvent(buttonDownEvent);
+					help.replayClick(nSpinner.incrementButton);
+				}
+				else if(nsEvent.value < number)
+				{
+					nSpinner.decrementButton.dispatchEvent(buttonDownEvent);
+					help.replayClick(nSpinner.decrementButton);
+				}
+				else if(ns.value !=  number)
+					ns.value = number;
+				// no event if the value was the same as before
+			}
+			else if (event is KeyboardEvent)
+			{
+
+				if ((event as KeyboardEvent).keyCode == Keyboard.HOME ||
+					(event as KeyboardEvent).keyCode == Keyboard.END ||
+					(event as KeyboardEvent).keyCode == Keyboard.UP ||
+					(event as KeyboardEvent).keyCode == Keyboard.DOWN)
+				{
+					help.replayKeyboardEvent(ns.textDisplay,
+						KeyboardEvent(event));
+				}
+				else
+					ns.textDisplay.replayAutomatableEvent(event);
+
+				// we observed that after the key replay the stepper value was not
+				// getiing reset.so let us set the value if the string is not empty
+				// when empty,we setting this will cause string to have value '0' which is not
+				// exptected.
+				if(ns.textDisplay.text.length)
+					ns.value = Number(ns.textDisplay.text);
+			}
+			else if (event is TextEvent || event is TextSelectionEvent)
+			{
+
+				(ns.textDisplay as IAutomationObject).replayAutomatableEvent(event);
+				ns.textDisplay.invalidateProperties();
+				ns.textDisplay.validateNow();
+
+
+				// it was observerd that after the complete element delete or back space
+				// the chars were not getting replayed on numeric stepper as it was expected.
+				// only the next operation on the numeric stepper
+				// tries to get the value of the text filed, so here we try to do that
+				// by adding the following hack
+				if(event is TextEvent)
+				{
+					ns.textDisplay.insertText("");
+				}
+
+
+				// we saw that the ns value was not getting refreshed after the text changes
+				// so till the issue is resolved, we are resetting the value to the stepper.
+				ns.value = Number(ns.textDisplay.text);
+			}
+			else
+			{
+				return super.replayAutomatableEvent(event);
+			}
+
+			return true;
+		}
+
+		/**
+		 *  Method which gets called after the component has been initialized.
+		 *  This can be used to access any sub-components and act on the component.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		override protected function componentInitialized():void
+		{
+			super.componentInitialized();
+
+
+			ns.textDisplay.addEventListener(KeyboardEvent.KEY_DOWN,
+				inputField_keyDownHandler, false, EventPriority.DEFAULT+1, true);
+
+			// let us listen to the text record event coming from the textInput.
+			// refer the even dispatch in the textBaseAutomationImpl during replay
+			ns.textDisplay.addEventListener(AutomationRecordEvent.RECORD,
+				inputField_recordHandler1, false, 0, true);
+
+
+		}
+
+		private function inputField_keyDownHandler(event:KeyboardEvent):void
+		{
+
+			if (event.keyCode == Keyboard.HOME ||
+				event.keyCode == Keyboard.END ||
+				event.keyCode == Keyboard.UP ||
+				event.keyCode == Keyboard.DOWN)
+			{
+				recordAutomatableEvent(event);
+			}
+			// this variable is used in the spinner delegate to differentiate whehter the current event happend
+			// by keydown or not.
+			// so after recording the current event, we need to set this to false
+			// so that only the changes corresponds to mouse interaction will be captured by the
+			// change event.
+			keyDownHappened = false;
+		}
+
+
+
+		private function inputField_recordHandler1(event1:AutomationRecordEvent):void
+		{
+			// We get this handler for events from ns.textDisplay.textDisplay also.
+			// i.e., for the same user interaction, ns.textDisplay (which is the TextInput
+			// of NumericStepper) and ns.textDisplay.textDisplay (which is the RichEditableText of
+			// NumericStepper's TextInput) will try to record the details. We need to handle the one
+			// from TextInput
+			if(event1.automationObject == ns.textDisplay)
+			{// the text event coming from the textInput, let us handle it
+				// and record as our own events.
+
+				// enter key is recorded by the base class.
+				// prevent its recording
+				var re:Object = event1.replayableEvent;
+				if (re is KeyboardEvent && re.keyCode == Keyboard.ENTER)
+					return;
+				recordAutomatableEvent(event1.replayableEvent);
+
+				// this variable is used in the spinner delegate to differentiate whehter the current event happend
+				// by keydown or not.
+				// so after recording the current event, we need to set this to false
+				// so that only the changes corresponds to mouse interaction will be captured by the
+				// change event.
+				keyDownHappened = false;
+			}
+		}
+
+	}
+}


minor space cleaning

minor space cleaning

--- DroneAnarchy/Resources/Scripts/DroneAnarchy.as
+++ DroneAnarchy/Resources/Scripts/DroneAnarchy.as
@@ -531,10 +531,7 @@
 	//Hide the enemy counter and player score texts
 	enemyCounterText_.text = "";
 	playerScoreText_.text = "";
-
-
-
-
+
 }


- change: The List control now resets the selected index to -1 (no item selected) instead of 0 (first item selected)

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

--- src/reprise/controls/List.as
+++ src/reprise/controls/List.as
@@ -54,7 +54,7 @@
 			{
 				addItemWithTitleAndValue(item.label, item.value);
 			}
-			setSelectedIndex(0);
+			setSelectedIndex(-1);
 		}

 		public function removeAllItems() : void


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/advancedgrids/src/mx/olap/aggregators/MaxAggregator.as
+++ frameworks/projects/advancedgrids/src/mx/olap/aggregators/MaxAggregator.as
@@ -0,0 +1,134 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package mx.olap.aggregators
+{
+import mx.olap.IOLAPCustomAggregator;
+
+/**
+ *  The MaxAggregator class  implements the maximum aggregator.
+ *  The maximum aggregator returns the maximum value of all measures.
+ *  Flex uses this aggregator when you set the OLAPMeasure.aggregator property
+ *  to "MAX".
+ *
+ *  @see mx.olap.OLAPMeasure
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class MaxAggregator implements IOLAPCustomAggregator
+{
+	//--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    // max functions.
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeBegin(dataField:String):Object
+    {
+        var newObj:Object = {};
+        newObj[dataField] = -Number.MAX_VALUE;
+        return newObj;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeLoop(data:Object, dataField:String, rowData:Object):void
+    {
+    	var value:Number = rowData[dataField];
+    	if (typeof(value) == "xml")
+			value = Number(value.toString());
+
+        if (!data.hasOwnProperty(dataField))
+            data[dataField] = value;
+        else
+            data[dataField] =  data[dataField] > value ? data[dataField] : value;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeEnd(data:Object, dataField:String):Number
+    {
+        return data[dataField];
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeObjectBegin(value:Object):Object
+    {
+        var newObj:Object = {};
+        for (var p:String in value)
+        {
+            newObj[p] = value[p];
+        }
+        return newObj;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeObjectLoop(oldValue:Object, newValue:Object):void
+    {
+        for (var p:String in newValue)
+        {
+            oldValue[p] = oldValue[p] > newValue[p] ? oldValue[p] : newValue[p];
+        }
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function computeObjectEnd(oldValue:Object, dataField:String):Number
+    {
+        return oldValue[dataField];
+    }
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3970
Author:   smgilson@adobe.com
Date:     2008-10-30T18:29:45.702912Z

Log Message:
-----------
Mark classes as @private that are also [ExcludeClass]

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/PlaceholderData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/RemotePopUp.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/StageEventProxy.as</path>

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

--- frameworks/projects/framework/src/mx/managers/systemClasses/RemotePopUp.as
+++ frameworks/projects/framework/src/mx/managers/systemClasses/RemotePopUp.as
@@ -18,6 +18,7 @@
 [ExcludeClass]

 /**
+ * @private
  * A form that exists in a SystemManager in another sandbox or compiled with
  * a different version of Flex.
  *
@@ -27,27 +28,27 @@
  */
 public class RemotePopUp extends Object
 {
-	/**
-	 * Create new RemotePopUp. There are two kinds of remote pop ups. One for trusted
-	 * popups and one for untrusted popups. Trusted pop ups pass may pass display objects
-	 * and the bridge handle of the form. Untrusted pop ups may only pass a string id and
-	 * the bridge handle of the direct child.
-	 *
-	 * @param window String if the form is a placeholder for an untrusted pop up. A display
-	 * object (SystemManagerProxy) if the form is trusted.
-	 *
-	 * @param bridge If the form is trusted, the bridge handle of the source of the form.
-	 * If the form is untrusted, the bridge of the direct child of this application that parents
-	 * the source of the form.
-	 */
-	public function RemotePopUp(window:Object, bridge:Object)
-	{
-		this.window = window;
-  		this.bridge = bridge;
-	}
-
-	public var window:Object;		// SystemManagerProxy or String id of remote form
-	public var bridge:Object;		// bridge of remote form
+    /**
+     * Create new RemotePopUp. There are two kinds of remote pop ups. One for trusted
+     * popups and one for untrusted popups. Trusted pop ups pass may pass display objects
+     * and the bridge handle of the form. Untrusted pop ups may only pass a string id and
+     * the bridge handle of the direct child.
+     *
+     * @param window String if the form is a placeholder for an untrusted pop up. A display
+     * object (SystemManagerProxy) if the form is trusted.
+     *
+     * @param bridge If the form is trusted, the bridge handle of the source of the form.
+     * If the form is untrusted, the bridge of the direct child of this application that parents
+     * the source of the form.
+     */
+    public function RemotePopUp(window:Object, bridge:Object)
+    {
+        this.window = window;
+        this.bridge = bridge;
+    }
+
+    public var window:Object;       // SystemManagerProxy or String id of remote form
+    public var bridge:Object;       // bridge of remote form
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18625
Author:   smgilson@adobe.com
Date:     2010-11-16T20:43:37.417675Z

Log Message:
-----------
ASDoc updates for DataGrid

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/CellRegion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/CellPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/DefaultGridItemEditor.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/ComboBoxGridItemEditor.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/CellPosition.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/CellPosition.as
@@ -14,16 +14,18 @@

 /**
  *  The CellPosition class defines a data structure
- *  used by the spark data grid classes to represent selected cells in the
- *  DataGrid control.  Each selected cell is represented by an instance of
- *  this class.
+ *  used by the Spark data grid classes to represent selected cells in the
+ *  control.
+ *  Each selected cell is represented by an instance of this class.
  *
- *  @see spark.component.DataGrid
- *  @see spark.component.Grid
+ *  @see spark.components.DataGrid#selectedCell
+ *  @see spark.components.DataGrid#selectedCells
+ *  @see spark.components.Grid#selectedCell
+ *  @see spark.components.Grid#selectedCells
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
- *  @playerversion AIR 2
+ *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
 public class CellPosition
@@ -39,12 +41,15 @@
     /**
      *  Constructor.
      *
-     *  @param rowIndex The 0-based row index of the cell.
-     *  @param columnIndex The 0-based column index of the cell. A value of -1 indicates "not set".
+     *  @param rowIndex The 0-based row index of the cell.
+     *  A value of -1 indicates that the value is not set.
+     *
+     *  @param columnIndex The 0-based column index of the cell.
+     *  A value of -1 indicates that the value is not set.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function CellPosition(rowIndex:int = -1, columnIndex:int = -1)
@@ -69,13 +74,13 @@

     /**
      *  The 0-based column index of the cell.
-     *  A value of -1 indicates "not set".
+     *  A value of -1 indicates that the value is not set.
      *
      *  @default -1
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get columnIndex():int
@@ -99,13 +104,13 @@

     /**
      *  The 0-based row index of the cell.
-     *  A value of -1 indicates "not set".
+     *  A value of -1 indicates that the value is not set.
      *
      *  @default -1
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get rowIndex():int


Transferred from the Adobe Open Source Subversion Repository

Revision: 14483
Author:   smgilson@adobe.com
Date:     2010-03-01T19:01:18.459430Z

Log Message:
-----------
merge 14456: Adding ASDoc version tags classes

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/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkRangeAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkRadioButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkPanelAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarAutomationImpl.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_air/src/mx/automation/air/AirFunctionsHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkSkinnableContainerAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/events/SparkValueChangeAutomationEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBarBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkNavigatorContentAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDataGroupAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkTrackBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/automation/events/EventDetails.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/events/SparkListItemSelectEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkTabBarAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkGroupAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableContainerBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/mediaClasses/SparkMuteButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_air/src/mx/automation/air/AirDragManagerAutomationHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/SOAPResult.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkTextBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkTitleWindowAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkTileGroupAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkToggleButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkSpinnerAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccConst.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkLabelAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkBorderContainerAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkGroupBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkVideoPlayerAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableComponentAutomationImpl.as</path>

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBarBaseAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBarBaseAutomationImpl.as
@@ -11,107 +11,117 @@

 package spark.automation.delegates.components.supportClasses
 {
-	import flash.display.DisplayObject;
-	import flash.events.KeyboardEvent;
-	import flash.events.MouseEvent;
-	import flash.ui.Keyboard;
-
-	import mx.automation.Automation;
-	import mx.automation.events.AutomationRecordEvent;
-	import mx.core.EventPriority;
-	import mx.core.mx_internal;
-
-	import spark.components.supportClasses.ButtonBarBase;
-	import spark.events.IndexChangeEvent;
-
-	use namespace mx_internal;
-
-	[Mixin]
-
-	/**
-	 *
-	 *  Defines methods and properties required to perform instrumentation for the
-	 *  ButtonBarBase control.
-	 *
-	 *  @see spark.components.supportClasses.ButtonBarBase
-	 *
-	 */
-	public class SparkButtonBarBaseAutomationImpl extends SparkListBaseAutomationImpl
-	{
-		include "../../../../core/Version.as";
-
-		//--------------------------------------------------------------------------
-		//
-		//  Class methods
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  Registers the delegate class for a component class with automation manager.
-		 *
-		 *  @param root The SystemManger of the application.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 9
-		 *  @playerversion AIR 1.1
-		 *  @productversion Flex 3
-		 */
-		public static function init(root:DisplayObject):void
-		{
-			Automation.registerDelegateClass(spark.components.supportClasses.ButtonBarBase, SparkButtonBarBaseAutomationImpl);
-		}
-
-		/**
-		 *  Constructor.
-		 * @param obj ButtonBarBase object to be automated.
-		 */
-		public function SparkButtonBarBaseAutomationImpl(obj:spark.components.supportClasses.ButtonBarBase)
-		{
-			super(obj);
-			recordClick = false;
-
-			obj.addEventListener(AutomationRecordEvent.RECORD, automationRecordHandler, false, EventPriority.DEFAULT+1, true);
-
-			obj.addEventListener(spark.events.IndexChangeEvent.CHANGE, itemClickHandler, false, 0, true);
-		}
-
-		/**
-		 *  @private
-		 */
-		private function automationRecordHandler(event:AutomationRecordEvent):void
-		{
-			if (event.replayableEvent.type == MouseEvent.CLICK)
-				event.stopImmediatePropagation();
-		}
-
-		/**
-		 *  @private
-		 */
-		protected function itemClickHandler(event:spark.events.IndexChangeEvent):void
-		{
-
-		}
-
-		//--------------------------------------------------------------------------
-		//
-		//  Event handlers
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  @private
-		 */
-		override protected function keyDownHandler(event:KeyboardEvent):void
-		{
-			switch (event.keyCode)
-			{
-				case Keyboard.DOWN:
-				case Keyboard.RIGHT:
-				case Keyboard.UP:
-				case Keyboard.LEFT:
-					recordAutomatableEvent(event);
-					break;
-			}
-		}
-	}
+    import flash.display.DisplayObject;
+    import flash.events.KeyboardEvent;
+    import flash.events.MouseEvent;
+    import flash.ui.Keyboard;
+
+    import mx.automation.Automation;
+    import mx.automation.events.AutomationRecordEvent;
+    import mx.core.EventPriority;
+    import mx.core.mx_internal;
+
+    import spark.components.supportClasses.ButtonBarBase;
+    import spark.events.IndexChangeEvent;
+
+    use namespace mx_internal;
+
+    [Mixin]
+
+    /**
+     *
+     *  Defines methods and properties required to perform instrumentation for the
+     *  ButtonBarBase control.
+     *
+     *  @see spark.components.supportClasses.ButtonBarBase
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     *
+     */
+    public class SparkButtonBarBaseAutomationImpl extends SparkListBaseAutomationImpl
+    {
+        include "../../../../core/Version.as";
+
+        //--------------------------------------------------------------------------
+        //
+        //  Class methods
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Registers the delegate class for a component class with automation manager.
+         *
+         *  @param root The SystemManger of the application.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 3
+         */
+        public static function init(root:DisplayObject):void
+        {
+            Automation.registerDelegateClass(spark.components.supportClasses.ButtonBarBase, SparkButtonBarBaseAutomationImpl);
+        }
+
+        /**
+         *  Constructor.
+         * @param obj ButtonBarBase object to be automated.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 3
+         */
+        public function SparkButtonBarBaseAutomationImpl(obj:spark.components.supportClasses.ButtonBarBase)
+        {
+            super(obj);
+            recordClick = false;
+
+            obj.addEventListener(AutomationRecordEvent.RECORD, automationRecordHandler, false, EventPriority.DEFAULT+1, true);
+
+            obj.addEventListener(spark.events.IndexChangeEvent.CHANGE, itemClickHandler, false, 0, true);
+        }
+
+        /**
+         *  @private
+         */
+        private function automationRecordHandler(event:AutomationRecordEvent):void
+        {
+            if (event.replayableEvent.type == MouseEvent.CLICK)
+                event.stopImmediatePropagation();
+        }
+
+        /**
+         *  @private
+         */
+        protected function itemClickHandler(event:spark.events.IndexChangeEvent):void
+        {
+
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Event handlers
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         */
+        override protected function keyDownHandler(event:KeyboardEvent):void
+        {
+            switch (event.keyCode)
+            {
+                case Keyboard.DOWN:
+                case Keyboard.RIGHT:
+                case Keyboard.UP:
+                case Keyboard.LEFT:
+                    recordAutomatableEvent(event);
+                    break;
+            }
+        }
+    }
 }


Initialize props "cloneable" and "compositeCloneable" of CompositeCloneableClass in tests.

--- dolly-framework/src/test/actionscript/dolly/CloningOfCompositeCloneableClassTest.as
+++ dolly-framework/src/test/actionscript/dolly/CloningOfCompositeCloneableClassTest.as
@@ -1,5 +1,6 @@
 package dolly {
 import dolly.core.dolly_internal;
+import dolly.data.CloneableClass;
 import dolly.data.CompositeCloneableClass;

 import mx.collections.ArrayCollection;
@@ -27,6 +28,19 @@
 	[Before]
 	public function before():void {
 		compositeCloneableClass = new CompositeCloneableClass();
+
+		const nestedCloneable:CloneableClass = new CloneableClass();
+		nestedCloneable.property1 = "property1 value";
+		nestedCloneable.writableField1 = "writableField1 value";
+
+		const nestedCompositeCloneable:CompositeCloneableClass = new CompositeCloneableClass();
+		nestedCompositeCloneable.compositeCloneable = compositeCloneableClass;
+		nestedCompositeCloneable.array = [1, 2, 3];
+		nestedCompositeCloneable.arrayList = new ArrayList([1, 2, 3]);
+		nestedCompositeCloneable.arrayCollection = new ArrayCollection([1, 2, 3]);
+
+		compositeCloneableClass.cloneable = nestedCloneable;
+		compositeCloneableClass.compositeCloneable = nestedCompositeCloneable;
 		compositeCloneableClass.array = [1, 2, 3, 4, 5];
 		compositeCloneableClass.arrayList = new ArrayList([1, 2, 3, 4, 5]);
 		compositeCloneableClass.arrayCollection = new ArrayCollection([1, 2, 3, 4, 5]);
@@ -36,6 +50,9 @@

 	[After]
 	public function after():void {
+		compositeCloneableClass.compositeCloneable =
+				compositeCloneableClass.compositeCloneable.compositeCloneable = null;
+		compositeCloneableClass.cloneable = null;
 		compositeCloneableClass = null;
 		compositeCloneableClassType = null;
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19231
Author:   jszeto@adobe.com
Date:     2010-12-09T19:25:51.943016Z

Log Message:
-----------
Mobile Skin Fixes

Merging in revisions 18989-19158 from hero_skin_sandbox.

The following component skins have been updated and 320 DPI skins added:

Button
CheckBox
RadioButton
TextInput
TextArea
ActionBar
HSlider

Updating MobileSkins test project

QE notes: baseline regen
Doc notes: none
Bugs: none
Reviewer: Jason San Jose, Tom Krakit
Tests run: full cyclone
Is noteworthy for integration: yes, updated skins!

Modified Paths:
--------------
129 paths were modified

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as
@@ -57,9 +57,9 @@
     // Used for gradient background
     protected static var matrix:Matrix = new Matrix();

-    protected static const ratios:Array = [0, 127.5, 255];
-
-    protected static const alphas:Array = [1, 1, 1];
+    protected static const CHROME_COLOR_RATIOS:Array = [0, 127.5];
+
+    protected static const CHROME_COLOR_ALPHAS:Array = [1, 1];

     private static const DEFAULT_SYMBOL_COLOR_VALUE:uint = 0x00;

@@ -113,7 +113,7 @@
      *  @productversion Flex 4.5
      */
     protected var useSymbolColor:Boolean = false;
-
+
     private var _focus:Boolean = false;

     //----------------------------------
@@ -317,11 +317,10 @@
         var colors:Array = [];
         matrix.createGradientBox(unscaledWidth, unscaledHeight, Math.PI / 2, 0, 0);
         var chromeColor:uint = getChromeColor();
-        colors[0] = ColorUtil.adjustBrightness2(chromeColor, 20);
+        colors[0] = ColorUtil.adjustBrightness2(chromeColor, 70);
         colors[1] = chromeColor;
-        colors[2] = ColorUtil.adjustBrightness2(chromeColor, -20);

-        chromeColorGraphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matrix);
+        chromeColorGraphics.beginGradientFill(GradientType.LINEAR, colors, CHROME_COLOR_ALPHAS, CHROME_COLOR_RATIOS, matrix);
     }

     protected function getChromeColor():uint