Transferred from the Adobe Open Source Subversion Repository

Revision: 18173
Author:   jasonsj@adobe.com
Date:     2010-10-15T17:03:20.801634Z

Log Message:
-----------
Mobile Theme Initial check-in

* New light-look visuals from XD
* Changed airmobile-config.xml to use standalone Mobile theme instead of Spark overlay
* Added theme="spark, mobile" where spark was already white-listed and support is implemented and/or planned for Mobile/spark.css (see https://zerowing.corp.adobe.com/display/flexmobile/Mobile+Theme+Styles+Spec)
* MobileSkin has symbolColor and chromeColor support. Override beginChromeColorFill and drawChromeColor when defining custom chromeColor visuals.
* CheckBox and RadioButton now have chromeColor and symbolColor support
* Added textShadowColor and textShadowAlpha support to Button and ActionBar
* Added chromeColor support to HScrollBar and VScrollBar

QE notes: All mobile skins have been updaetd.
Doc notes: Update mobile skinning documentation for new APIs
Bugs:
SDK-28043 Investigate usage of "viewWidth", "viewHeight" for the Flex Mobile Skin Assets
SDK-27609 Mobile scroll bar skins should use chromeColor
SDK-27646 cornerradius has no effect on button in mobile application
Reviewer: gruehle
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_symbol.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_symbol.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/Button_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/metadata/ContainerBackgroundStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.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="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/TextInput_border.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/Button_down.fxg</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_upSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_upSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_downSelected.fxg</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/themes/Mobile/spark.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/airmobile-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_downSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationButtonSkin.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -77,7 +77,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="borderVisible", type="Boolean", inherit="no", theme="spark")]
+[Style(name="borderVisible", type="Boolean", inherit="no", theme="spark, mobile")]

 /**
  *  The alpha of the content background for this component.
@@ -87,7 +87,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="contentBackgroundAlpha", type="Number", inherit="yes", theme="spark", minValue="0.0", maxValue="1.0")]
+[Style(name="contentBackgroundAlpha", type="Number", inherit="yes", theme="spark, mobile", minValue="0.0", maxValue="1.0")]

 /**
  *  @copy spark.components.supportClasses.GroupBase#contentBackgroundColor
@@ -97,7 +97,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="contentBackgroundColor", type="uint", format="Color", inherit="yes", theme="spark")]
+[Style(name="contentBackgroundColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]

 /**
  *  The alpha of the focus ring for this component.
@@ -107,7 +107,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="focusAlpha", type="Number", inherit="no", theme="spark", minValue="0.0", maxValue="1.0")]
+[Style(name="focusAlpha", type="Number", inherit="no", theme="spark, mobile", minValue="0.0", maxValue="1.0")]

 /**
  *  @copy spark.components.supportClasses.GroupBase#focusColor
@@ -117,7 +117,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="focusColor", type="uint", format="Color", inherit="yes", theme="spark")]
+[Style(name="focusColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]

 //--------------------------------------
 //  Events


Transferred from the Adobe Open Source Subversion Repository

Revision: 6792
Author:   jimurphy@adobe.com
Date:     2009-05-11T18:24:09.346026Z

Log Message:
-----------
Merged revisions 6729,6731,6746,6755,6757,6765,6767-6768,6770-6772,6775,6784-6786,6790 from http://p01weblab02.corp.adobe.com/svn/opensource/flex/sdk/branches/beta1

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/FlashContainerPlaceholder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/TypeHelper.java</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types" copyfrom-rev="6790" action="A">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/swf/FXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.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/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/RadioButtonSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types/FXGMatrix.java" copyfrom-rev="6790" action="R">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types/FXGMatrix.java</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -222,26 +222,9 @@

     /**
      *  @private
-     */
-    mx_internal var textInvalid:Boolean = false;
-
-    /**
-     *  @private
      *  Mouse shield that is put up when this component is disabled.
      */
     private var mouseShield:DisplayObject;
-
-    /**
-     *  @private
-     *  Text is a special case from the proxy pattern used for all the other
-     *  textView properties.  It is expensive to extract the text from the
-     *  textFlow so it is only done when really necessary.  As a result, the
-     *  textView text setter does not follow the normal pattern of checking
-     *  the value against the property and returning if it's already set.
-     *  We only want to proxy the text in the textView when we really need it
-     *  to be changed.
-     */
-    private var proxyText:Boolean = false;

     //--------------------------------------------------------------------------
     //
@@ -759,13 +742,6 @@
     //----------------------------------

     /**
-     *  @private
-     *  Text is the exception to the how the proxied properties work.  Because
-     *  it can be expensive to get text from the flow, keep a local copy.
-     */
-    private var _text:String;
-
-    /**
      *  The text String displayed by this component.
      *
      *  @langversion 3.0
@@ -775,17 +751,12 @@
      */
     public function get text():String
     {
-        // Thru events, textView notifies us when the text as we know it has
-        // changed.
-        if (mx_internal::textInvalid)
-        {
-            // Pull text up from textView into textViewProperties.
-            _text = textView.text;
-            mx_internal::textInvalid = false;
-        }
+        if (textView)
+            return textView.text;

         // want the default to be the empty string
-        return (_text == null) ? "" : _text;
+        var v:* = textViewProperties.text;
+        return (v === undefined) ? "" : v;
     }

     /**
@@ -793,22 +764,16 @@
      */
     public function set text(value:String):void
     {
-        if (value == _text)
-            return;
-
-        // If the textView is telling us about the change we don't want
-        // to proxy the text to it.
-        if (proxyText)
+        if (textView)
         {
             textView.text = value;
             textViewProperties = BitFlagUtil.update(
                 uint(textViewProperties), TEXT_PROPERTY_FLAG, true);
         }
-
-        // Always keep this current, even if using the textView.
-        _text = value;
-
-        mx_internal::textInvalid = false;
+        else
+        {
+            textViewProperties.text = value;
+        }

         invalidateProperties();
      }
@@ -925,7 +890,6 @@

             // Copy proxied values from textViewProperties (if set) to textView.
             textViewAdded();
-            proxyText = true;

             // Start listening for various events from the RichEditableText.

@@ -955,7 +919,6 @@
             // Copy proxied values from textView (if explicitly set) to
             // textViewProperties.
             textViewRemoved();
-            proxyText = false;

             // Stop listening for various events from the RichEditableText.

@@ -1242,10 +1205,9 @@
                 SELECTION_VISIBILITY_PROPERTY_FLAG, true);
         }

