Transferred from the Adobe Open Source Subversion Repository

Revision: 17459
Author:   chiedozi@adobe.com
Date:     2010-08-24T05:48:39.610163Z

Log Message:
-----------
Fixed a bunch of small bugs in TabbedViewNavigator and ViewNavigator.
TabbedViewNavigator now properly implements ISelectableList apis.
TabbedViewNavigator no longer destroys activeView as the selectedIndex changes to temporarily fix with flicker issues.

QE notes:
Doc notes:
Bugs: SDK-27544,SDK-27542,SDK-27536,SDK-27534
Reviewer: Ryan
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -26,6 +26,7 @@
 import mx.events.FlexEvent;
 import mx.events.PropertyChangeEvent;
 import mx.events.PropertyChangeEventKind;
+import mx.managers.LayoutManager;
 import mx.resources.ResourceManager;

 import spark.components.supportClasses.NavigationStack;
@@ -356,6 +357,11 @@

     /**
      *  @private
+     */
+    private var showingActionBar:Boolean;
+
+    /**
+     *  @private
      *  Flag indicates whether the navigator is in the process of
      *  changing a view.
      */
@@ -378,27 +384,42 @@
     {
         super.active = value;

-        if (navigationStack.length == 0 && firstView != null)
-        {
-            navigationStack.push(firstView, firstViewData);
-            viewChangeRequested = true;
-            invalidateProperties();
-        }
-
-        // If the navigator isn't initialized, this means the first validation
-        // pass hasn't been completed yet.  The top view will be added in that
-        // process and doesn't need to be done here.
-        if (initialized)
-        {
-            if (value)
-            {
-                var view:View = createViewInstance(navigationStack.topView);
-                view.active = true;
-            }
-            else
-            {
-                activeView.active = false;
-                destoryViewInstance(navigationStack.topView);
+        if (navigationStack.length == 0)
+        {
+            if (firstView != null)
+            {
+                navigationStack.push(firstView, firstViewData);
+                viewChangeRequested = true;
+                invalidateProperties();
+            }
+        }
+        else
+        {
+            // If the navigator isn't initialized, this means the first validation
+            // pass hasn't been completed yet.  The top view will be added in the
+            // next validation pass and doesn't need to be done here.
+            if (initialized)
+            {
+                if (value)
+                {
+                    // FIXME (chiedozi): Need to keep track of current view in the case that stuff
+                    // changes when navigator isnt active
+                    var view:View = navigationStack.topView.instance;
+                    if (!view)
+                        view = createViewInstance(navigationStack.topView);
+
+                    view.active = true;
+
+                    if (hasEventListener(Event.COMPLETE))
+                        dispatchEvent(new Event(Event.COMPLETE));
+                }
+                else
+                {
+                    activeView.active = false;
+
+    //                if (destructionPolicy == "auto")
+    //                    destoryViewInstance(navigationStack.topView);
+                }
             }
         }
     }
@@ -534,40 +555,6 @@

         invalidateProperties();
     }
-
-	//----------------------------------
-	//  transitionsEnabled
-	//----------------------------------
-
-    /**
-     *  Flag indicating whether transitions are played by the
-     *  navigator when a view changes or when the actionBar or tab bar
-     *  visibility changes.
-     *
-     *  @default true
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public var transitionsEnabled:Boolean = true;
-
-	//----------------------------------
-	//  useDefaultTransitions
-	//----------------------------------
-
-    // TODO (chiedozi): PARB name
-    /**
-     *
-     *  @default true
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-	public var useDefaultTransitions:Boolean = true;

     //--------------------------------------------------------------------------
     //
@@ -932,16 +919,14 @@
      */
 	public function showActionBar(animate:Boolean = true):void
 	{
-		if (actionBar && !actionBar.visible)
-		{
-			animateActionBarVisbility = animate;
-			actionBarVisibilityInvalidated = true;
-			invalidateProperties();
-		}
-		else
-		{
-			actionBarVisibilityInvalidated = false;
-		}
+        if (!actionBar)
+            return;
+
+        showingActionBar = true;
+        animateActionBarVisbility = animate;
+        actionBarVisibilityInvalidated = true;
+
+        invalidateProperties();
 	}

     /**
@@ -956,16 +941,14 @@
      */
 	public function hideActionBar(animate:Boolean = true):void
 	{
-		if (actionBar && actionBar.visible)
-		{
-			animateActionBarVisbility = animate;
-			actionBarVisibilityInvalidated = true;
-			invalidateProperties();
-		}
-		else
-		{
-			actionBarVisibilityInvalidated = false;
-		}
+        if (!actionBar)
+            return;
+
+        showingActionBar = false;
+        animateActionBarVisbility = animate;
+        actionBarVisibilityInvalidated = true;
+
+        invalidateProperties();
 	}

     //--------------------------------------------------------------------------
@@ -1297,20 +1280,24 @@
         }

         // If an animation is running, end it
-        // TODO (chiedozi): There is an issue here when you do two hides/shows in a row
+        // FIXME (chiedozi): There is an issue here when you do two hides/shows in a row
         if (actionBarVisibilityEffect)
             actionBarVisibilityEffect.end();

-        if (transitionsEnabled && animateActionBarVisbility)
-        {
-            actionBarVisibilityEffect = createVisibilityAnimation();
-            actionBarVisibilityEffect.addEventListener(EffectEvent.EFFECT_END, visibilityAnimation_completeHandler);
-            actionBarVisibilityEffect.play();
-        }
-        else
-        {
-            if (actionBarVisibilityInvalidated)
-                actionBar.visible = actionBar.includeInLayout = !actionBar.visible;
+        if (actionBar && showingActionBar != actionBar.visible)
+        {
+            if (transitionsEnabled && animateActionBarVisbility)
+            {
+                actionBarVisibilityEffect = createVisibilityAnimation();
+                actionBarVisibilityEffect.addEventListener(EffectEvent.EFFECT_END,
+                    visibilityAnimation_completeHandler);
+                actionBarVisibilityEffect.play();
+            }
+            else
+            {
+                if (actionBarVisibilityInvalidated)
+                    actionBar.visible = actionBar.includeInLayout = !actionBar.visible;
+            }
         }

         actionBarVisibilityInvalidated = false;
@@ -1389,8 +1376,11 @@
             animateActionBarUp = actionBar.y <= contentGroup.y;
         }

-        // Need to validate to capture final positions and sizes of skin parts
-        validateNow();
+        // Need to validate to capture final positions and sizes of skin parts.
+        // If the navigator is a child of another, we need the root navigator
+        // to perform the validation so that all widths and heights of all
+        // containers are sized.
+        LayoutManager.getInstance().validateNow();

         // This will store the final location and sizes of the components
         actionBarProps.end = captureAnimationValues(actionBar);
