Transferred from the Adobe Open Source Subversion Repository

Revision: 11555
Author:   jszeto@adobe.com
Date:     2009-11-07T01:42:09.814788Z

Log Message:
-----------
Refactor DropDownList

DropDownList has been refactored into DropDownList and DropDownListBase. ComboBox and DropDownList both subclass DropDownListBase.
DropDownList adds a labelDisplay TextBase skin part while ComboBox adds a textInput TextInput skin part. The prompt property has been moved to DropDownList.

Fixed some user interaction bugs when doing a partial typing of a matching item.

Adding ComboBox to BasicTests.

QE notes: None
Doc notes: Yes, Need to revisit the ASDocs for ComboBox, DropDownList and DropDownListBase.
Bugs: N/A
Reviewer: Chet, Glenn
Tests run: DropDownList, ComboBox
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/ComboBoxTestScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownListBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/views/ComboBoxTests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests-config.xml</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
@@ -0,0 +1,823 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package spark.components
+{
+
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+
+import mx.collections.IList;
+import mx.core.mx_internal;
+import mx.events.CollectionEvent;
+import mx.events.FlexEvent;
+
+import spark.components.supportClasses.ButtonBase;
+import spark.components.supportClasses.DropDownController;
+import spark.components.supportClasses.TextBase;
+import spark.core.NavigationUnit;
+import spark.events.DropDownEvent;
+import spark.events.IndexChangeEvent;
+import spark.utils.LabelUtil;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  The radius of the corners for this component.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="spark")]
+
+/**
+ *  Controls the visibility of the drop shadow for this component.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="dropShadowVisible", type="Boolean", inherit="no", theme="spark")]
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the drop-down list closes for any reason, such when
+ *  the user:
+ *

+ *
Selects an item in the drop-down list.

+ *
Clicks outside of the drop-down list.

+ *
Clicks the anchor button while the drop-down list is
+ *  displayed.

+ *

+ *
+ *  @eventType spark.events.DropDownEvent.CLOSE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Event(name="close", type="spark.events.DropDownEvent")]
+
+/**
+ *  Dispatched when the user clicks the anchor button
+ *  to display the drop-down list.
+ *  It is also dispatched if the user
+ *  uses Control-Down to open the dropDown.
+ *
+ *  @eventType spark.events.DropDownEvent.OPEN
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Event(name="open", type="spark.events.DropDownEvent")]
+
+//--------------------------------------
+//  SkinStates
+//--------------------------------------
+
+/**
+ *  Skin state for the open state of the DropDownListBase control.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[SkinState("open")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="allowMultipleSelection", kind="property")]
+[Exclude(name="dragEnabled", kind="property")]
+[Exclude(name="dragMoveEnabled", kind="property")]
+[Exclude(name="dropEnabled", kind="property")]
+[Exclude(name="selectedIndices", kind="property")]
+[Exclude(name="selectedItems", kind="property")]
+
+/**
+ *  The DropDownListBase control contains a drop-down list
+ *  from which the user can select a single value.
+ *  Its functionality is very similar to that of the
+ *  SELECT form element in HTML.
+ *
+ *
The DropDownListBase control consists of the anchor button,
+ *  and drop-down-list.
+ *  Use the anchor button to open and close the drop-down-list.
+ *

+ *
+ *
When the drop-down list is open:

+ *

+ *
Clicking the anchor button closes the drop-down list
+ *      and commits the currently selected data item.

+ *
Clicking outside of the drop-down list closes the drop-down list
+ *      and commits the currently selected data item.

+ *
Clicking on a data item selects that item and closes the drop-down list.

+ *
If the requireSelection property is false,
+ *      clicking on a data item while pressing the Control key deselects
+ *      the item and closes the drop-down list.

+ *

+ *
+ *  @mxml
The <s:DropDownListBase> tag inherits all of the tag
+ *  attributes of its superclass and adds the following attributes:

+ *
+ *

+ *  <s:DropDownListBase
+ *    Properties
+ *
+ *    Events
+ *    closed="No default"
+ *    open="No default"
+ *  />
+ *

+ *
+ *  @see spark.skins.spark.DropDownListSkin
+ *  @see spark.components.supportClasses.DropDownController
+ *
+ *  @includeExample examples/DropDownListExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class DropDownListBase extends List
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function DropDownListBase()
+    {
+        super();
+
+        super.allowMultipleSelection = false;
+
+        dropDownController = new DropDownController();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Skin parts
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  dropDown
+    //----------------------------------
+
+    [SkinPart(required="false")]
+
+    /**
+     *  A skin part that defines the drop-down list area. When the DropDownListBase is open,
+     *  clicking anywhere outside of the dropDown skin part closes the
+     *  drop-down list.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var dropDown:DisplayObject;
+
+    //----------------------------------
+    //  openButton
+    //----------------------------------
+
+    [SkinPart(required="true")]
+
+    /**
+     *  A skin part that defines the anchor button.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var openButton:ButtonBase;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var labelChanged:Boolean = false;
+    // Stores the user selected index until the dropDown closes
+
+    /**
+     *  @private
+     */
+    mx_internal static var PAGE_SIZE:int = 5;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  allowMultipleSelection
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set allowMultipleSelection(value:Boolean):void
+    {
+        // Don't allow this value to be set. If the multiple
+        // selection related properties are set and
+        // allowMultipleSelection is false, List will
+        // select the first item passed in.
+        return;
+    }
+
+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function get baselinePosition():Number
+    {
+        if (openButton)
+            return openButton.baselinePosition;
+        else
+            return NaN;
+    }
+
+    //----------------------------------
+    //  dataProvider
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Update the label if the dataProvider has changed
+     */
+    override public function set dataProvider(value:IList):void
+    {
+        if (dataProvider === value)
+            return;
+
+        super.dataProvider = value;
+        labelChanged = true;
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  dragEnabled
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Excluded property
+     */
+    override public function set dragEnabled(value:Boolean):void
+    {
+    }
+
+    //----------------------------------
+    //  dragMoveEnabled
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Excluded property
+     */
+    override public function set dragMoveEnabled(value:Boolean):void
+    {
+    }
+
+    //----------------------------------
+    //  dropEnabled
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Excluded property
+     */
+    override public function set dropEnabled(value:Boolean):void
+    {
+    }
+
+    //----------------------------------
+    //  labelField
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set labelField(value:String):void
+    {
+        if (labelField == value)
+            return;
+
+        super.labelField = value;
+        labelChanged = true;
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  labelFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set labelFunction(value:Function):void
+    {
+        if (labelFunction == value)
+            return;
+
+        super.labelFunction = value;
+        labelChanged = true;
+        invalidateProperties();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  dropDownController
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _dropDownController:DropDownController;
+
+    /**
+     *  Instance of the DropDownController class that handles all of the mouse, keyboard
+     *  and focus user interactions.
+     *
+     *  Flex calls the initializeDropDownController() method after
+     *  the DropDownController instance is created in the constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    protected function get dropDownController():DropDownController
+    {
+        return _dropDownController;
+    }
+
+    /**
+     *  @private
+     */
+    protected function set dropDownController(value:DropDownController):void
+    {
+        if (_dropDownController == value)
+            return;
+
+        _dropDownController = value;
+
+        _dropDownController.addEventListener(DropDownEvent.OPEN, dropDownController_openHandler);
+        _dropDownController.addEventListener(DropDownEvent.CLOSE, dropDownController_closeHandler);
+
+        if (openButton)
+            _dropDownController.openButton = openButton;
+        if (dropDown)
+            _dropDownController.dropDown = dropDown;
+    }
+
+    //----------------------------------
+    //  isDropDownOpen
+    //----------------------------------
+
+    /**
+     *  @copy spark.components.supportClasses.DropDownController#isOpen
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get isDropDownOpen():Boolean
+    {
+        if (dropDownController)
+            return dropDownController.isOpen;
+        else
+            return false;
+    }
+
+    //----------------------------------
+    //  userProposedSelectedIndex
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _userProposedSelectedIndex:Number = NO_SELECTION;
+
+    /**
+     *  @private
+     */
+    mx_internal function set userProposedSelectedIndex(value:Number):void
+    {
+        _userProposedSelectedIndex = value;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function get userProposedSelectedIndex():Number
+    {
+        return _userProposedSelectedIndex;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (labelChanged)
+        {
+            labelChanged = false;
+            updateLabelDisplay();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function partAdded(partName:String, instance:Object):void
+    {
+        super.partAdded(partName, instance);
+
+        if (instance == openButton)
+        {
+            if (dropDownController)
+                dropDownController.openButton = openButton;
+        }
+
+        if (instance == dropDown && dropDownController)
+            dropDownController.dropDown = dropDown;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function partRemoved(partName:String, instance:Object):void
+    {
+        if (dropDownController)
+        {
+            if (instance == openButton)
+                dropDownController.openButton = null;
+
+            if (instance == dropDown)
+                dropDownController.dropDown = null;
+        }
+
+        super.partRemoved(partName, instance);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function getCurrentSkinState():String
+    {
+        return !enabled ? "disabled" : dropDownController.isOpen ? "open" : "normal";
+    }
+
+    /**
+     *  @private
+     */
+    override protected function commitSelection(dispatchChangedEvents:Boolean = true):Boolean
+    {
+        var retVal:Boolean = super.commitSelection(dispatchChangedEvents);
+        updateLabelDisplay();
+        return retVal;
+    }
+
+    /**
+     *  @private
+     *  In updateRenderer, we want to select the proposedSelectedIndex
+     */
+    override mx_internal function isItemIndexSelected(index:int):Boolean
+    {
+        return userProposedSelectedIndex == index;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Open the drop-down list and dispatch
+     *  a DropdownEvent.OPEN event.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function openDropDown():void
+    {
+        dropDownController.openDropDown();
+    }
+
+    /**
+     *  Close the drop-down list and dispatch a DropDownEvent.CLOSE event.
+     *
+     *  @param commit If true, commit the selected
+     *  data item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function closeDropDown(commit:Boolean):void
+    {
+        dropDownController.closeDropDown(commit);
+    }
+
+    /**
+     *  @private
+     *  Called whenever we need to update the text passed to the labelDisplay skin part
+     */
+    // TODO (jszeto): Make this protected and make the name more generic (passing data to skin)
+    mx_internal function updateLabelDisplay():void
+    {
+        // DropDownList and ComboBox will override this function
+    }
+
+    /**
+     *  @private
+     *  Called whenever we need to change the highlighted selection while the dropDown is open
+     *  ComboBox overrides this behavior
+     */
+    mx_internal function changeHighlightedSelection(newIndex:int):void
+    {
+        // Store the selection in userProposedSelectedIndex because we
+        // don't want to update selectedIndex until the dropdown closes
+        itemSelected(userProposedSelectedIndex, false);
+        userProposedSelectedIndex = newIndex;
+        itemSelected(userProposedSelectedIndex, true);
+        ensureIndexIsVisible(userProposedSelectedIndex);
+
+        var e:IndexChangeEvent = new IndexChangeEvent(IndexChangeEvent.CARET_CHANGE);
+        e.oldIndex = caretIndex;
+        setCurrentCaretIndex(userProposedSelectedIndex);
+        e.newIndex = caretIndex;
+        dispatchEvent(e);
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function dataProvider_collectionChangeHandler(event:Event):void
+    {
+        super.dataProvider_collectionChangeHandler(event);
+
+        if (event is CollectionEvent)
+        {
+            labelChanged = true;
+            invalidateProperties();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function item_mouseDownHandler(event:MouseEvent):void
+    {
+        super.item_mouseDownHandler(event);
+        userProposedSelectedIndex = selectedIndex;
+        closeDropDown(true);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function keyDownHandler(event:KeyboardEvent) : void
+    {
+        if (!enabled)
+            return;
+
+        if (!dropDownController.processKeyDown(event))
+        {
+            var navigationUnit:uint = event.keyCode;
+            if (!NavigationUnit.isNavigationUnit(navigationUnit))
+                return;
+
+            var proposedNewIndex:int = NO_SELECTION;
+            var currentIndex:int;
+
+            if (dropDownController.isOpen)
+            {
+                // Normalize the proposed index for getNavigationDestinationIndex
+                currentIndex = userProposedSelectedIndex < NO_SELECTION ? NO_SELECTION : userProposedSelectedIndex;
+                proposedNewIndex = layout.getNavigationDestinationIndex(currentIndex, navigationUnit, arrowKeysWrapFocus);
+
+                if (proposedNewIndex != NO_SELECTION)
+                {
+                    changeHighlightedSelection(proposedNewIndex);
+                    event.preventDefault();
+                }
+            }
+            else if (dataProvider)
+            {
+                // Normalize the proposed index for getNavigationDestinationIndex
+                currentIndex = selectedIndex < NO_SELECTION ? NO_SELECTION : selectedIndex;
+
+                // FIXME (jszeto) : SDK-24036 Add arrowKeysWrapFocus support
+
+                switch (navigationUnit)
+                {
+                    case NavigationUnit.UP:
+                    {
+                        proposedNewIndex = currentIndex - 1;
+                        event.preventDefault();
+                        break;
+                    }
+
+                    case NavigationUnit.DOWN:
+                    {
+                        proposedNewIndex = currentIndex + 1;
+                        event.preventDefault();
+                        break;
+                    }
+
+                    case NavigationUnit.PAGE_UP:
+                    {
+                        proposedNewIndex = currentIndex == NO_SELECTION ?
+                            NO_SELECTION : Math.max(currentIndex - PAGE_SIZE, 0);
+                        event.preventDefault();
+                        break;
+                    }
+
+                    case NavigationUnit.PAGE_DOWN:
+                    {
+                        proposedNewIndex = currentIndex == NO_SELECTION ?
+                                           PAGE_SIZE : (currentIndex + PAGE_SIZE);
+                        event.preventDefault();
+                        break;
+                    }
+
+                    case NavigationUnit.HOME:
+                    {
+                        proposedNewIndex = 0;
+                        event.preventDefault();
+                        break;
+                    }
+
+                    case NavigationUnit.END:
+                    {
+                        proposedNewIndex = dataProvider.length - 1;
+                        event.preventDefault();
+                        break;
+                    }
+
+                }
+
+                proposedNewIndex = Math.min(proposedNewIndex, dataProvider.length - 1);
+
+                if (proposedNewIndex >= 0)
+                    selectedIndex = proposedNewIndex;
+            }
+        }
+        else
+        {
+            event.preventDefault();
+        }
+
+    }
+
+    /**
+     *  @private
+     */
+    override protected function focusOutHandler(event:FocusEvent):void
+    {
+        if (isOurFocus(DisplayObject(event.target)))
+            dropDownController.processFocusOut(event);
+
+        super.focusOutHandler(event);
+    }
+
+    /**
+     *  @private
+     *  Event handler for the dropDownController
+     *  DropDownEvent.OPEN event. Updates the skin's state and
+     *  ensures that the selectedItem is visible.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    mx_internal function dropDownController_openHandler(event:DropDownEvent):void
+    {
+        addEventListener(FlexEvent.UPDATE_COMPLETE, open_updateCompleteHandler);
+        userProposedSelectedIndex = selectedIndex;
+        invalidateSkinState();
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function open_updateCompleteHandler(event:FlexEvent):void
+    {
+        removeEventListener(FlexEvent.UPDATE_COMPLETE, open_updateCompleteHandler);
+        ensureIndexIsVisible(selectedIndex);
+
+        dispatchEvent(new DropDownEvent(DropDownEvent.OPEN));
+    }
+
+    /**
+     *  @private
+     *  Event handler for the dropDownController
+     *  DropDownEvent.CLOSE event. Updates the skin's state.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    protected function dropDownController_closeHandler(event:DropDownEvent):void
+    {
+        addEventListener(FlexEvent.UPDATE_COMPLETE, close_updateCompleteHandler);
+        invalidateSkinState();
+
+        if (!event.isDefaultPrevented())
+        {
+            selectedIndex = userProposedSelectedIndex;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function close_updateCompleteHandler(event:FlexEvent):void
+    {
+        removeEventListener(FlexEvent.UPDATE_COMPLETE, close_updateCompleteHandler);
+
+        dispatchEvent(new DropDownEvent(DropDownEvent.CLOSE));
+    }
+}
+
+}


Test for copying of ArrayList in CompositeCloneableClass.

--- dolly-framework/src/test/actionscript/dolly/CopyingOfCompositeCopyableClassTest.as
+++ dolly-framework/src/test/actionscript/dolly/CopyingOfCompositeCopyableClassTest.as
@@ -59,5 +59,21 @@
 		assertThat(copy.array, everyItem(isA(Number)));
 		assertThat(copy.array, array(equalTo(1), equalTo(2), equalTo(3), equalTo(4), equalTo(5)));
 	}
+
+	[Test]
+	public function copyingOfArrayList():void {
+		const copy:CompositeCopyableClass = Copier.copy(compositeCopyableClass);
+
+		const arrayList:ArrayList = copy.arrayList;
+
+		assertNotNull(arrayList);
+		assertFalse(copy.arrayList == compositeCopyableClass.arrayList);
+		assertEquals(arrayList.length, 5);
+		assertEquals(arrayList.getItemAt(0), 1);
+		assertEquals(arrayList.getItemAt(1), 2);
+		assertEquals(arrayList.getItemAt(2), 3);
+		assertEquals(arrayList.getItemAt(3), 4);
+		assertEquals(arrayList.getItemAt(4), 5);
+	}
 }
 }


fix bone parent change bug

fix bone parent change bug

--- src/model/AnimationDataProxy.as
+++ src/model/AnimationDataProxy.as
@@ -201,9 +201,12 @@

 		internal function updateBoneParent(boneName:String):void
 		{
-			var animationData:AnimationData = ImportDataProxy.getInstance().skeletonData.getAnimationData(animationName);
-			var armatureData:ArmatureData = ImportDataProxy.getInstance().skeletonData.getArmatureData(animationName);
-			XMLDataParser.parseAnimationData(_xml, animationData, armatureData);
+			if(_xml)
+			{
+				var animationData:AnimationData = ImportDataProxy.getInstance().skeletonData.getAnimationData(animationName);
+				var armatureData:ArmatureData = ImportDataProxy.getInstance().skeletonData.getArmatureData(animationName);
+				XMLDataParser.parseAnimationData(_xml, animationData, armatureData);
+			}
 		}

 		private function updateMovement():void


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 4420
Author:   cframpto@adobe.com
Date:     2009-01-07T12:17:17.932609Z

Log Message:
-----------
18072 – tell the TextView when it loses focus so selections are handled properly (add focusInHandler and modified focusOutHandler)
17926 – if text changed to displayAsPassword, the scroll position should be maintained (don’t create new controller unless text/content changed)
16010 – change event generated when text hasn’t changed (backspace at beginning of container generates 0-length selection probably so it can go to the previous container if there are multiple ones)
16364 – appendText (make sure pending changes to text/content are commited in both FxTextBase and TextView before appending text directly into the text flow).  Also do the same fix for insertText.

QE Notes:
Doc Notes: None
Bugs: SDK-18072, SDK-17926, SDK-16010, SDK-16364
Reviewer: Gordon

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -719,6 +719,10 @@
         if (!textView)
             return;

+        // Make sure all properties are committed (i.e. pushed down to textView)
+        // before doing the insert.
+        validateNow();
+
         textView.insertText(text);
     }

@@ -729,6 +733,10 @@
     {
         if (!textView)
             return;
+
+        // Make sure all properties are committed (i.e. pushed down to textView)
+        // before doing the append.
+        validateNow();

         textView.appendText(text);
     }


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

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


XIFF-53: Tuning on the uncompression method. It was spitting out incomplete data, now complete. Changes based on http://community.igniterealtime.org/people/mani

git-svn-id: c197267f952b24206666de142881703007ca05d5@13185 b35dd754-fafc-0310-a699-88a17e54d16e

--- src/org/igniterealtime/xiff/util/Zlib.as
+++ src/org/igniterealtime/xiff/util/Zlib.as
@@ -38,7 +38,7 @@
 	public class Zlib implements ICompressor
 	{
 		/**
-		 * Uncompress the given ByteArray.
+		 * Uncompress (inflate) the given ByteArray.
 		 *
 		 * @param	data
 		 * @return Uncompressed data
@@ -47,6 +47,8 @@
 		{
 			data.position = 0;
 			var uncompressed:ByteArray = new ByteArray();
+			var outBytesLength:int = data.length * 2;
+
 			var err:int;
 			var i:int = 0;
 			var j:int = 0;
@@ -63,22 +65,46 @@
 			stream.next_out = uncompressed;
 			stream.next_out_index = 0;

+			stream.avail_out = outBytesLength;
+			stream.total_in = 0;
+
+
 			err = stream.inflateInit();
 			checkError(stream, err, "inflateInit");

 			var outcount:int = 0;
-			while (stream.total_out < data.length && stream.total_in < data.length)
-			{
-				stream.avail_in = stream.avail_out = 1; /* force small buffers */
+			while (true)
+			{
+				// force small buffers
+				stream.avail_in = 1;
+				stream.avail_out = 1;
+
 				err = stream.inflate(JZlib.Z_NO_FLUSH);
-				if (err == JZlib.Z_STREAM_END)
-				{
-					trace("Zlib.uncompress. inflation stream ended");
-					break;
+				switch (err)
+				{
+					case JZlib.Z_STREAM_END:
+						// completed decompression, lets copy data and get out
+						trace("Zlib.uncompress. inflation stream ended");
+						break;
+					case JZlib.Z_BUF_ERROR:
+						stream.next_out_index = 0;
+						stream.avail_out = outBytesLength;
+						break;
+					default:
+						// unknown error
+						if (err != JZlib.Z_OK)
+						{
+							if (stream.msg == null) {
+								trace("Unknown error. Error code : " + err);
+							}
+							else {
+								trace("Unknown error. Error code : " + err + " and message : " + stream.msg);
+							}
+						}
 				}

 				outcount++;
-				trace("Zlib.uncompress. outcount: " + outcount + ", stream.total_out: " + stream.total_out);
+				//trace("Zlib.uncompress. outcount: " + outcount + ", stream.total_out: " + stream.total_out);

 				if (!checkError(stream, err, "inflate"))
 				{
@@ -90,56 +116,15 @@
 			checkError(stream, err, "inflateEnd");

-			// Checking ... is this needed?
-			data.position = 0;
-			for (i = 0; i < data.length; i++)
-			{
-				if (data.readByte() == 0)
-				{
-					break;
-				}
-			}
-
-			uncompressed.position = 0;
-			for (j = 0; j < uncompressed.length; j++)
-			{
-				if (uncompressed.readByte() == 0)
-				{
-					break;
-				}
-			}
-
-			if (i == j)
-			{
-				uncompressed.position = 0;
-				data.position = 0;
-				for (i = 0; i < j; i++)
-				{
-					if (data.readByte() != uncompressed.readByte())
-					{
-						break;
-					}
-				}
-				if (i == j)
-				{
-					trace("inflate(): " + String(uncompressed));
-					//return;
-				}
-			}
-			else
-			{
-				trace("bad inflate");
-			}
-
-
 			trace("Zlib.uncompress. uncompressed.length: " + uncompressed.length);
 			trace("Zlib.uncompress. uncompressed: " + uncompressed.toString());
-
+
+			uncompressed.position = 0;
 			return uncompressed;
 		}

 		/**
-		 * Compress the given ByteArray. Will add Adler32 checksum to the end of the data.
+		 * Compress (deflate) the given ByteArray.
 		 *
 		 * @param	data
 		 * @return Compressed data
@@ -172,7 +157,10 @@
 			var comprLen:int = 40000;
 			while (stream.total_in != data.length && stream.total_out < comprLen)
 			{
-				stream.avail_in = stream.avail_out = 1; // force small buffers
+				// force small buffers
+				stream.avail_in = 1;
+				stream.avail_out = 1;
+
 				err = stream.deflate(JZlib.Z_NO_FLUSH);
 				checkError(stream, err, "deflate");
 			}
@@ -197,7 +185,8 @@

 			trace("Zlib.compress. compressed.length: " + compressed.length);
 			trace("Zlib.compress. compressed: " + compressed.toString());
-
+
+			compressed.position = 0;
 			return compressed;
 		}


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

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

 package mx.collections
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19113
Author:   mhorn@adobe.com
Date:     2010-12-07T20:56:44.187293Z

Log Message:
-----------
ASDoc update

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -88,7 +88,7 @@
 [Style(name="contentBackgroundAlpha", type="Number", inherit="yes", theme="spark, mobile", minValue="0.0", maxValue="1.0")]

 /**
- *  @copy spark.components.supportClasses.GroupBase#contentBackgroundColor
+ *  @copy spark.components.supportClasses.GroupBase#style:contentBackgroundColor
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -108,7 +108,7 @@
 [Style(name="focusAlpha", type="Number", inherit="no", theme="spark, mobile", minValue="0.0", maxValue="1.0")]

 /**
- *  @copy spark.components.supportClasses.GroupBase#focusColor
+ *  @copy spark.components.supportClasses.GroupBase#style:focusColor
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -304,11 +304,11 @@
      */
     private static const TEXT_FLOW_PROPERTY_FLAG:uint = 1 << 12;

-	/**
-	 *  @private
-	 */
-	private static const TYPICAL_TEXT_PROPERTY_FLAG:uint = 1 << 13;
-
+    /**
+     *  @private
+     */
+    private static const TYPICAL_TEXT_PROPERTY_FLAG:uint = 1 << 13;
+
     /**
      *  @private
      */
@@ -385,7 +385,7 @@
     //  textDisplay
     //----------------------------------

-	[Bindable]
+    [Bindable]
     [SkinPart(required="false")]

     /**
@@ -423,152 +423,152 @@
     //  Overridden properties: UIComponent
     //
     //--------------------------------------------------------------------------
-
-	/*
-
-	Note:
-
-	SkinnableTextBase does not have an accessibilityImplementation
-	because, if it does, the Flash Player doesn't support text-selection
-	accessibility. The selectionAnchorIndex and selectionActiveIndex
-	getters of the acc impl don't get called, probably because Player 10.1
-	doesn't like the fact that stage.focus is the texDisplay:RichEditableText
-	part instead of the SinnableTextBase component (i.e., the TextInput
-	or TextArea).
-
-	Instead, we rely on the RichEditableTextAccImpl of the textDisplay
-	to provide accessibility.
-
-	However, developers expect to be able to control accessibility by setting
-	accessibilityProperties, accessibilityName, accessibilityDescription,
-	tabIndex, etc. on the component itself.
-
-	In order to make these settings usable by RichEditableTextAccImpl,
-	we push them down into the accessibilityProperties of the RichEditableText,
-	using the invalidateProperties() / commitProperties() pattern.
-
-	*/
-
-	//----------------------------------
-	//  accessibilityEnabled
-	//----------------------------------
-
-	/**
-	 *  @private
-	 */
-	override public function set accessibilityEnabled(value:Boolean):void
-	{
-		if (!Capabilities.hasAccessibility)
-			return;
-
-		if (!accessibilityProperties)
-			accessibilityProperties = new AccessibilityProperties();
-
-		accessibilityProperties.silent = !value;
-		accessibilityPropertiesChanged = true;
-
-		invalidateProperties();
-	}
-
-	//----------------------------------
-	//  accessibilityDescription
-	//----------------------------------
-
-	/**
-	 *  @private
-	 */
-	override public function set accessibilityDescription(value:String):void
-	{
-		if (!Capabilities.hasAccessibility)
-			return;
-
-		if (!accessibilityProperties)
-			accessibilityProperties = new AccessibilityProperties();
-
-		accessibilityProperties.description = value;
-		accessibilityPropertiesChanged = true;
-
-		invalidateProperties();
-	}
-
-	//----------------------------------
-	//  accessibilityName
-	//----------------------------------
-
-	/**
-	 *  @private
-	 */
-	override public function set accessibilityName(value:String):void
-	{
-		if (!Capabilities.hasAccessibility)
-			return;
-
-		if (!accessibilityProperties)
-			accessibilityProperties = new AccessibilityProperties();
-
-		accessibilityProperties.name = value;
-		accessibilityPropertiesChanged = true;
-
-		invalidateProperties();
-	}
-
-	//----------------------------------
-	//  accessibilityProperties
-	//----------------------------------
-
-	/**
-	 *  @private
-	 *  Storage for the accessibilityProperties property.
-	 */
-	private var _accessibilityProperties:AccessibilityProperties = null;
-
-	/**
-	 *  @private
-	 */
-	private var accessibilityPropertiesChanged:Boolean = false;
-
-	/**
-	 *  @private
-	 */
-	override public function get accessibilityProperties():AccessibilityProperties
-	{
-		return _accessibilityProperties;
-	}
-
-	/**
-	 *  @private
-	 */
-	override public function set accessibilityProperties(
-									value:AccessibilityProperties):void
-	{
-		_accessibilityProperties = value;
-		accessibilityPropertiesChanged = true;
-
-		invalidateProperties();
-	}
-
-	//----------------------------------
-	//  accessibilityShortcut
-	//----------------------------------
-
-	/**
-	 *  @private
-	 */
-	override public function set accessibilityShortcut(value:String):void
-	{
-		if (!Capabilities.hasAccessibility)
-			return;
-
-		if (!accessibilityProperties)
-			accessibilityProperties = new AccessibilityProperties();
-
-		accessibilityProperties.shortcut = value;
-		accessibilityPropertiesChanged = true;
-
-		invalidateProperties();
-	}
-
-	//----------------------------------
+
+    /*
+
+    Note:
+
+    SkinnableTextBase does not have an accessibilityImplementation
+    because, if it does, the Flash Player doesn't support text-selection
+    accessibility. The selectionAnchorIndex and selectionActiveIndex
+    getters of the acc impl don't get called, probably because Player 10.1
+    doesn't like the fact that stage.focus is the texDisplay:RichEditableText
+    part instead of the SinnableTextBase component (i.e., the TextInput
+    or TextArea).
+
+    Instead, we rely on the RichEditableTextAccImpl of the textDisplay
+    to provide accessibility.
+
+    However, developers expect to be able to control accessibility by setting
+    accessibilityProperties, accessibilityName, accessibilityDescription,
+    tabIndex, etc. on the component itself.
+
+    In order to make these settings usable by RichEditableTextAccImpl,
+    we push them down into the accessibilityProperties of the RichEditableText,
+    using the invalidateProperties() / commitProperties() pattern.
+
+    */
+
+    //----------------------------------
+    //  accessibilityEnabled
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set accessibilityEnabled(value:Boolean):void
+    {
+        if (!Capabilities.hasAccessibility)
+            return;
+
+        if (!accessibilityProperties)
+            accessibilityProperties = new AccessibilityProperties();
+
+        accessibilityProperties.silent = !value;
+        accessibilityPropertiesChanged = true;
+
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  accessibilityDescription
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set accessibilityDescription(value:String):void
+    {
+        if (!Capabilities.hasAccessibility)
+            return;
+
+        if (!accessibilityProperties)
+            accessibilityProperties = new AccessibilityProperties();
+
+        accessibilityProperties.description = value;
+        accessibilityPropertiesChanged = true;
+
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  accessibilityName
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set accessibilityName(value:String):void
+    {
+        if (!Capabilities.hasAccessibility)
+            return;
+
+        if (!accessibilityProperties)
+            accessibilityProperties = new AccessibilityProperties();
+
+        accessibilityProperties.name = value;
+        accessibilityPropertiesChanged = true;
+
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  accessibilityProperties
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the accessibilityProperties property.
+     */
+    private var _accessibilityProperties:AccessibilityProperties = null;
+
+    /**
+     *  @private
+     */
+    private var accessibilityPropertiesChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+    override public function get accessibilityProperties():AccessibilityProperties
+    {
+        return _accessibilityProperties;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set accessibilityProperties(
+                                    value:AccessibilityProperties):void
+    {
+        _accessibilityProperties = value;
+        accessibilityPropertiesChanged = true;
+
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  accessibilityShortcut
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set accessibilityShortcut(value:String):void
+    {
+        if (!Capabilities.hasAccessibility)
+            return;
+
+        if (!accessibilityProperties)
+            accessibilityProperties = new AccessibilityProperties();
+
+        accessibilityProperties.shortcut = value;
+        accessibilityPropertiesChanged = true;
+
+        invalidateProperties();
+    }
+
+    //----------------------------------
     //  baselinePosition
     //----------------------------------

@@ -668,16 +668,16 @@
         setPrompt(value);
     }

-	//----------------------------------
-	//  tabIndex
-	//----------------------------------
+    //----------------------------------
+    //  tabIndex
+    //----------------------------------

     /**
      *  @private
      *  Storage for the tabIndex property.
      */
     private var _tabIndex:int = -1;
-
+
     /**
      *  @private
      */
@@ -866,8 +866,8 @@

         if (textDisplay)
         {
-			if (richEditableText)
-            	richEditableText.imeMode = value;
+            if (richEditableText)
+                richEditableText.imeMode = value;
             textDisplayProperties = BitFlagUtil.update(
                 uint(textDisplayProperties), IME_MODE_PROPERTY_FLAG, true);
         }
@@ -1166,29 +1166,29 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  @private
-	 */
-	override protected function commitProperties():void
-	{
-		super.commitProperties();
-
-		if (accessibilityPropertiesChanged)
-		{
-			if (textDisplay)
-			{
-				textDisplay.accessibilityProperties = _accessibilityProperties;
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (accessibilityPropertiesChanged)
+        {
+            if (textDisplay)
+            {
+                textDisplay.accessibilityProperties = _accessibilityProperties;
                 textDisplay.tabIndex = _tabIndex;

-				// Note: Calling updateProperties() on players that don't
-				// support accessibility will throw an RTE.
-				if (Capabilities.hasAccessibility)
-					Accessibility.updateProperties();
-			}
-
-			accessibilityPropertiesChanged = false;
-		}
-	}
+                // Note: Calling updateProperties() on players that don't
+                // support accessibility will throw an RTE.
+                if (Capabilities.hasAccessibility)
+                    Accessibility.updateProperties();
+            }
+
+            accessibilityPropertiesChanged = false;
+        }
+    }

     /**
      *  @private
@@ -1569,48 +1569,48 @@
         invalidateSkinState();
     }

-	/**
-	 *  @see RichEditableText#typicalText
-	 *
-	 *  @private
-	 */
-	mx_internal function getTypicalText():String
-	{
-		var richEditableText:RichEditableText = textDisplay as RichEditableText;
-
-		if (richEditableText)
-			return richEditableText.typicalText;
-
-		// want the default to be null
-		var v:* = textDisplay ? undefined : textDisplayProperties.typicalText;
-		return (v === undefined) ? null : v;
-	}
-
-	/**
-	 *  @private
-	 */
-	mx_internal function setTypicalText(value:String):void
-	{
-		if (textDisplay)
-		{
-			var richEditableText:RichEditableText = textDisplay as RichEditableText;
-
-			if (richEditableText)
-				richEditableText.typicalText = value;
-			textDisplayProperties = BitFlagUtil.update(
-				uint(textDisplayProperties),
-				TYPICAL_TEXT_PROPERTY_FLAG, true);
-		}
-		else
-		{
-			textDisplayProperties.typicalText = value;
-		}
-
-		// Generate an UPDATE_COMPLETE event.
-		invalidateProperties();
-	}
-
-	/**
+    /**
+     *  @see RichEditableText#typicalText
+     *
+     *  @private
+     */
+    mx_internal function getTypicalText():String
+    {
+        var richEditableText:RichEditableText = textDisplay as RichEditableText;
+
+        if (richEditableText)
+            return richEditableText.typicalText;
+
+        // want the default to be null
+        var v:* = textDisplay ? undefined : textDisplayProperties.typicalText;
+        return (v === undefined) ? null : v;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function setTypicalText(value:String):void
+    {
+        if (textDisplay)
+        {
+            var richEditableText:RichEditableText = textDisplay as RichEditableText;
+
+            if (richEditableText)
+                richEditableText.typicalText = value;
+            textDisplayProperties = BitFlagUtil.update(
+                uint(textDisplayProperties),
+                TYPICAL_TEXT_PROPERTY_FLAG, true);
+        }
+        else
+        {
+            textDisplayProperties.typicalText = value;
+        }
+
+        // Generate an UPDATE_COMPLETE event.
+        invalidateProperties();
+    }
+
+    /**
      *  The default width for the Text components, measured in characters.
      *  The width of the "M" character is used for the calculation.
      *  So if you set this property to 5, it will be wide enough
@@ -1760,14 +1760,14 @@
                 uint(newTextDisplayProperties), TEXT_FLOW_PROPERTY_FLAG, true);
         }

-		if (textDisplayProperties.typicalText !== undefined && richEditableText)
-		{
-			richEditableText.typicalText = textDisplayProperties.typicalText;
-			newTextDisplayProperties = BitFlagUtil.update(
-				uint(newTextDisplayProperties),
-				TYPICAL_TEXT_PROPERTY_FLAG, true);
-		}
-
+        if (textDisplayProperties.typicalText !== undefined && richEditableText)
+        {
+            richEditableText.typicalText = textDisplayProperties.typicalText;
+            newTextDisplayProperties = BitFlagUtil.update(
+                uint(newTextDisplayProperties),
+                TYPICAL_TEXT_PROPERTY_FLAG, true);
+        }
+
         if (textDisplayProperties.widthInChars !== undefined && richEditableText)
         {
             richEditableText.widthInChars = textDisplayProperties.widthInChars;
@@ -1872,12 +1872,12 @@
             newTextDisplayProperties.typicalText = richEditableText.typicalText;
         }

-		if (BitFlagUtil.isSet(uint(textDisplayProperties),
-			WIDTH_IN_CHARS_PROPERTY_FLAG) && richEditableText)
-		{
-			newTextDisplayProperties.widthInChars = richEditableText.widthInChars;
-		}
-
+        if (BitFlagUtil.isSet(uint(textDisplayProperties),
+            WIDTH_IN_CHARS_PROPERTY_FLAG) && richEditableText)
+        {
+            newTextDisplayProperties.widthInChars = richEditableText.widthInChars;
+        }
+
         // Switch from storing bit mask to storing properties.
         textDisplayProperties = newTextDisplayProperties;
     }


better handling of errors

better handling of errors

--- WeaveJS/src/weavejs/core/LinkablePlaceholder.as
+++ WeaveJS/src/weavejs/core/LinkablePlaceholder.as
@@ -66,15 +66,19 @@

 			var ownerCC:ICallbackCollection = Weave.getCallbacks(owner);
 			ownerCC.delayCallbacks();
-
-			var sessionState:Object = Weave.getState(oldObject);
-			if (lhm)
-				lhm.setObject(lhm.getName(oldObject), newObject);
-			else if (ldo)
-				ldo.target = newObject;
-			Weave.setState(newObject, sessionState);
-
-			ownerCC.resumeCallbacks();
+			try
+			{
+				var sessionState:Object = Weave.getState(oldObject);
+				if (lhm)
+					lhm.setObject(lhm.getName(oldObject), newObject);
+				else if (ldo)
+					ldo.target = newObject;
+				Weave.setState(newObject, sessionState);
+			}
+			finally
+			{
+				ownerCC.resumeCallbacks();
+			}
 		}

 		/**
@@ -123,6 +127,7 @@
 			catch (e:Error)
 			{
 				Weave.dispose(placeholder);
+				throw e;
 			}
 		}
 	}


Now using default session state w/ WeaveDataSource when defaults.xml
does not exist.

Change-Id: Ib1d02cf16e5e9288b070aba8db2a962425645b5b

--- WeaveUI/src/weave/application/VisApplication.as
+++ WeaveUI/src/weave/application/VisApplication.as
@@ -261,9 +261,8 @@
 				WeaveAPI.URLRequestUtils.getURL(null, new URLRequest(fileName + noCacheHack), handleConfigFileDownloaded, handleConfigFileFault, fileName);
 			}
 		}
-		private function handleConfigFileDownloaded(event:ResultEvent = null, token:Object = null):void
-		{
-			var fileName:String = token as String;
+		private function handleConfigFileDownloaded(event:ResultEvent = null, fileName:String = null):void
+		{
 			if (!event)
 			{
 				loadSessionState(null, null);
@@ -294,25 +293,26 @@
 			WeaveAPI.initializeExternalInterface(); // this calls weaveReady() in JavaScript
 			Weave.properties.runStartupJavaScript(); // run startup script after weaveReady()
 		}
-		private function handleConfigFileFault(event:FaultEvent, token:Object = null):void
-		{
-			// When creating a new file through the admin console, don't report an error for the missing file.
-			var adminDefault:Boolean = (getFlashVarAdminConnectionName() && !getFlashVarFile());
-			if (adminDefault)
-			{
-				// The admin hasn't created a default configuration yet.
-				// When we're creating a new config through the admin console, create a
-				// WeaveDataSource so the admin doesn't have to add it manually every time.
+		private function handleConfigFileFault(event:FaultEvent, fileName:String):void
+		{
+			// don't report an error if no filename was specified
+			var noFileName:Boolean = !getFlashVarFile();
+			if (noFileName)
+			{
+				// for default fallback configuration, create a WeaveDataSource
 				Weave.root.requestObject(null, WeaveDataSource, false);
+
+				// if not opened from admin console, enable interface now
+				if (!getFlashVarAdminConnectionName())
+					this.enabled = true;
 			}
 			else
 			{
 				reportError(event);
-			}
-			if (event.fault.faultCode == SecurityErrorEvent.SECURITY_ERROR)
-				Alert.show(lang("The server hosting the configuration file does not have a permissive crossdomain policy."), lang("Security sandbox violation"));
-		}
-
+				if (event.fault.faultCode == SecurityErrorEvent.SECURITY_ERROR)
+					Alert.show(lang("The server hosting the configuration file does not have a permissive crossdomain policy."), lang("Security sandbox violation"));
+			}
+		}

 		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
 		{


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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -44,7 +44,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="chromeColor", type="uint", format="Color", inherit="yes", theme="spark")]
+[Style(name="chromeColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]

 /**
  *  Name of the skin class to use for this component when a validation error occurs.


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

--- frameworks/projects/automation_airspark/src/spark/automation/delegates/components/SparkWindowedApplicationAutomationImpl.as
+++ frameworks/projects/automation_airspark/src/spark/automation/delegates/components/SparkWindowedApplicationAutomationImpl.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
+//  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: 15368
Author:   smgilson@adobe.com
Date:     2010-04-13T12:31:21.786591Z

Log Message:
-----------
integrate 15352: Update ASDoc version tags

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkCheckBoxAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSliderBaseAutomationImpl.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkTextAreaAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkListBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableTextBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TitleWindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RadioButtonAccImpl.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1252243 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
@@ -35,9 +35,9 @@
  *  @see spark.components.supportClasses.ButtonBase
  *
  *  @langversion 3.0
- *  @playerversion Flash 9
+ *  @playerversion Flash 10
  *  @playerversion AIR 1.5
- *  @productversion Flex 3
+ *  @productversion Flex 4
  *
  */
 public class SparkButtonBaseAutomationImpl extends SparkSkinnableComponentAutomationImpl
@@ -56,9 +56,9 @@
      *  @param root The SystemManger of the application.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
+     *  @playerversion Flash 10
      *  @playerversion AIR 1.5
-     *  @productversion Flex 3
+     *  @productversion Flex 4
      */
     public static function init(root:DisplayObject):void
     {
@@ -70,9 +70,9 @@
      * @param obj ButtonBase object to be automated.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
+     *  @playerversion Flash 10
      *  @playerversion AIR 1.5
-     *  @productversion Flex 3
+     *  @productversion Flex 4
      */
     public function SparkButtonBaseAutomationImpl(obj:spark.components.supportClasses.ButtonBase)
     {
@@ -165,9 +165,9 @@
      *  @param event ReplayableClickEvent to replay.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
+     *  @playerversion Flash 10
      *  @playerversion AIR 1.5
-     *  @productversion Flex 3
+     *  @productversion Flex 4
      */
     override public function replayAutomatableEvent(event:Event):Boolean
     {


updated comments

updated comments

--- dorkbots/dorkbots_ui/TruncateTextField.as
+++ dorkbots/dorkbots_ui/TruncateTextField.as
@@ -41,7 +41,7 @@
 					tempTextField.text = tempTextField.text.slice(0, -1);
 				}

-				// just incase, because while loops make me nervous
+				// just in case, because while loops make me nervous
 				if (tempTextField.text.length <= 0) break;
 			}

@@ -222,7 +222,7 @@
 					result = result.slice(0, -1);
 				}

-				// just incase, because while loops make me nervous
+				// just in case, because while loops make me nervous
 				if (result.length <= 0) break;
 			}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18743
Author:   clucier@adobe.com
Date:     2010-11-19T20:43:39.402229Z

Log Message:
-----------
Adding cross fade mobile view transition.
Updates to ASDoc.

QE notes: None
Doc notes: None
Bugs: None
Reviewer: Chiedo
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as
@@ -0,0 +1,182 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.transitions
+{
+
+import flash.display.BlendMode;
+
+import mx.core.mx_internal;
+import mx.effects.IEffect;
+
+import spark.components.Group;
+import spark.effects.Animate;
+import spark.effects.animation.MotionPath;
+import spark.effects.animation.SimpleMotionPath;
+
+use namespace mx_internal;
+
+/**
+ *  The CrossFadeViewTransition class serves as a simple cross fade transition
+ *  for views.  It performs its transition by fading out the startView to reveal
+ *  the endView. By design, the cross fade transitions the control bar and
+ *  view content as one.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+public class CrossFadeViewTransition extends ViewTransitionBase
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	public function CrossFadeViewTransition()
+	{
+		super();
+
+		// Defaut duration of 400 yields a smoother result.
+		duration = 400;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var transitionGroup:Group;
+
+	/**
+	 *  @private
+	 */
+	private var savedCacheAsBitmap:Boolean;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @inheritDoc
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	override public function captureStartValues():void
+	{
+		// With the cross fade transition we always want to transition the
+		// complete navigator.
+		consolidatedTransition = true;
+
+		super.captureStartValues();
+
+		var oldVisibility:Boolean = endView.visible;
+		endView.visible = false;
+		cachedNavigator = getSnapshot(targetNavigator);
+		endView.visible = oldVisibility;
+	}
+
+	/**
+	 *  @inheritDoc
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	override protected function createConsolidatedEffect():IEffect
+	{
+		// If we have no cachedNavigator then there is not much we can do.
+		if (!cachedNavigator)
+			return null;
+
+		// Add a group to contain our snapshot view of the navigator while
+		// we animate.
+		transitionGroup = new Group();
+		transitionGroup.includeInLayout=false;
+		addComponentToContainer(transitionGroup, targetNavigator.skin);
+
+		// Position our snapshot above endView.
+		cachedNavigator.includeInLayout = false;
+		transitionGroup.addElement(cachedNavigator);
+		transitionGroup.x = transitionGroup.y = 0;
+
+		// Ensure that appropriate surfaces are cached and snapshots rendered.
+		transitionGroup.validateNow();
+		transitionGroup.cacheAsBitmap = true;
+
+		if (targetNavigator.contentGroup)
+		{
+			savedCacheAsBitmap = targetNavigator.contentGroup.cacheAsBitmap;
+			targetNavigator.contentGroup.cacheAsBitmap = true;
+		}
+
+		// We don't want to do the extra work involved with BlendMode.AUTO.
+		transitionGroup.blendMode = BlendMode.NORMAL;
+
+		// Ensure our snapshot is rendered.
+		transitionGroup.validateNow();
+
+		// Construction fade animation sequence.
+		var animation:Animate = new Animate();
+		var vector:Vector.<MotionPath> = new Vector.<MotionPath>();
+		vector.push(new SimpleMotionPath("alpha", 1, 0));
+		animation.motionPaths = vector;
+		animation.easer = easer;
+		animation.targets = [transitionGroup];
+		animation.duration = duration;
+
+		return animation;
+	}
+
+	/**
+	 *  @inheritDoc
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	override protected function cleanUp():void
+	{
+		if (transitionGroup)
+			removeComponentFromContainer(transitionGroup, targetNavigator.skin);
+
+		if (targetNavigator.contentGroup)
+			targetNavigator.contentGroup.cacheAsBitmap = savedCacheAsBitmap;
+
+		transitionGroup = null;
+		cachedNavigator = null;
+
+		super.cleanUp();
+	}
+
+}
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/framework/src/mx/core/FlexSprite.as
+++ frameworks/projects/framework/src/mx/core/FlexSprite.as
@@ -21,6 +21,11 @@
  *  It overrides the toString() method
  *  to return a string indicating the location of the object
  *  within the hierarchy of DisplayObjects in the application.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class FlexSprite extends Sprite
 {
@@ -45,6 +50,11 @@
 	 *
 	 *  @see flash.display.DisplayObject#name
 	 *  @see mx.utils.NameUtil#createUniqueName()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function FlexSprite()
 	{
@@ -88,6 +98,11 @@
 	 *
 	 *  @see flash.display.DisplayObject#name
 	 *  @see mx.utils.NameUtil#displayObjectToString()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override public function toString():String
 	{


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/framework/src/mx/core/IChildList.as
+++ frameworks/projects/framework/src/mx/core/IChildList.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2006 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: 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@1267764 13f79535-47bb-0310-9956-ffa450edef68

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

 package mx.containers
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

QE Notes: None
Doc Notes: None
Bugs: -

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

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

--- frameworks/projects/spark/src/mx/core/UIFTETextField.as
+++ frameworks/projects/spark/src/mx/core/UIFTETextField.as
@@ -64,10 +64,10 @@
  *  @productversion Flex 4
  */
 public class UITLFTextField extends TLFTextField
-							implements IAutomationObject, IIMESupport,
-							IFlexModule,
-							IInvalidating, ISimpleStyleClient,
-							IToolTipManagerClient, IUITextField
+                            implements IAutomationObject, IIMESupport,
+                            IFlexModule,
+                            IInvalidating, ISimpleStyleClient,
+                            IToolTipManagerClient, IUITextField

 {
     include "../core/Version.as";
@@ -165,16 +165,6 @@
         The width and height of the TextField are 4 pixels greater than
         the textWidth and textHeight.

-    *
-
-    *  @langversion 3.0
-
-    *  @playerversion Flash 10
-
-    *  @playerversion AIR 1.5
-
-    *  @productversion Flex 4
-
     */

     //--------------------------------------------------------------------------
@@ -1680,11 +1670,6 @@

         dispatchEvent(new Event("textInsert"));
     }
-*
-*  @langversion 3.0
-*  @playerversion Flash 10
-*  @playerversion AIR 1.5
-*  @productversion Flex 4
 */

     /**


FLEX-34854 FLEX-34852 Removing unused variables. NOTE: this mirrors commit 5a27cc8044e4e7a8e22cb2c75037bb9356d6d128.

--- frameworks/projects/spark/src/spark/collections/Sort.as
+++ frameworks/projects/spark/src/spark/collections/Sort.as
@@ -801,7 +801,6 @@
         }
         else
         {
-            var fields:Array = this.fields;
             if (fields && fields.length > 0)
             {
                 //doing the init value each time may be a little inefficient
@@ -813,7 +812,7 @@
                 //if the Sort is supposed to be unique and fields.length > 1
                 //we cannot use sortOn since it only tests uniqueness
                 //on the first field
-                var sortArgs:Object = initSortFields(items[0], true);
+                initSortFields(items[0], true);

                 if (unique)
                 {


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

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

 import mx.core.mx_internal;