-        // Text is special.
-        if (_text != null)
-        {
-            textView.text = _text;
+        if (textViewProperties.text != null)
+        {
+            textView.text = textViewProperties.text;
             newTextViewProperties = BitFlagUtil.update(
                 uint(newTextViewProperties), TEXT_PROPERTY_FLAG, true);
         }
@@ -1325,7 +1287,7 @@

         // Text is special.
         if (BitFlagUtil.isSet(uint(textViewProperties), TEXT_PROPERTY_FLAG))
-            _text = textView.text;
+            newTextViewProperties.text = textView.text;

         if (BitFlagUtil.isSet(uint(textViewProperties),
             WIDTH_IN_CHARS_PROPERTY_FLAG))
@@ -1387,13 +1349,6 @@
     protected function textView_changeHandler(event:TextOperationEvent):void
     {
         //trace(id, "textView_changeHandler", textView.text);
-
-        // Use the setter so that the textChanged event is dispatched.  Set
-        // proxyText to false so the setter doesn't try to push the text down to
-        // textView.
-        proxyText = false;
-        text = textView.text;
-        proxyText = true;

         // Redispatch the event that came from the RichEditableText.
         dispatchEvent(event);


Transferred from the Adobe Open Source Subversion Repository

Revision: 195
Author:   clucier@adobe.com
Date:     2008-01-14T16:28:04.133917Z

Log Message:
-----------
Fixed size synchronization issue for Window and WindowedApplication.
(Cyclone tests passed - Joan Lafferty)

Bugs: SDK-14223
Docs: No
QA: Yes

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as

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

--- frameworks/projects/airframework/src/mx/core/Window.as
+++ frameworks/projects/airframework/src/mx/core/Window.as
@@ -1898,8 +1898,13 @@

         if (boundsChanged)
         {
-            systemManager.stage.stageWidth = _bounds.width;
-            systemManager.stage.stageHeight = _bounds.height;
+            // We use temporary variables because when we set stageWidth or
+            // stageHeight _bounds will be overwritten when we receive
+            // a RESIZE event.
+            var newWidth:Number  = _bounds.width;
+            var newHeight:Number = _bounds.height;
+            systemManager.stage.stageWidth = newWidth;
+            systemManager.stage.stageHeight = newHeight;
             boundsChanged = false;
         }


commented x, y and z getter in Sprite because they are now marked as final in AbstractSceneNode

--- src/aerys/minko/scene/node/Sprite.as
+++ src/aerys/minko/scene/node/Sprite.as
@@ -14,7 +14,7 @@
 		private static const EFFECT	: Effect	= new Effect(new SpriteShader());
 		private static const GEOM	: Geometry	= new BillboardsGeometry(1);

-		override public function get x() : Number
+		/*override public function get x() : Number
 		{
 			return bindings.getProperty('x') as Number;
 		}
@@ -30,7 +30,7 @@
 		override public function set y(value : Number) : void
 		{
 			properties.setProperty('y', value);
-		}
+		}*/

 		public function get width() : Number
 		{


react to fewer change events

react to fewer change events

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/SimpleBinding.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/SimpleBinding.as
@@ -175,6 +175,12 @@

 		private function changeHandler(event:Event):void
 		{
+            if (event.type == ValueChangeEvent.VALUE_CHANGE)
+            {
+                var vce:ValueChangeEvent = event as ValueChangeEvent;
+                if (vce.propertyName != sourcePropertyName)
+                    return;
+            }
 			destination[destinationPropertyName] = source[sourcePropertyName];
 		}


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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


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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBaseAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBaseAutomationImpl.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.supportClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 16822
Author:   deeptika@adobe.com
Date:     2010-07-07T06:16:32.586582Z

Log Message:
-----------
Removing deprecated API and their usage.

QE notes:
Doc notes:
Bugs: FLEXDMV-2463 (LineaSeries legendData marker are not working if the series has lineStroke to a SolidColorStroke)
FLEXDMV-2470 (Remove deprecation or Remove deprecated properties in charting)
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/BarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/CartesianChartAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/renderers/AreaRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/AreaChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/HLOCSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/LineSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/PlotChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/BubbleSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/ColumnSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation/src/mx/automation/tabularData/CartesianChartTabularData.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/CandlestickChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/HLOCChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/chartClasses/StackedSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/BarSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/LineChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/chartClasses/HLOCSeriesBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/chartClasses/ChartBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/BubbleChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/AreaSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/ColumnChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/PlotSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/renderers/HLOCItemRenderer.as</path>

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

--- frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
+++ frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
@@ -108,8 +108,8 @@

 /**
  * Determines the alignment of the label. Considered only
- * when labelPosition is inside. Possible values are center,
- * left, and right.
+ * when labelPosition is inside and label is shown vertically.
+ * Possible values are center, top, and bottom.
  *
  * @default "center"
  *
@@ -118,7 +118,7 @@
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-[Style(name="labelAlign", type="String", enumeration="left, center, right", inherit="no")]
+[Style(name="labelAlign", type="String", enumeration="top,center,bottom", inherit="no")]

 /**
@@ -1092,26 +1092,14 @@
         {
             if (!_horizontalAxis)
             {
-                if (c.secondSeries.indexOf(this) != -1 && c.secondHorizontalAxis)
-                {
-                    if (dataTransform.axes[CartesianTransform.HORIZONTAL_AXIS] != c.secondHorizontalAxis)
-                        CartesianTransform(dataTransform).setAxis(
-                            CartesianTransform.HORIZONTAL_AXIS,c.secondHorizontalAxis);
-                }
-                else if (dataTransform.axes[CartesianTransform.HORIZONTAL_AXIS] != c.horizontalAxis)
+               if (dataTransform.axes[CartesianTransform.HORIZONTAL_AXIS] != c.horizontalAxis)
                         CartesianTransform(dataTransform).setAxis(
                             CartesianTransform.HORIZONTAL_AXIS,c.horizontalAxis);
             }

             if (!_verticalAxis)
             {
-                if (c.secondSeries.indexOf(this) != -1 && c.secondVerticalAxis)
-                {
-                    if (dataTransform.axes[CartesianTransform.VERTICAL_AXIS] != c.secondVerticalAxis)
-                        CartesianTransform(dataTransform).setAxis(
-                            CartesianTransform.VERTICAL_AXIS,c.secondVerticalAxis);
-                }
-                else if (dataTransform.axes[CartesianTransform.VERTICAL_AXIS] != c.verticalAxis)
+                if (dataTransform.axes[CartesianTransform.VERTICAL_AXIS] != c.verticalAxis)
                         CartesianTransform(dataTransform).setAxis(
                             CartesianTransform.VERTICAL_AXIS, c.verticalAxis);
             }
@@ -1369,12 +1357,6 @@
                     allSeriesTransform = false;
             }

-            n = cChart.secondSeries.length;
-            for (i = 0; i < n; i++)
-            {
-                if (cChart.getSeriesTransformState(cChart.secondSeries[i]))
-                    allSeriesTransform = false;
-            }
             if (allSeriesTransform)
                 cChart.measureLabels();
         }


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 19527
Author:   klin@adobe.com
Date:     2010-12-23T01:22:07.328805Z

Log Message:
-----------
Enable percentWidth on ConstraintColumns in ConstraintLayout. The aligned columns of a Form will now fit inside the Form container because the content column of each FormItem has width="100%". Note that this changes the behavior for the default Spark Form. Form is now resizable by default and does not resize FormItems to fit the Form. FormItems should be set at width="100%" to fit the Form.

ConstraintLayout.as
-percentWidth on columns now works. Columns with a percentWidth will resize to fill the remaining space based on their specified percentages at layout time.
-measureAndPositionColumnsAndRows now takes two parameters, constrainedWidth and constrainedHeight, which are used to calculate the size of percent size columns and rows.
-Refactored measureColumns into three steps: Setting columns to their minimum width, finding the preferred width of each column based on elements that constrain to the column, and constraining the percent size columns to the given constrainingWidth.
-ConstraintLayout uses similar code to Horizontal and VerticalLayout to calculate the widths of the percent size columns in constrainPercentColumnWidths().

FormLayout.as
-Refactored much of the code to use and pass around a vector of the layout elements with a FormItemLayout.
-Modified updateDisplayList to first calculate the maximum column widths then constrain the percent size columns to the Form's unscaledWidth. This ensures that the columns will fit within the Form container. However, form items themselves are not resized to fit the columns. Thus, columns may spill out of each FormItem.

Skins, defaults.css
-The contentCol is now width="100%" making it fill the remaining space. Thus, Forms by default will be resizable.
-Fixed bug with bold font. We must hard code these values onto the sequenceLabel and labelDisplay because putting it in the CSS file will cause all the content to be bold too.
-Fixed bug in StackedFormItemSkin where the required indicator was included in the layout causing issues with its measuredMinWidth.

QE notes: No
Doc notes: No
Bugs: SDK-28949
Reviewer: Evtim
Tests run: cyclone to Joann, checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/FormHeadingSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/FormItemLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/FormLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/StackedFormItemSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/FormItemSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/StackedFormHeadingSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
+++ frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as
@@ -1,7 +1,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 Adobe Systems Incorporated
+//  Copyright 2010 Adobe Systems Incorporated
 //  All Rights Reserved.
 //
 //  NOTICE: Adobe permits you to use, modify, and distribute this file
@@ -11,11 +11,13 @@

 package spark.layouts
 {
+import flash.geom.Point;
 import flash.utils.Dictionary;

 import mx.containers.errors.ConstraintError;
 import mx.containers.utilityClasses.ConstraintColumn;
 import mx.containers.utilityClasses.ConstraintRow;
+import mx.containers.utilityClasses.Flex;
 import mx.core.ILayoutElement;
 import mx.core.mx_internal;
 import mx.resources.ResourceManager;
@@ -144,7 +146,7 @@
      *  Pass in unscaledWidth, left, right, childX to get a maxWidth value.
      *  Pass in unscaledHeight, top, bottom, childY to get a maxHeight value.
      */
-    static private function maxSizeToFitIn(totalSize:Number,
+    private static function maxSizeToFitIn(totalSize:Number,
                                            lowConstraint:Number,
                                            highConstraint:Number,
                                            position:Number):Number
@@ -205,10 +207,23 @@
      *  @private
      *  Vectors to store the baseline property of the rows, and
      *  the maximum ascent of the elements in each row.
+     *
+     *  In rowBaselines, the value is stored as
+     *  [value, maxAscent] if the baseline is maxAscent:value,
+     *  and [value, null] if the baseline is just a value.
      */
     private var rowBaselines:Vector.<Array> = null;
     private var rowMaxAscents:Vector.<Number> = null;

+    /**
+     *  @private
+     *  Hashtable that maps elements to their constraint
+     *  information. The mapping has type:
+     *  ILayoutElement -> ElementConstraintInfo
+     *
+     *  This cache is always discarded after measure() or
+     *  updateDisplayList() because the constraints may have changed.
+     */
     private var constraintCache:Dictionary = null;

     //--------------------------------------------------------------------------
@@ -264,10 +279,6 @@
             col = temp[i];
             col.container = this.target;
             obj[col.id] = i;
-
-            // TODO (klin): Allow percentWidth columns.
-            if (!isNaN(col.percentWidth))
-                throw new Error(ResourceManager.getInstance().getString("layout", "percentWidthColumn"));
         }

         _constraintColumns = temp;
@@ -405,7 +416,7 @@

         parseConstraints();

-        // TODO (klin): minimum will be different when percent size comes into play
+        // Find preferred column widths and row heights.
         var colWidths:Vector.<Number> = measureColumns();
         var rowHeights:Vector.<Number> = measureRows();
         var n:Number;
@@ -414,12 +425,20 @@
         {
             width += n;
         }
-        minWidth = width;
+
         for each (n in rowHeights)
         {
             height += n;
         }
         minHeight = height;
+
+        // Find minimum measured width by passing in 0 for the constrained width.
+        // This means that percentWidth columns will be set to their minWidth.
+        constrainPercentColumnWidths(colWidths, 0);
+        for each (n in colWidths)
+        {
+            minWidth += n;
+        }

         if (otherElements)
         {
@@ -437,11 +456,7 @@
         layoutTarget.measuredMinHeight = Math.ceil(minHeight);

         // clear out cache
-        colSpanElements = null;
-        rowSpanElements = null;
-        otherElements = null;
-        rowMaxAscents = null;
-        constraintCache = null;
+        clearConstraintCache();
     }

     /**
@@ -462,7 +477,7 @@

         // Need to measure in case of explicit width and height on target.
         // Also need to reparse constraints in case of something changing.
-        measureAndPositionColumnsAndRows();
+        measureAndPositionColumnsAndRows(unscaledWidth, unscaledHeight);

         layoutContent(unscaledWidth, unscaledHeight);
     }
@@ -516,26 +531,29 @@
         layoutTarget.setContentSize(Math.ceil(maxX), Math.ceil(maxY));

         // clear out cache
-        colSpanElements = null;
-        rowSpanElements = null;
-        otherElements = null;
-        rowMaxAscents = null;
-        constraintCache = null;
+        clearConstraintCache();
     }

     /**
      *  Used by FormItemLayout to measure and set new column widths
-     *  before laying out the elements.
+     *  and row heights before laying out the elements.
+     *
+     *  @param constrainedWidth The total width available for columns to stretch
+     *  or shrink their percent width columns. If NaN, percent width columns
+     *  are unconstrained and fit to their content.
+     *  @param constrainedHeight The total height available for rows to stretch
+     *  or shrink their percent height rows. If NaN, percent height rows
+     *  are unconstrained and fit to their content.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4.5
      */
-    protected function measureAndPositionColumnsAndRows():void
+    protected function measureAndPositionColumnsAndRows(constrainedWidth:Number = NaN, constrainedHeight:Number = NaN):void
     {
         parseConstraints();
-        setColumnWidths(measureColumns());
+        setColumnWidths(measureColumns(constrainedWidth));
         setRowHeights(measureRows());
     }

@@ -786,39 +804,288 @@
         layoutElement.setLayoutBoundsPosition(elementX, elementY);
     }

+    /**
+     *  @private
+     *  Updates the widths of content size and percent size columns that are spanned
+     *  by the specified element. This method updates the provided column widths
+     *  vector in place. The algorithm is as follows:
+     *
+     *  1) Determine the space needed by the element to satisfy its constraints
+     *     and be at its preferred size.
+     *
+     *  2) Calculate the number of columns the element will span.
+     *
+     *  3) If the element causes a column to expand, update the column width to match.
+     *     a) For the single spanning case, we only need to check if this element's
+     *        required width is larger than the column's current width.
+     *     b) For the multiple spanning case, we distribute the remaining width after
+     *        subtracting the fixed size columns across the content/percent size columns.
+     *        Then, we only update a column's width if the new divided width would cause
+     *        the column's width to expand.
+     *
+     *  @param elementInfo The constraint information of the element.
+     *  @param colWidths The vector of column widths to update.
+     */
+    private function updateColumnWidthsForElement(colWidths:Vector.<Number>, elementInfo:ElementConstraintInfo):void
+    {
+        var layoutElement:ILayoutElement = elementInfo.layoutElement;
+        var numCols:int = _constraintColumns.length;
+        var col:ConstraintColumn;
+
+        var leftIndex:int = -1;
+        var rightIndex:int = -1;
+        var span:int;
+
+        var extX:Number = 0;
+        var preferredWidth:Number = layoutElement.getPreferredBoundsWidth();
+        var maxExtent:Number;
+        var remainingWidth:Number;
+
+        var colWidth:Number = 0;
+
+        // 1) Determine how much space the element needs to satisfy its
+        //    constraints and be at its preferred width.
+        if (!isNaN(elementInfo.left))
+        {
+            extX += elementInfo.left;
+            if (elementInfo.leftBoundary)
+                leftIndex = elementInfo.colSpanLeftIndex;
+            else
+                leftIndex = 0; // constrained to parent
+        }
+
+        if (!isNaN(elementInfo.right))
+        {
+            extX += elementInfo.right;
+            if (elementInfo.rightBoundary)
+                rightIndex = elementInfo.colSpanRightIndex;
+            else
+                rightIndex = numCols - 1; // constrained to parent
+        }
+
+        maxExtent = extX + preferredWidth;
+        remainingWidth = maxExtent;
+
+        // 2) If either the left or the right constraint doesn't exist,
+        //    we must find the span of the element. We do this by
+        //    determining the index of the last column that the element
+        //    occupies in the unconstrained direction.
+        if (leftIndex < 0 || rightIndex < 0)
+        {
+            var isLeft:Boolean = leftIndex < 0;
+            var startIndex:int = isLeft ? rightIndex : leftIndex;
+            var endIndex:int = isLeft ? -1 : numCols;
+            var increment:int = isLeft ? -1 : 1;
+
+            if (isLeft) // defaults to 0
+                leftIndex = 0;
+            else // defaults to numCols - 1
+                rightIndex = numCols - 1;
+
+            for (j = startIndex; j != endIndex ; j += increment)
+            {
+                col = _constraintColumns[j];
+
+                // subtract fixed columns
+                if (!isNaN(col.explicitWidth))
+                    remainingWidth -= col.explicitWidth;
+
+                if ((col.contentSize || !isNaN(col.percentWidth)) || remainingWidth < 0)
+                {
+                    if (isLeft)
+                        leftIndex = j;
+                    else
+                        rightIndex = j;
+                    break;
+                }
+            }
+        }
+        // always 1 or positive.
+        span = rightIndex - leftIndex + 1;
+
+        // 3) If the element causes a column to expand, update the column width to match.
+        if (span == 1)
+        {
+           // a) For the single spanning case, we only need to check if this element's
+           //    required width is larger than the column's current width.
+            col = _constraintColumns[leftIndex];
+
+            if (col.contentSize || !isNaN(col.percentWidth))
+            {
+                colWidth = Math.max(colWidths[leftIndex], extX + preferredWidth);
+
+                if (constraintsDetermineWidth(elementInfo))
+                    colWidth = Math.max(colWidth, extX + layoutElement.getMinBoundsWidth());
+
+                // bound with max width of column
+                if (!isNaN(col.maxWidth))
+                    colWidth = Math.min(colWidth, col.maxWidth);
+
+                colWidths[leftIndex] = Math.ceil(colWidth);
+            }
+        }
+        else
+        {
+            // b) multiple spanning case when span >= 2.
+            //    1) start from leftIndex and subtract fixed columns.
+            //    2) divide space evenly into content/percent size columns.
+            var contentCols:Vector.<ConstraintColumn> = new Vector.<ConstraintColumn>();
+            var contentColsIndices:Vector.<int> = new Vector.<int>();
+            var j:int;
+
+            remainingWidth = maxExtent;
+            for (j = leftIndex; j <= rightIndex; j++)
+            {
+                col = _constraintColumns[j];
+
+                if (!isNaN(col.explicitWidth))
+                {
+                    if (remainingWidth < col.width)
+                        break;
+
+                    remainingWidth -= col.width;
+                }
+                else if (col.contentSize || !isNaN(col.percentWidth))
+                {
+                    contentCols.push(col);
+                    contentColsIndices.push(j);
+                }
+            }
+
+            var numContentCols:Number = contentCols.length;
+            if (numContentCols > 0)
+            {
+                var splitWidth:Number = remainingWidth / numContentCols;
+
+                for (j = 0; j < numContentCols; j++)
+                {
+                    col = contentCols[j];
+
+                    colWidth = Math.max(colWidths[contentColsIndices[j]], splitWidth);
+                    if (!isNaN(col.maxWidth))
+                        colWidth = Math.min(colWidth, col.maxWidth);
+
+                    colWidths[contentColsIndices[j]] = Math.ceil(colWidth);
+                }
+            }
+        }
+    }
+
+    /**
+     *  @private
+     *  Adjusts the widths of percent size columns to fill the constrainedWidth.
+     *  This method updates the provided column widths vector in place.
+     *
+     *  The percent size column widths are first reset to their minimum width.
+     *  If the given column widths from the content and fixed size columns already
+     *  fill the available width, then the percent size column widths stay at their
+     *  minimum width. Otherwise, the remaining width is distributed to the percent
+     *  size columns based on the ratio of the percentWidth to the sum of all the
+     *  percent widths.
+     */
+    private function constrainPercentColumnWidths(colWidths:Vector.<Number>, constrainedWidth:Number):void
+    {
+        var col:ConstraintColumn;
+        var numCols:int = _constraintColumns.length;
+        var childInfoArray:Array /* of ConstraintRegionFlexChildInfo */ = [];
+        var childInfo:ConstraintRegionFlexChildInfo;
+        var remainingWidth:Number = constrainedWidth;
+        var percentMinWidths:Number = 0;
+        var totalPercent:Number = 0;
+
+        // Set percent width columns back to minWidth and
+        // find the remaining width.
+        for (var i:int = 0; i < numCols; i++)
+        {
+            col = _constraintColumns[i];
+            if (!isNaN(col.percentWidth))
+            {
+                colWidths[i] = (!isNaN(col.minWidth)) ? Math.ceil(Math.max(col.minWidth, 0)) : 0;
+                percentMinWidths += colWidths[i];
+                totalPercent += col.percentWidth;
+
+                // Fill childInfoArray for distributing the width.
+                childInfo = new ConstraintRegionFlexChildInfo();
+                childInfo.index = i;
+                childInfo.percent = col.percentWidth;
+                childInfo.min = col.minWidth;
+                childInfo.max = col.maxWidth;
+                childInfoArray.push(childInfo);
+            }
+            else
+            {
+                remainingWidth -= colWidths[i];
+            }
+        }
+
+        // If there's space remaining, distribute the width to the percent size
+        // columns based on their ratio of percentWidth to sum of all the percentWidths.
+        if (remainingWidth > percentMinWidths)
+        {
+            Flex.flexChildrenProportionally(constrainedWidth,
+                                            remainingWidth,
+                                            totalPercent,
+                                            childInfoArray);
+
+            var roundOff:Number = 0;
+            for each (childInfo in childInfoArray)
+            {
+                // Make sure the calculated widths are rounded to pixel boundaries
+                var colWidth:Number = Math.round(childInfo.size + roundOff);
+                roundOff += childInfo.size - colWidth;
+
+                colWidths[childInfo.index] = colWidth;
+
+                // remainingWidth -= colWidth;
+            }
+            // FIXME (klin): What do we do if there's remainingWidth after all this?
+        }
+    }
+
     /**
      *  @private
      *  This function measures the ConstraintColumns partitioning
      *  the target and returns their new widths. The calculations
-     *  are based on the current constraintCache. To update the
-     *  constraintCache, one needs to call the parseConstraints()
-     *  method.
+     *  are based on the current constraintCache and other derived
+     *  data structures. To update the constraintCache, one needs to
+     *  call the parseConstraints() method.
+     *
+     *  The widths are measured with the following requirements:
+     *  1. Fixed size columns honor their pixel values.
+     *
+     *  2. Content size columns whose children only span that column
+     *     assumes the width of the widest child.
+     *
+     *  3. Content size columns whose children span more than one column
+     *     assumes the widest width possible when the child's size is divided
+     *     among the spanned columns.
+     *     a. Each child divides its preferred width among the content size
+     *        columns that it spans. A child also always honors fixed size
+     *        columns that it spans.
+     *     b. The column takes the widest width given by its children.
+     *
+     *  4. Percent size columns measure exactly like content size columns
+     *     at first, but after measurement, if availableWidth is provided,
+     *     the percent size columns are remeasured to allow the columns to
+     *     fit exactly in the remaining width in accordance with their given
+     *     percentage.
+     *     a. The percentages given are treated as ratios for how the width
+     *        should be divided among the percent size columns.
+     *     b. If no remaining space is available or the measured size of all
+     *        the content and fixed size columns are greater than the
+     *        constrainedWidth, percent size columns are set to their minimum.
+     *
+     *  5. Columns always honor their max and min widths.
+     *
+     *  6. If constrainedWidth is not specified, sum the column widths to find
+     *     the total measured width of the target.
      *
-     *  The algorithm works like this:
-     *  1. Fixed columns honor their pixel values.
-     *
-     *  2. Content sized columns whose children span
-     *  only that column assume the width of the widest child.
-     *
-     *  3. (not implemented) Those Content sized columns that span multiple
-     *  columns do the following:
-     *    a. Sort the children by order of how many columns they
-     *    are spanning.
-     *    b. For children spanning a single column, make each
-     *    column as wide as the preferred size of the child.
-     *    c. For subsequent children, divide the remainder space
-     *    equally between shared columns.
-     *
-     *  4. (not implemented) Remaining space is shared between the percentage size
-     *  columns.
-     *
-     *  5. x positions are set based on the column widths
-     *
-     *  6. Sum the column widths to get the total measured width of the target.
-     *
-     *  @return a vector of the new column widths.
-     */
-    private function measureColumns():Vector.<Number>
+     *  @param constrainedWidth The constraining width to be used when measuring
+     *  percent size columns. The default is NaN.
+     *
+     *  @return A vector of the new column widths.
+     */
+    mx_internal function measureColumns(constrainedWidth:Number = NaN):Vector.<Number>
     {
         // TODO (klin): Parameterize this to work for both columns and rows.
         // This may mean we need to add some mx_internal properties to
@@ -826,6 +1093,15 @@
         // 1-D properties like baseline? What parts can we parameterize and
         // what parts aren't possible.

+        // Parse constraints if it hasn't been done yet, make sure to clear
+        // the cache afterwards.
+        var clearCache:Boolean = false;
+        if (!constraintCache)
+        {
+            parseConstraints();
+            clearCache = true;
+        }
+
         if (_constraintColumns.length <= 0)
             return new Vector.<Number>();

@@ -834,16 +1110,19 @@
         var numCols:Number = _constraintColumns.length;
         var col:ConstraintColumn;
         var hasContentSize:Boolean = false;
-        var colWidths:Vector.<Number> = new Vector.<Number>();
+        var hasPercentSize:Boolean = false;
+        var colWidths:Vector.<Number> = new Vector.<Number>(numCols);

         // Start column widths at the minWidth of each column or
         // its explicit width.
         for (i = 0; i < numCols; i++)
         {
             col = _constraintColumns[i];
-            if (col.contentSize)
+
+            if (col.contentSize || !isNaN(col.percentWidth))
             {
-                hasContentSize = true;
+                hasContentSize ||= col.contentSize;
+                hasPercentSize ||= !isNaN(col.percentWidth);

                 if (!isNaN(col.minWidth))
                     colWidths[i] = Math.ceil(Math.max(col.minWidth, 0));
@@ -852,7 +1131,7 @@
             }
             else if (!isNaN(col.explicitWidth))
             {
-                var w:Number = col.width;
+                var w:Number = col.explicitWidth;

                 if (!isNaN(col.minWidth))
                     w = Math.max(w, col.minWidth);
@@ -866,161 +1145,24 @@

         // Assumption: elements in colSpanElements have one or more constraints touching a column.
         // This is enforced in parseElementConstraints().
-        if (colSpanElements && hasContentSize)
-        {
-            var numColSpanElements:Number = colSpanElements.length;
-
-            // Measure content size columns only single span for now.
-            // If multiple span, do nothing yet.
-            for (i = 0; i < numColSpanElements; i++)
+        if (colSpanElements && (hasContentSize || hasPercentSize))
+        {
+            // Measure content/percent size columns.
+            for each (var elementInfo:ElementConstraintInfo in colSpanElements)
             {
-                var elementInfo:ElementConstraintInfo = colSpanElements[i];
-                var layoutElement:ILayoutElement = elementInfo.layoutElement;
-                var leftIndex:int = -1;
-                var rightIndex:int = -1;
-                var span:int;
-
-                var extX:Number = 0;
-                var preferredWidth:Number = layoutElement.getPreferredBoundsWidth();
-                var maxExtent:Number;
-                var availableWidth:Number;
-
-                var j:int;
-                var colWidth:Number = 0;
-
-                // Determine how much space the element needs to satisfy its
-                // constraints and be at its preferred width.
-                if (!isNaN(elementInfo.left))
-                {
-                    extX += elementInfo.left;
-                    if (elementInfo.leftBoundary)
-                        leftIndex = elementInfo.colSpanLeftIndex;
-                    else
-                        leftIndex = 0; // constrained to parent
-                }
-
-                if (!isNaN(elementInfo.right))
-                {
-                    extX += elementInfo.right;
-                    if (elementInfo.rightBoundary)
-                        rightIndex = elementInfo.colSpanRightIndex;
-                    else
-                        rightIndex = numCols - 1; // constrained to parent
-                }
-
-                maxExtent = extX + preferredWidth;
-                availableWidth = maxExtent;
-
-                // If either the left or the right constraint doesn't exist,
-                // we must find the span of the element. We do this by
-                // determining the index of the last column that the element
-                // occupies in the unconstrained direction.
-                if (leftIndex < 0 || rightIndex < 0)
-                {
-                    var isLeft:Boolean = leftIndex < 0;
-                    var startIndex:int = isLeft ? rightIndex : leftIndex;
-                    var endIndex:int = isLeft ? -1 : numCols;
-                    var increment:int = isLeft ? -1 : 1;
-
-                    // defaults to 0
-                    if (isLeft)
-                        leftIndex = 0;
-                    else // defaults to numCols - 1
-                        rightIndex = numCols - 1;
-
-                    for (j = startIndex; j != endIndex ; j += increment)
-                    {
-                        col = _constraintColumns[j];
-
-                        // subtract fixed columns
-                        if (!isNaN(col.explicitWidth))
-                            availableWidth -= col.explicitWidth;
-
-                        if (col.contentSize || availableWidth < 0)
-                        {
-                            if (isLeft)
-                                leftIndex = j;
-                            else
-                                rightIndex = j;
-                            break;
-                        }
-                    }
-                }
-
-                // always 1 or positive.
-                span = rightIndex - leftIndex + 1;
-                //trace(span);
-
-                if (span == 1)
-                {
-                    col = _constraintColumns[leftIndex];
-
-                    // only measure with when dealing with content size
-                    if (col.contentSize)
-                    {
-                        colWidth = Math.max(colWidths[leftIndex], extX + preferredWidth);
-
-                        if (constraintsDetermineWidth(elementInfo))
-                            colWidth = Math.max(colWidth, extX + layoutElement.getMinBoundsWidth());
-
-                        // bound with max width of column
-                        if (!isNaN(col.maxWidth))
-                            colWidth = Math.min(colWidth, col.maxWidth);
-
-                        colWidths[leftIndex] = Math.ceil(colWidth);
-                    }
-                }
-                else
-                {
-                    // multiple spanning case. span >= 2.
-                    // 1) start from leftIndex and subtract fixed columns
-                    // 2) divide space evenly into content size columns.
-                    var contentCols:Vector.<ConstraintColumn> = new Vector.<ConstraintColumn>();
-                    var contentColsIndices:Vector.<int> = new Vector.<int>();
-
-                    availableWidth = maxExtent;
-
-                    for (j = leftIndex; j <= rightIndex; j++)
-                    {
-                        col = _constraintColumns[j];
-
-                        if (!isNaN(col.explicitWidth))
-                        {
-                            availableWidth -= col.width;
-
-                            if (availableWidth < 0)
-                            {
-                                availableWidth += col.width;
-                                break;
-                            }
-                        }
-                        else if (col.contentSize)
-                        {
-                            contentCols.push(col);
-                            contentColsIndices.push(j);
-                        }
-                    }
-
-                    var numContentCols:Number = contentCols.length;
-
-                    if (numContentCols > 0)
-                    {
-                        var splitWidth:Number = availableWidth / numContentCols;
-
-                        for (j = 0; j < numContentCols; j++)
-                        {
-                            col = contentCols[j];
-
-                            colWidth = Math.max(colWidths[contentColsIndices[j]], splitWidth);
-                            if (!isNaN(col.maxWidth))
-                                colWidth = Math.min(colWidth, col.maxWidth);
-
-                            colWidths[contentColsIndices[j]] = Math.ceil(colWidth);
-                        }
-                    }
-                }
-            }
-        }
+                updateColumnWidthsForElement(colWidths, elementInfo);
+            }
+        }
+
+        // Adjust percent size columns to account for constraining width.
+        if (!isNaN(constrainedWidth) && hasPercentSize)
+        {
+            constrainPercentColumnWidths(colWidths, constrainedWidth);
+        }
+
+        // Clear the cache only if we created it just for this method call.
+        if (clearCache)
+            clearConstraintCache();

         return colWidths;
     }
@@ -1442,7 +1584,7 @@

         // Variables to track the boundaries from which
         // the offsets are calculated from. If null, the
-        // boundary is the parent container edge.
+        // boundary is the parent container edge.
         var leftBoundary:String;
         var rightBoundary:String;
         var topBoundary:String;
@@ -1610,16 +1752,29 @@
             }
         }
     }