@@ -1659,8 +1649,7 @@

         if(pendingViewData.factory != null)
         {
-            var view:View = createViewInstance(pendingViewData);
-            addElement(view);
+            createViewInstance(pendingViewData);

             // Put this before viewAdded() so that another validation pass can run
             // if needed during viewAdded


Transferred from the Adobe Open Source Subversion Repository

Revision: 19337
Author:   mhorn@adobe.com
Date:     2010-12-13T22:01:27.841985Z

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as
@@ -23,7 +23,7 @@
 import spark.skins.mobile320.assets.HSliderTrack;

 /**
- *  Actionscript based skin for the HSlider track skin part on mobile applications.
+ *  ActionScript-based skin for the HSlider track skin part in mobile applications.
  *
  *  @langversion 3.0
  *  @playerversion Flash 10


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 7836
Author:   chaase@adobe.com
Date:     2009-06-15T14:37:21.379918Z

Log Message:
-----------
PARB changes for effects. This includes various property renames, a couple of class renames, moving 3 classes to a sub-package, and various doc cleanups. This also includes changing a handful of Array properties to typed Vectors.

QE: This breaks Mustella due to the renames
Doc: Docs will need to be updated to reflect the changes as well
Bugs: None
Reviewer: Jason
Tests: checkintests, Thermo's transitionbug test

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/BitmapUtil.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/MotionPath.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EasingFraction.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/KeyFrame.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/RGBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/HSBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/RepeatBehavior.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateShaderTransition.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateShaderTransition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/IInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/NumberInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/CallActionInstance.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateShaderTransitionInstance.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateShaderTransitionInstance.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Wipe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/ArrayInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CrossFade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SimpleMotionPath.as" copyfrom-rev="7748" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/HSBColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/IAnimationTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Keyframe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CrossFade.pbk</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/WipeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>

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

--- frameworks/projects/spark/src/spark/effects/interpolation/IInterpolator.as
+++ frameworks/projects/spark/src/spark/effects/interpolation/IInterpolator.as
@@ -27,16 +27,6 @@
  */
 public interface IInterpolator
 {
-    /**
-     *  The data type that an implementation class can process.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    function get interpolatedType():Class;
-
     /**
      *  Given an elapsed fraction of an animation, between 0.0 and 1.0,
      *  and start and end values to interpolate, return the interpolated value.


Transferred from the Adobe Open Source Subversion Repository

Revision: 11574
Author:   egeorgie@adobe.com
Date:     2009-11-09T18:53:35.299310Z

Log Message:
-----------
Drag and Drop - Bug fixes:
- Added slight delay before drag-scrolling start.
- Single selection ctrl+drag fixed.
- Default drop indicator for List that doesn't have drop indicator specified in its skin. The default DI is specified through the new dropIndicatorSkin List style.
- Memory leak for the drop indicator dynamic skin part.
- ListItemDragProxy incorrectly listed in spark-manifest.xml moved to SparkClassess.

QE notes: None
Doc notes: None
Bugs: SDK-24047, SDK-23999, SDK-23871
Reviewer: Glenn, Deepa
Tests run: checkintests, mustella (List, ListDragDrop)
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ListDropIndicator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/DropLocation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/DropLocation.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/DropLocation.as
@@ -16,7 +16,6 @@
 import mx.core.IVisualElement;
 import mx.events.DragEvent;

-// FIXME (egeorgie): add ASDoc reference to layoutbase calculateDragScrollDelta when implemented
 /**
  *  The DropLocation class contains information describing the drop location
  *  for the dragged data in a drag-and-drop operation.


Transferred from the Adobe Open Source Subversion Repository

Revision: 7148
Author:   gruehle@adobe.com
Date:     2009-05-20T19:29:46.978196Z

Log Message:
-----------
Add comment AdobePatentID="B976"

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/SkinPartExtension.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Skin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/SkinPartEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/TypeAnalyzer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
@@ -8,6 +8,8 @@
 //  in accordance with the terms of the license agreement accompanying it.
 //
 ////////////////////////////////////////////////////////////////////////////////
+
+// AdobePatentID="B976"

 package spark.components.supportClasses


Change PoC color to red both for fill and for line color

--- asn_visualization/asn_visualization.as
+++ asn_visualization/asn_visualization.as
@@ -82,7 +82,8 @@
         private var _default_edge_line_color:uint=0XFFCCCCCC;
         private var _default_node_fill_color:uint=0XFFCCCCCC;
         private var _default_node_line_color:uint=0XFF000000;
-        private var _node_point_of_control_line_color:uint=0XFFFF00FF;
+        private var _node_point_of_control_line_color:uint=0XFFFF0000;
+        private var _node_point_of_control_fill_color:uint=0XFFFF0000;

         private var _detail:TextSprite;

@@ -773,12 +774,25 @@
             }
         }

+        private function restore_node_fill_color(node:NodeSprite)
+        {
+        	if (isPointOfControl(node))
+        	{
+        		node.fillColor = _node_point_of_control_fill_color;
+        	}
+        	else
+        	{
+				node.fillColor=_default_node_fill_color;
+        	}
+        }
+
+
         private function restore_nodes_color():void
         {
             for each (var _node:NodeSprite in vis.data.nodes)
             {
                 _node.data.highlighted=false;
-                _node.fillColor=_default_node_fill_color;
+                restore_node_fill_color(_node);

                 restore_node_line_color(_node);

@@ -816,12 +830,12 @@
                     vis.marks.setChildIndex(e, vis.marks.numChildren - 1);
                 }, NodeSprite.OUT_LINKS);

-            node.fillColor=_default_node_fill_color;
+            restore_node_fill_color(node);
             restore_node_line_color(node);

             node.visitNodes(function(n:NodeSprite):void
                 {
-                    n.fillColor=_default_node_fill_color;
+                    restore_node_fill_color(n);
                 });

             vis.update();


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

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

 package mx.filters
 {


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

--- frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as
@@ -0,0 +1,841 @@
+/*************************************************************************
+ *
+ * ADOBE CONFIDENTIAL
+ * __________________
+ *
+ *  [2002] - [2007] Adobe Systems Incorporated
+ *  All Rights Reserved.
+ *
+ * NOTICE:  All information contained herein is, and remains
+ * the property of Adobe Systems Incorporated and its suppliers,
+ * if any.  The intellectual and technical concepts contained
+ * herein are proprietary to Adobe Systems Incorporated
+ * and its suppliers and may be covered by U.S. and Foreign Patents,
+ * patents in process, and are protected by trade secret or copyright law.
+ * Dissemination of this information or reproduction of this material
+ * is strictly forbidden unless prior written permission is obtained
+ * from Adobe Systems Incorporated.
+ */
+package mx.messaging.channels
+{
+import flash.events.Event;
+import flash.events.TimerEvent;
+import flash.utils.Timer;
+
+import mx.core.mx_internal;
+import mx.logging.Log;
+import mx.messaging.Channel;
+import mx.messaging.ConsumerMessageDispatcher;
+import mx.messaging.MessageAgent;
+import mx.messaging.MessageResponder;
+import mx.messaging.events.ChannelFaultEvent;
+import mx.messaging.messages.AcknowledgeMessage;
+import mx.messaging.messages.CommandMessage;
+import mx.messaging.messages.IMessage;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+
+use namespace mx_internal;
+
+[ResourceBundle("messaging")]
+
+/**
+ *  The PollingChannel class provides the polling behavior that all polling channels in the messaging
+ *  system require.
+ */
+public class PollingChannel extends Channel
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Creates a new PollingChannel instance with the specified id. Once a PollingChannel is
+     *  connected and begins polling, it will issue a poll request once every three seconds
+     *  by default.
+     *
+ 	 *  Note: The PollingChannel type should not be constructed directly. Instead
+	 *  create instances of protocol specific subclasses such as HTTPChannel or
+	 *  AMFChannel that extend it.
+     *
+	 *  @param id The id of this Channel.
+	 *
+	 *  @param uri The uri for this Channel.
+     */
+    public function PollingChannel(id:String = null, uri:String = null)
+    {
+        super(id, uri);
+
+        _pollingEnabled = true;
+        _shouldPoll = false;
+
+        if (timerRequired())
+        {
+            // Poll on a 3 second interval by default.
+            // The timer is configured to only dispatch one event per run.
+            // It is restarted after a poll response is received for the current outstanding poll request.
+            _pollingInterval = DEFAULT_POLLING_INTERVAL;
+            _timer = new Timer(_pollingInterval, 1);
+            _timer.addEventListener(TimerEvent.TIMER, internalPoll);
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  The base polling interval to use if the server is not triggering adaptive polling
+     *  interval waits via its poll responses.
+     */
+    mx_internal var _pollingInterval:int;
+
+    /**
+     *  @private
+     *  Indicates whether we should poll but stopped for some reason.
+     */
+    mx_internal var _shouldPoll:Boolean;
+
+    /**
+     *  @private
+     *  This reference count allows us to determine when polling is needed and
+     *  when it is not.
+     */
+    private var _pollingRef:int = -1;
+
+   /**
+    *  @private
+    *  Guard used to avoid issuing poll requests on top of each other. This is
+    *  needed when a poll request is issued manually by calling poll() method.
+    */
+    mx_internal var pollOutstanding:Boolean;
+
+    /**
+     *  @private
+     *  Used for polling the server at a given interval.
+     *  This may be null if channel implementation does not require the use of a
+     *  timer to poll.
+     */
+    mx_internal var _timer:Timer;
+
+    /**
+     *  @private
+     */
+    private var resourceManager:IResourceManager =
+									ResourceManager.getInstance();
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+	//  piggybackingEnabled
+	//----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _piggybackingEnabled:Boolean;
+
+    /**
+     *  @private
+     */
+    protected function get internalPiggybackingEnabled():Boolean
+    {
+        return _piggybackingEnabled;
+    }
+
+    /**
+     *  @private
+     */
+    protected function set internalPiggybackingEnabled(value:Boolean):void
+    {
+        _piggybackingEnabled = value;
+    }
+
+    //----------------------------------
+	//  pollingEnabled
+	//----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _pollingEnabled:Boolean;
+
+    /**
+     *  @private
+     */
+    protected function get internalPollingEnabled():Boolean
+    {
+        return _pollingEnabled;
+    }
+
+    /**
+     *  @private
+     */
+    protected function set internalPollingEnabled(value:Boolean):void
+    {
+        _pollingEnabled = value;
+        // If the value is false, we want to stop polling only if the timer is
+        // definitely running OR the timer isn't running and the polling interval is 0
+        // because if the polling interval is 0 and we're polling, the timer isn't on
+        // anyway, so we need to include both cases.
+        if (!value && (timerRunning || (!timerRunning && (_pollingInterval == 0))))
+        {
+            stopPolling();
+        }
+        else if (value && _shouldPoll && !timerRunning)
+        {
+            startPolling();
+        }
+    }
+
+	//----------------------------------
+	//  pollingInterval
+	//----------------------------------
+
+    /**
+     *  @private
+     */
+    mx_internal function get internalPollingInterval():Number
+    {
+        return (_timer == null) ? 0 : _pollingInterval;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function set internalPollingInterval(value:Number):void
+    {
+        // We have to be careful here because the timer's delay cannot be set to
+        // 0 so if we are setting the polling interval to 0, we need to stop the
+        // timer AND hold onto the value in the _pollingInterval variable.
+        if (value == 0)
+        {
+            _pollingInterval = value;
+
+            if (_timer != null)
+            {
+                _timer.stop();
+            }
+            if (_shouldPoll)
+            {
+                startPolling();
+            }
+
+        }
+        else if (value > 0)
+        {
+            if (_timer != null)
+            {
+                _timer.delay = _pollingInterval = value;
+                if (!timerRunning && _shouldPoll)
+                {
+                    startPolling();
+                }
+            }
+        }
+        else
+        {
+			var message:String = resourceManager.getString(
+				"messaging", "pollingIntervalNonPositive");
+            throw new ArgumentError(message);
+        }
+    }
+
+	//----------------------------------
+	//  realtime
+	//----------------------------------
+
+    /**
+     *  @private
+     *  Returns true if the channel supports realtime behavior via server push or client poll.
+     *  Piggybacking does not qualify as real time because no data will arrive from the server
+     *  without a message being explicitly sent by the client.
+     */
+    override mx_internal function get realtime():Boolean
+    {
+        return _pollingEnabled;
+    }
+
+	//----------------------------------
+	//  timerRunning
+	//----------------------------------
+
+    /**
+     *  @private
+     */
+    mx_internal function get timerRunning():Boolean
+    {
+        return (_timer != null) && _timer.running;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Overridden Public Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+	 *  Sends the specified message to its target destination.
+	 *  Subclasses must override the internalSend() method to
+	 *  perform the actual send.
+	 *  PollingChannel will wrap outbound messages in poll requests if a poll
+	 *  is not currently outstanding.
+     *
+	 *  @param agent The MessageAgent that is sending the message.
+	 *
+	 *  @param message The Message to send.
+	 *
+	 *  @throws mx.messaging.errors.InvalidDestinationError If neither the MessageAgent nor the
+	 *                                  message specify a destination.
+	 */
+	override public function send(agent:MessageAgent, message:IMessage):void
+	{
+	    var piggyback:Boolean = false;
+	    if (!pollOutstanding && _piggybackingEnabled && !(message is CommandMessage))
+	    {
+	        if (_shouldPoll)
+	        {
+	            piggyback = true;
+	        }
+	        else
+	        {
+	            var consumerDispatcher:ConsumerMessageDispatcher = ConsumerMessageDispatcher.getInstance();
+	            if (consumerDispatcher.isChannelUsedForSubscriptions(this))
+	                piggyback = true;
+	        }
+	    }
+	    if (piggyback)
+	        internalPoll();
+
+	    super.send(agent, message);
+
+	    if (piggyback)
+	    {
+    	    // Manually build and send a terminal poll message to return any pushed messages
+    	    // that may result from the sent message above. Invoking internalPoll() again would
+    	    // be a no-op because we now have the initial poll outstanding.
+    	    var msg:CommandMessage = new CommandMessage();
+            msg.operation = CommandMessage.POLL_OPERATION;
+
+            if (Log.isDebug())
+                _log.debug("'{0}' channel sending poll message\n{1}\n", id, msg.toString());
+
+            try
+            {
+                internalSend(new PollCommandMessageResponder(null, msg, this, _log));
+            }
+            catch(e:Error)
+            {
+                // If there was a problem stop polling.
+                stopPolling();
+                throw e;
+            }
+        }
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    // Overridden Protected Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  This method prevents polling from continuing when the Channel can not connect.
+     *
+     *  @param event The ChannelFaultEvent.
+     */
+	override protected function connectFailed(event:ChannelFaultEvent):void
+	{
+	     stopPolling();
+	     super.connectFailed(event);
+	}
+
+    /**
+     *  @private
+     *  If a consumer sends a subscribe message to the server, we need to
+     *  track that polling should occur.  In addition, we don't however, want
+     *  to begin polling before we actually receive the acknowledgement that
+     *  we have successfully subscribed.  This method is used to return a
+     *  special message handler that will notify us when we have a successful
+     *  subscribe and can safely begin polling.  This case is the reverse for
+     *  unsubscribe, we need to track that we successfully unsubscribed and
+     *  there are no more consumers attached that need polling.
+     *
+     *  In addition to handling this case, this method also returns a special
+     *  responder to handle the results or fault for a poll request.
+     *
+     *  @param agent MessageAgent that requested the message be sent.
+     *
+     *  @param msg Message to be sent.
+     *
+     *  @return A PollSyncMessageResponder for subscribe/unsubscriber requests or a
+     *          PollCommandMessageResponder for poll requests; otherwise the default
+     *          message responder.
+     */
+    final override protected function getMessageResponder(agent:MessageAgent, msg:IMessage):MessageResponder
+    {
+        var responder:MessageResponder = null;
+        if (msg is CommandMessage)
+        {
+            var cmd:CommandMessage = CommandMessage(msg);
+            if ((cmd.operation == CommandMessage.SUBSCRIBE_OPERATION) ||
+                (cmd.operation == CommandMessage.UNSUBSCRIBE_OPERATION))
+            {
+                responder = getPollSyncMessageResponder(agent, cmd);
+            }
+            else if (cmd.operation == CommandMessage.POLL_OPERATION)
+            {
+                responder = new PollCommandMessageResponder(agent, msg, this, _log);
+            }
+        }
+        return responder == null ? getDefaultMessageResponder(agent, msg):responder;
+    }
+
+    /**
+     *  @private
+     *  Disconnects from the remote destination.
+     */
+    override protected function internalDisconnect(rejected:Boolean = false):void
+    {
+        stopPolling();
+        super.internalDisconnect(rejected);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Enables polling based on the number of times enablePolling()
+     *  and disablePolling() have been invoked. If the net result is to enable
+     *  polling the channel will poll the server on behalf of connected MessageAgents.
+     *
Invoked automatically based upon subscribing or unsubscribing from a remote
+     *  destination over a PollingChannel.

+     */
+    public function enablePolling():void
+    {
+    	_pollingRef++;
+        if (_pollingRef == 0)
+            startPolling();
+    }
+
+    /**
+     *  Disables polling based on the number of times enablePolling()
+     *  and disablePolling() have been invoked. If the net result is to disable
+     *  polling the channel stops polling.
+     *
Invoked automatically based upon subscribing or unsubscribing from a remote
+     *  destination over a PollingChannel.

+     */
+    public function disablePolling():void
+    {
+    	_pollingRef--;
+        if (_pollingRef < 0)
+            stopPolling();
+    }
+
+    /**
+     *  Initiates a poll operation if there are consumers subscribed to this channel,
+     *  and polling is enabled for this channel.
+     *
+     *  Note that this method will not start a new poll if one is currently in progress.
+     */
+    public function poll():void
+    {
+        internalPoll();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Internal Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  This method allows a PollCommandMessageResponder to indicate that the
+     *  channel has lost its connectivity.
+     *
+     *  @param rejected Channel will be rejected and will not attempt to reconnect if
+     *  this flag is true
+     */
+    mx_internal function pollFailed(rejected:Boolean = false):void
+    {
+        internalDisconnect(rejected);
+    }
+
+    /**
+     *  @private
+     *  This method is invoked automatically when disablePolling()
+     *  is called and it results in a net negative number of requests to poll.
+     *
+     *  mx_internal to allow the poll responder to shut down polling if a general,
+     *  fatal error occurs.
+     */
+    mx_internal function stopPolling():void
+    {
+        if (Log.isInfo())
+            _log.info("'{0}' channel polling stopped.", id);
+
+        if (_timer != null)
+            _timer.stop();
+
+        _pollingRef = -1;
+        _shouldPoll = false;
+        pollOutstanding = false;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Protected Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Processes polling related configuration settings.
+     *
+     *  @param settings The Channel settings.
+     */
+    protected function applyPollingSettings(settings:XML):void
+    {
+        if (settings.properties.length())
+        {
+            var props:XML = settings.properties[0];
+            if (props["polling-enabled"].length())
+                internalPollingEnabled = props["polling-enabled"].toString()=="true";
+            if (props["polling-interval-millis"].length())
+                internalPollingInterval = parseInt(props["polling-interval-millis"].toString());
+            else if (props["polling-interval-seconds"].length()) // deprecated
+                internalPollingInterval = parseInt(props["polling-interval-seconds"].toString()) * 1000;
+
+           	if (props["piggybacking-enabled"].length())
+           	    internalPiggybackingEnabled = props["piggybacking-enabled"].toString()=="true";
+
+           	if (props["login-after-disconnect"].length())
+           		_loginAfterDisconnect = props["login-after-disconnect"].toString()=="true";
+        }
+    }
+
+    /**
+     *  @private
+     */
+    protected function getPollSyncMessageResponder(agent:MessageAgent, msg:CommandMessage):MessageResponder
+    {
+        return null;
+    }
+
+    /**
+     *  @private
+     */
+    protected function getDefaultMessageResponder(agent:MessageAgent, msg:IMessage):MessageResponder
+    {
+        return super.getMessageResponder(agent, msg);
+    }
+
+    /**
+     *  @private
+     *  Requests the server return any messages queued since the last poll request for this FlexClient.
+     *
+     *  @param event Event dispatched by the polling Timer.
+     */
+    protected function internalPoll(event:Event = null):void
+    {
+        if (!pollOutstanding)
+        {
+            if (Log.isInfo())
+            	_log.info("'{0}' channel requesting queued messages.", id);
+
+            // If this poll is triggered via a direct invocation make sure no
+            // concurrent poll Timer is running.
+            if (timerRunning)
+                _timer.stop();
+
+            var msg:CommandMessage = new CommandMessage();
+            msg.operation = CommandMessage.POLL_OPERATION;
+            // Pass a null clientId - this indicates that we're polling for
+            // any subscriptions for this client as opposed to receive()'ing
+            // messages for a single Consumer instance subscribed to a specific destination.
+            if (Log.isDebug())
+                _log.debug("'{0}' channel sending poll message\n{1}\n", id, msg.toString());
+
+            try
+            {
+                internalSend(new PollCommandMessageResponder(null, msg, this, _log));
+                pollOutstanding = true;
+            }
+            catch(e:Error)
+            {
+                // If there was a problem stop polling.
+                stopPolling();
+                throw e;
+            }
+        }
+        else
+        {
+            if (Log.isInfo())
+                _log.info("'{0}' channel waiting for poll response.", id);
+        }
+    }
+
+    /**
+     *  @private
+     *  This method is invoked automatically when enablePolling()
+     *  is called and it results in net positive number of requests to poll.
+     */
+    protected function startPolling():void
+    {
+        if (_pollingEnabled)
+        {
+            if (Log.isInfo())
+                _log.info("'{0}' channel polling started.", id);
+
+            _shouldPoll = true;
+
+		    poll(); // Poll immediately. Once a result is returned we schedule the next poll invocation.
+        }
+        // If polling is not enabled, this is a no-op.
+    }
+
+    /**
+     *  @private
+     *  Returns true if this channel requires a timer for polling.
+     */
+    protected function timerRequired():Boolean
+    {
+        return true;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Static Constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+    * Define the default Polling Interval as 3000ms
+    */
+    private static const DEFAULT_POLLING_INTERVAL:int = 3000;
+}
+
+}
+
+//------------------------------------------------------------------------------
+//
+// Private Classes
+//
+//------------------------------------------------------------------------------
+
+import flash.utils.Timer;
+
+import mx.core.mx_internal;
+import mx.logging.Log;
+import mx.logging.ILogger;
+import mx.messaging.MessageAgent;
+import mx.messaging.MessageResponder;
+import mx.messaging.channels.PollingChannel;
+import mx.messaging.events.ChannelFaultEvent;
+import mx.messaging.events.MessageEvent;
+import mx.messaging.messages.IMessage;
+import mx.messaging.messages.AcknowledgeMessage;
+import mx.messaging.messages.CommandMessage;
+import mx.messaging.messages.ErrorMessage;
+import mx.messaging.messages.MessagePerformanceUtils;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+
+use namespace mx_internal;
+
+[ResourceBundle("messaging")]
+
+/**
+ *  @private
+ *  Used internally to dispatch a batched set of messages returned in the poll
+ *  command message.
+ */
+class PollCommandMessageResponder extends MessageResponder
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Initializes an instance of the message responder that handles
+     *  multiple messages received from a poll request that a Channel makes.
+     *
+     *  @param channel PollingChannel.
+     */
+    public function PollCommandMessageResponder(agent:MessageAgent, msg:IMessage, channel:PollingChannel, log:ILogger)
+    {
+        super(agent, msg, channel);
+        _log = log;
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	// Variables
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Reference to the logger for the associated Channel.
+     */
+    private var _log:ILogger;
+
+    /**
+     *  @private
+     */
+    private var resourceManager:IResourceManager =
+									ResourceManager.getInstance();
+
+    //--------------------------------------------------------------------------
+    //
+    // Overridden Protected Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Handles a poll command result from the server which is either an empty acknowledgement
+     *  if there were no messages to deliver or a response containing a list of messages to
+     *  dispatch in its body.
+     *
+     *  @param msg The result message.
+     */
+    override protected function resultHandler(msg:IMessage):void
+    {
+        PollingChannel(channel).pollOutstanding = false;
+
+        if ((msg is CommandMessage))
+        {
+            // Return early if the response is tagged as a no-op poll.
+            if (msg.headers[CommandMessage.NO_OP_POLL_HEADER] == true)
+                return;
+
+            if (msg.body != null)
+            {
+                var messageList:Array = msg.body as Array;
+                for each (var message:IMessage in messageList)
+                {
+                    if (Log.isDebug())
+                    {
+        	            _log.debug("'{0}' channel got message\n{1}\n", channel.id, message.toString());
+    				    if (channel.mpiEnabled)
+        			    {
+        				    var mpiutil:MessagePerformanceUtils = new MessagePerformanceUtils(message);
+        				    _log.debug(mpiutil.prettyPrint());
+        			    }
+        	        }
+                    channel.dispatchEvent(MessageEvent.createEvent(MessageEvent.MESSAGE, message));
+                }
+            }
+        }
+        else if (msg is AcknowledgeMessage)
+        {
+            // The server returns an empty ack if there are no messages to return.
+            // We don't need to do anything here.
+        }
+        else
+        {
+            // This should never happen.
+            // If it does, treat it as a status (error) and return.
+        	var errMsg:ErrorMessage = new ErrorMessage();
+        	errMsg.faultDetail = resourceManager.getString(
+				"messaging", "receivedNull");
+        	status(errMsg);
+        	return;
+       	}
+
+       	// Only set up the next poll if the channel is still connected.
+       	// Subscription invalidation commands pushed by the server can cause the channel to disconnect
+       	// and it shouldn't issue another poll request in this case.
+       	// Also, if the channel is piggybacking but not polling on an interval we don't want to
+       	// schedule the next poll.
+       	var pollingChannel:PollingChannel = PollingChannel(channel);
+       	if (pollingChannel.connected && pollingChannel._shouldPoll)
+       	{
+           	var adaptivePollWait:int = 0;
+           	if (msg.headers[CommandMessage.POLL_WAIT_HEADER] != null)
+                adaptivePollWait = msg.headers[CommandMessage.POLL_WAIT_HEADER];
+
+           	// An adaptive polling value of 0 indicates that the channel should use its default
+           	// polling interval.
+           	if (adaptivePollWait == 0)
+           	{
+               	if (pollingChannel.internalPollingInterval == 0)
+                {
+                    // No need for a Timer at all if we're polling immediately.
+                    pollingChannel.poll();
+               	}
+               	else if (!pollingChannel.timerRunning)
+               	{
+               	    // Poll at the base rate for this Channel; no adaptive poll wait is defined.
+               	    pollingChannel._timer.delay = pollingChannel._pollingInterval;
+                   	pollingChannel._timer.start();
+                }
+            }
+            else
+            {
+                // Use adaptive poll wait.
+                pollingChannel._timer.delay = adaptivePollWait;
+                pollingChannel._timer.start();
+            }
+        }
+    }
+
+    /**
+     *  @private
+     *  Handles a fault while attempting to poll.
+     *
+     *  @param msg The ErrorMessage from the remote destination.
+     */
+    override protected function statusHandler(msg:IMessage):void
+    {
+        var pollingChannel:PollingChannel = PollingChannel(channel);
+        pollingChannel.stopPolling(); // Shut down all polling.
+        var errMsg:ErrorMessage = msg as ErrorMessage;
+        var details:String = (errMsg != null) ? errMsg.faultDetail : "";
+        var faultEvent:ChannelFaultEvent = ChannelFaultEvent.createEvent
+            (pollingChannel, false, "Channel.Polling.Error", "error", details);
+        faultEvent.rootCause = msg;
+        pollingChannel.dispatchEvent(faultEvent);
+
+        // Reject this channel if the server does not support polling
+        if (errMsg != null && errMsg.faultCode == "Server.PollNotSupported")
+        {
+        	pollingChannel.pollFailed(true);
+        }
+        else
+        {
+        	pollingChannel.pollFailed(false);
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Static Constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Code that indicates a poll message faulted because the agent isn't subscribed.
+     */
+    private static const NOT_SUBSCRIBED_CODE:String = "Server.Processing.NotSubscribed";
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 21584
Author:   aaltman@adobe.com
Date:     2011-07-15T22:40:24.389074Z

Log Message:
-----------
Plumbed soft keyboard hint properties from SkinnableTextBase to StageText.
Fixed some excessive padding around StageText.
Added a style to control when prompt text disappears from text controls.
Changed prompt to be a non-StageText to fix z-order issues.
Added a workaround for the lack of a StageText "enter" event (only works on Android).

QE notes: The fix for SDK-30728 is only a partial workaround. It still does not work on iOS.
Doc notes:
Bugs: SDK-30781 - iOS: SoftKeyboard hints don't appear when StageText is used on iPodTouch, and iPad2
SDK-30740 - StageText: Prompt displays over content.
SDK-30737 - SoftKeyboard does not appears on the first tap on TextInput
SDK-30736 - Text prompt disappears when text got focus
SDK-30728 - "Enter" key does not work correctly in StageText
Reviewer: aharui
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/core/ISoftKeyboardHintClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>

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

--- frameworks/projects/spark/src/spark/core/ISoftKeyboardHintClient.as
+++ frameworks/projects/spark/src/spark/core/ISoftKeyboardHintClient.as
@@ -0,0 +1,113 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2011 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+package spark.core
+{
+    [ExcludeClass]
+
+    /**
+     *  @private
+     *  Interface to plumb soft-keyboard hints to soft-keyboard-aware
+     *  implementation components.
+     */
+    public interface ISoftKeyboardHintClient
+    {
+        //--------------------------------------------------------------------------
+        //
+        //  Properties
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  autoCapitalize
+        //----------------------------------
+
+        /**
+         *  Hint indicating what captialization behavior soft keyboards should use.
+         *
+         *  Supported values are defined in flash.text.AutoCapitalize:
+         *      "none" - no automatic capitalization
+         *      "word" - capitalize the first letter following any space or
+         *          punctuation
+         *      "sentence" - captitalize the first letter following any period
+         *      "all" - capitalize every letter
+         *
+         *  @langversion 3.0
+         *  @playerversion AIR 3.0
+         *  @productversion Flex 4.5.2
+         */
+        function set autoCapitalize(value:String):void;
+        function get autoCapitalize():String;
+
+        //----------------------------------
+        //  autoCorrect
+        //----------------------------------
+
+        /**
+         *  Hint indicating whether a soft keyboard should use its auto-correct
+         *  behavior, if supported.
+         *
+         *  @langversion 3.0
+         *  @playerversion AIR 3.0
+         *  @productversion Flex 4.5.2
+         */
+        function get autoCorrect():Boolean;
+        function set autoCorrect(value:Boolean):void;
+
+        //----------------------------------
+        //  returnKeyLabel
+        //----------------------------------
+
+        /**
+         *  Hint indicating what label should be displayed for the return key on
+         *  soft keyboards.
+         *
+         *  Supported values are defined in flash.text.ReturnKeyLabel:
+         *      "default" - default icon or label text
+         *      "done" - icon or label text indicating completed text entry
+         *      "go" - icon or label text indicating that an action should start
+         *      "next" - icon or label text indicating a move to the next field
+         *      "search" - icon or label text indicating that the entered text
+         *          should be searched for
+         *
+         *  @langversion 3.0
+         *  @playerversion AIR 3.0
+         *  @productversion Flex 4.5.2
+         */
+        function get returnKeyLabel():String;
+        function set returnKeyLabel(value:String):void;
+
+        //----------------------------------
+        //  softKeyboardType
+        //----------------------------------
+
+        /**
+         *  Hint indicating what kind of soft keyboard should be displayed for this
+         *  component.
+         *
+         *  Supported values are defined in flash.text.SoftKeyboardType:
+         *      "default" - the default keyboard
+         *      "punctuation" - puts the keyboard into punctuation/symbol entry mode
+         *      "url" - present soft keys appropriate for URL entry, such as a
+         *          specialized key that inserts '.com'
+         *      "number" - puts the keyboard into numeric keypad mode
+         *      "contact" - puts the keyboard into a mode appropriate for entering
+         *          contact information
+         *      "email" - puts the keyboard into e-mail addres entry mode, which may
+         *          make it easier to enter '@' or '.com'
+         *
+         *  @langversion 3.0
+         *  @playerversion AIR 3.0
+         *  @productversion Flex 4.5.2
+         */
+        function get softKeyboardType():String;
+        function set softKeyboardType(value:String):void;
+    }
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5797
Author:   jimurphy@adobe.com
Date:     2009-03-31T15:35:34.544076Z

Log Message:
-----------
Merged revisions 3.x 5505,5526-5527,5535,5540,5542,5572,5616-5617,5656-5657,5671,5674,5683,5687-5688,5690,5698,5708-5709,5713-5716,5719-5723,5726,5728-5729,5736,5752,5754,5761,5774,5780,5784 -> trunk

most of these are user submitted patches! very cool.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/IResourceManager.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/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressIndeterminateSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="D">/flex/sdk/trunk/modules/compiler/FlexCompilerShell-license.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateFormatter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/PhoneNumberValidator.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/validators/NumberValidatorDomainType.as" copyfrom-rev="5784" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/NumberValidatorDomainType.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/NumberValidator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/CurrencyValidator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Form.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/CalendarLayoutChangeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/DataGridEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpMenuButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>

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

--- frameworks/projects/mx/src/mx/containers/DividedBox.as
+++ frameworks/projects/mx/src/mx/containers/DividedBox.as
@@ -16,6 +16,7 @@
 import flash.events.Event;
 import flash.events.MouseEvent;
 import flash.geom.Point;
+
 import mx.containers.dividedBoxClasses.BoxDivider;
 import mx.core.EdgeMetrics;
 import mx.core.IFlexDisplayObject;
@@ -463,6 +464,16 @@
 	 */
 	private var numLayoutChildren:int = 0;

+    /**
+     * @private
+     * If last child was stretched to fill remaining space it will be asigned
+     * to this variable.
+     * See preLayoutAdjustment() for detailed description of the initial layout
+     * algorithm.
+     * Note that after resizing using dividers this property will be set to null.
+     */
+    private var stretchedChild:IUIComponent;
+
 	//--------------------------------------------------------------------------
 	//
 	//  Properties
@@ -480,6 +491,12 @@
 	{
 		if (super.direction != value)
 		{
+            // Direction has changed so we reset the last child's
+            // percentWidth/percentHeight setting. Note that
+            // we call this before assigning the new direction value
+            // as resetStrechedChild() depends on the direction.
+            resetStretchedChild();
+
 			super.direction = value;

 			// Need to invalidate all our dividers
@@ -545,6 +562,9 @@
 	public function get numDividers():int
 	{
 		if (dividerLayer)
+           	if (!liveDragging && activeDivider)
+           		return dividerLayer.numChildren-1;
+           	else
 			return dividerLayer.numChildren;
 		else
 			return 0;
@@ -663,8 +683,8 @@
 			}
 		}

-		var wPadding:Number = layoutObject.widthPadding(numChildren);
-		var hPadding:Number = layoutObject.heightPadding(numChildren);
+        var wPadding:Number = layoutObject.widthPadding(numLayoutChildren);
+        var hPadding:Number = layoutObject.heightPadding(numLayoutChildren);

 		measuredMinWidth = dbMinWidth = minWidth + wPadding;
 		measuredMinHeight = dbMinHeight = minHeight + hPadding;
@@ -712,17 +732,28 @@
 		super.updateDisplayList(unscaledWidth, unscaledHeight);

 		// Lay out the dividers.
-		if (dividerLayer)
-		{
+        if (!dividerLayer)
+           return;
+
 			var vm:EdgeMetrics = viewMetrics;

 			dividerLayer.x = vm.left;
 			dividerLayer.y = vm.top;

-			n = dividerLayer.numChildren;
+        var prevChild:IUIComponent = null;
+        var dividerIndex:int = 0;
+        n = numChildren;
 			for (i = 0; i < n; i++)
 			{
-				layoutDivider(i, unscaledWidth, unscaledHeight);
+            child = UIComponent(getChildAt(i));
+            if (child.includeInLayout)
+            {
+                if (prevChild)
+                {
+                    layoutDivider(dividerIndex, unscaledWidth, unscaledHeight, prevChild, child);
+                    dividerIndex++;
+                }
+                prevChild = child;
 			}
 		}
 	}
@@ -880,7 +911,9 @@
 	 */
 	private function layoutDivider(i:int,
 								   unscaledWidth:Number,
-								   unscaledHeight:Number):void
+                                   unscaledHeight:Number,
+                                   prevChild:IUIComponent,
+                                   nextChild:IUIComponent):void
 	{
 		// The mouse-over thickness of the divider is normally determined
 		// by the dividerAffordance style, and the visible thickness is
@@ -901,9 +934,6 @@

 		var divider:BoxDivider = BoxDivider(getDividerAt(i));

-		var prevChild:IUIComponent = getLayoutChildAt(i);
-		var nextChild:IUIComponent = getLayoutChildAt(i + 1);
-
 		var vm:EdgeMetrics = viewMetrics;

 		var verticalGap:Number = getStyle("verticalGap");
@@ -1078,6 +1108,8 @@
 		for (var i:int = 0; i < n; i++)
 		{
 			var child:IUIComponent = getLayoutChildAt(i);
+            if (!child.includeInLayout)
+                continue;

 			var sz:Number = vertical ? child.height : child.width;

@@ -1219,14 +1251,14 @@
 		var deltaMinBelow:Number = 0;
 		var deltaMaxBelow:Number = 0;

-		var n:int = numChildren;
+        var n:int = numLayoutChildren;
 		var i:int;
 		var child:ChildSizeInfo;

 		if (at < 0)
 			return;

-		for (i = at; i >= 0; i = (i > 0) ? i - 1 : -1)
+        for (i = at; i >= 0; i--)
 		{
 			child = ChildSizeInfo(oldChildSizes[i]);

@@ -1292,7 +1324,7 @@
 	 *  @private
      *  We distribute the delta space in the same
 	 *  fashion that we calculated it. That is we
-	 *  start at the divider an give out space
+     *  start at the divider and give out space
 	 *  until we hit a limit on the component or
 	 *  we run out of space to distribute.
 	 *  We need to do this in both directions since
@@ -1307,7 +1339,7 @@
 			return;

 		var vertical:Boolean = isVertical();
-		var n:int = numChildren;
+        var n:int = numLayoutChildren;
 		var k:int = activeDividerIndex;
 		var smallest:Number = oldChildSizes[n].size -
 			Math.abs(dragDelta); // smallest possible child size
@@ -1322,10 +1354,24 @@
 		var child:IUIComponent;
 		var childSize:Number;

+        // Find the index of the child before the active divider
+        var activeDividerChildIndex:int = -1;
+        var dividerIndex:int = -1;
+        while (dividerIndex < activeDividerIndex)
+        {
+            if (UIComponent(getChildAt(++activeDividerChildIndex)).includeInLayout)
+                ++dividerIndex;
+        }
+
+        // There's no need to track the last stretched child, as
+        // we are about to assing percentWidth/percentHeight.
+        stretchedChild = null;
+
 		// Distribute space starting from the center and
 		// moving upwards.
+        var curChildIndex:int = activeDividerChildIndex;
 		var amt:Number = dragDelta;
-		for (i = k; i >= 0; i = (i > 0) ? i - 1 : -1)
+        for (i = k; i >= 0; i--)
 		{
 			// If dragDelta -ve  => shrink upper components
 			// otherwise grow them.
@@ -1338,8 +1384,14 @@
 			newSize = size.size + move;
 			amt -= move;

+            // Find the previous child included in the layout
+            do
+            {
+                 child = IUIComponent(getChildAt(curChildIndex--));
+            }
+            while (!child.includeInLayout);
+
 			// Adjust the child size.
-			child = getLayoutChildAt(i);
 			childSize = (newSize / smallest) * 100;

 			if (vertical)
@@ -1355,6 +1407,7 @@
 		// assert(amt == 0)

 		// Now do the same distribution but moving downwards.
+        curChildIndex = activeDividerChildIndex + 1;
 		amt = dragDelta;
 		for (i = k + 1; i < n; i++)
 		{
@@ -1369,7 +1422,13 @@
 			newSize = size.size + move;
 			amt += move;

-			child = getLayoutChildAt(i);
+            // Find the next child included in the layout
+            do
+            {
+                 child = IUIComponent(getChildAt(curChildIndex++));
+            }
+            while (!child.includeInLayout);
+
 			childSize = (newSize / smallest) * 100;

 			if (vertical)
@@ -1400,6 +1459,24 @@

 	/**
 	 *  @private
+     * If the last child is stretched to fill
+     * the remaining space this function resets its size
+     * and sets stretchedChild property to null.
+     */
+    private function resetStretchedChild():void
+    {
+        if (stretchedChild)
+        {
+            if (isVertical())
+                stretchedChild.percentHeight = NaN;
+            else
+                stretchedChild.percentWidth = NaN;
+            stretchedChild = null;
+        }
+    }
+
+    /**
+     *  @private
 	 *  Algorithm employed pre-layout to ensure that
 	 *  we don't leave any dangling space and to ensure
 	 *  that only explicit min/max values are honored.
@@ -1449,18 +1526,19 @@
 		// No flexible children, so we make the last one 100%.
 		if (totalPerc == 0 && percCount == 0)
 		{
-			// Everyone is fixed and we can give 100% to the last one
-			// without concern.
-			if (n > 0)
+            // Everyone is fixed and we can give 100% to the last
+            // included in layout one without concern.
+            for (i = n-1; i >= 0; i--)
 			{
-				child = getLayoutChildAt(n - 1);
-
+                child = UIComponent(getChildAt(i));
 				if (child.includeInLayout)
 				{
 					if (vertical)
 						child.percentHeight = 100;
 					else
 						child.percentWidth = 100;
+                    stretchedChild = child;
+                    break;
 				}
 			}
 		}
@@ -1526,53 +1604,20 @@
 	{
 		var child:DisplayObject = event.relatedObject;

-		if (IUIComponent(child).includeInLayout)
-			numLayoutChildren++;
-
-		if (numLayoutChildren > 1)
-			createDivider(numLayoutChildren - 2);
-
 		child.addEventListener("includeInLayoutChanged",
                                child_includeInLayoutChangedHandler);

-		// If this child is the new last child, and we have already
-		// set the old last child to 100%, move that 100% setting to
-		// the new last child. This way dynamically added children
-		// (across multiple layout passes) behave the same as if they
-		// were all added in a single layout pass. Bug 165249.
-		if (initialized && getChildIndex(child) == numChildren - 1 && numChildren > 1)
-		{
-			var foundPercentage:Boolean = false;
-			var comp:IUIComponent;
-			var isVertical:Boolean = this.isVertical();
-
-			// First, check for any percentage values
-			for (var i:int = 0; i < numChildren - 2; i++)
-			{
-				comp = getLayoutChildAt(i);
-				if (!isNaN(isVertical ? comp.percentHeight : comp.percentWidth))
-					foundPercentage = true;
-			}
-
-			// Next, see if the old last child has 100%, and reset if it
-			// does.
-			comp = getLayoutChildAt(numChildren - 2);
-			if (!foundPercentage)
-			{
-				if (isVertical)
-				{
-					if (comp.percentHeight == 100)
-						comp.percentHeight = NaN;
-				}
-				else
-				{
-					if (comp.percentWidth == 100)
-						comp.percentWidth = NaN;
-				}
-			}
-
-			// The new child will be set to 100% in preLayoutAdjustment().
-		}
+        if (!IUIComponent(child).includeInLayout)
+          return;
+
+        numLayoutChildren++;
+
+        if (numLayoutChildren > 1)
+            createDivider(numLayoutChildren - 2);
+
+        // Clear the stretched child as the new last child
+        // will be set to 100% in preLayoutAdjustment().
+        resetStretchedChild();

 		// Clear the cached values so that we do another
 		// measurement pass.
@@ -1589,14 +1634,20 @@
 	{
 		var child:DisplayObject = event.relatedObject;

-		if (IUIComponent(child).includeInLayout)
+        child.removeEventListener("includeInLayoutChanged",
+                                  child_includeInLayoutChangedHandler);
+
+        if (!IUIComponent(child).includeInLayout)
+          return;
+
 			numLayoutChildren--;

 		if (numLayoutChildren > 0)
 			dividerLayer.removeChild(getDividerAt(numLayoutChildren - 1));

-		child.removeEventListener("includeInLayoutChanged",
-                                  child_includeInLayoutChangedHandler);
+        // Clear the stretched child as the new last child
+        // will be set to 100% in preLayoutAdjustment().
+        resetStretchedChild();

 		// Clear the cached values so that we do another
 		// measurement pass.
@@ -1621,6 +1672,18 @@

 		else if (!child.includeInLayout && --numLayoutChildren > 0)
 			dividerLayer.removeChild(getDividerAt(numLayoutChildren - 1));
+
+        // Clear the stretched child as the new last child
+        // will be set to 100% in preLayoutAdjustment().
+        resetStretchedChild();
+
+        // Clear the cached values so that we do another
+        // measurement pass.
+        dbMinWidth = NaN;
+        dbMinHeight = NaN;
+        dbPreferredWidth = NaN;
+        dbPreferredHeight = NaN;
+        invalidateSize();
 	}

 }
@@ -1712,3 +1775,4 @@
 	public var size:Number;
 }

+


Transferred from the Adobe Open Source Subversion Repository

Revision: 11118
Author:   gosmith@adobe.com
Date:     2009-10-23T23:35:38.504561Z

Log Message:
-----------
Did some code cleanup on the Spark components to enforce the conventions about how to order stuff within an AS file.

QE notes: None
Doc notes: None
Bugs: None
Reviewer: None; no functional changes
Tests run: ant checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -10,7 +10,8 @@
 ////////////////////////////////////////////////////////////////////////////////

 package spark.components
-{
+{
+
 import flash.display.DisplayObject;
 import flash.events.Event;
 import flash.events.KeyboardEvent;
@@ -39,6 +40,10 @@
 import spark.layouts.supportClasses.DropLocation;

 use namespace mx_internal;  //ListBase and List share selection properties that are mx_internal
+
+//--------------------------------------
+//  Styles
+//--------------------------------------

 /**
  *  @copy spark.components.supportClasses.GroupBase#style:alternatingItemColors
@@ -169,10 +174,12 @@
 //  Other metadata
 //--------------------------------------

+[AccessibilityClass(implementation="spark.accessibility.ListBaseAccImpl")]
+
+[DefaultTriggerEvent("change")]
+
 [IconFile("List.png")]
-[DefaultTriggerEvent("change")]
-
-[AccessibilityClass(implementation="spark.accessibility.ListBaseAccImpl")]
+
 /**
  *  The List control displays a vertical list of items.
  *  Its functionality is very similar to that of the SELECT
@@ -247,6 +254,7 @@
     public function List()
     {
         super();
+
         useVirtualLayout = true;
     }

@@ -279,7 +287,15 @@
      *  comitting the selection until mouse up.
      */
     private var pendingSelectionOnMouseUp:Boolean = false;
+
+    /**
+     *  @private
+     */
     private var pendingSelectionShiftKey:Boolean;
+
+    /**
+     *  @private
+     */
     private var pendingSelectionCtrlKey:Boolean;

     //--------------------------------------------------------------------------
@@ -288,6 +304,10 @@
     //
     //--------------------------------------------------------------------------

+    //----------------------------------
+    //  dropIndicator
+    //----------------------------------
+
     [SkinPart(required="false", type="flash.display.DisplayObject")]

     /**
@@ -318,6 +338,67 @@
      */
     public var scroller:Scroller;

+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  hasFocusableChildren
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set hasFocusableChildren(value:Boolean):void
+    {
+        super.hasFocusableChildren = value;
+
+        if (scroller)
+            scroller.hasFocusableChildren = value;
+    }
+
+    //----------------------------------
+    //  useVirtualLayout
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    override public function get useVirtualLayout():Boolean
+    {
+        return super.useVirtualLayout;
+    }
+
+    /**
+     *  Overrides the inherited default property , it is true for this class.
+     *
+     *  Sets the value of the useVirtualLayout property
+     *  of the layout associated with this control.
+     *  If the layout is subsequently replaced and the value of this
+     *  property is true, then the new layout's
+     *  useVirtualLayout property is set to true.
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    override public function set useVirtualLayout(value:Boolean):void
+    {
+        super.useVirtualLayout = value;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -328,7 +409,10 @@
     //  allowMultipleSelection
     //----------------------------------

-    private var _allowMultipleSelection:Boolean = false;
+    /**
+	 *  @private
+	 */
+	private var _allowMultipleSelection:Boolean = false;

     /**
      *  If true multiple selections is enabled.
@@ -526,14 +610,23 @@

     /**
      *  @private
-     *  Internal storage for the selectedIndices property and invalidation variables.
+     *  Internal storage for the selectedIndices property.
      */
     private var _selectedIndices:Vector.<int>;
-    private var _proposedSelectedIndices:Vector.<int> = new Vector.<int>();
-    private var multipleSelectionChanged:Boolean;
+
+	/**
+     *  @private
+     */
+	private var _proposedSelectedIndices:Vector.<int> = new Vector.<int>();
+
+	/**
+     *  @private
+     */
+	private var multipleSelectionChanged:Boolean;

     [Bindable("change")]
-    /**
+
+	/**
      *  A Vector of ints representing the indices of the currently selected
      *  item or items.
      *  If multiple selection is disabled by setting
@@ -575,6 +668,7 @@
     //----------------------------------

     [Bindable("change")]
+
     /**
      *  An Vector of Objects representing the currently selected data items.
      *  If multiple selection is disabled by setting allowMultipleSelection
@@ -645,49 +739,9 @@
         invalidateProperties();
     }

-    //----------------------------------
-    //  useVirtualLayout
-    //----------------------------------
-
-    /**
-     *  @inheritDoc
-     *
-     *  @default true
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    override public function get useVirtualLayout():Boolean
-    {
-        return super.useVirtualLayout;
-    }
-
-    /**
-     *  Overrides the inherited default property , it is true for this class.
-     *
-     *  Sets the value of the useVirtualLayout property
-     *  of the layout associated with this control.
-     *  If the layout is subsequently replaced and the value of this
-     *  property is true, then the new layout's
-     *  useVirtualLayout property is set to true.
-     *
-     *  @default true
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    override public function set useVirtualLayout(value:Boolean):void
-    {
-        super.useVirtualLayout = value;
-    }
-
     //--------------------------------------------------------------------------
     //
-    //  Overridden Methods
+    //  Overridden methods
     //
     //--------------------------------------------------------------------------

@@ -717,11 +771,52 @@
     /**
      *  @private
      */
-    override public function set hasFocusableChildren(value:Boolean):void
-    {
-        super.hasFocusableChildren = value;
-        if (scroller)
-            scroller.hasFocusableChildren = value;
+    override protected function partAdded(partName:String, instance:Object):void
+    {
+        super.partAdded(partName, instance);
+        if (instance == dataGroup)
+        {
+            dataGroup.addEventListener(
+                RendererExistenceEvent.RENDERER_ADD, dataGroup_rendererAddHandler);
+            dataGroup.addEventListener(
+                RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler);
+        }
+        if (instance == scroller)
+            scroller.hasFocusableChildren = hasFocusableChildren;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function partRemoved(partName:String, instance:Object):void
+    {
+        if (instance == dataGroup)
+        {
+            dataGroup.removeEventListener(
+                RendererExistenceEvent.RENDERER_ADD, dataGroup_rendererAddHandler);
+            dataGroup.removeEventListener(
+                RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler);
+        }
+
+        super.partRemoved(partName, instance);
+    }
+
+    /**
+     *  @private
+     *  Called when an item has been added to this component.
+     */
+    override protected function itemAdded(index:int):void
+    {
+        adjustSelection(index, true);
+    }
+
+    /**
+     *  @private
+     *  Called when an item has been removed from this component.
+     */
+    override protected function itemRemoved(index:int):void
+    {
+        adjustSelection(index, false);
     }

     /**
@@ -902,60 +997,9 @@
         return index == selectedIndex;
     }

-    /**
-     *  @private
-     */
-    override protected function partAdded(partName:String, instance:Object):void
-    {
-        super.partAdded(partName, instance);
-        if (instance == dataGroup)
-        {
-            dataGroup.addEventListener(
-                RendererExistenceEvent.RENDERER_ADD, dataGroup_rendererAddHandler);
-            dataGroup.addEventListener(
-                RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler);
-        }
-        if (instance == scroller)
-            scroller.hasFocusableChildren = hasFocusableChildren;
-    }
-
-    /**
-     *  @private
-     */
-    override protected function partRemoved(partName:String, instance:Object):void
-    {
-        if (instance == dataGroup)
-        {
-            dataGroup.removeEventListener(
-                RendererExistenceEvent.RENDERER_ADD, dataGroup_rendererAddHandler);
-            dataGroup.removeEventListener(
-                RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler);
-        }
-
-        super.partRemoved(partName, instance);
-    }
-
-    /**
-     *  @private
-     *  Called when an item has been added to this component.
-     */
-    override protected function itemAdded(index:int):void
-    {
-        adjustSelection(index, true);
-    }
-
-    /**
-     *  @private
-     *  Called when an item has been removed from this component.
-     */
-    override protected function itemRemoved(index:int):void
-    {
-        adjustSelection(index, false);
-    }
-
     //--------------------------------------------------------------------------
     //
-    //  Private Methods
+    //  Methods
     //
     //--------------------------------------------------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 4548
Author:   jszeto@adobe.com
Date:     2009-01-16T01:06:23.973750Z

Log Message:
-----------
Flex SDK Bug Fix - Path Fills

SDK-17788 Gradient Fills for Path are in the wrong position

Path now passes its fill the values measuredX and measuredY, multiplied by the internal scale factor (ie. width / measuredWidth).

QE Notes: Paths that draw at an offset from the origin will now properly place their gradient fills
Doc Notes: N/A
Bugs: SDK-17788
Reviewer: Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxScrollBarLeftButtonSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/primitives/Path.as
+++ frameworks/projects/spark/src/spark/primitives/Path.as
@@ -561,6 +561,29 @@
         return topLeft;
     }

+ 	/**
+ 	 *  @private
+ 	 *  Use measuredX and measuredY instead of drawX and drawY
+ 	 */
+ 	override protected function beginDraw(g:Graphics):void
+    {
+        // Don't call super.beginDraw() since it will also set up an
+        // invisible fill.
+
+        // Adjust the position by the internal scale factor
+        var bounds:Rectangle = new Rectangle(drawX + (measuredX * width / measuredWidth),
+        									 drawY + (measuredY * height / measuredHeight),
+        									 width,
+        									 height);
+        if (stroke)
+            stroke.draw(g, bounds);
+        else
+            g.lineStyle();
+
+        if (fill)
+            fill.begin(g, bounds);
+    }
+
     //TODO: these are a short term fix for MAX to work around the fact
     //that graphic elements can't differentiate between owning a display object
     //and sharing one.  The problem is, a previous graphic element might be


RTSPClient: Dont wait for teardown response to shut down

--- src/com/axis/rtspclient/RTSPClient.as
+++ src/com/axis/rtspclient/RTSPClient.as
@@ -179,12 +179,21 @@
     }

     public function stop():Boolean {
+      dispatchEvent(new ClientEvent(ClientEvent.STOPPED, { currentTime: this.getCurrentTime() }));
+      this.ns.dispose();
       bcTimer.stop();
-      sendTeardownReq();
+
+      try {
+        sendTeardownReq();
+      } catch (e:*) {}
+
+      this.handle.disconnect();
+
       nc.removeEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
       nc.removeEventListener(IOErrorEvent.IO_ERROR, onIOError);
       nc.removeEventListener(NetStatusEvent.NET_STATUS, onNetStatusError);
       nc.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);
+
       return true;
     }

@@ -251,18 +260,18 @@
       bcTimer.stop();
       this.bcTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, bcTimerHandler);

-      if (state === STATE_TEARDOWN) {
-        dispatchEvent(new ClientEvent(ClientEvent.STOPPED, { currentTime: this.getCurrentTime() }));
-        this.ns.dispose();
-      } else {
+      if (state !== STATE_TEARDOWN) {
         if (this.streamBuffer.length > 0 && this.streamBuffer[this.streamBuffer.length - 1].timestamp - this.ns.time * 1000 < this.ns.bufferTime * 1000) {
           this.ns.bufferTime = 0;
           this.ns.pause();
           this.ns.resume();
         }

-        if (!connectionBroken)
+        if (!connectionBroken) {
           ErrorManager.dispatchError(803);
+          dispatchEvent(new ClientEvent(ClientEvent.STOPPED, { currentTime: this.getCurrentTime() }));
+          this.ns.dispose();
+        }
       }
     }

@@ -486,8 +495,6 @@

       case STATE_TEARDOWN:
         Logger.log('RTSPClient: STATE_TEARDOWN');
-        this.bcTimer.stop();
-        this.handle.disconnect();
         break;
       }

@@ -671,15 +678,9 @@
         "Session: " + session + "\r\n" +
         auth.authorizationHeader("TEARDOWN", authState, authOpts, urlParsed, digestNC++) +
         "\r\n";
-      try {
-        handle.writeUTFBytes(req);
-        Logger.log('RTSP OUT:', req);
-      } catch (error:*) {
-        // If we got an IO error trying to tear down the stream, dispatch
-        // STOPPED to let listeners know the stream is stopped.
-        dispatchEvent(new ClientEvent(ClientEvent.STOPPED, { currentTime: this.getCurrentTime() }));
-        this.ns.dispose();
-      }
+
+      handle.writeUTFBytes(req);
+      Logger.log('RTSP OUT:', req);

       prevMethod = sendTeardownReq;
     }