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

--- frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
@@ -9,62 +9,26 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package spark.effects
+package spark.transitions
 {
-import flash.display.BitmapData;
-import flash.display.DisplayObject;
-
-import mx.core.IVisualElementContainer;
-import mx.core.UIComponent;
+
 import mx.core.mx_internal;
 import mx.effects.IEffect;
-import mx.effects.Parallel;
-import mx.events.EffectEvent;

 import spark.components.ActionBar;
 import spark.components.Group;
-import spark.components.Image;
 import spark.components.TabbedViewNavigator;
 import spark.components.ViewNavigator;
 import spark.components.supportClasses.ButtonBarBase;
 import spark.components.supportClasses.ViewNavigatorBase;
+import spark.effects.Animate;
 import spark.effects.animation.MotionPath;
 import spark.effects.animation.SimpleMotionPath;
-import spark.effects.easing.Sine;

 use namespace mx_internal;
-
-/**
- *
- */
-public class SlideViewTransition extends ViewTransition
+
+public class SlideViewTransition extends ViewTransitionBase
 {
-    //--------------------------------------------------------------------------
-    //
-    //  Constants
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  Slide the views to the left.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public static const SLIDE_LEFT:String = "left";
-
-    /**
-     *  Slide the views to the right.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public static const SLIDE_RIGHT:String = "right";
-
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -74,20 +38,14 @@
     /**
      *  Constructor.
      *
-     *  @param duration The duration of the effect
-     *  @param direction The direction of the transition.  Can be "left" or "right".
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function SlideViewTransition(duration:Number = 300, direction:String = SLIDE_LEFT)
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function SlideViewTransition()
     {
         super();
-
-        this.duration = duration;
-        this.direction = direction;
     }

     //--------------------------------------------------------------------------
@@ -95,88 +53,85 @@
     //  Variables
     //
     //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var currentViewProps:Object;
+
+    /**
+     *  @private
+     */
+    private var nextViewProps:Object;
+
+	/**
+	 *  @private
+	 */
+	private var transitionGroup:Group;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //---------------------------------
+    // direction
+    //---------------------------------
+
+    private var _direction:String = ViewTransitionDirection.LEFT;
+
+    /**
+     *  Specifies the direction of slide transition.
+     *
+     *  @default ViewTransitionDirection.LEFT
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get direction():String
+    {
+        return _direction;
+    }

     /**
      *  @private
      */
-    private var parentNavigator:ViewNavigatorBase;
+    public function set direction(value:String):void
+    {
+        _direction = value;
+    }
+
+    //---------------------------------
+    // mode
+    //---------------------------------
+
+    private var _mode:String = SlideViewTransitionMode.PUSH;
+
+    /**
+     *  Specifies the type of slide transition to perform.
+     *
+     *  @default SlideViewTransitionMode.PUSH
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get mode():String
+    {
+        return _mode;
+    }

     /**
      *  @private
-     */
-    private var targetNavigator:ViewNavigatorBase;
-
-    /**
-     *  @private
-     */
-    private var actionBar:ActionBar;
-
-    /**
-     *  @private
-     */
-    private var cachedNavigator:Image;
-
-    /**
-     *  @private
-     */
-    private var cachedActionBar:Image;
-
-    /**
-     *  @private
-     */
-    private var cachedActionGroup:Image;
-
-    /**
-     *  @private
-     */
-    private var cachedTitleGroup:Image;
-
-    /**
-     *  @private
-     */
-    private var cachedNavigationGroup:Image;
-
-    /**
-     *  @private
-     */
-    private var currentViewProps:Object;
-
-    /**
-     *  @private
-     */
-    private var nextViewProps:Object;
-
-    /**
-     *  @private
-     */
-    private var explicitContentGroupIncludeInLayout:Boolean;
-
-    /**
-     *  @private
-     */
-    private var explicitIncludeInLayout:Boolean;
-
-    /**
-     *  @private
-     */
-    private var fullScreenAnimation:Boolean;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Properties
-    //
-    //--------------------------------------------------------------------------
-
-    [Inspectable(category="General", enumeration="left,right", defaultValue="left")]
-    /**
-     *  The direction of the slide animation.  Can be either "left" or "right".
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public var direction:String = SLIDE_LEFT;
+     */
+    public function set mode(value:String):void
+    {
+        _mode = value;
+    }

     //--------------------------------------------------------------------------
     //
@@ -185,7 +140,7 @@
     //--------------------------------------------------------------------------

     /**
-     *
+     *  @inheritDoc
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -194,556 +149,271 @@
      */
     override public function captureStartValues():void
     {
-        var tabBar:ButtonBarBase;
-        parentNavigator = navigator.parentNavigator;
-        targetNavigator = parentNavigator ? parentNavigator : navigator;
-
-        fullScreenAnimation = false;
-
-        // Determine if this will be a full screen slide animation.  A
-        // fullScreen animation will occur if the parent navigator is a
-        // TabbedViewNavigator and the tabBar visiblity has changed, the
-        // overlayControls property changes between views or the size of
-        // the actionBar changes.
-        if (parentNavigator is TabbedViewNavigator)
-        {
-            tabBar = TabbedViewNavigator(parentNavigator).tabBar;
+        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 createViewEffect():IEffect
+    {
+		// Prepare our start and end views by positioning them prior to
+		// the start of our transition, ensuring that they are cached as
+		// surfaces, and adjust z-order if necessary.
+
+		var slideTargets:Array = new Array();
+
+        if (startView)
+        {
+            currentViewProps = { includeInLayout:startView.includeInLayout,
+                cacheAsBitmap:startView.cacheAsBitmap };
+
+            startView.includeInLayout = false;
+            startView.cacheAsBitmap = true;
+
+            if (!(mode == SlideViewTransitionMode.COVER))
+                slideTargets.push(startView);
+        }
+
+        if (endView)
+        {
+            nextViewProps = { includeInLayout:endView.includeInLayout,
+                cacheAsBitmap:endView.cacheAsBitmap };
+
+            endView.includeInLayout = false;
+            endView.cacheAsBitmap = true;
+
+            if (!(mode == SlideViewTransitionMode.UNCOVER))
+                slideTargets.push(endView);
+
+            if (mode == SlideViewTransitionMode.UNCOVER)
+				setComponentChildIndex(endView, navigator, 0);
+        }
+
+        var slideDistance:Number;
+        var slideOffset:Number = 0;
+        var animatedProperty:String;
+        var verticalTransition:Boolean;
+
+        // Predetermine slide direction and distance.
+        switch (direction)
+        {
+            case ViewTransitionDirection.DOWN:
+                animatedProperty = "y";
+                slideDistance = navigator.height;
+                slideOffset = -navigator.contentGroup[animatedProperty];
+                verticalTransition = true;
+                break;
+
+            case ViewTransitionDirection.UP:
+                animatedProperty = "y";
+                slideDistance = -navigator.height;
+                slideOffset = navigator.contentGroup[animatedProperty];
+                verticalTransition = true;
+                break;
+
+            case ViewTransitionDirection.RIGHT:
+                animatedProperty = "x";
+                slideDistance = navigator.width;
+                break;
+
+            case ViewTransitionDirection.LEFT:
+            default:
+                animatedProperty = "x";
+                slideDistance = -navigator.width;
+                break;
+        }
+
+		// Position the end view prior to start of transition.
+        if (!(mode == SlideViewTransitionMode.UNCOVER))
+            endView[animatedProperty] = -slideDistance - slideOffset;
+
+		// Construction animation sequence.
+        var animation:Animate = new Animate();
+        var vector:Vector.<MotionPath> = new Vector.<MotionPath>();
+        vector.push(new SimpleMotionPath(animatedProperty, null, null, slideDistance + slideOffset));
+        animation.motionPaths = vector;
+        animation.easer = easer;
+        animation.targets = slideTargets;
+        animation.duration = duration;
+
+        return animation;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    override protected function createConsolidatedEffect():IEffect
+    {
+		// Prepare our start and end view elements by positioning them prior to
+		// the start of our transition, ensuring that they are cached as
+		// surfaces, and adjust z-order if necessary.
+
+		var slideTargets:Array = new Array();
+
+        if (!(mode == SlideViewTransitionMode.COVER))
+            slideTargets.push(cachedNavigator);
+
+        if (!(mode == SlideViewTransitionMode.UNCOVER))
+            slideTargets.push(targetNavigator.contentGroup);
+
+        targetNavigator.contentGroup.includeInLayout = false;
+
+        transitionGroup = new Group();
+        transitionGroup.includeInLayout=false;
+
+		// Ensure the views are in the right stacking order based on our
+		// transition mode (cover vs. uncover for instance).
+        if (mode == SlideViewTransitionMode.COVER)
+		{
+			var childIndex:uint = targetNavigator.skin.getChildIndex(targetNavigator.contentGroup);
+		    addComponentToContainerAt(transitionGroup, targetNavigator.skin, childIndex);
+		}
+        else
+			addComponentToContainer(transitionGroup, targetNavigator.skin);
+
+        if (targetNavigator is TabbedViewNavigator)
+        {
+            var tabBar:ButtonBarBase = TabbedViewNavigator(targetNavigator).tabBar;

             if (tabBar)
-                fullScreenAnimation = (componentIsVisible(tabBar) != nextView.tabBarVisible);
-        }
-
-        if (navigator is ViewNavigator)
-            actionBar = ViewNavigator(navigator).actionBar;
-
-        // Check for actionBar visiblity and overlayControls property change
-        if (!fullScreenAnimation)
-        {
-            if (nextView.overlayControls != currentView.overlayControls)
             {
-                fullScreenAnimation = true;
+                if (!(mode == SlideViewTransitionMode.UNCOVER))
+                    slideTargets.push(tabBar);
+                tabBar.includeInLayout = false;
             }
-            else if (navigator is ViewNavigator)
+        }
+        else if (targetNavigator is ViewNavigator)
+        {
+            if (actionBar)
             {
-                if (componentIsVisible(actionBar) != nextView.actionBarVisible)
-                {
-                    fullScreenAnimation = true;
-                    targetNavigator = navigator;
-                }
+                if (!(mode == SlideViewTransitionMode.UNCOVER))
+                    slideTargets.push(actionBar);
+                actionBar.includeInLayout = false;
             }
         }

-        // If the transition still can't determine if the animation will be fullscreen,
-        // prepare bitmaps of the actionBar in the case they are needed
-        if (!fullScreenAnimation)
-        {
-            targetNavigator = navigator;
-
-            if (navigator is ViewNavigator)
-            {
-                if (componentIsVisible(actionBar))
-                {
-                    // Always generate full ActionBar caches
-                    cachedActionBar = generateBitmap(actionBar);
-
-                    // This transition was designed to always animate the title content
-                    if (actionBar.titleGroup && actionBar.titleGroup.visible)
-                        cachedTitleGroup = generateBitmap(actionBar.titleGroup);
-                    else if (actionBar.titleDisplay
-                        && (actionBar.titleDisplay is UIComponent)
-                        && UIComponent(actionBar.titleDisplay).visible)
-                        cachedTitleGroup = generateBitmap(UIComponent(actionBar.titleDisplay));
-
-                    // If the actionContent will change prepare a bitmap image of the group
-                    if (currentView.actionContent != nextView.actionContent)
-                        cachedActionGroup = generateBitmap(actionBar.actionGroup);
-
-                    // If the navigationContent will change prepare a bitmap image of the group
-                    if (currentView.navigationContent != nextView.navigationContent)
-                        cachedNavigationGroup = generateBitmap(actionBar.navigationGroup);
-                }
-            }
-        }
-
-        // Temporarily hide the the next view so that it isn't included in the cached bitmap
-        // of the current navigator state
-        var oldVisibility:Boolean = nextView.visible;
-        nextView.visible = false;
-
-        // Always generate a bitmap representation of the navigator because
-        // we can't determine if it will be a full screen animation at this point.
-        // The acitonBar's dimensions can change between now and play() since a
-        // validation pass will run.
-        cachedNavigator = generateBitmap(targetNavigator);
-
-        // Restore the visibility of the next view
-        nextView.visible = oldVisibility;
-    }
-
-    /**
-     *  @inheritDoc
-	 *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    override public function prepareFinalState():void
-    {
-        var targets:Array = new Array();
-
-        // Check if the height of the actionBar changed.  If so, perform a
-        // fullscreen animation
-        if (!fullScreenAnimation)
-        {
-            fullScreenAnimation = cachedActionBar &&
-                                  ((actionBar.height != cachedActionBar.height) ||
-                                   (actionBar.width != cachedActionBar.width));
-        }
-
-        // Create the animation
-        if (fullScreenAnimation)
-        {
-            currentView.visible = false;
-            targets.push(cachedNavigator);
-            targets.push(targetNavigator.contentGroup);
-
-            explicitContentGroupIncludeInLayout = targetNavigator.contentGroup.includeInLayout;
-            targetNavigator.contentGroup.includeInLayout = false;
-
+        if (cachedNavigator)
+        {
+            cachedNavigator.x = cachedNavigator.y = 0;
+            cachedNavigator.includeInLayout = false;
+            transitionGroup.addElement(cachedNavigator);
+        }
+
+        var slideDistance:Number;
+        var animatedProperty:String;
+        var verticalTransition:Boolean;
+
+		// Predetermine slide direction and distance.
+        switch (direction)
+        {
+            case ViewTransitionDirection.RIGHT:
+                animatedProperty = "x";
+                slideDistance = targetNavigator.width;
+                break;
+
+            case ViewTransitionDirection.DOWN:
+                animatedProperty = "y";
+                slideDistance = targetNavigator.height;
+                verticalTransition = true;
+                break;
+
+            case ViewTransitionDirection.UP:
+                animatedProperty = "y";
+                slideDistance = -targetNavigator.height;
+                verticalTransition = true;
+                break;
+
+            case ViewTransitionDirection.LEFT:
+            default:
+                animatedProperty = "x";
+                slideDistance = -targetNavigator.width;
+                break;
+        }
+
+		// Position the control bars prior to our transition.
+
+        if (targetNavigator == parentNavigator)
+        {
             if (targetNavigator is TabbedViewNavigator)
             {
-                var tabBar:ButtonBarBase = TabbedViewNavigator(targetNavigator).tabBar;
+                tabBar = TabbedViewNavigator(targetNavigator).tabBar;

-                if (tabBar)
-                {
-                    targets.push(tabBar);
-                    explicitIncludeInLayout = tabBar.includeInLayout;
-                    tabBar.includeInLayout = false;
-                }
+                if (tabBar && !(mode == SlideViewTransitionMode.UNCOVER))
+                    tabBar[animatedProperty] = -slideDistance;
             }
-            else if (targetNavigator is ViewNavigator)
-            {
-                if (actionBar)
-                {
-                    targets.push(actionBar);
-                    explicitIncludeInLayout = actionBar.includeInLayout;
-                    actionBar.includeInLayout = false;
-                }
-            }
-
-            if (cachedNavigator)
-            {
-                cachedNavigator.x = cachedNavigator.y = 0;
-                cachedNavigator.includeInLayout = false;
+        }
+        else
+        {
+            if (targetNavigator is ViewNavigator && actionBar && (!(mode == SlideViewTransitionMode.UNCOVER)))
+                actionBar[animatedProperty] = -slideDistance;
+        }
+
+        if (!(mode == SlideViewTransitionMode.UNCOVER))
+           targetNavigator.contentGroup[animatedProperty] = -slideDistance + targetNavigator.contentGroup[animatedProperty];

-                addComponentToContainerSkin(cachedNavigator, targetNavigator.skin);
-            }
-
-            effect = createFullScreenAnimation(targets);
-        }
-        else
-        {
-            // If we aren't doing a full screen transition, this transition will
-            // slide the child views and the internals of the actionBar only
-            if (currentView)
-            {
-                currentViewProps = { includeInLayout:currentView.includeInLayout,
-                                     cacheAsBitmap:currentView.cacheAsBitmap };
-
-                currentView.includeInLayout = false;
-                currentView.cacheAsBitmap = true;
-                targets.push(currentView);
-            }
-
-            if (nextView)
-            {
-                nextViewProps = { includeInLayout:nextView.includeInLayout,
-                                  cacheAsBitmap:nextView.cacheAsBitmap };
-
-                nextView.includeInLayout = false;
-                nextView.cacheAsBitmap = true;
-                targets.push(nextView);
-            }
-
-            effect = new Parallel();
-
-            // Determine if we are doing an internal actionbar transition
-            // or sliding in a new one
-            if (actionBar)
-                createActionBarAnimations(Parallel(effect));
-
-            Parallel(effect).addChild(createViewAnimation(targets));
-        }
-	}
-
-    /**
-     * Called when the transition is complete.  Cleans up all temporary
-     * bitmaps that were created, and restores any properties on
-     * the view and navigator components that were changed.
-     *
-     * @param event The effect complete event dispatched by the single
-     * parallel effect this transition plays.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    override public function transitionComplete(event:EffectEvent=null):void
-    {
-        event.target.removeEventListener(EffectEvent.EFFECT_END, transitionComplete);
-
-        if (fullScreenAnimation)
-        {
-            // Restore the visibility of the current view
-            currentView.visible = true;
-
-            if (cachedNavigator)
-                removeComponentFromContainerSkin(cachedNavigator, targetNavigator.skin);
-
-            targetNavigator.contentGroup.includeInLayout = explicitContentGroupIncludeInLayout;
-
-            if (targetNavigator is TabbedViewNavigator)
-            {
-                var tabBar:ButtonBarBase = TabbedViewNavigator(targetNavigator).tabBar;
-
-                if (tabBar)
-                    tabBar.includeInLayout = explicitIncludeInLayout;
-            }
-            else if (targetNavigator is ViewNavigator)
-            {
-                if (actionBar)
-                    actionBar.includeInLayout = explicitIncludeInLayout;
-            }
-        }
-        else
-        {
-            if (currentView)
-            {
-                currentView.includeInLayout = currentViewProps.includeInLayout;
-                currentView.cacheAsBitmap = currentViewProps.cacheAsBitmap;
-                currentViewProps = null;
-            }
-
-            if (nextView)
-            {
-                nextView.includeInLayout = nextViewProps.includeInLayout;
-                nextView.cacheAsBitmap = nextViewProps.cacheAsBitmap;
-                nextViewProps = null;
-            }
-
-            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;
-            }
-
-            if (cachedTitleGroup)
-                removeComponentFromContainerSkin(cachedTitleGroup, actionBar.skin);
-
-            if (cachedNavigationGroup)
-                removeComponentFromContainerSkin(cachedNavigationGroup, actionBar.skin);
-
-            if (cachedActionGroup)
-            {
-                removeComponentFromContainerSkin(cachedActionGroup, actionBar.skin);
-                actionBar.actionGroup.cacheAsBitmap = false;
-            }
-        }
-
-        if (cachedTitleGroup)
-            cachedTitleGroup = null;
-
-        if (cachedNavigationGroup)
-            cachedNavigationGroup = null;
-
-        if (cachedActionGroup)
-            cachedActionGroup = null;
-
-        if (cachedNavigator)
-            cachedNavigator = null;
-
-        // Clear references
-        parentNavigator = null;
-        targetNavigator = null;
-        actionBar = null;
-        effect = null;
-
-        super.transitionComplete(event);
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Private Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * @private
-     * Creates the animations used to animate the content of the
-     * action bar.  This method is only called if the slide transition
-     * isn't doing a full action bar transition.
-     *
-     * This method should add any effects it would like to play to
-     * the effect object.
-     *
-     * @param effect The parallel effect that will be played by the
-     * slide animation
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    protected function createActionBarAnimations(effect:Parallel):void
-    {
-        var childIndex:Number;
-        var slideDistance:Number;
-        var animatedProperty:String;
-
-        var actionBarSkin:UIComponent = actionBar.skin;
-        var fadeOutTargets:Array = new Array();
-        var fadeInTargets:Array = new Array();
-
-        // Calculate the slide amount
-        switch(direction)
-        {
-            case SLIDE_LEFT:
-                animatedProperty = "x";
-                slideDistance = actionBar.width / 2.5;
-                break;
-
-            case SLIDE_RIGHT:
-                animatedProperty = "x";
-                slideDistance = -actionBar.width / 2.5;
-                break;
-        }
-
-        // Check if the skin has a titleGroup skin part
-        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 (cachedTitleGroup)
-            {
-                childIndex = actionBarSkin.getChildIndex(titleComponent);
-                addComponentToContainerSkinAt(cachedTitleGroup, actionBarSkin, childIndex);
-            }
-        }
-
-        // If a cache of the navigation group exists, that means the content
-        // changed.  In this case the old and new display objects need to
-        // be added to an effect.
-        if (cachedNavigationGroup)
-        {
-            childIndex = actionBarSkin.getChildIndex(actionBar.navigationGroup);
-            addComponentToContainerSkinAt(cachedNavigationGroup, actionBarSkin, childIndex);
-
-            fadeOutTargets.push(cachedNavigationGroup);
-        }
-
-        if (cachedActionGroup)
-        {
-            childIndex = actionBarSkin.getChildIndex(actionBar.actionGroup);
-            addComponentToContainerSkinAt(cachedActionGroup, actionBarSkin, childIndex);
-
-            fadeOutTargets.push(cachedActionGroup);
-        }
-
-        // Create fade in animations for navigationContent and actionContent
-        // of the next view
-        if (nextView)
-        {
-            if (nextView.navigationContent)
-            {
-                actionBar.navigationGroup[animatedProperty] += slideDistance;
-                actionBar.navigationGroup.cacheAsBitmap = true;
-                actionBar.navigationGroup.alpha = 0;
-
-                fadeInTargets.push(actionBar.navigationGroup);
-            }
-
-            if (nextView.actionContent)
-            {
-                actionBar.actionGroup[animatedProperty] += slideDistance;
-                actionBar.actionGroup.cacheAsBitmap = true;
-                actionBar.actionGroup.alpha = 0;
-
-                fadeInTargets.push(actionBar.actionGroup);
-            }
-        }
-
-        // Fade out action and navigation content
-        var fadeOut:Fade = new Fade();
-        fadeOut.alphaFrom = 1;
-        fadeOut.alphaTo = 0;
-		fadeOut.duration = duration * .7;
-        fadeOut.targets = fadeOutTargets;
-
-        if (cachedTitleGroup)
-        {
-            // Fade out and slide old title 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);
-            animation.targets = [cachedTitleGroup];
-            animation.duration = duration;
-
-            effect.addChild(animation);
-        }
-
-        // Fade and slide in new content
-        var animation2:Animate = new Animate();
-        vector = new Vector.<MotionPath>();
-
-        vector.push(new SimpleMotionPath("alpha", 0, 1));
-        vector.push(new SimpleMotionPath(animatedProperty, null, null, -slideDistance));
-
-        animation2.motionPaths = vector;
-        animation2.easer = new spark.effects.easing.Sine(.7);
-        animation2.targets = fadeInTargets;
-        animation2.duration = duration;
-
-        // Add effects to the parallel effect
-        effect.addChild(fadeOut);
-        effect.addChild(animation2);
-    }
-
-    /**
-     * @private
-     * Creates the animation used to transition the previous and new view.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    protected function createViewAnimation(targets:Array):IEffect
-    {
-        var slideDistance:Number = direction == SLIDE_LEFT ? -navigator.width : navigator.width;
-        var effect:Move = new Move();
-
-        effect.targets = targets;
-        effect.duration = duration;
-        effect.xBy = slideDistance;
-
-        nextView.x = -slideDistance;
-
-        return effect;
-    }
-    /**
-     * @private
-     * Creates the animation when it is a full screen aniamtion.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    protected function createFullScreenAnimation(targets:Array):IEffect
-    {
-        var slideDistance:Number = (direction == SLIDE_LEFT) ?
-                                      -targetNavigator.width : targetNavigator.width;
-
-        if (targetNavigator == parentNavigator)
-        {
-            if (targetNavigator is TabbedViewNavigator)
-            {
-                var tabBar:ButtonBarBase = TabbedViewNavigator(targetNavigator).tabBar;
-
-                if (tabBar)
-                    tabBar.x = -slideDistance;
-            }
-        }
-        else
-        {
-            if (targetNavigator is ViewNavigator && actionBar)
-                actionBar.x = -slideDistance;
-        }
-
-        targetNavigator.contentGroup.x = -slideDistance;
-
-        var effect:Move = new Move();
-        effect.xBy = slideDistance;
-        effect.targets = targets;
-        effect.duration = duration;
-
-        return effect;
-    }
-
-    /**
-     * @private
-     *
-     * Convenience method for generating a bitmap of a component.
-     * Returns a spark image.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    // TODO (chiedozi): We shouldn't use spark image, seems a bit too heavy for this
-    private function generateBitmap(component:UIComponent):Image
-    {
-        var width:Number = component.width;
-        var height:Number = component.height;
-
-        // Can't draw something that has a width or height of 0
-        if (width <= 0 || height <= 0 || component.visible == false)
-            return null;
-
-        var bitmapData:BitmapData = new BitmapData(width, height, true, 0);
-        bitmapData.draw(component);
-
-        var image:Image = new Image();
-        image.source = bitmapData;
-        image.setActualSize(width, height);
-        image.includeInLayout = false;
-        image.cacheAsBitmap = true;
-
-        image.x = component.x;
-        image.y = component.y;
-        image.alpha = component.alpha;
-
-        return image;
-    }
-
-    /**
-     * @private
-     *
-     * Convenience property to determine whether the action bar is
-     * visible.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    private function componentIsVisible(component:UIComponent):Boolean
-    {
-        return component && component.visible && component.width > 0 && component.height > 0;
-    }
+		// Validate to ensure our snapshots are rendered.
+        transitionGroup.validateNow();
+
+		// Construction animation sequence.
+        var animation:Animate = new Animate();
+        var vector:Vector.<MotionPath> = new Vector.<MotionPath>();
+        vector.push(new SimpleMotionPath(animatedProperty, null, null, slideDistance));
+        animation.motionPaths = vector;
+        animation.easer = easer;
+        animation.targets = slideTargets;
+        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);
+
+        transitionGroup = null;
+        cachedNavigator = null;
+
+        super.cleanUp();
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    override public function prepareForPlay():void
+    {
+        actionBarTransitionDirection = direction;
+        super.prepareForPlay();
+    }
+
 }
-}+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
@@ -298,6 +298,8 @@
     //  dataProvider
     //----------------------------------

+    [Inspectable(category="Data")]
+
     /**
      *  @private
      *  Update the label if the dataProvider has changed
@@ -352,6 +354,8 @@
     //  labelField
     //----------------------------------

+    [Inspectable(category="Data", defaultValue="label")]
+
     /**
      *  @private
      */
@@ -368,6 +372,8 @@
     //----------------------------------
     //  labelFunction
     //----------------------------------
+
+    [Inspectable(category="Data")]

     /**
      *  @private


Transferred from the Adobe Open Source Subversion Repository

Revision: 3509
Author:   jimurphy@adobe.com
Date:     2008-10-07T18:19:17.646255Z

Log Message:
-----------
Rename of flex -> mx.

For compatibility reasons it was decided that the new functionality remain integrated with the old framework, although we will continue to build two separate SWCs, one with primarily existing framework classes, and one with new Flex 4 classes. This change removes duplicate names from the Flex 4 framework to avoid class name overlapping with the old framework code.  The naming overlap consists of two major areas:  New Components, and New Effects

Modified Paths:
--------------
386 paths were modified

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutElementHelper.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutElementHelper.as
@@ -9,10 +9,10 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package flex.layout
+package mx.layout
 {

-import flex.intf.ILayoutItem;
+import mx.layout.ILayoutItem;

 import mx.core.IConstraintClient;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5770
Author:   gruehle@adobe.com
Date:     2009-03-30T20:58:54.529722Z

Log Message:
-----------
Add [Alternative] metadata to the Halo components that have a Gumbo replacement.

Bugs: SDK-20190
QA notes: none
Doc notes: Additional ASDoc comments added for many of the classes. These should all be reviewed.
Reviewer: Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TileList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Zoom.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToggleButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/HBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Cubic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Fade.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/framework/src/mx/effects/RemoveChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/TweenEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeRight.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/VBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Glow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.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/framework/src/mx/effects/easing/Quartic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Box.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeLeft.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quintic.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/framework/src/mx/containers/Tile.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quadratic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/AddChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeDown.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/SetPropertyAction.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/framework/src/mx/containers/Canvas.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Resize.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/Blur.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Move.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/controls/HorizontalList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeUp.as</path>

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

--- frameworks/projects/mx/src/mx/controls/Text.as
+++ frameworks/projects/mx/src/mx/controls/Text.as
@@ -39,6 +39,8 @@
 [DefaultBindingProperty(source="text",destination="text")]

 [IconFile("Text.png")]
+
+[Alternative(replacement="spark.primitives.SimpleText", since="4.0")]

 /**
  *  The Text control displays multiline, noneditable text.


trying like mad to get this file back into the repo

--- FlexUnit4/src/org/flexunit/internals/runners/statements/StackAndFrameManagement.as
+++ FlexUnit4/src/org/flexunit/internals/runners/statements/StackAndFrameManagement.as
@@ -43,9 +43,11 @@
 	 * It does this by starting a timer when it is asked to evaluate itself. When the timer fires, which
 	 * will be the following frame, execution will resume.
 	 *
-	 * <p>One might argue (with validity) that we shouldn't do this on each test, but rather take a more
-	 * green threaded approach and look at how much time we have taken so far. This would make things run
-	 * much faster and may be considered for a future version
+	 * Each time we get to the beginning of a new test, we calculate the elapsed time versus the framerate.
+	 * If we get to the point where we have used mroe than about 80% of a given frame, we then defer until the
+	 * next one. This prevents the player from being locked into a single frame for the entire duration of the tests
+	 * preventing it from communicating with external servers, updating the UI and potentially timing out after 15 seconds
+	 *
 	 **/
 	public class StackAndFrameManagement implements IAsyncStatement {
 		/**


Transferred from the Adobe Open Source Subversion Repository

Revision: 17485
Author:   aharui@adobe.com
Date:     2010-08-26T04:05:56.622744Z

Log Message:
-----------
Add 'typicalText' measurement to TextInput, TextArea and RET. We will update NumericStepper later.

Also add 'textInput' event metadata.

QE notes: none
Doc notes: new typicalText property
Bugs: SDK-26180, SDK-25542
Reviewer: Gordon
Tests run: checkintests mustella/gumbo/RichEditableText, TextInput, TextArea
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -161,6 +161,19 @@
  *  @productversion Flex 4
  */
 [Event(name="change", type="spark.events.TextOperationEvent")]
+
+/**
+ *  Dispatched when a keystroke is about to be input to
+ *  the component.
+ *
+ *  @eventType flash.events.TextEvent.TEXT_INPUT
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Event(name="textInput", type="flash.events.TextEvent")]

 /**
  *  The base class for skinnable components, such as the Spark TextInput
@@ -253,6 +266,11 @@
      */
     private static const WIDTH_IN_CHARS_PROPERTY_FLAG:uint = 1 << 13;

+	/**
+	 *  @private
+	 */
+	private static const TYPICAL_TEXT_PROPERTY_FLAG:uint = 1 << 14;
+
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -1370,7 +1388,48 @@
         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 NaN
+		var v:* = 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
@@ -1520,6 +1579,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.widthInChars !== undefined && richEditableText)
         {
             richEditableText.widthInChars = textDisplayProperties.widthInChars;
@@ -1619,11 +1686,17 @@
         }

         if (BitFlagUtil.isSet(uint(textDisplayProperties),
-                              WIDTH_IN_CHARS_PROPERTY_FLAG) && richEditableText)
-        {
-            newTextDisplayProperties.widthInChars = richEditableText.widthInChars;
-        }
-
+                              TYPICAL_TEXT_PROPERTY_FLAG) && richEditableText)
+        {
+            newTextDisplayProperties.typicalText = richEditableText.typicalText;
+        }
+
+		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;
     }


added debugging code

added debugging code

Change-Id: I6cb01e000c36300cb0e52617825a45c4b31cbf7e

--- WeaveData/src/weave/data/KeySets/FilteredKeySet.as
+++ WeaveData/src/weave/data/KeySets/FilteredKeySet.as
@@ -111,6 +111,9 @@
 						throw new Error("sortColumns must be an Array of IAttributeColumn objects");
 				}
 				// SortedKeySet should trigger callbacks
+				if (debug && keyCompare == null)
+					trace(debugId(this), 'sort by [', sortColumns, ']');
+
 				var compare:Function = keyCompare || SortedKeySet.generateCompareFunction(sortColumns, descendingFlags);
 				var sorted:SortedKeySet = registerLinkableChild(this, new SortedKeySet(union, compare, sortColumns));
 				_generatedKeySets = [union, sorted];


Transferred from the Adobe Open Source Subversion Repository

Revision: 220
Author:   clucier@adobe.com
Date:     2008-01-16T23:47:12.900781Z

Log Message:
-----------
Fixing copy and paste errors with last checkin.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>

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

--- frameworks/projects/airframework/src/mx/core/WindowedApplication.as
+++ frameworks/projects/airframework/src/mx/core/WindowedApplication.as
@@ -73,7 +73,7 @@
 /**
  *  Dispatched after this application window has been activated.
  *
- *  @eventType mx.events.AIREvent.WINDOW_DEACTIVATE
+ *  @eventType mx.events.AIREvent.WINDOW_ACTIVATE
  */
 [Event(name="windowActivate", type="mx.events.AIREvent")]

@@ -2608,7 +2608,7 @@
         // AIR xml file, we fabricate an activate event, since Flex
         // comes in late to the show.
         if (systemManager.stage.nativeWindow.active)
-            dispatchEvent(new AIREvent(AIREvent.APPLICATION_ACTIVATE));
+            dispatchEvent(new AIREvent(AIREvent.WINDOW_ACTIVATE));

         systemManager.stage.nativeWindow.addEventListener(
             "activate", nativeWindow_activateHandler, false, 0, true);
@@ -2825,7 +2825,7 @@
  	 */
  	private function nativeWindow_activateHandler(event:Event):void
  	{
- 		dispatchEvent(new AIREvent(AIREvent.APPLICATION_ACTIVATE));
+ 		dispatchEvent(new AIREvent(AIREvent.WINDOW_ACTIVATE));
  	}

  	/**
@@ -2833,7 +2833,7 @@
  	 */
  	private function nativeWindow_deactivateHandler(event:Event):void
  	{
- 		dispatchEvent(new AIREvent(AIREvent.APPLICATION_DEACTIVATE));
+ 		dispatchEvent(new AIREvent(AIREvent.WINDOW_DEACTIVATE));
  	}

     /**


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

--- frameworks/projects/charts/src/mx/charts/chartClasses/LegendData.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/LegendData.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.charts.chartClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/framework/src/mx/validators/ZipCodeValidator.as
+++ frameworks/projects/framework/src/mx/validators/ZipCodeValidator.as
@@ -0,0 +1,654 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.validators
+{
+
+import mx.managers.ISystemManager;
+import mx.managers.SystemManager;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+
+[ResourceBundle("validators")]
+
+/**
+ *  The ZipCodeValidator class validates that a String
+ *  has the correct length and format for a five-digit ZIP code,
+ *  a five-digit+four-digit United States ZIP code, or Canadian postal code.
+ *
+ *  @mxml
+ *
+ *
The <mx:ZipCodeValidator> tag
+ *  inherits all of the tag attributes of its superclass,
+ *  and adds the following tag attributes:

+ *
+ *

+ *  <mx:ZipCodeValidator
+ *    allowedFormatChars=" -"
+ *    domain="US Only | US or Canada"
+ *    invalidCharError="The ZIP code contains invalid characters."
+ *    invalidDomainError="The domain parameter is invalid. It must be either 'US Only' or 'US or Canada'."
+ *    wrongCAFormatError="The Canadian postal code must be formatted 'A1B 2C3'."
+ *    wrongLengthError="The ZIP code must be 5 digits or 5+4 digits."
+ *    wrongUSFormatError="The ZIP+4 code must be formatted '12345-6789'."
+ *  />
+ *

+ *
+ *  @see mx.validators.ZipCodeValidatorDomainType
+ *
+ *  @includeExample examples/ZipCodeValidatorExample.mxml
+ */
+public class ZipCodeValidator extends Validator
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+	 *  @private
+	 */
+	private static const DOMAIN_US:uint = 1;
+
+    /**
+	 *  @private
+	 */
+	private static const DOMAIN_US_OR_CANADA:uint = 2;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Convenience method for calling a validator.
+	 *  Each of the standard Flex validators has a similar convenience method.
+	 *
+	 *  @param validator The ZipCodeValidator instance.
+	 *
+	 *  @param value A field to validate.
+	 *
+	 *  @param baseField Text representation of the subfield
+	 *  specified in the value parameter.
+	 *  For example, if the value parameter specifies value.zipCode,
+	 *  the baseField value is "zipCode".
+     *
+	 *  @return An Array of ValidationResult objects, with one ValidationResult
+	 *  object for each field examined by the validator.
+	 *
+	 *  @see mx.validators.ValidationResult
+	 *
+	 */
+    public static function validateZipCode(validator:ZipCodeValidator,
+										   value:Object,
+										   baseField:String):Array
+    {
+		var results:Array = [];
+
+		// Resource-backed properties of the validator.
+		var allowedFormatChars:String = validator.allowedFormatChars;
+		var domain:String = validator.domain;
+
+		var resourceManager:IResourceManager = ResourceManager.getInstance();
+
+        var zip:String = String(value);
+        var len:int = zip.length;
+
+		var domainType:uint = DOMAIN_US;
+        if (domain == ZipCodeValidatorDomainType.US_OR_CANADA)
+		{
+            domainType = DOMAIN_US_OR_CANADA;
+        }
+        else if (domain == ZipCodeValidatorDomainType.US_ONLY)
+		{
+            domainType = DOMAIN_US;
+        }
+        else
+        {
+			results.push(new ValidationResult(
+				true, baseField, "invalidDomain",
+				validator.invalidDomainError));
+            return results;
+        }
+
+		var n:int;
+		var i:int;
+		var c:String;
+
+        // Make sure localAllowedFormatChars contains no numbers or letters.
+        n = allowedFormatChars.length;
+		for (i = 0; i < n; i++)
+        {
+            c = allowedFormatChars.charAt(i);
+            if (DECIMAL_DIGITS.indexOf(c) != -1 ||
+                ROMAN_LETTERS.indexOf(c) != -1)
+            {
+				var message:String = resourceManager.getString(
+					"validators", "invalidFormatCharsZCV");
+				throw new Error(message);
+            }
+        }
+
+        // Now start checking the ZIP code.
+        // At present, only US and Canadian ZIP codes are supported.
+		// As a result, the easiest thing to check first
+		// to determine the domain is the length.
+		// A length of 5 or 10 means a US ZIP code
+		// and a length of 6 or 7 means a Canadian ZIP.
+        // If more countries are supported in the future, it may make sense
+		// to check other conditions first depending on the domain specified
+		// and all the possible ZIP code formats for that domain.
+		// For now, this approach makes the most sense.
+
+        // Find out if the ZIP code contains any letters.
+        var containsLetters:Boolean = false;
+        for (i = 0; i < len; i++)
+        {
+            if (ROMAN_LETTERS.indexOf(zip.charAt(i)) != -1)
+            {
+                containsLetters = true;
+                break;
+            }
+        }
+
+        // Make sure there are no invalid characters in the ZIP.
+        for (i = 0; i < len; i++)
+        {
+            c = zip.charAt(i);
+
+            if (ROMAN_LETTERS.indexOf(c) == -1 &&
+                DECIMAL_DIGITS.indexOf(c) == -1 &&
+                allowedFormatChars.indexOf(c) == -1)
+            {
+				results.push(new ValidationResult(
+					true, baseField, "invalidChar",
+					validator.invalidCharError));
+                return results;
+            }
+        }
+
+        if (len == 5 || len == 9 || len == 10) // US ZIP code
+        {
+            // Make sure the first 5 characters are all digits.
+            for (i = 0; i < 5; i++)
+            {
+                if (DECIMAL_DIGITS.indexOf(zip.charAt(i)) == -1)
+                {
+					results.push(new ValidationResult(
+						true, baseField, "wrongUSFormat",
+						validator.wrongUSFormatError));
+                    return results;
+                }
+            }
+
+            if (len == 9 || len == 10)
+            {
+                if (len == 10)
+                {
+                    // Make sure the 6th character
+					// is an allowed formatting character.
+                    if (allowedFormatChars.indexOf(zip.charAt(5)) == -1)
+                    {
+						results.push(new ValidationResult(
+							true, baseField, "wrongUSFormat",
+							validator.wrongUSFormatError));
+                        return results;
+                    }
+                    i++;
+                }
+
+                // Make sure the remaining 4 characters are digits.
+                for (; i < len; i++)
+                {
+                    if (DECIMAL_DIGITS.indexOf(zip.charAt(i)) == -1)
+                    {
+						results.push(new ValidationResult(
+							true, baseField, "wrongUSFormat",
+							validator.wrongUSFormatError));
+                        return results;
+                    }
+                }
+            }
+        }
+
+        else if (domainType == DOMAIN_US_OR_CANADA &&
+				 containsLetters &&
+				 (len == 6 || len == 7)) // Canadian zip code
+        {
+            i = 0;
+
+            // Make sure the zip is in the form 'ldlfdld'
+			// where l is a letter, d is a digit,
+			// and f is an allowed formatting character.
+            if (ROMAN_LETTERS.indexOf(zip.charAt(i++)) == -1 ||
+                DECIMAL_DIGITS.indexOf(zip.charAt(i++)) == -1 ||
+                ROMAN_LETTERS.indexOf(zip.charAt(i++)) == -1)
+            {
+				results.push(new ValidationResult(
+					true, baseField, "wrongCAFormat",
+					validator.wrongCAFormatError));
+                return results;
+            }
+
+            if (len == 7 &&
+				allowedFormatChars.indexOf(zip.charAt(i++)) == -1)
+            {
+				results.push(new ValidationResult(
+					true, baseField, "wrongCAFormat",
+					validator.wrongCAFormatError));
+                return results;
+            }
+
+            if (DECIMAL_DIGITS.indexOf(zip.charAt(i++)) == -1 ||
+                ROMAN_LETTERS.indexOf(zip.charAt(i++)) == -1 ||
+                DECIMAL_DIGITS.indexOf(zip.charAt(i++)) == -1)
+            {
+				results.push(new ValidationResult(
+					true, baseField, "wrongCAFormat",
+					validator.wrongCAFormatError));
+                return results;
+            }
+        }
+
+		else
+        {
+			results.push(new ValidationResult(
+				true, baseField, "wrongLength",
+				validator.wrongLengthError));
+            return results;
+        }
+
+        return results;
+    }
+
+ 	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function ZipCodeValidator()
+	{
+		super();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  allowedFormatChars
+	//----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _allowedFormatChars:String;
+
+    /**
+	 *  @private
+	 */
+	private var allowedFormatCharsOverride:String;
+
+	[Inspectable(category="General", defaultValue="null")]
+
+	/**
+     *  The set of formatting characters allowed in the ZIP code.
+	 *  This can not have digits or alphabets [a-z A-Z].
+	 *
+	 *  @default " -".
+	 */
+	public function get allowedFormatChars():String
+	{
+		return _allowedFormatChars;
+	}
+
+    /**
+	 *  @private
+	 */
+	public function set allowedFormatChars(value:String):void
+	{
+		if (value != null)
+		{
+			for (var i:int = 0; i < value.length; i++)
+			{
+				var c:String = value.charAt(i);
+				if (DECIMAL_DIGITS.indexOf(c) != -1 ||
+					ROMAN_LETTERS.indexOf(c) != -1)
+				{
+					var message:String = resourceManager.getString(
+						"validators", "invalidFormatCharsZCV");
+					throw new Error(message);
+				}
+			}
+		}
+
+		allowedFormatCharsOverride = value;
+
+		_allowedFormatChars = value != null ?
+							  value :
+							  resourceManager.getString(
+								  "validators",
+								  "zipCodeValidatorAllowedFormatChars");
+	}
+
+	//----------------------------------
+	//  domain
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the domain property.
+	 */
+	private var _domain:String;
+
+    /**
+	 *  @private
+	 */
+	private var domainOverride:String;
+
+    [Inspectable(category="General", defaultValue="null")]
+
+    /**
+     *  Type of ZIP code to check.
+     *  In MXML, valid values are "US or Canada"
+     *  and "US Only".
+	 *
+	 *
In ActionScript, you can use the following constants to set this property:
+	 *  ZipCodeValidatorDomainType.US_ONLY and
+	 *  ZipCodeValidatorDomainType.US_OR_CANADA.

+	 *
+	 *  @default ZipCodeValidatorDomainType.US_ONLY
+     */
+	public function get domain():String
+	{
+		return _domain;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set domain(value:String):void
+	{
+		domainOverride = value;
+
+		_domain = value != null ?
+				  value :
+				  resourceManager.getString(
+				      "validators", "zipCodeValidatorDomain");
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties: Errors
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  invalidCharError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the invalidCharError property.
+	 */
+	private var _invalidCharError:String;
+
+    /**
+	 *  @private
+	 */
+	private var invalidCharErrorOverride:String;
+
+    [Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+     *  Error message when the ZIP code contains invalid characters.
+	 *
+	 *  @default "The ZIP code contains invalid characters."
+     */
+	public function get invalidCharError():String
+	{
+		return _invalidCharError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set invalidCharError(value:String):void
+	{
+		invalidCharErrorOverride = value;
+
+		_invalidCharError = value != null ?
+							value :
+							resourceManager.getString(
+								"validators", "invalidCharErrorZCV");
+	}
+
+	//----------------------------------
+	//  invalidDomainError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the invalidDomainError property.
+	 */
+	private var _invalidDomainError:String;
+
+    /**
+	 *  @private
+	 */
+	private var invalidDomainErrorOverride:String;
+
+    [Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+     *  Error message when the domain property contains an invalid value.
+	 *
+	 *  @default "The domain parameter is invalid. It must be either 'US Only' or 'US or Canada'."
+     */
+	public function get invalidDomainError():String
+	{
+		return _invalidDomainError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set invalidDomainError(value:String):void
+	{
+		invalidDomainErrorOverride = value;
+
+		_invalidDomainError = value != null ?
+							  value :
+							  resourceManager.getString(
+							      "validators", "invalidDomainErrorZCV");
+	}
+
+	//----------------------------------
+	//  wrongCAFormatError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the wrongCAFormatError property.
+	 */
+	private var _wrongCAFormatError:String;
+
+    /**
+	 *  @private
+	 */
+	private var wrongCAFormatErrorOverride:String;
+
+    [Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+     *  Error message for an invalid Canadian postal code.
+	 *
+	 *  @default "The Canadian postal code must be formatted 'A1B 2C3'."
+     */
+	public function get wrongCAFormatError():String
+	{
+		return _wrongCAFormatError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set wrongCAFormatError(value:String):void
+	{
+		wrongCAFormatErrorOverride = value;
+
+		_wrongCAFormatError = value != null ?
+							  value :
+							  resourceManager.getString(
+							      "validators", "wrongCAFormatError");
+	}
+
+	//----------------------------------
+	//  wrongLengthError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the wrongLengthError property.
+	 */
+	private var _wrongLengthError:String;
+
+    /**
+	 *  @private
+	 */
+	private var wrongLengthErrorOverride:String;
+
+    [Inspectable(category="Errors", defaultValue="null")]
+
+    /**
+     *  Error message for an invalid US ZIP code.
+	 *
+	 *  @default "The ZIP code must be 5 digits or 5+4 digits."
+     */
+	public function get wrongLengthError():String
+	{
+		return _wrongLengthError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set wrongLengthError(value:String):void
+	{
+		wrongLengthErrorOverride = value;
+
+		_wrongLengthError = value != null ?
+							value :
+							resourceManager.getString(
+								"validators", "wrongLengthErrorZCV");
+	}
+
+ 	//----------------------------------
+	//  wrongUSFormatError
+	//----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the wrongUSFormatError property.
+	 */
+	private var _wrongUSFormatError:String;
+
+    /**
+	 *  @private
+	 */
+	private var wrongUSFormatErrorOverride:String;
+
+    [Inspectable(category="Errors", defaultValue="null")]
+
+	/**
+     *  Error message for an incorrectly formatted ZIP code.
+	 *
+	 *  @default "The ZIP+4 code must be formatted '12345-6789'."
+     */
+	public function get wrongUSFormatError():String
+	{
+		return _wrongUSFormatError;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set wrongUSFormatError(value:String):void
+	{
+		wrongUSFormatErrorOverride = value;
+
+		_wrongUSFormatError = value != null ?
+							  value :
+							  resourceManager.getString(
+							    "validators", "wrongUSFormatError");
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+	 *  @private
+     */
+	override protected function resourcesChanged():void
+	{
+		super.resourcesChanged();
+
+		allowedFormatChars = allowedFormatCharsOverride;
+		domain = domainOverride;
+
+		invalidDomainError = invalidDomainErrorOverride;
+		invalidCharError = invalidCharErrorOverride;
+		wrongCAFormatError = wrongCAFormatErrorOverride;
+		wrongLengthError = wrongLengthErrorOverride;
+		wrongUSFormatError = wrongUSFormatErrorOverride;
+	}
+
+    /**
+     *  Override of the base class doValidation() method
+     *  to validate a ZIP code.
+     *
+	 *
You do not call this method directly;
+	 *  Flex calls it as part of performing a validation.
+	 *  If you create a custom Validator class, you must implement this method.

+	 *
+     *  @param value Object to validate.
+     *
+	 *  @return An Array of ValidationResult objects, with one ValidationResult
+	 *  object for each field examined by the validator.
+     */
+    override protected function doValidation(value:Object):Array
+    {
+    	var results:Array = super.doValidation(value);
+
+		// Return if there are errors
+		// or if the required property is set to false and length is 0.
+		var val:String = value ? String(value) : "";
+		if (results.length > 0 || ((val.length == 0) && !required))
+			return results;
+		else
+		    return ZipCodeValidator.validateZipCode(this, value, null);
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17264
Author:   egeorgie@adobe.com
Date:     2010-08-11T00:59:28.775334Z

Log Message:
-----------
Add SplashScreen preloader class to the mobilecomponents.swc

I forgot to check-in this file with my previous revision. This should allow testing SplashScreen in Flash Builder. As soon as bug SDK-27346 is fixed, the SplashScreen should work with command-line compilation of the test applications.

QE notes: Can start feature testing
Doc notes: None
Bugs: N/A
Reviewer: Glenn, Paul
Tests run: cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as

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

--- frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as
+++ frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as
@@ -22,6 +22,7 @@
  *  from the classes specified in manifest.xml.
  *  For example, Button does not have a reference to ButtonSkin,
  *  but ButtonSkin needs to be in framework.swc along with Button.
- */
+ */
+    import spark.preloaders.SplashScreen; SplashScreen;
 }
 }


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/rpc/src/mx/rpc/soap/types/ApacheDocumentType.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/types/ApacheDocumentType.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 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.rpc.soap.types
+{
+
+import mx.rpc.soap.SOAPDecoder;
+import mx.rpc.soap.SOAPEncoder;
+import mx.rpc.xml.ContentProxy;
+import mx.utils.object_proxy;
+import mx.utils.ObjectProxy;
+
+use namespace object_proxy;
+
+[ExcludeClass]
+
+/**
+ * Marshalls between an Apache SOAP Document type and ActionScript XML.
+ * @private
+ */
+public class ApacheDocumentType implements ICustomSOAPType
+{
+    public function ApacheDocumentType()
+    {
+        super();
+    }
+
+    public function encode(encoder:SOAPEncoder, parent:XML, name:QName, value:*, restriction:XML = null):void
+    {
+    	encoder.setValue(parent, value);
+    }
+
+    public function decode(decoder:SOAPDecoder, parent:*, name:*, value:*, restriction:XML = null):void
+    {
+        decoder.setValue(parent, name, XML(value).elements());
+    }
+
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6391
Author:   smgilson@adobe.com
Date:     2009-04-29T20:04:20.789717Z

Log Message:
-----------
ASDoc updates

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

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/events/TextOperationEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/VideoEvent.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/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/RendererExistenceEvent.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/flex4/src/spark/events/ElementExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/events/ElementExistenceEvent.as
+++ frameworks/projects/spark/src/spark/events/ElementExistenceEvent.as
@@ -17,8 +17,10 @@
 import mx.core.IVisualElement;

 /**
- *  Represents events that are dispatched when an element of a Group
- *  is created or destroyed.
+ *  The ElementExistenceEvent class represents events that are dispatched when
+ *  an element of a Group is created or destroyed.
+ *
+ *  @see spark.components.Group
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -29,27 +31,27 @@
 {
     include "../core/Version.as";

-	//--------------------------------------------------------------------------
-	//
-	//  Class constants
-	//
-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------

-	/**
-	 *  The ElementExistenceEvent.ELEMENT_ADD constant
-	 *  defines the value of the type property of the event
-	 *  object for an elementAdd event.
-	 *
-     *
The properties of the event object have the following values:

-	 *

-	 *
Property	Value

+    /**
+     *  The ElementExistenceEvent.ELEMENT_ADD constant
+     *  defines the value of the type property of the event
+     *  object for an elementAdd event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

      *
bubbles	false

      *
cancelable	false

      *
currentTarget	The Object that defines the
      *       event listener that handles the event. For example, if you use
      *       myButton.addEventListener() to register an event listener,
      *       myButton is the value of the currentTarget.

-	 *
element	Contains a reference
+     *
element	Contains a reference
      *         to the visual element that was added.

      *
index	The index where the
      *       visual element that was added.

@@ -57,98 +59,98 @@
      *       it is not always the Object listening for the event.
      *       Use the currentTarget property to always access the
      *       Object listening for the event.

-	 *

-	 *
+     *

+     *
      *  @eventType elementAdd
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public static const ELEMENT_ADD:String = "elementAdd";
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static const ELEMENT_ADD:String = "elementAdd";

-	/**
-	 *  The ElementExistenceEvent.ELEMENT_REMOVE constant
-	 *  defines the value of the type property of the event
-	 *  object for an elementRemove event.
-	 *
-     *
The properties of the event object have the following values:

-	 *

-	 *
Property	Value

+    /**
+     *  The ElementExistenceEvent.ELEMENT_REMOVE constant
+     *  defines the value of the type property of the event
+     *  object for an elementRemove event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

      *
bubbles	false

      *
cancelable	false

      *
currentTarget	The Object that defines the
      *       event listener that handles the event. For example, if you use
      *       myButton.addEventListener() to register an event listener,
      *       myButton is the value of the currentTarget.

-	 *
element	Contains a reference
+     *
element	A reference
      *        to the visual element that is about to be removed.

-     *
index	The index where the
+     *
index	The index of
      *       visual element that is being removed.

      *
target	The Object that dispatched the event;
      *       it is not always the Object listening for the event.
      *       Use the currentTarget property to always access the
      *       Object listening for the event.

-	 *

-	 *
+     *

+     *
      *  @eventType elementRemove
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public static const ELEMENT_REMOVE:String = "elementRemove";
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static const ELEMENT_REMOVE:String = "elementRemove";

-	//--------------------------------------------------------------------------
-	//
-	//  Constructor
-	//
-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------

-	/**
-	 *  Constructor.
-	 *
-	 *  @param type The event type; indicates the action that caused the event.
-	 *
-	 *  @param bubbles Specifies whether the event can bubble up the display list hierarchy.
-	 *
-	 *  @param cancelable Specifies whether the behavior associated with the event can be prevented.
-	 *
-	 *  @param element Reference to the element that was added or removed.
-	 *
-	 *  @param index The index where the element was added or removed.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function ElementExistenceEvent(
-								type:String, bubbles:Boolean = false,
-								cancelable:Boolean = false,
-								element:IVisualElement = null,
-								index:int = -1)
-	{
-		super(type, bubbles, cancelable);
+    /**
+     *  Constructor.
+     *
+     *  @param type The event type; indicates the action that caused the event.
+     *
+     *  @param bubbles Specifies whether the event can bubble up the display list hierarchy.
+     *
+     *  @param cancelable Specifies whether the behavior associated with the event can be prevented.
+     *
+     *  @param element Reference to the element that was added or removed.
+     *
+     *  @param index The index where the element was added or removed.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function ElementExistenceEvent(
+                                type:String, bubbles:Boolean = false,
+                                cancelable:Boolean = false,
+                                element:IVisualElement = null,
+                                index:int = -1)
+    {
+        super(type, bubbles, cancelable);

-		this.element = element;
-		this.index = index;
-	}
+        this.element = element;
+        this.index = index;
+    }

-	//--------------------------------------------------------------------------
-	//
-	//  Properties
-	//
-	//--------------------------------------------------------------------------
-
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
     //----------------------------------
     //  index
     //----------------------------------

     /**
-     *  The index where the element was added or removed
+     *  The index where the element was added or removed.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -157,29 +159,29 @@
      */
     public var index:int;

-	//----------------------------------
-	//  element
-	//----------------------------------
+    //----------------------------------
+    //  element
+    //----------------------------------

-	/**
-	 *  Reference to the visual element that was added or removed.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public var element:IVisualElement;
+    /**
+     *  Reference to the visual element that was added or removed.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var element:IVisualElement;

-	//--------------------------------------------------------------------------
-	//
-	//  Overridden methods: Event
-	//
-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Event
+    //
+    //--------------------------------------------------------------------------

-	/**
-	 *  @private
-	 */
+    /**
+     *  @private
+     */
     override public function clone():Event
     {
         return new ElementExistenceEvent(type, bubbles, cancelable,