+
+    /**
+     *  @private
+     */
+    private function clearConstraintCache():void
+    {
+        colSpanElements = null;
+        rowSpanElements = null;
+        otherElements = null;
+        rowBaselines = null;
+        rowMaxAscents = null;
+        constraintCache = null;
+    }
 }
 }
-
-import mx.core.ILayoutElement;

 ////////////////////////////////////////////////////////////////////////////////
 //
 //  Helper class: ElementConstraintInfo
 //
 ////////////////////////////////////////////////////////////////////////////////
+
+import mx.core.ILayoutElement;

 class ElementConstraintInfo
 {
@@ -1694,4 +1849,17 @@
     public var rowSpanTopIndex:int;
     public var rowSpanBottomIndex:int;
     public var baselineIndex:int;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Helper class: ConstraintRegionFlexChildInfo
+//
+////////////////////////////////////////////////////////////////////////////////
+
+import mx.containers.utilityClasses.FlexChildInfo;
+
+class ConstraintRegionFlexChildInfo extends FlexChildInfo
+{
+    public var index:int
 }


Worked on UserPreferencesDialog

Worked on UserPreferencesDialog

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

--- org.openwms/trunk/org.openwms.app/org.openwms.client.flex.app/src/main/flex/org/openwms/web/flex/client/business/SecurityDelegate.as
+++ org.openwms/trunk/org.openwms.app/org.openwms.client.flex.app/src/main/flex/org/openwms/web/flex/client/business/SecurityDelegate.as
@@ -79,13 +79,11 @@
         }

         private function loginOk(event : TideResultEvent) : void {
-            trace("CALL SERVICE:");
             tideContext.securityContextHelper.getLoggedInUser(onComplete, onFault);
         }

         private function onComplete(event : TideResultEvent) : void {
             modelLocator.loggedInUser = event.result as User;
-            trace("Logged in user:" + modelLocator.loggedInUser);
             dispatchEvent(new ApplicationEvent(ApplicationEvent.APP_LOGIN_OK));
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 13046
Author:   hneelu@adobe.com
Date:     2009-12-17T12:34:07.695337Z

Log Message:
-----------
Updating automation sources..

Modified Paths:
--------------
451 paths were modified

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableTextBaseAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableTextBaseAutomationImpl.as
@@ -0,0 +1,352 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.supportClasses
+{
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+	import flash.events.KeyboardEvent;
+	import flash.events.MouseEvent;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationObjectHelper;
+	import mx.automation.events.AutomationDragEvent;
+	import mx.automation.events.AutomationRecordEvent;
+	import mx.core.EventPriority;
+	import mx.core.UIComponent;
+	import mx.core.mx_internal;
+
+	import spark.automation.delegates.SparkRichEditableTextAutomationHelper;
+	import spark.automation.tabularData.RichEditableTextTabularData;
+	import spark.components.Scroller;
+	import spark.components.supportClasses.SkinnableTextBase;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  SkinnableTextBase control.
+	 *
+	 *  @see spark.components.supportClasses.SkinnableTextBase
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class SparkSkinnableTextBaseAutomationImpl extends SparkSkinnableComponentAutomationImpl
+	{
+		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.SkinnableTextBase, SparkSkinnableTextBaseAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 * @param obj SkinnableTextBase object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function SparkSkinnableTextBaseAutomationImpl(obj:spark.components.supportClasses.SkinnableTextBase)
+		{
+			super(obj);
+			obj.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler,
+				false, EventPriority.DEFAULT+1, true );
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Variables
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 *  storage for the owner component
+		 */
+		protected function get  skinnableTextBase():spark.components.supportClasses.SkinnableTextBase
+		{
+			return uiComponent as spark.components.supportClasses.SkinnableTextBase;
+		}
+
+		/**
+		 *  @private
+		 *  Generic record/replay logic for textfields.
+		 */
+		private var automationHelper:SparkRichEditableTextAutomationHelper;
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden properties
+		//
+		//--------------------------------------------------------------------------
+
+		//----------------------------------
+		//  automationValue
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function get automationValue():Array
+		{
+			return [ skinnableTextBase.text ];
+		}
+
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function replayAutomatableEvent(interaction:Event):Boolean
+		{
+			// For drag events, this needs to be handled by this object itself
+			// instead of delegating it to its textDisplay
+			// This is needed for AIR as we need to dispatch native drag events on
+			// current object to handle drag drop events in AIR
+			// This is working in Flex even without this special handling because
+			// drag events are automatically triggered by mouse events in Flex.
+			// But this is not the case in AIR. Mouse events do not trigger those
+			// native drag events and so we need to construct those events manually
+			// and dispatch them on the corresponding objects to replay them.
+			if(interaction is AutomationDragEvent)
+				return super.replayAutomatableEvent(interaction);
+
+			// we have delegated the replay to the underlying the richEditabale Text.
+			if(skinnableTextBase.textDisplay)
+				return skinnableTextBase.textDisplay.replayAutomatableEvent(interaction);
+			else
+				return super.replayAutomatableEvent(interaction);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Event handlers
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  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 3
+		 */
+		override protected function componentInitialized():void
+		{
+			super.componentInitialized();
+			skinnableTextBase.addEventListener(AutomationRecordEvent.RECORD,
+				inputField_recordHandler1, false, 0, true);
+		}
+
+
+		private function inputField_recordHandler1(event1:AutomationRecordEvent):void
+		{
+			if(event1.automationObject == skinnableTextBase.textDisplay)
+			{
+				// let us record the evnet from the richEditableText as our event
+				recordAutomatableEvent(event1.replayableEvent);
+			}
+		}
+
+		/**
+		 *  @private
+		 *  Prevent duplicate ENTER key recordings.
+		 */
+		override protected function keyDownHandler(event:KeyboardEvent):void
+		{
+			;
+		}
+
+		/**
+		 *  @private
+		 */
+
+		override public function get automationTabularData():Object
+		{
+			return new RichEditableTextTabularData(skinnableTextBase.textDisplay);
+		}
+
+
+		/**
+		 *  @private
+		 */
+
+		override public function get numAutomationChildren():int
+		{
+			var scrollBars:Array = getScrollBars(skinnableTextBase,skinnableTextBase.skin);
+			return scrollBars?scrollBars.length:0;
+		}
+
+		override public function getAutomationChildAt(index:int):IAutomationObject
+		{
+			var scrollBars:Array = getScrollBars(skinnableTextBase,skinnableTextBase.skin);
+			if(scrollBars && index < scrollBars.length)
+				return scrollBars[index];
+			return null;
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function getAutomationChildren():Array
+		{
+			return getScrollBars(skinnableTextBase,skinnableTextBase.skin);
+		}
+
+		protected function getScrollBars(passedObj:Object, stopWithSkin:UIComponent):Array
+		{
+			var scroller:spark.components.Scroller = null;
+			if(passedObj)
+				scroller = getScroller(passedObj,null);
+			else
+				scroller = getScroller(skinnableTextBase,stopWithSkin);
+
+			if(scroller)
+			{
+				var tempArray:Array = new Array();
+				if(scroller.horizontalScrollBar)
+					tempArray.push(scroller.horizontalScrollBar);
+				if(scroller.verticalScrollBar)
+					tempArray.push(scroller.verticalScrollBar);
+
+			}
+			return tempArray;
+
+		}
+		protected function getScroller(passedObj:Object, stopWithSkin:UIComponent):spark.components.Scroller
+		{
+			if(passedObj)
+			{
+				if( !(passedObj.hasOwnProperty("numChildren") &&
+					passedObj.hasOwnProperty("getChildAt")))
+					return null;
+			}
+
+			var requiredObject:Object = null;
+			if(passedObj)
+				requiredObject = passedObj;
+			else
+				// just to ensure that if no object is passed, we will consider it on the
+				// current object.
+				requiredObject = skinnableTextBase;
+
+			var n:int = requiredObject.numChildren;
+
+			var obj:Object;
+			for (var i:int = 0; i<n ; i++)
+			{
+				obj  =  requiredObject.getChildAt(i);
+
+				if(obj is spark.components.Scroller)
+					return obj as spark.components.Scroller;
+
+				// check whether we need to proceed with the element to dig further
+				// if it is a skin we need to proceed.
+				// if the object corresponds to our contentGroup, we need not proceed further
+				if(obj == stopWithSkin)
+					continue;
+				do
+				{
+					obj = getScroller(obj,stopWithSkin);
+				}while(obj && !(obj is spark.components.Scroller))
+
+				if(obj is spark.components.Scroller)
+					return obj as spark.components.Scroller;
+			}
+			return null;
+		}
+
+
+		/**
+		 *  @private
+		 */
+
+		private function mouseWheelHandler(event:MouseEvent):void
+		{
+			if( isEventTargetApplicabale(event)  )
+				recordAutomatableEvent(event, true);
+		}
+
+		private function isEventTargetApplicabale(event:Event):Boolean
+		{
+			return (event.target == skinnableTextBase.textDisplay);
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function createAutomationIDPart(child:IAutomationObject):Object
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return help.helpCreateIDPart(uiAutomationObject, child);
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function resolveAutomationIDPart(part:Object):Array
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return help.helpResolveIDPart(uiAutomationObject, part);
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return help.helpCreateIDPartWithRequiredProperties(uiAutomationObject, child,properties);
+
+		}
+
+	}
+}


fix coding style

fix coding style

--- src/aerys/minko/render/shader/Signature.as
+++ src/aerys/minko/render/shader/Signature.as
@@ -100,8 +100,6 @@
 					otherSignature._values[i],
 					otherSignature._flags[i]
 				);
-
-
 		}

 		public function clone() : Signature


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.effects
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18480
Author:   egeorgie@adobe.com
Date:     2010-11-07T04:57:01.323333Z

Log Message:
-----------
Various Resizing Bugs: Ellipse, Path, Rounded Rect

In this change:

- new iterative algorithm for fitting transformed Path, Ellipse, Rounded Rect
- tweaked iterative algorithm for fitting non-transformed Path with miter limit
- fixes to calculating the bounding box of a rounded rect when radiusX != radiusY
- fix to MatrixUtil.fitBounds to take explicits into account in the case where both dimensions are specified
- fix to MatrixUtil to properly return null when no solution exists for 45 degree rotated elements when trying to fit in both dimensions
- fix to MatrixUtil to take explicit settings into account when relaxing constraints while trying to fit an element in both dimensions
- added min/max properties to SpriteVisualElement
- fix GraphicElement to avoid extra layout pass when dealing with transformations (looks like extra invalidation was added with the mirroring infrastrucutre)

QE notes: Maybe add a couple of tests for rotated ellipse, rotated path, rotated round rect, non-rotated path with stroke and miter limit joints
Doc notes:
Bugs: SDK-17269, SDK-26762, SDK-27321, SDK-27516, SDK-27589, SDK-28389
Reviewer: Kevin
Tests run: full mustella cyclone
Is noteworthy for integration: Yes, Yes, Yyyyyyyeeeeeeeeeeeees sir!!

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/Rect.as</path>

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

--- frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
+++ frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
@@ -714,6 +714,70 @@
     }

     //----------------------------------
