Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkToggleButtonAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkToggleButtonAutomationImpl.as
@@ -11,56 +11,71 @@

 package spark.automation.delegates.components
 {
-	import flash.display.DisplayObject;
-
-	import mx.automation.Automation;
-	import mx.core.mx_internal;
-
-	import spark.automation.delegates.components.supportClasses.SparkToggleButtonBaseAutomationImpl;
-	import spark.components.ToggleButton;
-
-	use namespace mx_internal;
-
-	[Mixin]
-	/**
-	 *
-	 *  Defines methods and properties required to perform instrumentation for the
-	 *  ToggleButton control.
-	 *
-	 *  @see spark.components.ToggleButton
-	 *
-	 */
-	public class SparkToggleButtonAutomationImpl extends SparkToggleButtonBaseAutomationImpl
-	{
-
-		include "../../../core/Version.as";
-		//--------------------------------------------------------------------------
-		//
-		//  Class methods
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  Registers the delegate class for a component class with automation manager.
-		 *
-		 *  @param root The SystemManger of the application.
-		 */
-		public static function init(root:DisplayObject):void
-		{
-			Automation.registerDelegateClass(spark.components.ToggleButton, SparkToggleButtonAutomationImpl);
-		}
-
-		/**
-		 *  Constructor.
-		 * @param obj ToggleButton object to be automated.
-		 */
-		public function SparkToggleButtonAutomationImpl(obj:spark.components.ToggleButton)
-		{
-			super(obj);
-
-		}
-
-
-	}
-
+    import flash.display.DisplayObject;
+
+    import mx.automation.Automation;
+    import mx.core.mx_internal;
+
+    import spark.automation.delegates.components.supportClasses.SparkToggleButtonBaseAutomationImpl;
+    import spark.components.ToggleButton;
+
+    use namespace mx_internal;
+
+    [Mixin]
+    /**
+     *
+     *  Defines methods and properties required to perform instrumentation for the
+     *  ToggleButton control.
+     *
+     *  @see spark.components.ToggleButton
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     *
+     */
+    public class SparkToggleButtonAutomationImpl extends SparkToggleButtonBaseAutomationImpl
+    {
+
+        include "../../../core/Version.as";
+        //--------------------------------------------------------------------------
+        //
+        //  Class methods
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Registers the delegate class for a component class with automation manager.
+         *
+         *  @param root The SystemManger of the application.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public static function init(root:DisplayObject):void
+        {
+            Automation.registerDelegateClass(spark.components.ToggleButton, SparkToggleButtonAutomationImpl);
+        }
+
+        /**
+         *  Constructor.
+         * @param obj ToggleButton object to be automated.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function SparkToggleButtonAutomationImpl(obj:spark.components.ToggleButton)
+        {
+            super(obj);
+
+        }
+
+
+    }
+
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8031
Author:   egeorgie@adobe.com
Date:     2009-06-20T01:10:03.288554Z

Log Message:
-----------
Scrub the TODOs in the framework, convert to FIXMEs in the new convention and assigning an owner.

Doc Notes: N/A
Bugs: N/A
Reviewer: Deepa
tests: build, checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.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/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Timeline.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/VolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ModifiedCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ErrorSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.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/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/MoveInstance.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/effects/EffectTargetFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/BitmapUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/StreamingVideoSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RemoveActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/pathSegments/LineSegment.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/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutElementHelper.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutElementHelper.as
@@ -24,7 +24,7 @@
 {
     include "../../core/Version.as";

-    // TODO EGeorgie: move to a more general place, this is not specific to the LayoutElementHelper
+    // FIXME (egeorgie): move to a more general place, this is not specific to the LayoutElementHelper

     //--------------------------------------------------------------------------
     //
@@ -46,7 +46,7 @@
         return Math.min(max, Math.max(min, val));
     }

-    // TODO EGeorgie: this currently works only for constraints specified to
+    // FIXME (egeorgie): this currently works only for constraints specified to
     // the parent. Add constraintRow and constraintColumn support.
     /**
      *  @return returns the number for the passed in constraint value. Constraint value
@@ -73,7 +73,7 @@
         return result[0];
     }

-    // TODO EGeorgie: Duplicated code! Share this code with the Flex3 Canvas:
+    // FIXME (egeorgie): Duplicated code! Share this code with the Flex3 Canvas:
     /**
      *  @private
      *  Parses a constraint expression, like left="col1:10"


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

--- frameworks/projects/automation/src/mx/automation/codec/TriggerEventPropertyCodec.as
+++ frameworks/projects/automation/src/mx/automation/codec/TriggerEventPropertyCodec.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.automation.codec
 {


OFC-268 Not all record ids are shown in record selector list

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/ui/component/datagrid/RecordSummaryDataGrid.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/ui/component/datagrid/RecordSummaryDataGrid.as
@@ -72,7 +72,7 @@
 			if(dataField.indexOf(dataFieldPrefix) == 0) {
 				var posText:String = dataField.substring(dataFieldPrefix.length);
 				var position:int = int(posText);
-				if(position < list.length) {
+				if(position <= list.length) {
 					var value:Object = list.getItemAt(position - 1);
 					if((value is Number && !isNaN(Number(value))) || value != null) {
 						return String(value);


Transferred from the Adobe Open Source Subversion Repository

Revision: 18731
Author:   clucier@adobe.com
Date:     2010-11-19T15:50:29.937447Z

Log Message:
-----------
Initial drop of mobile SlideViewTransition inclusive of push/cover/pop modes, and up/down/left/right directions. Refactored and renamed classes per PARB review and current view transitions specification.

e.g. ViewTransition -> ViewTransitionBase , SlideViewTransition constructor signature changed.

QE notes: None
Doc notes: None
Bugs: None
Reviewer: Chiedo
Tests run: Checkin, TransitionTests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="dir" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects</path>
<path kind="file" action="A">/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/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/SlideViewTransition.as" copyfrom-rev="18652" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionDirection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransitionMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions</path>

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
@@ -0,0 +1,1235 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.BitmapData;
+import flash.display.DisplayObject;
+import flash.events.EventDispatcher;
+import flash.geom.Rectangle;
+
+import mx.core.IVisualElement;
+import mx.core.IVisualElementContainer;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.effects.Effect;
+import mx.effects.IEffect;
+import mx.effects.Parallel;
+import mx.effects.Pause;
+import mx.events.EffectEvent;
+import mx.events.FlexEvent;
+
+import spark.components.ActionBar;
+import spark.components.Group;
+import spark.components.Image;
+import spark.components.TabbedViewNavigator;
+import spark.components.View;
+import spark.components.ViewNavigator;
+import spark.components.supportClasses.ButtonBarBase;
+import spark.components.supportClasses.ViewNavigatorBase;
+import spark.effects.Animate;
+import spark.effects.Fade;
+import spark.effects.animation.MotionPath;
+import spark.effects.animation.SimpleMotionPath;
+import spark.effects.easing.IEaser;
+import spark.effects.easing.Sine;
+import spark.primitives.BitmapImage;
+import spark.utils.BitmapUtil;
+
+use namespace mx_internal;
+
+/**
+ *  Dispatched when the transition starts.
+ */
+[Event(name="transitionStart", type="flash.events.Event")]
+
+/**
+ *  Dispatched when the transition is complete.
+ */
+[Event(name="transitionEnd", type="flash.events.Event")]
+
+
+/**
+ *  The ViewTransitionBase class serves as the base class for all stock view
+ *  transitions.  It is not intended to be used as a transition on its own.
+ *
+ *  In addition to providing common convenience and helper methods used by
+ *  view transitions this class also provides a default action bar transition
+ *  sequence.
+ *
+ *
When a view transition is initialized, the owning view navigator will
+ *  assign the startView and endView references to the views the transition
+ *  will be animating from and to. In addition, the navigator property will
+ *  be set to reflect the view navigator.

+ *
+ *
The lifecycle of a transition starts with the captureStartValues()
+ *  method.  When this method is called, the navigator is currently in the
+ *  start state.  At this point the transition should capture any start values
+ *  or bitmaps that it requires.  Afterwards, a validation pass on the pending
+ *  view and captureEndValues() will be called. At this point the
+ *  transition is to capture any properties or bitmaps representations from the
+ *  pending view.

+ *
+ *
At this point prepareForPlay() is called, which allows the transition
+ *  to perform any further preparation (such as preparing a spark effects sequence,
+ *  or positioning transient elements on the display list).

+ *
+ *
After one final validation pass (if necessary), play() is invoked
+ *  by the navigator to perform the actual transition. Prior to any animation
+ *  starting the FlexEvent.TRANSITION_START event will be dispatched.

+ *
+ *
When a transition completes, it is required to dispatch a
+ *  FlexEvent.TRANSITION_END event.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+public class ViewTransitionBase extends EventDispatcher
+{
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constant used in tandem with the actionBarTransitionMode property to
+     *  hint the default action bar transition behavior.
+     */
+	mx_internal static const ACTION_BAR_MODE_FADE:String = "fade";
+
+    /**
+     *  Constant used in tandem with the actionBarTransitionMode property to
+     *  hint the default action bar transition behavior.
+     */
+	mx_internal static const ACTION_BAR_MODE_FADE_AND_SLIDE:String = "fadeAndSlide";
+
+	/**
+	 *  Constant used in tandem with the actionBarTransitionMode property to
+	 *  hint the default action bar transition behavior.
+	 */
+	mx_internal static const ACTION_BAR_MODE_NONE:String = "none";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function ViewTransitionBase()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Flag set when we've determined that we need to transition the navigator
+     *  in its entirety and cannot transition the control bars independently.
+     */
+    private var consolidatedTransition:Boolean = false;
+
+    /**
+     *  @private
+     *  startView's action bar height.
+     */
+    private var cachedActionBarHeight:Number;
+
+    /**
+     *  @private
+     *  startView's action bar width.
+     */
+    private var cachedActionBarWidth:Number;
+
+	/**
+	 *  @private
+	 *  Transient display object used to hold temporary bitmap snapshots
+	 *  during transition.
+	 */
+	private var transitionGroup:Group;
+
+	/**
+	 *  @private
+	 *  Flag to assist with cleanup of any constructs used only for vertical
+	 *  transitions (e.g. clipping masks).
+	 */
+	private var verticalTransition:Boolean;
+
+
+	/**
+	 *  @private
+	 */
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  duration
+    //----------------------------------
+
+    private var _duration:Number = 250;
+
+    /**
+     *  Duration of the transition in milliseconds. The default may vary
+     *  depending on the transition.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get duration():Number
+    {
+        return _duration;
+    }
+
+    /**
+     *  @private
+     */
+    public function set duration(value:Number):void
+    {
+        _duration = value;
+    }
+
+    //----------------------------------
+    //  easer
+    //----------------------------------
+
+    private var _easer:IEaser = new Sine(.5);
+
+    /**
+     *  The easing behavior for this transition. The IEaser object is
+     *  generally propagated to the IEffect instance managing the actual
+     *  transition animation.
+	 *
+	 *  @default new Sine(.5);
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get easer():IEaser
+    {
+        return _easer;
+    }
+
+    /**
+     *  @private
+     */
+    public function set easer(value:IEaser):void
+    {
+        _easer = value;
+    }
+
+    //----------------------------------
+    //  effect
+    //----------------------------------
+
+    private var _effect:IEffect;
+
+    /**
+     *  Provides access to the underlying IEffect instance which the
+     *  transition is using to perform the transition (if any).  This property
+     *  is only valid after the FlexEvent.TRANSITION_START event even has been
+     *  dispatched.
+     *
+     *  If a transition does not make use of IEffect to perform the transition
+     *  this can be null.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    mx_internal function get effect():IEffect
+    {
+        return _effect;
+    }
+
+    mx_internal function set effect(value:IEffect):void
+    {
+        _effect = value;
+    }
+
+    //----------------------------------
+    //  endView
+    //----------------------------------
+
+    private var _endView:View;
+
+    /**
+     *  The reference to the view that the navigator is transitioning
+     *  to, set by the owning ViewNavigator itself.  This can be null.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get endView():View
+    {
+        return _endView;
+    }
+
+    /**
+     *  @private
+     */
+    public function set endView(value:View):void
+    {
+        _endView = value;
+    }
+
+    //----------------------------------
+    //  navigator
+    //----------------------------------
+
+    private var _navigator:ViewNavigator;
+
+    /**
+     *  Reference to the owning ViewNavigator instance set by the owning
+     *  ViewNavigator.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get navigator():ViewNavigator
+    {
+        return _navigator;
+    }
+
+    /**
+     *  @private
+     */
+    public function set navigator(value:ViewNavigator):void
+    {
+        _navigator = value;
+    }
+
+    //----------------------------------
+    //  startView
+    //----------------------------------
+
+    private var _startView:View;
+
+    /**
+     *  The currently active view of the view navigator, set by the owning
+     *  view navigator itself. This can be null.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get startView():View
+    {
+        return _startView;
+    }
+
+    /**
+     *  @private
+     */
+    public function set startView(value:View):void
+    {
+        _startView = value;
+    }
+
+    //----------------------------------
+    //  transitionControlsWithContent
+    //----------------------------------
+
+    private var _transitionControlsWithContent:Boolean;
+
+    /**
+     *  When set to true, the primary view transition
+     *  is used to transition the navigator in its entirety,
+     *  and sub-transitions such as the action bar or
+     *  tab bar transitions are not performed.
+     *
+     *
Note that even when set to false, there are cases
+	 *  where its not feasible to transition the action bar
+	 *  or tab bar, such as when the action bar or
+     *  tab bar does not exist in one of the two views or
+     *  if the tab bar or action bar changes size.

+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get transitionControlsWithContent():Boolean
+    {
+        return _transitionControlsWithContent;
+    }
+
+    /**
+     *  @private
+     */
+    public function set transitionControlsWithContent(value:Boolean):void
+    {
+        _transitionControlsWithContent = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Private Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  actionBarTransitionMode
+    //----------------------------------
+
+    /**
+	 *  @private
+     *  Convenience property used by ViewTransitionBase overrides to hint the behavior of
+     *  the default action bar transition as appropriate for the type and nature
+     *  of the specific view transition. Can be one either ViewTransitionBase.ACTION_BAR_MODE_FADE,
+     *  ViewTransitionBase.ACTION_BAR_MODE_FADE_AND_SLIDE, or null. If set to fade
+     *  and slide, the actionBarTransitionDirection property is considered by the
+     *  default createActionBarEffect() implementation.
+     *
+     *  @default ACTION_BAR_MODE_FADE_AND_SLIDE
+     */
+    mx_internal var actionBarTransitionMode:String = ACTION_BAR_MODE_FADE_AND_SLIDE;
+
+    //----------------------------------
+    //  actionBarTransitionDirection
+    //----------------------------------
+
+    /**
+	 *  @private
+     *  Convenience property used by ViewTransitionBase overrides to hint the direction
+     *  of the default action bar transition when the actionBarTransitionMode is set to
+     *  "fadeAndSlide". Can be or null or set to one of the ViewTransitionDirection
+     *  constants.  This property is considered by the default createActionBarEffect()
+     *  implementation.
+     *
+     *  @default ViewTransitionDirection.LEFT
+     */
+    mx_internal var actionBarTransitionDirection:String = ViewTransitionDirection.LEFT;
+
+    //----------------------------------
+    //  cachedNavigatorSnapshot
+    //----------------------------------
+
+    /**
+	 *  @private
+     *  Cached image of the cumulative view of the owning navigator
+     *  captured by the default captureStartValues() implementation.
+     *  This snapshot is generally leveraged by transitions that need to
+     *  performing a full screen transition.
+     */
+    mx_internal var cachedNavigator:BitmapImage;
+
+    //----------------------------------
+    //  cachedActionGroupSnapshot
+    //----------------------------------
+
+    /**
+	 *  @private
+     *  Cached image of the action bar's action group. This image is
+     *  only captured by default if action group content exists in the
+     *  previous view.
+     */
+    mx_internal var cachedActionGroup:BitmapImage;
+
+    //----------------------------------
+    //  cachedTitleGroupSnapshot
+    //----------------------------------
+
+    /**
+	 *  @private
+     *  Cached image of the action bar's title group. This image is
+     *  only captured by default if title group content exists in the
+     *  previous view.
+     */
+    mx_internal var cachedTitleGroup:BitmapImage;
+
+    //----------------------------------
+    //  cachedNavigationGroupSnapshot
+    //----------------------------------
+
+    /**
+	 *  @private
+     *  Cached image of the action bar's navigation group. This image is
+     *  only captured by default if navigation group content exists in the
+     *  previous view.
+     */
+    mx_internal var cachedNavigationGroup:BitmapImage;
+
+	//----------------------------------
+	//  targetNavigator
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Convenience property which caches our primary containing navigator,
+	 *  this is usually our owning ViewNavigator but may be an outer TabNavigator
+	 */
+	protected var targetNavigator:ViewNavigatorBase;
+
+	//----------------------------------
+	//  parentNavigator
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Convenience property which caches our primary containing navigator,
+	 *  this is usually our owning ViewNavigator but may be an outer TabNavigator
+	 */
+	protected var parentNavigator:ViewNavigatorBase;
+
+	//----------------------------------
+	//  actionBar
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Convenience property which caches our associated action bar.
+	 */
+	protected var actionBar:ActionBar;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  This method is called by the ViewNavigator during the preparation phase of a transition.
+     *  It is invoked when the new view has been fully realized and validated and the
+     *  action bar and tab bar content reflect the state of the new view. It is at
+     *  this point that the transition is to capture any values it requires from the
+     *  pending view. In addition any bitmaps reflecting the state of the new view, tab bar,
+     *  or action bar should be captured if required for animation.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function captureStartValues():void
+    {
+		// Remember some common references.
+		parentNavigator = navigator.parentNavigator;
+		targetNavigator = parentNavigator ? parentNavigator : navigator;
+		if (navigator is ViewNavigator)
+		    actionBar = ViewNavigator(navigator).actionBar;
+
+        // Determine first if we're able to transition our control bars independently
+        // of our view content.  If we are, then capture the necessary action bar
+        // bitmap snapshots for use later by our default action bar transition.
+        consolidatedTransition = !canTransitionControlBarContent();
+
+        // Snapshot component parts of action bar in preparation for our
+        // default action bar transition, (if appropriate).
+        if (!consolidatedTransition && navigator is ViewNavigator)
+        {
+            if (componentIsVisible(actionBar))
+            {
+                // Save bounds of action bar.
+                cachedActionBarWidth = actionBar.width;
+                cachedActionBarHeight = actionBar.height;
+
+                // Snapshot title content of our startView.
+                if (actionBar.titleGroup && actionBar.titleGroup.visible)
+                    cachedTitleGroup = getSnapshot(actionBar.titleGroup);
+                else if (actionBar.titleDisplay
+                    && (actionBar.titleDisplay is UIComponent)
+                    && UIComponent(actionBar.titleDisplay).visible)
+                    cachedTitleGroup = getSnapshot(UIComponent(actionBar.titleDisplay));
+
+                // Snapshot actionContent if it's changing between our start and end views.
+                if (startView.actionContent != endView.actionContent)
+                    cachedActionGroup = getSnapshot(actionBar.actionGroup);
+
+                // Snapshot navigationContent if it's changing between our start and end views.
+                if (startView.navigationContent != endView.navigationContent)
+                    cachedNavigationGroup = getSnapshot(actionBar.navigationGroup);
+            }
+        }
+    }
+
+    /**
+     *  This method is called by the ViewNavigator during the preparation phase of a transition.
+     *  It is invoked when the new view has been fully realized and validated and the
+     *  action bar and tab bar content reflect the state of the new view. It is at
+     *  this point that the transition is to capture any values it requires from the
+     *  pending view. In addition any bitmaps reflecting the state of the new view, tab bar,
+     *  or action bar should be captured if required for animation.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function captureEndValues():void
+    {
+        // One final check to determine if we will be required to perform a full
+        // (consolidated) transition.
+        if (!consolidatedTransition)
+        {
+            consolidatedTransition =
+                ((actionBar.height != cachedActionBarHeight) ||
+                    (actionBar.width != cachedActionBarWidth));
+        }
+    }
+
+    /**
+     *  This method is called by the ViewNavigator when the transition
+     *  should begin animating.  At this time the transition should dispatch an
+     *  FlexEvent.TRANSITION_START event.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function play():void
+    {
+        if (effect)
+        {
+            effect.addEventListener(EffectEvent.EFFECT_END, effectComplete);
+            effect.play();
+        }
+        else
+            transitionComplete();
+    }
+
+    /**
+     *  This method is called by the ViewNavigator during the preparation phase
+     *  of a transition.  It gives the transition the chance to create and
+     *  configure the underlying IEffect instance, or to add any transient
+     *  elements to the display list (e.g. bitmap placeholders, temporary
+     *  containers required during the transition, etc.). One final validation
+     *  pass will occur prior to invocation of play() (if required).
+     *
+     *  If it is determined that a standard transition can be initiated (e.g one
+     *  that transitions the control bars separately from the views), the default
+     *  implementation of prepareForPlay() will construct a single Parallel effect
+     *  which wraps the individual effect sequences for the view transition, the
+     *  action bar transition, and the tab bar transition.  prepareForPlay() makes
+     *  use of the helper methods, createActionBarEffect(), createTabBarEffect(),
+     *  and createViewEffect() to do so.
+     *
+     *  If transitionControlsWithContent is set to true, or if it is determined that
+     *  the control bars cannot be transitioned independently, a single effect is
+     *  created to transition the navigator in its entirety from its before and
+     *  after states. In this case, only createConsolidatedEffect() is invoked.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function prepareForPlay():void
+    {
+        if (!consolidatedTransition)
+        {
+            effect = new Parallel();
+
+            // Prepare action bar effect
+            if (actionBar)
+            {
+                var actionBarEffect:IEffect = createActionBarEffect();
+                if (actionBarEffect)
+                    Parallel(effect).addChild(actionBarEffect);
+            }
+
+            // Prepare tab bar effect
+            if (targetNavigator is TabbedViewNavigator)
+            {
+                if (TabbedViewNavigator(targetNavigator).tabBar)
+                {
+                    var tabBarEffect:IEffect = createTabBarEffect();
+                    if (tabBarEffect)
+                        Parallel(effect).addChild(tabBarEffect);
+                }
+            }
+
+            // Prepare view effect
+            var viewEffect:IEffect = createViewEffect();
+            if (viewEffect)
+                Parallel(effect).addChild(createViewEffect());
+        }
+        else
+        {
+            // Prepare full transition of navigator in its entirety.
+            effect = createConsolidatedEffect();
+        }
+    }
+
+    /**
+     *  Called by the default prepareForPlay() implementation, this method
+     *  is responsible for creating the spark effect that should be played on the
+     *  action bar when the transition starts.  This method should be
+     *  overridden by sub classes if a custom action bar effect is
+     *  required.  By default, this returns a basic action bar effect.
+     *
+     *  @return An IEffect instance serving as the action bar effect. Will be
+     *  played by the default play() method implementation.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function createActionBarEffect():IEffect
+    {
+        var slideDistance:Number;
+        var animatedProperty:String;
+
+        var actionBarSkin:UIComponent = actionBar.skin;
+        var fadeOutTargets:Array = new Array();
+        var fadeInTargets:Array = new Array();
+
+        // Return if we have a noop action bar transition mode.
+        if (!actionBar || actionBarTransitionMode == ACTION_BAR_MODE_NONE ||
+			!actionBarTransitionMode)
+            return null;
+
+        transitionGroup = new Group();
+        transitionGroup.includeInLayout = false;
+		addComponentToContainer(transitionGroup, actionBarSkin);
+		transitionGroup.width = actionBar.width;
+		transitionGroup.height = actionBar.height;
+
+        // Construct our parallel effect.
+        var effect:Parallel = new Parallel();
+
+        // Calculate the slide distance based on direction.
+        switch (actionBarTransitionDirection)
+        {
+            case ViewTransitionDirection.RIGHT:
+                animatedProperty = "x";
+                slideDistance = -actionBar.width / 2.5;
+                break;
+
+            case ViewTransitionDirection.DOWN:
+                animatedProperty = "y";
+                slideDistance = -actionBar.height / 2.5;
+				transitionGroup.clipAndEnableScrolling = true;
+                verticalTransition = true;
+                break;
+
+            case ViewTransitionDirection.UP:
+                animatedProperty = "y";
+                slideDistance = actionBar.height / 2.5;
+				transitionGroup.clipAndEnableScrolling = true;
+                verticalTransition = true;
+                break;
+
+            case ViewTransitionDirection.LEFT:
+            default:
+                animatedProperty = "x";
+                slideDistance = actionBar.width / 2.5;
+                break;
+        }
+
+        // Suppress slide if our action bar transition behavior is fade-only.
+        if (actionBarTransitionMode == ACTION_BAR_MODE_FADE)
+            slideDistance = 0;
+
+        // If the skin has title content queue new title content for fade in.
+        if (actionBar.titleGroup || actionBar.titleDisplay)
+        {
+            var titleComponent:UIComponent = actionBar.titleGroup;
+
+            if (!titleComponent || !titleComponent.visible)
+                titleComponent = actionBar.titleDisplay as UIComponent;
+
+            if (titleComponent)
+            {
+                // Initialize titleGroup
+                titleComponent.cacheAsBitmap = true;
+                titleComponent.alpha = 0;
+                titleComponent[animatedProperty] += slideDistance;
+                fadeInTargets.push(titleComponent);
+
+				if (verticalTransition)
+					transitionGroup.addElementAt(titleComponent, 0);
+            }
+
+            if (cachedTitleGroup)
+                transitionGroup.addElement(cachedTitleGroup);
+        }
+
+        // If a cache of the navigation group exists, that means the content
+        // changed.  In this case the queue cached representation to be faded
+        // out.
+        if (cachedNavigationGroup)
+        {
+            transitionGroup.addElement(cachedNavigationGroup);
+			if (!verticalTransition)
+                fadeOutTargets.push(cachedNavigationGroup);
+        }
+
+        // If a cache of the action group exists, that means the content
+        // changed.  In this case the queue cached representation to be faded
+        // out.
+        if (cachedActionGroup)
+        {
+            transitionGroup.addElement(cachedActionGroup);
+			if (!verticalTransition)
+                fadeOutTargets.push(cachedActionGroup);
+        }
+
+        // Create fade in animations for navigationContent and actionContent
+        // of the next view.
+        if (endView)
+        {
+            if (endView.navigationContent)
+            {
+                actionBar.navigationGroup[animatedProperty] += slideDistance;
+                actionBar.navigationGroup.cacheAsBitmap = true;
+                actionBar.navigationGroup.alpha = 0;
+                fadeInTargets.push(actionBar.navigationGroup);
+				if (verticalTransition)
+					transitionGroup.addElementAt(actionBar.navigationGroup, 0);
+            }
+
+            if (endView.actionContent)
+            {
+                actionBar.actionGroup[animatedProperty] += slideDistance;
+                actionBar.actionGroup.cacheAsBitmap = true;
+                actionBar.actionGroup.alpha = 0;
+                fadeInTargets.push(actionBar.actionGroup);
+				if (verticalTransition)
+					transitionGroup.addElementAt(actionBar.actionGroup, 0);
+            }
+        }
+
+        // Fade out action and navigation content
+		var fadeOut:Animate = new Animate();
+		vector = new Vector.<MotionPath>();
+		vector.push(new SimpleMotionPath("alpha", 1, 0));
+		fadeOut.motionPaths = vector;
+		fadeOut.easer = new spark.effects.easing.Sine(.7);
+		fadeOut.targets = fadeOutTargets;
+		fadeOut.duration = duration * .7;
+
+        // Fade out and slide old select content
+        var animation:Animate = new Animate();
+        var vector:Vector.<MotionPath> = new Vector.<MotionPath>();
+        vector.push(new SimpleMotionPath("alpha", 1, 0));
+        vector.push(new SimpleMotionPath(animatedProperty, null, null, -slideDistance));
+        animation.motionPaths = vector;
+        animation.easer = new spark.effects.easing.Sine(.7);
+		var fadeOutSlideTargets:Array = new Array();
+
+		if (cachedTitleGroup)
+			fadeOutSlideTargets.push(cachedTitleGroup);
+
+		if (cachedActionGroup && verticalTransition)
+			fadeOutSlideTargets.push(cachedActionGroup);
+
+		if (cachedNavigationGroup && verticalTransition)
+			fadeOutSlideTargets.push(cachedNavigationGroup);
+
+		if (fadeOutSlideTargets.length)
+		{
+		    animation.targets = fadeOutSlideTargets;
+		    animation.duration = duration;
+            effect.addChild(animation);
+		}
+
+        // Construct animation for our fade in and slide elements.
+        var fadeAndSlide:Animate = new Animate();
+        vector = new Vector.<MotionPath>();
+        vector.push(new SimpleMotionPath("alpha", 0, 1));
+        vector.push(new SimpleMotionPath(animatedProperty, null, null, -slideDistance));
+        fadeAndSlide.motionPaths = vector;
+        fadeAndSlide.easer = new spark.effects.easing.Sine(.7);
+        fadeAndSlide.targets = fadeInTargets;
+        fadeAndSlide.duration = duration;
+
+        // Add effects to the parallel effect
+        effect.addChild(fadeOut);
+        effect.addChild(fadeAndSlide);
+
+        // Ensure bitmaps are rendered prior to invocation of our effect.
+        transitionGroup.validateNow();
+
+        return effect;
+    }
+
+    /**
+     *  Called by the default prepareForPlay() implementation, this method
+     *  is responsible for creating the spark effect that should be played
+     *  on the tab bar when the transition starts.  This method should be
+     *  overridden by sub classes.  By default, this returns null.
+     *
+     *  @return An IEffect instance serving as the tab bar transition. Will be played
+     *  by the default play() method implementation.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function createTabBarEffect():IEffect
+    {
+        return null;
+    }
+
+    /**
+     *  Called by the default prepareForPlay() implementation, this method
+     *  is responsible for creating the spark effect that should be played
+     *  on the current and next view when the transition starts.  This method
+     *  should be overridden by sub classes.  By default, this returns null.
+     *
+     *  @return An IEffect instance serving as the view transition. Will be played
+     *  by the default play() method implementation.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function createViewEffect():IEffect
+    {
+        return null;
+    }
+
+    /**
+     *  Called by the default prepareForPlay() implementation, this method
+     *  is responsible for creating the spark effect that will be played to
+     *  transition the entire navigator (inclusive of the control bar content)
+     *  when necessary.  This method should be overridden by sub classes.
+     *  By default, this returns null.
+     *
+     *  @return An IEffect instance serving as the view transition. Will be played
+     *  by the default play() method implementation.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function createConsolidatedEffect():IEffect
+    {
+        return null;
+    }
+
+    /**
+     *  Called by the transition to denote that the effect object
+     *  has finished executing, dispatches a FlexEvent.TRANSITION_END event.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function transitionComplete():void
+    {
+		cleanUp();
+
+        if (hasEventListener(FlexEvent.TRANSITION_END))
+            dispatchEvent(new FlexEvent(FlexEvent.TRANSITION_END));
+    }
+
+    /**
+     *  Called after the transition is complete, responsible for
+     *  releasing any references and temporary constructs used by the
+     *  transition.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function cleanUp():void
+    {
+        if (!consolidatedTransition)
+        {
+            if (cachedTitleGroup)
+                transitionGroup.removeElement(cachedTitleGroup);
+
+            if (cachedNavigationGroup)
+                transitionGroup.removeElement(cachedNavigationGroup);
+
+            if (cachedActionGroup)
+            {
+                transitionGroup.removeElement(cachedActionGroup);
+                actionBar.actionGroup.cacheAsBitmap = false;
+            }
+
+			// Restore title group and title content to their original state.
+			if (actionBar && actionBar.titleGroup && actionBar.titleGroup.visible)
+				actionBar.titleGroup.cacheAsBitmap = false;
+
+			if (actionBar && actionBar.titleDisplay
+				&& (actionBar.titleDisplay is DisplayObject)
+				&& DisplayObject(actionBar.titleDisplay).visible)
+			{
+				DisplayObject(actionBar.titleDisplay).cacheAsBitmap = false;
+			}
+
+			// Restore title group and title content to their original home.
+			if (actionBar && verticalTransition)
+			{
+				var titleComponent:UIComponent = actionBar.titleGroup;
+				if (!titleComponent || !titleComponent.visible)
+					titleComponent = actionBar.titleDisplay as UIComponent;
+
+				if (titleComponent)
+				{
+					transitionGroup.removeElement(titleComponent);
+					addComponentToContainer(titleComponent, actionBar.skin);
+				}
+			}
+
+			// Restore navigation group to their proper home.
+			if (endView.navigationContent && actionBar && verticalTransition)
+			{
+				transitionGroup.removeElement(actionBar.navigationGroup);
+				if (actionBar.titleDisplay)
+				{
+					var childIndex:uint = actionBar.skin.getChildIndex(actionBar.titleDisplay as DisplayObject);
+					addComponentToContainerAt(actionBar.navigationGroup, actionBar.skin, childIndex);
+				}
+				else
+					addComponentToContainer(actionBar.navigationGroup, actionBar.skin);
+			}
+
+			// Restore action group to their proper home.
+			if (endView.actionContent && actionBar && verticalTransition)
+			{
+				transitionGroup.removeElement(actionBar.actionGroup);
+				if (actionBar.titleDisplay)
+				{
+					childIndex = actionBar.skin.getChildIndex(actionBar.titleDisplay as DisplayObject);
+					addComponentToContainerAt(actionBar.actionGroup, actionBar.skin, childIndex);
+				}
+				else
+				    addComponentToContainer(actionBar.actionGroup, actionBar.skin);
+			}
+
+			removeComponentFromContainer(transitionGroup, actionBar.skin);
+            actionBar.skin.scrollRect = null;
+
+			verticalTransition = false;
+			cachedActionBarHeight = 0;
+			cachedActionBarWidth = 0;
+
+            transitionGroup = null;
+            cachedTitleGroup = null;
+            cachedNavigationGroup = null;
+            cachedActionGroup = null;
+			actionBar = null;
+			parentNavigator = null;
+			targetNavigator = null;
+        }
+    }
+
+    /**
+     *  Helper method used to determine if we can safely transition our
+     *  control bar content independently of our views.
+     *
+     *
 We will not be able to transition our action bar independently if
+     *  our containing navigator is a TabbedViewNavigator and its tabBar's
+     *  visibility changes between views, if the value of the overlayControls
+     *  flag changes between views, or if the size/visibility of the action
+     *  bar changes between views.

+     *
+     *  @return false if we determine controls bars between views are
+     *  incompatible in some way.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function canTransitionControlBarContent():Boolean
+    {
+        // Short circuit if we've already been asked to not consider
+        // control bars during transition.
+        if (transitionControlsWithContent)
+            return false;
+
+        // Test for visibility or size of tab bar changing.
+        if (targetNavigator is TabbedViewNavigator)
+        {
+            var tabBar:ButtonBarBase = TabbedViewNavigator(targetNavigator).tabBar;
+            if (componentIsVisible(tabBar) != endView.tabBarVisible)
+                return false;
+        }
+
+        // Test for visibility or size of action bar changing.
+        if (navigator is ViewNavigator)
+        {
+            var actionBar:ActionBar = ViewNavigator(navigator).actionBar;
+            if (componentIsVisible(actionBar) != endView.actionBarVisible)
+                return false;
+        }
+
+        // Test for value of overlayControls changing.
+        if (startView.overlayControls != endView.overlayControls)
+            return false;
+
+        return true;
+    }
+
+    /**
+     *  Helper method used to render snap shots of on screen elements in
+     *  preparation for transitioning.  The bitmap is returned in the form
+     *  of a BitmapImage.
+     *
+     *  @param target Display object to capture.
+     *  @return BitmapImage representation of the target.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function getSnapshot(target:UIComponent):BitmapImage
+    {
+        var snapShot:BitmapImage = new BitmapImage();
+
+        // Ensure bitmap leverages its own display object for performance
+        // reasons.
+        snapShot.alwaysCreateDisplayObject = true;
+
+        // Capture image, with consideration for transform and color matrix.
+        var bounds:Rectangle = new Rectangle();
+        snapShot.source = BitmapUtil.getSnapshot(target, bounds, true);
+
+        // Size and offset snapShot to match our image bounds data.
+        snapShot.width = bounds.width;
+        snapShot.height = bounds.height;
+        snapShot.x = target.x + bounds.left;
+        snapShot.y = target.y + bounds.top;
+
+        // Exclude from layout.
+        snapShot.includeInLayout = false;
+
+        return snapShot;
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Private Methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     * @private
+     */
+    private function effectComplete(event:EffectEvent):void
+    {
+        effect.removeEventListener(EffectEvent.EFFECT_END, effectComplete);
+        transitionComplete();
+        effect = null;
+    }
+
+	/**
+	 * @private
+	 * Helper method to test whether a component is visible to user.
+	 */
+	protected function componentIsVisible(component:UIComponent):Boolean
+	{
+		return component && component.visible &&
+			component.width && component.height && component.alpha;
+	}
+
+	/**
+	 *  @private
+	 *  Helper method to add a UIComponent instance to either an IVisualElementContainer
+	 *  or DisplayObjectContainer.
+	 */
+	protected function addComponentToContainerAt(component:UIComponent,
+											   container:UIComponent,
+										       index:int):void
+	{
+		if (container is IVisualElementContainer)
+			IVisualElementContainer(container).addElementAt(component, index);
+		else
+			container.addChildAt(component, index);
+	}
+
+	/**
+	 *  @private
+	 *  Helper method to add a UIComponent instance to either an IVisualElementContainer
+	 *  or DisplayObjectContainer.
+	 */
+	protected function addComponentToContainer(component:UIComponent,
+											   container:UIComponent):void
+	{
+		if (container is IVisualElementContainer)
+			IVisualElementContainer(container).addElement(component);
+		else
+			container.addChild(component);
+	}
+
+	/**
+	 *  @private
+	 *  Helper method to remove a UIComponent instance from either an IVisualElementContainer
+	 *  or DisplayObjectContainer.
+	 */
+	protected function removeComponentFromContainer(component:UIComponent,
+													 container:UIComponent):void
+	{
+		if (container is IVisualElementContainer)
+			IVisualElementContainer(container).removeElement(component);
+		else
+			container.removeChild(component);
+	}
+
+	/**
+	 *  @private
+	 *  Helper method to set the child index of the given component.
+	 */
+	protected function setComponentChildIndex(component:UIComponent,
+											  container:UIComponent,
+											  index:int):void
+	{
+		if (container is IVisualElementContainer)
+			IVisualElementContainer(container).setElementIndex(component, index);
+		else
+			container.setChildIndex(component, index);
+	}
+
+}
+
+
+}


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

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


FLEX-34119 Using correct StringUtils.

FLEX-34119 Using correct StringUtils.

--- frameworks/tests/unitTests/mx/collections/HierarchicalCollectionViewTestUtils.as
+++ frameworks/tests/unitTests/mx/collections/HierarchicalCollectionViewTestUtils.as
@@ -19,8 +19,7 @@

 package mx.collections
 {
-	import com.adobe.utils.StringUtil;
-
+    import mx.utils.StringUtil;
 	import mx.collections.ArrayCollection;
 	import mx.collections.CursorBookmark;
 	import mx.collections.HierarchicalCollectionView;


Inventory editing allows a single click to leave the action drop down and goto the action detail drobdown

--- flexEditor/src/org/arisgames/editor/view/PlayerStateChangesEditorView.as
+++ flexEditor/src/org/arisgames/editor/view/PlayerStateChangesEditorView.as
@@ -148,13 +148,20 @@
 		{
 			trace("PlayerStateChangeEditorView: Event CBO");
 			evt.preventDefault();
-
+
 			// Get new requirement from editor for renderer to display
 			st = PlayerStateChangesEditorActionRendererMX(DataGrid(evt.target).itemEditorInstance).cbo.text;
 			dg.editedItemRenderer.data = st;
+			trace("PlayerStateChangeEditorView: st:" + st);
+
+			// Close the cell editor.
+			dg.destroyItemEditor();
+
+			// Update the new data choice
 			psc.actionHuman = st;
-			trace("PlayerStateChangeEditorView: st:" + st);
-
+
+			// Notify the list control to update its display.
+			pscs.refresh();

 		}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/advancedgrids/src/mx/collections/HierarchicalData.as
+++ frameworks/projects/advancedgrids/src/mx/collections/HierarchicalData.as
@@ -0,0 +1,306 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+
+import flash.events.EventDispatcher;
+
+import mx.events.CollectionEvent;
+import mx.events.CollectionEventKind;
+
+
+/**
+ *  Hierarchical data is data already in a structure of parent and child data items.
+ *  The HierarchicalData class provides a default implementation for
+ *  accessing and manipulating data for use in controls such as the AdvancedDataGrid control.
+ *  To configure the AdvancedDataGrid control to display hierarchical data,
+ *  you pass to the dataProvider property an instance of the HierarchicalData class.
+ *
+ *  This implementation handles E4X, XML, and Object nodes in similar but different
+ *  ways. See each method description for details on how the method
+ *  accesses values in nodes of various types.
+ *
+ *  @see mx.controls.AdvancedDataGrid
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class HierarchicalData  extends EventDispatcher implements IHierarchicalData
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param value The data used to populate the HierarchicalData instance.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function HierarchicalData(value:Object = null)
+    {
+        super();
+
+        source = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //--------------------------------------------------------------------------
+    // childrenField
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  The field name to be used to detect children field.
+     */
+    private var _childrenField:String = "children";
+
+    /**
+     *  Indicates the field name to be used to detect children objects in
+     *  a data item.
+     *  By default, all subnodes are considered as children for
+     *  XML data, and the children property is used for the Object data type.
+     *
+     *  This is helpful in adapting to a data format that uses custom data fields
+     *  to represent children.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get childrenField():String
+    {
+        return _childrenField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set childrenField(value:String):void
+    {
+        _childrenField = value;
+    }
+
+    //--------------------------------------------------------------------------
+    // source
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  The source collection.
+     */
+    private var _source:Object;
+
+    /**
+     *  The source collection.
+     *  The collection should implement the IList interface
+     *  to facilitate operation like the addition and removal of items.
+     *
+     *  @see mx.collections.IList
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get source():Object
+    {
+        return _source;
+    }
+
+    /**
+     *  @private
+     */
+    public function set source(value:Object):void
+    {
+        _source = value;
+
+        var event:CollectionEvent = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
+        event.kind = CollectionEventKind.RESET;
+        dispatchEvent(event);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function canHaveChildren(node:Object):Boolean
+    {
+        if (node == null)
+            return false;
+
+        var branch:Boolean = false;
+
+        if (node is XML)
+        {
+            var childList:XMLList = childrenField == "children" ? node.children() : node.child(childrenField).children();
+            //accessing non-required e4x attributes is quirky
+            //but we know we'll at least get an XMLList
+            var branchFlag:XMLList = node.@isBranch;
+            //check to see if a flag has been set
+            if (branchFlag.length() == 1)
+            {
+                //check flag and return (this flag overrides termination status)
+                if (branchFlag[0] == "true")
+                    branch = true;
+            }
+            //since no flags, we'll check to see if there are children
+            else if (childList.length() != 0)
+            {
+                branch = true;
+            }
+        }
+        else if (node is Object)
+        {
+            try
+            {
+                if (node[childrenField] != undefined)
+                {
+                    branch = true;
+                }
+            }
+            catch (e:Error)
+            {
+            }
+        }
+        return branch;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function getChildren(node:Object):Object
+    {
+        if (node == null)
+            return null;
+
+        var children:*;
+
+        //first get the children based on the type of node.
+        if (node is XML)
+        {
+            children = childrenField == "children" ? node.* : node.child(childrenField).*;
+        }
+        else if (node is Object)
+        {
+            //we'll try the default children property
+            try
+            {
+                children = node[childrenField];
+            }
+            catch (e:Error)
+            {
+            }
+        }
+
+        //no children exist for this node
+        if(children === undefined)
+            return null;
+
+        return children;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function hasChildren(node:Object):Boolean
+    {
+        if (node == null)
+            return false;
+
+        //This default impl can't optimize this call to getChildren
+        //since we can't make any assumptions by type.  Custom impl's
+        //can probably avoid this call and reduce the number of calls to
+        //getChildren if need be.
+        var children:Object = getChildren(node);
+        try
+        {
+            if(children is XMLList || children is XML)
+            {
+                if (children.length() > 0)
+                    return true;
+            }
+
+            if (children.length > 0)
+                return true;
+        }
+        catch (e:Error)
+        {
+        }
+        return false;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function getData(node:Object):Object
+    {
+        return Object(node);
+    }
+
+    /**
+     * @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function getRoot():Object
+    {
+        return source;
+    }
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 7743
Author:   clucier@adobe.com
Date:     2009-06-11T13:53:10.203664Z

Log Message:
-----------
Moving away from using namespace qualifiers in most cases in the SDK.  We've run into a few cases now where the use of qualifiers in code that is called excessively can slow things down.
Bugs: SDK-21337
Reviewer: Ryan, Paul
QE Notes: None
Tests: Ran several random Mustella test groups, checkintests.

Modified Paths:
--------------
106 paths were modified

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

--- frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as
+++ frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as
@@ -1580,7 +1580,7 @@
             regenerate = true;
         }

-        super.mx_internal::setStyle(styleProp, value);
+        super.setLocalStyle(styleProp, value);

         // The default implementation of setStyle won't always regenerate
         // the proto chain when headerStyleName is set, and we need to make sure


Transferred from the Adobe Open Source Subversion Repository

Revision: 6442
Author:   dsubrama@adobe.com
Date:     2009-04-30T22:37:48.504610Z

Log Message:
-----------
SDK-20745, SDK-20856

Strict check when determining toString() representation of data items.

Reviewer: Hans
Checkintests: PASS

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/LabelUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
@@ -666,7 +666,7 @@
      */
     public function itemToLabel(item:Object):String
     {
-        if (item)
+        if (item !== null)
             return item.toString();
         else return " ";
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20458
Author:   jszeto@adobe.com
Date:     2011-02-24T19:08:51.095355Z

Log Message:
-----------
TextArea and Scroller auto-scroll bug fix

http://bugs.adobe.com/jira/browse/SDK-29516 - TextArea does not autoscroll on edit if it's height is not specified

Fixed the use case where the TextArea is both wider and taller than the Scroller.

QE notes: none
Doc notes: none
Bugs: SDK-29516
Reviewer: Glenn
Tests run: checkintests
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
@@ -1510,6 +1510,7 @@
             return null;

         if (isNaN(topOffset) && isNaN(bottomOffset) && isNaN(leftOffset) && isNaN(rightOffset) &&
+            !elementLocalBounds &&
             (scrollR.containsRect(elementR) || elementR.containsRect(scrollR)))
             return null;