+    //  minHeight
+    //----------------------------------
+
+    /**
+     *  @private
+     *
+     *  The minimum height explicitly set by the user.
+     */
+    private var _explicitMinHeight:Number = NaN;
+
+    /**
+     *  @private
+     */
+    public function get minHeight():Number
+    {
+        if (!isNaN(_explicitMinHeight))
+            return _explicitMinHeight;
+        return resizeMode == ResizeMode.SCALE ? 0 : preferredHeight;
+    }
+
+    /**
+     *  @private
+     */
+    public function set minHeight(value:Number):void
+    {
+        if (_explicitMinHeight == value)
+            return;
+        _explicitMinHeight = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  maxHeight
+    //----------------------------------
+
+    /**
+     *  @private
+     *
+     *  The maximum height explicitly set by the user.
+     */
+    private var _explicitMaxHeight:Number = NaN;
+
+    /**
+     *  @private
+     */
+    public function get maxHeight():Number
+    {
+        if (!isNaN(_explicitMaxHeight))
+            return _explicitMaxHeight;
+        return DEFAULT_MAX_HEIGHT;
+    }
+
+    /**
+     *  @private
+     */
+    public function set maxHeight(value:Number):void
+    {
+        if (_explicitMaxHeight == value)
+            return;
+        _explicitMaxHeight = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
     //  horizontalCenter
     //----------------------------------

@@ -1725,6 +1789,70 @@
         invalidateParentSizeAndDisplayList();
     }

+    //----------------------------------
+    //  minWidth
+    //----------------------------------
+
+    /**
+     *  @private
+     *
+     *  The minimum width explicitly set by the user.
+     */
+    private var _explicitMinWidth:Number = NaN;
+
+    /**
+     *  @private
+     */
+    public function get minWidth():Number
+    {
+        if (!isNaN(_explicitMinWidth))
+            return _explicitMinWidth;
+        return resizeMode == ResizeMode.SCALE ? 0 : preferredWidth;
+    }
+
+    /**
+     *  @private
+     */
+    public function set minWidth(value:Number):void
+    {
+        if (_explicitMinWidth == value)
+            return;
+        _explicitMinWidth = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  maxWidth
+    //----------------------------------
+
+    /**
+     *  @private
+     *
+     *  The maximum width explicitly set by the user.
+     */
+    private var _explicitMaxWidth:Number = NaN;
+
+    /**
+     *  @private
+     */
+    public function get maxWidth():Number
+    {
+        if (!isNaN(_explicitMaxWidth))
+            return _explicitMaxWidth;
+        return DEFAULT_MAX_WIDTH;
+    }
+
+    /**
+     *  @private
+     */
+    public function set maxWidth(value:Number):void
+    {
+        if (_explicitMaxWidth == value)
+            return;
+        _explicitMaxWidth = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
     //----------------------------------
     //  viewWidth
     //----------------------------------
@@ -2338,7 +2466,7 @@
      */
     public function getMaxBoundsWidth(postLayoutTransform:Boolean = true):Number
     {
-        return transformWidthForLayout(DEFAULT_MAX_WIDTH, DEFAULT_MAX_HEIGHT, postLayoutTransform);
+        return transformWidthForLayout(maxWidth, maxHeight, postLayoutTransform);
     }

     /**
@@ -2351,7 +2479,7 @@
      */
     public function getMaxBoundsHeight(postLayoutTransform:Boolean = true):Number
     {
-        return transformHeightForLayout(DEFAULT_MAX_WIDTH, DEFAULT_MAX_HEIGHT, postLayoutTransform);
+        return transformHeightForLayout(maxWidth, maxHeight, postLayoutTransform);
     }

     /**
@@ -2364,7 +2492,7 @@
      */
     public function getMinBoundsWidth(postLayoutTransform:Boolean = true):Number
     {
-        return resizeMode == ResizeMode.SCALE ? 0 : getPreferredBoundsWidth(postLayoutTransform);
+        return transformWidthForLayout(minWidth, minHeight, postLayoutTransform);
     }

     /**
@@ -2377,7 +2505,7 @@
      */
     public function getMinBoundsHeight(postLayoutTransform:Boolean = true):Number
     {
-        return resizeMode == ResizeMode.SCALE ? 0 : getPreferredBoundsHeight(postLayoutTransform);
+        return transformHeightForLayout(minWidth, minHeight, postLayoutTransform);
     }

     /**
@@ -2516,10 +2644,10 @@
             _explicitHeight,
             preferredWidth,
             preferredHeight,
-            getMinBoundsWidth(false),
-            getMinBoundsHeight(false),
-            getMaxBoundsWidth(false),
-            getMaxBoundsWidth(false));
+            minWidth,
+            minHeight,
+            maxWidth,
+            maxHeight);

         // If we couldn't fit at all, default to the minimum size
         if (!fitSize)


Transferred from the Adobe Open Source Subversion Repository

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

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

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

Modified Paths:
--------------
151 paths were modified

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

--- frameworks/projects/spark/src/spark/filters/DropShadowFilter.as
+++ frameworks/projects/spark/src/spark/filters/DropShadowFilter.as
@@ -39,6 +39,11 @@
 	 *  For example, .25 sets a transparency value of 25%.
 	 *
 	 *  @default 1
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get alpha():Number
 	{
@@ -68,6 +73,11 @@
 	 *   therefore, the angle property has no effect.
 	 *
 	 *   @default 45
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get angle():Number
 	{
@@ -93,6 +103,11 @@
 	 *  The color of the glow. Valid values are in the hexadecimal format
 	 * 	0xRRGGBB.
 	 *  @default 0xFF0000
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get color():uint
 	{
@@ -117,6 +132,11 @@
 	/**
 	 *  The offset distance of the bevel. Valid values are in pixels (floating point).
 	 * 	@default 4
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get distance():Number
 	{
@@ -142,6 +162,11 @@
 	 *  Indicates whether or not the object is hidden. The value true indicates that the
 	 *  object itself is not drawn; only the shadow is visible.
 	 *  The default is false (the object is shown).
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get hideObject():Boolean
 	{
@@ -166,6 +191,11 @@
 	/**
 	 *  Specifies whether the glow is an inner glow. The value true indicates an inner glow.
 	 *  The default is false, an outer glow (a glow around the outer edges of the object).
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
 	public function get inner():Boolean
 	{


Handle disabled LCD

Handle disabled LCD

--- index.as
+++ index.as
@@ -393,8 +393,8 @@
   // Video RAM: $8000 – $9FFF
   if (address & 0xF000) <= 0x9000 {
     // VRAM cannot be accessed in mode 3
-    let mode = mmu_read8(0xFF41) & 3;
-    if mode == 3 { return 0xFF; }
+    // let mode = mmu_read8(0xFF41) & 3;
+    // if mode == 3 { return 0xFF; }

     return *(vram + (address & 0x1FFF));
   }
@@ -408,8 +408,8 @@
   // Sprite Attribute Table (OAM): $FE00 – $FE9F
   if (address >= 0xFE00) and (address <= 0xFE9F) {
     // OAM cannot be accessed in modes 2 or 3
-    let mode = mmu_read8(0xFF41) & 3;
-    if mode == 3 or mode == 2 { return 0xFF; }
+    // let mode = mmu_read8(0xFF41) & 3;
+    // if mode == 3 or mode == 2 { return 0xFF; }

     return *(oam + (address & 0xFF));
   }
@@ -512,8 +512,8 @@
   // Video RAM: $8000 – $9FFF
   if (address & 0xF000) <= 0x9000 {
     // FIXME: VRAM cannot be accessed in mode 3
-    let mode = mmu_read8(0xFF41) & 3;
-    if gpu_lcd_enable and mode == 3 { return; }
+    // let mode = mmu_read8(0xFF41) & 3;
+    // if gpu_lcd_enable and mode == 3 { return; }

     // GPU VRAM
     *(vram + (address & 0x1FFF)) = value;
@@ -532,8 +532,8 @@
   // Sprite Attribute Table (OAM): $FE00 – $FE9F
   if (address >= 0xFE00) and (address <= 0xFE9F) {
     // FIXME: OAM cannot be accessed in modes 2 or 3
-    let mode = mmu_read8(0xFF41) & 3;
-    if gpu_lcd_enable and (mode == 3 or mode == 2) { return; }
+    // let mode = mmu_read8(0xFF41) & 3;
+    // if gpu_lcd_enable and (mode == 3 or mode == 2) { return; }

     *(oam + (address & 0xFF)) = value;
     return;
@@ -5006,57 +5006,64 @@

 def gpu_step(cycles: uint8): bool {
   gpu_mode_clock += uint16(cycles);
-  let vblank_begin = false;
-
-  if gpu_mode == 2 {
-    // Scanline: OAM read mode
-    if gpu_mode_clock >= 80 {
-      gpu_mode = 3;
-      gpu_mode_clock -= 80;
-    }
-  } else if gpu_mode == 3 {
-    // Scanline: VRAM read mode
-    if gpu_mode_clock >= 172 {
-      gpu_mode = 0;
-      gpu_mode_clock -= 172;
-
-      // Render Scanline
-      gpu_render_scanline();
-    }
-  } else if gpu_mode == 0 {
-    // HBLANK
-    if gpu_mode_clock >= 204 {
-      gpu_mode_clock -= 204;
-
-      if gpu_line == 143 {
-        gpu_mode = 1;
-        vblank_begin = true;
-
-        // VBLANK Interrupt
-        IF |= 0x01;
-      } else {
-        gpu_mode = 2;
+  let vblank = false;
+
+  if gpu_lcd_enable {
+    if gpu_mode == 2 {
+      // Scanline: OAM read mode
+      if gpu_mode_clock >= 80 {
+        gpu_mode = 3;
+        gpu_mode_clock -= 80;
       }
-
-      gpu_line += 1;
-    }
-  } else if gpu_mode == 1 {
-    // VBLANK
-    if gpu_mode_clock >= 456 {
-      gpu_mode_clock -= 456;
-
-      if gpu_line == 0 {
-        gpu_line = 0;
-        gpu_mode = 2;
-      } else {
+    } else if gpu_mode == 3 {
+      // Scanline: VRAM read mode
+      if gpu_mode_clock >= 172 {
+        gpu_mode = 0;
+        gpu_mode_clock -= 172;
+
+        // Render Scanline
+        gpu_render_scanline();
+      }
+    } else if gpu_mode == 0 {
+      // HBLANK
+      if gpu_mode_clock >= 204 {
+        gpu_mode_clock -= 204;
+
+        if gpu_line == 143 {
+          gpu_mode = 1;
+          vblank = true;
+
+          // VBLANK Interrupt
+          IF |= 0x01;
+        } else {
+          gpu_mode = 2;
+        }
+
         gpu_line += 1;
       }
-    } else if gpu_line == 153 and gpu_mode_clock >= 4 {
-      gpu_line = 0;
+    } else if gpu_mode == 1 {
+      // VBLANK
+      if gpu_mode_clock >= 456 {
+        gpu_mode_clock -= 456;
+
+        if gpu_line == 0 {
+          gpu_line = 0;
+          gpu_mode = 2;
+        } else {
+          gpu_line += 1;
+        }
+      } else if gpu_line == 153 and gpu_mode_clock >= 4 {
+        gpu_line = 0;
+      }
     }
-  }
-
-  return vblank_begin;
+  } else {
+    if gpu_mode_clock >= 70224 {
+      gpu_mode_clock -= 70224;
+      vblank = true;
+    }
+  }
+
+  return vblank;
 }

 def gpu_read(address: uint16): uint8 {
@@ -5119,6 +5126,12 @@
 def gpu_write(address: uint16, value: uint8) {
   if address == 0xFF40 {
     // LCDC - LCD Control (R/W)
+    if testb(value, 7) ^ gpu_lcd_enable {
+      gpu_line = 0;
+      gpu_mode = 0;
+      gpu_mode_clock = 0;
+    }
+
     gpu_lcd_enable = testb(value, 7);
     gpu_window_tm_select = testb(value, 6);
     gpu_window_enable = testb(value, 5);
@@ -5258,9 +5271,9 @@
     div_timer_step(cycles);

     // STEP -> GPU
-    let vblank_begin = gpu_step(cycles);
-
-    if vblank_begin {
+    let vblank = gpu_step(cycles);
+
+    if vblank {
       // Rasterize framebuffer
       gpu_present();


RTSP: Fix incorrect assumption about live streaming

Do not assume live stream if to-value in range header is empty.

--- src/com/axis/rtspclient/RTPTiming.as
+++ src/com/axis/rtspclient/RTPTiming.as
@@ -47,7 +47,7 @@
       var rangeTo:String = rangeMatch[2];
       var from:Number = 0;
       var to:Number = rangeTo.length > 0 ? Math.round(parseFloat(rangeTo) * 1000) : -1;
-      var live:Boolean = rangeFrom == 'now' || to == -1;
+      var live:Boolean = rangeFrom == 'now';
       if (rangeFrom != 'now') {
         from = Math.round(parseFloat(rangeFrom) * 1000);
         /* Some idiot RTSP servers writes Range: npt=0.000-0.000 in the header... */