now redrawing when stats are calculated

now redrawing when stats are calculated

Change-Id: I835a1494aeb1c9ddfb3cd304cd3d1a830798cf89

--- WeaveUISpark/src/weave/visualization/plotters/MeterPlotter.as
+++ WeaveUISpark/src/weave/visualization/plotters/MeterPlotter.as
@@ -23,8 +23,9 @@
 	import weave.api.WeaveAPI;
 	import weave.api.data.IColumnStatistics;
 	import weave.api.newLinkableChild;
+	import weave.api.registerLinkableChild;
 	import weave.core.LinkableNumber;
-	import weave.data.AttributeColumns.DynamicColumn;
+	import weave.data.AttributeColumns.DynamicColumn;

 	/**
 	 * This abstract class contains functionality common to any "meter tool" such as the thermometer and the gauge.
@@ -43,7 +44,7 @@

 		//the column whose value drives this meter
 		public const meterColumn:DynamicColumn = newSpatialProperty(DynamicColumn);
-		protected const meterColumnStats:IColumnStatistics = WeaveAPI.StatisticsCache.getColumnStatistics(meterColumn);
+		protected const meterColumnStats:IColumnStatistics = registerLinkableChild(this, WeaveAPI.StatisticsCache.getColumnStatistics(meterColumn));

 //		private var mode:Number = PROBE_MODE;
 		public function MeterPlotter()


Flash-side error handling and documentation.

--- flash/src/com/flashwarp/FlashWarp.as
+++ flash/src/com/flashwarp/FlashWarp.as
@@ -4,6 +4,11 @@
 	import flash.external.ExternalInterface;
 	import flash.utils.Dictionary;

+	/**
+	 * JavaScript-Flash bridge.
+	 *
+	 * @author Artem Abashev
+	 */
 	public final class FlashWarp
 	{
 		public function FlashWarp()
@@ -27,21 +32,44 @@
 		//
 		//--------------------------------------------------------------------------

+		/**
+		 * Declare function as available from JavaScript by the name.
+		 *
+		 * @param name Function mapping alias.
+		 * @param handler Function to map.
+		 */
 		public static function map(name:String, handler:Function):void
 		{
 			_instance.doMap(name, handler);
 		}

+		/**
+		 * Remove function mapping.
+		 *
+		 * @param name Existing function mapping alias.
+		 */
 		public static function unmap(name:String):void
 		{
 			_instance.doUnmap(name);
 		}

-		public static function invoke(name:String, params:Array):void
+		/**
+		 * Invoke mapped JavaScript function by its name with the provided parameters.
+		 *
+		 * @param name JavaScript function mapping name.
+		 * @params Optional parameters list.
+		 */
+		public static function invoke(name:String, params:Array = null):void
 		{
 			_instance.doInvoke(name, params);
 		}

+		/**
+		 * Get observable value for a JavaScript-Flash binding.
+		 * If no binding exists with the provided name, it will be created automatically.
+		 *
+		 * @param name Binding alias.
+		 */
 		public static function binding(name:String):IObservable
 		{
 			return _instance.doBinding(name);
@@ -52,6 +80,8 @@
 		//  Data
 		//
 		//--------------------------------------------------------------------------
+
+		private static const JAVASCRIPT_ENDPOINT:String = "$FlashWarp";

 		private static var _instance:FlashWarp = new FlashWarp();

@@ -72,6 +102,11 @@
 			if (!_isAvailable)
 				throw new IllegalOperationError("External interface is not available.");

+			if (!isValidAlias(name)) throw new ArgumentError("name");
+
+			if (functionsMap[name])
+				throw new IllegalOperationError("Mapping with alias '" + name + "' already exists.");
+
 			functionsMap[name] = handler;
 		}

@@ -80,19 +115,34 @@
 			if (!_isAvailable)
 				throw new IllegalOperationError("External interface is not available.");

+			if (!isValidAlias(name)) throw new ArgumentError("name");
+
+			if (!functionsMap[name])
+				throw new IllegalOperationError("Mapping with alias '" + name + "' does not exist.");
+
 			delete functionsMap[name];
 		}

-		internal function doInvoke(name:String, params:Array):void
+		internal function doInvoke(name:String, params:Array = null):void
 		{
 			if (!_isAvailable)
 				throw new IllegalOperationError("External interface is not available.");

-			ExternalInterface.call("$FlashWarp", _id, "exec", [name, params]);
+			if (!isValidAlias(name)) throw new ArgumentError("name");
+
+			if (params == null)
+				params = [];
+
+			ExternalInterface.call(JAVASCRIPT_ENDPOINT, _id, "exec", [name, params]);
 		}

 		internal function doBinding(name:String):Observable
 		{
+			if (!_isAvailable)
+				throw new IllegalOperationError("External interface is not available.");
+
+			if (!isValidAlias(name)) throw new ArgumentError("name");
+
 			var observable:Observable = bidningsMap[name] as Observable;

 			if (observable == null)
@@ -106,17 +156,27 @@

 		//--------------------------------------------------------------------------
 		//
-		//  Private methods
-		//
-		//--------------------------------------------------------------------------
-
-		private function execHandler(name:String, params:Array):void
-		{
+		//  Event handlers
+		//
+		//--------------------------------------------------------------------------
+
+		private function execHandler(name:String, params:Array = null):void
+		{
+			if (!isValidAlias(name)) throw new ArgumentError("name");
+
+			if (!functionsMap[name])
+				throw new IllegalOperationError("Mapping with alias '" + name + "' does not exist.");
+
+			if (params == null)
+				params = [];
+
 			functionsMap[name].apply(null, params);
 		}

 		private function updateBindingHandler(name:String, value:*):void
 		{
+			if (!isValidAlias(name)) throw new ArgumentError("name");
+
 			doBinding(name).setValue(value);
 		}

@@ -126,7 +186,18 @@
 				return;

 			var binding:Observable = Observable(e.target);
-			ExternalInterface.call("$FlashWarp", _id, "updateBinding", [ binding.name, binding.value ]);
+			ExternalInterface.call(JAVASCRIPT_ENDPOINT, _id, "updateBinding", [ binding.name, binding.value ]);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Helper methods
+		//
+		//--------------------------------------------------------------------------
+
+		private static function isValidAlias(name:String):Boolean
+		{
+			return (name != null && name != "");
 		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

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

 package mx.core
 {


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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.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 spark.components
 {


Fix clean rules.

Fix clean rules.

	* src/tests/examples/urbi-send.as (medir): Fix its value.

--- sdk-remote/src/tests/examples/urbi-send.as
+++ sdk-remote/src/tests/examples/urbi-send.as
@@ -2,9 +2,9 @@
 URBI_INIT

 me=$as_me
-medir=$(echo "$as_me" | sed -e 's/\..*//').dir
+medir=$(absolute "$0").dir
 rm -rf $medir
-mkdir $medir
+mkdir -p $medir
 cd $medir
 xrun "--help"    urbi-send --help
 xrun "--version" urbi-send --version


Switched declarations from concrete classes to interfaces

--- asunit-4.0/src/asunit/runners/SuiteRunner.as
+++ asunit-4.0/src/asunit/runners/SuiteRunner.as
@@ -2,6 +2,7 @@

 	import asunit.framework.IResult;
 	import asunit.framework.IRunner;
+    import asunit.utils.Iterator;
 	import asunit.framework.SuiteIterator;

     import flash.display.DisplayObjectContainer;
@@ -19,8 +20,7 @@
 		public static var DEFAULT_TEST_RUNNER:Class = TestRunner;

 		protected var defaultRunner:IRunner;
-		protected var suiteRunner:SuiteRunner;
-		protected var testClasses:SuiteIterator;
+		protected var testClasses:Iterator;
 		protected var timer:Timer;
 		protected var result:IResult;
         protected var visualContext:DisplayObjectContainer;


Transferred from the Adobe Open Source Subversion Repository

Revision: 10828
Author:   jszeto@adobe.com
Date:     2009-10-02T17:41:48.523309Z

Log Message:
-----------
FXG stroke and fill translation fix

http://bugs.adobe.com/jira/browse/SDK-23257 - Gradient translation should occur from 0,0, not the upper left bounds

The current API only passes in the shape's bounds. I have added a new targetOrigin parameter to IFill.begin, IStroke.apply and IStroke.createGraphicsStroke of type Point. It is the origin (0,0) of the shape in the target graphic's coordinate space.

Changed the logic in the gradient stroke and fills. The x and y transform properties are now positioned relative to the origin instead of to the top left corner of the bounds. If no x and y are set, then the default behavior remains the same.

Removed the centering logic in LinearGradientStroke when scaleX was set.

This API change has been approved by PARB.

QE notes: Need to add tests that exercise this logic
Doc notes: Need to document additions to the API
Bugs: SDK-23257
Reviewer: Deepa
Tests run: spark/primitives, gumbo/components
Is noteworthy for integration: Yes, modifications to the API

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/FilledElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradient.as</path>

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

--- frameworks/projects/framework/src/mx/graphics/BitmapFill.as
+++ frameworks/projects/framework/src/mx/graphics/BitmapFill.as
@@ -824,7 +824,7 @@
 	/**
 	 *  @private
 	 */
-	public function begin(target:Graphics, bounds:Rectangle):void
+	public function begin(target:Graphics, targetBounds:Rectangle, targetOrigin:Point):void
 	{
         var sourceAsBitmapData:BitmapData = _bitmapData;

@@ -843,7 +843,7 @@
         if (compoundTransform)
         {
             transformMatrix = compoundTransform.matrix;
-            transformMatrix.translate(bounds.left, bounds.top);
+            transformMatrix.translate(targetBounds.left, targetBounds.top);
         }
         else
         {
@@ -852,21 +852,21 @@

             // If fillMode is scale and our bitmapdata width and height are > 0, scale to fill the content area
             if (fillMode == BitmapFillMode.SCALE && sourceAsBitmapData.width > 0 && sourceAsBitmapData.height > 0)
-                transformMatrix.scale((bounds.width/sourceAsBitmapData.width), (bounds.height/sourceAsBitmapData.height));
+                transformMatrix.scale((targetBounds.width/sourceAsBitmapData.width), (targetBounds.height/sourceAsBitmapData.height));

             transformMatrix.scale(scaleX, scaleY);
             transformMatrix.rotate(rotation * RADIANS_PER_DEGREES);
-            transformMatrix.translate(x + bounds.left + transformX, y + bounds.top + transformY);
+            transformMatrix.translate(x + targetBounds.left + transformX, y + targetBounds.top + transformY);
         }

         // If repeat is true, fillMode is repeat, or if the source bitmap size
-        // equals or exceeds the bounds, just use the source bitmap
+        // equals or exceeds the targetBounds, just use the source bitmap
         if (repeatFill ||
             (MatrixUtil.isDeltaIdentity(transformMatrix) &&
-             transformMatrix.tx == bounds.left &&
-             transformMatrix.ty == bounds.top &&
-             bounds.width <= sourceAsBitmapData.width &&
-             bounds.height <= sourceAsBitmapData.height))
+             transformMatrix.tx == targetBounds.left &&
+             transformMatrix.ty == targetBounds.top &&
+             targetBounds.width <= sourceAsBitmapData.width &&
+             targetBounds.height <= sourceAsBitmapData.height))
         {
             if (nonRepeatAlphaSource && nonRepeatSourceCreated)
             {
@@ -882,8 +882,8 @@
             // Regenerate the nonRepeatSource if it wasn't previously created or if the bounds
             // dimensions have changed.
             if (regenerateNonRepeatSource ||
-                lastBoundsWidth != bounds.width ||
-                lastBoundsHeight != bounds.height)
+                lastBoundsWidth != targetBounds.width ||
+                lastBoundsHeight != targetBounds.height)
             {
                 // Release the old bitmap data
                 if (nonRepeatAlphaSource)
@@ -923,8 +923,8 @@
                 // We need to restore both the matrix translation and the rotation translation
                 transformMatrix.translate(tx + bitmapTopLeft.x - 1, ty + bitmapTopLeft.y - 1);
                 // Save off the bounds so we can compare it the next time this function is called
-                lastBoundsWidth = bounds.width;
-                lastBoundsHeight = bounds.height;
+                lastBoundsWidth = targetBounds.width;
+                lastBoundsHeight = targetBounds.height;

                 nonRepeatSourceCreated = true;


Transferred from the Adobe Open Source Subversion Repository

Revision: 20845
Author:   mhorn@adobe.com
Date:     2011-03-14T15:29:23.391952Z

Log Message:
-----------
merge 20756,20790,20712,20805

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ISortField.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientBase.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodgeShader.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TabBar.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/StringUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="dir" action="M">/private/flex/sdk/trunk</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>

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

--- frameworks/projects/framework/src/mx/styles/CSSCondition.as
+++ frameworks/projects/framework/src/mx/styles/CSSCondition.as
@@ -122,7 +122,7 @@

     /**
      *  The value of this condition without any CSS syntax. To get a String
-     *  representation that includes CSS syntax, call the toString() method.
+     *  representation that includes CSS syntax, call the toString() method.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -186,6 +186,8 @@
     }

     /**
+     * Returns a String representation of this condition.
+     *
      *  @return A String representation of this condition, including CSS syntax.
      *
      *  @langversion 3.0


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

 package mx.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8487
Author:   smgilson@adobe.com
Date:     2009-07-09T18:57:21.985536Z

Log Message:
-----------
final checkin to update the namespace in ASDoc MXML syntax descriptions for Spark components

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/EaseInOutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.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/primitives/Graphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Wipe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GlowFilter.as</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/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Keyframe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/SetAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientFilter.as</path>

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

--- frameworks/projects/spark/src/spark/effects/easing/Power.as
+++ frameworks/projects/spark/src/spark/effects/easing/Power.as
@@ -23,7 +23,7 @@
  *
  *  @mxml
  *
- *
The <mx:Power> tag
+ *
The <s:Power> tag
  *  inherits all of the tag attributes of its of its superclass,
  *  and adds the following tag attributes:

  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 12942
Author:   gosmith@adobe.com
Date:     2009-12-15T04:55:43.884728Z

Log Message:
-----------
The trunk version of AccImpl once again uses the new AccConst constants and has @langversion etc. for its ASDoc comments. These changes were somehow lost in revision 12612 when some 3.x changes were merged.

QE notes: None
Doc notes: None
Bugs: None
Reviewer: Jon Avila
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccImpl.as

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

--- frameworks/projects/framework/src/mx/accessibility/AccImpl.as
+++ frameworks/projects/framework/src/mx/accessibility/AccImpl.as
@@ -18,6 +18,7 @@
 import flash.display.DisplayObjectContainer;
 import flash.events.Event;

+import mx.accessibility.AccConst;
 import mx.containers.Form;
 import mx.containers.FormHeading;
 import mx.containers.FormItem;
@@ -37,51 +38,15 @@
  *  The AccImpl class is Flex's base class for implementing accessibility
  *  in UIComponents.
  *  It is a subclass of the Flash Player's AccessibilityImplementation class.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class AccImpl extends AccessibilityImplementation
 {
     include "../core/Version.as";
-
-    //--------------------------------------------------------------------------
-    //
-    //  Class constants
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    private static const STATE_SYSTEM_NORMAL:uint = 0x00000000;
-
-    /**
-     *  @private
-     */
-    private static const STATE_SYSTEM_FOCUSABLE:uint = 0x00100000;
-
-    /**
-     *  @private
-     */
-    private static const STATE_SYSTEM_FOCUSED:uint = 0x00000004;
-
-    /**
-     *  @private
-     */
-    private static const STATE_SYSTEM_UNAVAILABLE:uint = 0x00000001;
-
-    /**
-     *  @private
-     */
-    private static const EVENT_OBJECT_NAMECHANGE:uint = 0x800C;
-
-    /**
-     *  @private
-     */
-    public static const EVENT_OBJECT_SHOW:uint = 0x8002;
-
-    /**
-     *  @private
-     */
-    private static const EVENT_OBJECT_HIDE:uint = 0x8003;

     //--------------------------------------------------------------------------
     //
@@ -91,7 +56,12 @@

     /**
      *  Method for supporting Form Accessibility.
-     */
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+	 */
     public static function getFormName(component:UIComponent):String
     {
         var formName:String = "";
@@ -197,6 +167,11 @@
      *
      *  @param master The UIComponent instance that this AccImpl instance
      *  is making accessible.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function AccImpl(master:UIComponent)
     {
@@ -231,11 +206,21 @@
     /**
      *  A reference to the UIComponent instance that this AccImpl instance
      *  is making accessible.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     protected var master:UIComponent;

     /**
      *  Accessibility role of the component being made accessible.
+	 *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     protected var role:uint;

@@ -248,6 +233,11 @@
     /**
      *  All subclasses must override this function by returning an array
      *  of strings of the events to listen for.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     protected function get eventsToHandle():Array
     {
@@ -357,6 +347,11 @@
      *  Returns the name of the accessible component.
      *  All subclasses must implement this
      *  instead of implementing get_accName().
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     protected function getName(childID:uint):String
     {
@@ -365,22 +360,27 @@

     /**
      *  Utility method to determine state of the accessible component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     protected function getState(childID:uint):uint
     {
-        var accState:uint = STATE_SYSTEM_NORMAL;
+        var accState:uint = AccConst.STATE_SYSTEM_NORMAL;

         if (!UIComponent(master).enabled)
         {
-            accState &= ~STATE_SYSTEM_FOCUSABLE;
-            accState |= STATE_SYSTEM_UNAVAILABLE;
+            accState &= ~AccConst.STATE_SYSTEM_FOCUSABLE;
+            accState |= AccConst.STATE_SYSTEM_UNAVAILABLE;
         }
         else
         {
-            accState |= STATE_SYSTEM_FOCUSABLE
+            accState |= AccConst.STATE_SYSTEM_FOCUSABLE

             if (UIComponent(master) == UIComponent(master).getFocus())
-                accState |= STATE_SYSTEM_FOCUSED;
+                accState |= AccConst.STATE_SYSTEM_FOCUSED;
         }

         return accState;
@@ -424,6 +424,11 @@
      *  Generic event handler.
      *  All AccImpl subclasses must implement this
      *  to listen for events from its master component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     protected function eventHandler(event:Event):void
     {
@@ -441,21 +446,24 @@
             case "errorStringChanged":
             case "toolTipChanged":
             {
-                Accessibility.sendEvent(master, 0, EVENT_OBJECT_NAMECHANGE);
+                Accessibility.sendEvent(master, 0,
+										AccConst.EVENT_OBJECT_NAMECHANGE);
                 Accessibility.updateProperties();
                 break;
             }

             case "show":
             {
-                Accessibility.sendEvent(master, 0, EVENT_OBJECT_SHOW);
+                Accessibility.sendEvent(master, 0,
+										AccConst.EVENT_OBJECT_SHOW);
                 Accessibility.updateProperties();
                 break;
             }

             case "hide":
             {
-                Accessibility.sendEvent(master, 0, EVENT_OBJECT_HIDE);
+                Accessibility.sendEvent(master, 0,
+										AccConst.EVENT_OBJECT_HIDE);
                 Accessibility.updateProperties();
                 break;
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 7109
Author:   jszeto@adobe.com
Date:     2009-05-20T04:13:55.843496Z

Log Message:
-----------
Added matrix support for gradient classes

SDK-20529 matrix property on LinearGradient and RadialGradient not implemented
SDK-21161 Gradient classes matrix and transform properties should remain in sync

Implemented the matrix property for the GradientBase classes (LinearGradient, LinearGradientStroke, RadialGradient, and RadialGradientStroke). Added a compoundTransform property which holds the matrix and the convenience transform properties (x, y, rotation). The gradient scaleX and scaleY properties represent pixels while the Matrix scale properties represent multipliers. Thus they are not compatible. Another difference is the most of the transform properties (x, y, scaleX, and scaleY) support NaN values while the matrix does not. A NaN value means that the gradient will choose an appropriate value.

By default, the matrix property is null. The scaleX and scaleY properties can not be represented by the matrix. The compoundTransform is only created when the matrix property is set. Once the matrix is set, scaleX and scaleY can no longer be set. Also, x and y can not be set to NaN. The matrix can be set back to null which also resets all of the convenience transform properties back to their default values.

If the matrix is set, then the gradient draw logic will scale the gradient to fit the bounds of the graphic element. It will then position the gradient in the upper left corner of the graphic element. Finally, it will apply the matrix transformations.

QE Notes: Add matrix tests
Doc Notes: Need to document behaviors described above
Bugs: SDK-20529, SDK-21161
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradient.as</path>

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

--- frameworks/projects/framework/src/mx/graphics/GradientBase.as
+++ frameworks/projects/framework/src/mx/graphics/GradientBase.as
@@ -18,6 +18,7 @@

 import mx.core.mx_internal;
 import mx.events.PropertyChangeEvent;
+import mx.geom.CompoundTransform;

 use namespace mx_internal;

@@ -122,6 +123,12 @@
         mx_internal::dispatchGradientChangedEvent(
                             "angle", oldValue, _angle);
     }
+
+    //----------------------------------
+    //  compoundTransform
+    //----------------------------------
+
+    protected var compoundTransform:CompoundTransform;

 	//----------------------------------
 	//  entries
@@ -238,7 +245,7 @@
      */
     public function get matrix():Matrix
     {
-        return _matrix;
+        return compoundTransform ? compoundTransform.matrix : null;
     }

     /**
@@ -246,11 +253,33 @@
      */
     public function set matrix(value:Matrix):void
     {
-    	var oldValue:Matrix = _matrix;
-       	_matrix = value.clone();
-
-       	// TODO!!! Handle overriding the rotation, x, y, scaleX, scaleY values
-       	dispatchGradientChangedEvent("matrix", oldValue, _matrix);
+    	var oldValue:Matrix = matrix;
+
+    	var oldScaleX:Number = scaleX;
+    	var oldX:Number = x;
+    	var oldY:Number = y;
+    	var oldRotation:Number = rotation;
+
+    	scaleX = NaN; // Clear scaleX
+
+    	if (value == null)
+    	{
+    		compoundTransform = null;
+    		x = NaN;
+    		y = NaN;
+    		rotation = 0;
+    	}
+    	else
+    	{
+	    	// Create the transform if none exists.
+	    	if(compoundTransform == null)
+	            compoundTransform = new CompoundTransform();
+	       	compoundTransform.matrix = value; // CompoundTransform will create a clone
+
+	       	dispatchGradientChangedEvent("x", oldX, compoundTransform.x);
+	       	dispatchGradientChangedEvent("y", oldY, compoundTransform.y);
+	       	dispatchGradientChangedEvent("rotation", oldRotation, compoundTransform.rotationZ);
+	    }
     }

     //----------------------------------
@@ -282,7 +311,7 @@
      */
     public function get rotation():Number
     {
-        return _rotation;
+        return compoundTransform ? compoundTransform.rotationZ : _rotation;
     }

     /**
@@ -290,10 +319,14 @@
      */
     public function set rotation(value:Number):void
     {
-        var oldValue:Number = _rotation;
-        if (value != oldValue)
+        if (value != rotation)
         {
-        	_rotation = value;
+        	var oldValue:Number = rotation;
+
+        	if (compoundTransform)
+                compoundTransform.rotationZ = value;
+        	else
+                _rotation = value;
         	dispatchGradientChangedEvent("rotation", oldValue, value);
         }
     }
@@ -302,7 +335,7 @@
     //----------------------------------
 	//  scaleX
 	//----------------------------------
-
+
     private var _scaleX:Number;

     [Bindable("propertyChange")]
@@ -326,10 +359,12 @@
 	 */
     public function set scaleX(value:Number):void
     {
-    	var oldValue:Number = _scaleX;
-    	if (value != oldValue)
+    	// Once a matrix is set, scaleX can no longer be set
+    	if (_scaleX != value && !compoundTransform)
     	{
-    		_scaleX = value;
+    		var oldValue:Number = scaleX;
+			_scaleX = value;
+
     		dispatchGradientChangedEvent("scaleX", oldValue, value);
     	}
     }
@@ -399,7 +434,7 @@
      */
     public function get x():Number
     {
-    	return _x;
+    	return compoundTransform ? compoundTransform.x : _x;
     }

 	/**
@@ -407,10 +442,19 @@
 	 */
     public function set x(value:Number):void
     {
-    	var oldValue:Number = _x;
+        var oldValue:Number = x;
     	if (value != oldValue)
     	{
-    		_x = value;
+    		if (compoundTransform)
+    		{
+    			// If we have a compoundTransform, only non-NaN values are allowed
+    			if (!isNaN(value))
+                    compoundTransform.x = value;
+    		}
+            else
+            {
+                _x = value;
+            }
     		dispatchGradientChangedEvent("x", oldValue, value);
     	}
     }
@@ -434,7 +478,7 @@
      */
     public function get y():Number
     {
-    	return _y;
+    	return compoundTransform ? compoundTransform.y : _y;
     }

     /**
@@ -442,17 +486,27 @@
      */
     public function set y(value:Number):void
     {
-    	var oldValue:Number = _y;
+    	var oldValue:Number = y;
     	if (value != oldValue)
     	{
-    		_y = value;
+    		if (compoundTransform)
+    		{
+    			// If we have a compoundTransform, only non-NaN values are allowed
+    		    if (!isNaN(value))
+                    compoundTransform.y = value;
+            }
+            else
+            {
+                _y = value;
+            }
+
     		dispatchGradientChangedEvent("y", oldValue, value);
     	}
     }

     mx_internal function get rotationInRadians():Number
     {
-    	return _rotation / 180 * Math.PI;
+    	return rotation / 180 * Math.PI;
     }

 	//--------------------------------------------------------------------------


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

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


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/mx/src/mx/skins/halo/ProgressTrackSkin.as
+++ frameworks/projects/mx/src/mx/skins/halo/ProgressTrackSkin.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2004-2006 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.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4883
Author:   dloverin@adobe.com
Date:     2009-02-06T23:31:50.172524Z

Log Message:
-----------
Update ASDoc comment for FxApplication's background property.
The background color is solid not a gradient.

QE Notes: None
Doc Notes: None
Bugs: SDK-18833
Reviewer: None
tests: checkintests

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxApplication.as

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

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -203,10 +203,8 @@

     /**
      *  Background color of a component.
-     *  This property specifies the background color while the application loads,
-     *  and a background gradient while it is running.
-     *  Flex calculates the gradient pattern between a color slightly darker than
-     *  the specified color, and a color slightly lighter than the specified color.
+     *  This property specifies the background color, both while the application
+     *  loads, and while it is running.
      */
     public function get backgroundColor():Object /* Color (int or String) */
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 9215
Author:   jszeto@adobe.com
Date:     2009-08-11T00:30:21.721484Z

Log Message:
-----------
Event Propagation bug fix

http://bugs.adobe.com/jira/browse/SDK-21044 - Spark Components should use event.preventDefault instead of event.stopPropagation

Since keyboard are now cancellable, the Spark components should use event.preventDefault() / event.isDefaultPrevented()  instead of event.stopPropagation. I updated ButtonBar, RadioButton, and DropDownList to use preventDefault(). Also cleaned up Slider and Spinner to always assume the event is cancellable.

QE notes: Add tests with these components inside of scrollable containers
Doc notes: None
Bugs: SDK-21044
Reviewer: Hans
Tests run: Slider, Spinner, RadioButton, ButtonBar, DropDownList
Is noteworthy for integration: No

Modified Paths:
--------------
<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/supportClasses/DropDownController.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/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>

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

--- frameworks/projects/spark/src/spark/components/RadioButton.as
+++ frameworks/projects/spark/src/spark/components/RadioButton.as
@@ -645,34 +645,36 @@
     {
         // Have to make sure we don't move to a radio button that's not enabled
         // because it's in a different container that is not enabled.
-
+        if (event.isDefaultPrevented())
+            return;
+
         switch (event.keyCode)
         {
             case Keyboard.DOWN:
             {
                 setNext(!event.ctrlKey);
-                event.stopPropagation();
+                event.preventDefault();
                 break;
             }

             case Keyboard.UP:
             {
                 setPrev(!event.ctrlKey);
-                event.stopPropagation();
+                event.preventDefault();
                 break;
             }

             case Keyboard.LEFT:
             {
                 setPrev(!event.ctrlKey);
-                event.stopPropagation();
+                event.preventDefault();
                 break;
             }

             case Keyboard.RIGHT:
             {
                 setNext(!event.ctrlKey);
-                event.stopPropagation();
+                event.preventDefault();
                 break;
             }


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

--- frameworks/projects/spark/src/spark/filters/GradientFilter.as
+++ frameworks/projects/spark/src/spark/filters/GradientFilter.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 spark.filters
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11657
Author:   rfrishbe@adobe.com
Date:     2009-11-11T17:24:23.830556Z

Log Message:
-----------
We need to set menu's automationParent/automationOwner.  This is needed for automation, and this was already in the MX Window/WindowedApplication but not in Spark Window/WIndowedApplication

QE notes: -
Doc notes: -
Bugs: SDK-23798
Reviewer: Darrell
Tests run: checkintest
Is noteworthy for integration: No

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

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

--- frameworks/projects/airframework/src/mx/core/WindowedApplication.as
+++ frameworks/projects/airframework/src/mx/core/WindowedApplication.as
@@ -1455,8 +1455,8 @@
     {
         if (_menu)
         {
+            _menu.automationParent = null;
             _menu.automationOwner = null;
-            _menu.automationParent = null;
         }

         _menu = value;


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

--- frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as
@@ -0,0 +1,1373 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.managers
+{
+
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import flash.events.MouseEvent;
+import flash.events.TimerEvent;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+import flash.utils.Timer;
+import mx.controls.ToolTip;
+import mx.core.ApplicationGlobals;
+import mx.core.IInvalidating;
+import mx.core.IToolTip;
+import mx.core.IUIComponent;
+import mx.core.mx_internal;
+import mx.effects.IAbstractEffect;
+import mx.effects.EffectManager;
+import mx.events.EffectEvent;
+import mx.events.ToolTipEvent;
+import mx.managers.IToolTipManagerClient;
+import mx.styles.IStyleClient;
+import mx.validators.IValidatorListener;
+
+use namespace mx_internal;
+
+[ExcludeClass]
+
+/**
+ *  @private
+ *  The ToolTipManager lets you set basic ToolTip and error tip functionality,
+ *  such as display delay and the disabling of ToolTips.
+ *
+ *  @see mx.controls.ToolTip
+ *  @see mx.validators.Validator
+ */
+public class ToolTipManagerImpl extends EventDispatcher
+             implements IToolTipManager2
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static var instance:IToolTipManager2;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public static function getInstance():IToolTipManager2
+    {
+        if (!instance)
+            instance = new ToolTipManagerImpl();
+
+        return instance;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public function ToolTipManagerImpl()
+    {
+        super();
+
+        if (instance)
+            throw new Error("Instance already exists.");
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  A flag that keeps track of whether this class's initialize()
+     *  method has been executed.
+     */
+    mx_internal var initialized:Boolean = false;
+
+    /**
+     *  @private
+     *  This timer is used to delay the appearance of a normal ToolTip
+     *  after the mouse moves over a target; an error tip has no such delay.
+     *
+     *
This timer, which is lazily created, is started when the mouse
+     *  moves over an object with a ToolTip, with a duration specified
+     *  by showDelay.
+     *  If the mouse moves out of this object before the timer fires,
+     *  the ToolTip is never created.
+     *  If the mouse stays over the object until the timer fires,
+     *  the ToolTip is created and its showEffect is started.
+     */
+    mx_internal var showTimer:Timer;
+
+    /**
+     *  @private
+     *  This timer is used to make the tooltip "time out" and hide itself
+     *  if the mouse stays over a target.
+     *
+     *
This timer, which is lazily created, is started
+     *  when the showEffect ends.
+     *  When it fires, the hideEffect is started.

+     */
+    mx_internal var hideTimer:Timer;
+
+    /**
+     *  @private
+     *  This timer is used to implement mousing quickly over multiple targets
+     *  with ToolTip...
+     *
+     *
This timer, which is lazily created, is started
+     *  when ...

+     */
+    mx_internal var scrubTimer:Timer;
+
+    /**
+     *  @private
+     */
+    mx_internal var currentText:String;
+
+    /**
+     *  @private
+     */
+    mx_internal var isError:Boolean;
+
+    /**
+     *  The UIComponent with the ToolTip assigned to it
+     *  that was most recently under the mouse.
+     *  During much of the tool tip life cycle this property
+     *  has the same value as the currentTarget property.
+     */
+    mx_internal var previousTarget:DisplayObject;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  currentTarget
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _currentTarget:DisplayObject;
+
+    /**
+     *  The UIComponent that is currently displaying a ToolTip,
+     *  or null if none is.
+     */
+    public function get currentTarget():DisplayObject
+    {
+        return _currentTarget;
+    }
+
+    /**
+     *  @private
+     */
+    public function set currentTarget(value:DisplayObject):void
+    {
+        _currentTarget = value;
+    }
+
+    //----------------------------------
+    //  currentToolTip
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _currentToolTip:IToolTip;
+
+    /**
+     *  The ToolTip object that is currently visible,
+     *  or null if none is shown.
+     */
+    public function get currentToolTip():IToolTip
+    {
+        return _currentToolTip;
+    }
+
+    /**
+     *  @private
+     */
+    public function set currentToolTip(value:IToolTip):void
+    {
+        _currentToolTip = value;
+    }
+
+    //----------------------------------
+    //  enabled
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _enabled:Boolean = true;
+
+    /**
+     *  If true, the ToolTipManager will automatically show
+     *  ToolTips when the user moves the mouse pointer over components.
+     *  If false, no ToolTips will be shown.
+     *
+     *  @default true
+     */
+    public function get enabled():Boolean
+    {
+        return _enabled;
+    }
+
+    /**
+     *  @private
+     */
+    public function set enabled(value:Boolean):void
+    {
+        _enabled = value;
+    }
+
+    //----------------------------------
+    //  hideDelay
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _hideDelay:Number = 10000; // milliseconds
+
+    /**
+     *  The amount of time, in milliseconds, that Flex waits
+     *  to hide the ToolTip after it appears.
+     *  Once Flex hides a ToolTip, the user must move the mouse
+     *  off the component and then back onto it to see the ToolTip again.
+     *  If you set hideDelay to Infinity,
+     *  Flex does not hide the ToolTip until the user triggers an event,
+     *  such as moving the mouse off of the component.
+     *
+     *  @default 10000
+     */
+    public function get hideDelay():Number
+    {
+        return _hideDelay;
+    }
+
+    /**
+     *  @private
+     */
+    public function set hideDelay(value:Number):void
+    {
+        _hideDelay = value;
+    }
+
+    //----------------------------------
+    //  hideEffect
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _hideEffect:IAbstractEffect;
+
+    /**
+     *  The effect that plays when a ToolTip is hidden,
+     *  or null if the ToolTip should disappear with no effect.
+     *
+     *  @default null
+     */
+    public function get hideEffect():IAbstractEffect
+    {
+        return _hideEffect;
+    }
+
+    /**
+     *  @private
+     */
+    public function set hideEffect(value:IAbstractEffect):void
+    {
+        _hideEffect = value as IAbstractEffect;
+    }
+
+    //----------------------------------
+    //  scrubDelay
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _scrubDelay:Number = 100; // milliseconds
+
+    /**
+     *  The amount of time, in milliseconds, that a user can take
+     *  when moving the mouse between controls before Flex again waits
+     *  for the duration of showDelay to display a ToolTip.
+     *
+     *
This setting is useful if the user moves quickly from one control
+     *  to another; after displaying the first ToolTip, Flex will display
+     *  the others immediately rather than waiting.
+     *  The shorter the setting for scrubDelay, the more
+     *  likely that the user must wait for an amount of time specified
+     *  by showDelay in order to see the next ToolTip.
+     *  A good use of this property is if you have several buttons on a
+     *  toolbar, and the user will quickly scan across them to see brief
+     *  descriptions of their functionality.

+     *
+     *  @default 100
+     */
+    public function get scrubDelay():Number
+    {
+        return _scrubDelay;
+    }
+
+    /**
+     *  @private
+     */
+    public function set scrubDelay(value:Number):void
+    {
+        _scrubDelay = value;
+    }
+
+    //----------------------------------
+    //  showDelay
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _showDelay:Number = 500; // milliseconds
+
+    /**
+     *  The amount of time, in milliseconds, that Flex waits
+     *  before displaying the ToolTip box once a user
+     *  moves the mouse over a component that has a ToolTip.
+     *  To make the ToolTip appear instantly, set showDelay to 0.
+     *
+     *  @default 500
+     */
+    public function get showDelay():Number
+    {
+        return _showDelay;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showDelay(value:Number):void
+    {
+        _showDelay = value;
+    }
+
+    //----------------------------------
+    //  showEffect
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _showEffect:IAbstractEffect;
+
+    /**
+     *  The effect that plays when a ToolTip is shown,
+     *  or null if the ToolTip should appear with no effect.
+     *
+     *  @default null
+     */
+    public function get showEffect():IAbstractEffect
+    {
+        return _showEffect;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showEffect(value:IAbstractEffect):void
+    {
+        _showEffect = value as IAbstractEffect;
+    }
+
+    //----------------------------------
+    //  toolTipClass
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _toolTipClass:Class = ToolTip;
+
+    /**
+     *  The class to use for creating ToolTips.
+     *
+     *  @default mx.controls.ToolTip
+     */
+    public function get toolTipClass():Class
+    {
+        return _toolTipClass;
+    }
+
+    /**
+     *  @private
+     */
+    public function set toolTipClass(value:Class):void
+    {
+        _toolTipClass = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Initializes the class.
+     *
+     *
This method sets up three Timer objects that ToolTipManager
+     *  starts and stops while tracking the mouse.
+     *  The repeatCount is set to 1 so that they fire only once.
+     *  Their duration is set later, just before they are started.
+     *  The timers are never destroyed once they are created here.

+     *
+     *
This method is called by targetChanged(); Flex waits to initialize
+     *  the class until mouse-tracking happens in order to optimize
+     *  startup time.

+     */
+    mx_internal function initialize():void
+    {
+        if (!showTimer)
+        {
+            showTimer = new Timer(0, 1);
+            showTimer.addEventListener(TimerEvent.TIMER,
+                                       showTimer_timerHandler);
+        }
+
+        if (!hideTimer)
+        {
+            hideTimer = new Timer(0, 1);
+            hideTimer.addEventListener(TimerEvent.TIMER,
+                                       hideTimer_timerHandler);
+        }
+
+        if (!scrubTimer)
+            scrubTimer = new Timer(0, 1);
+
+        initialized = true;
+    }
+
+    /**
+     *  Registers a target UIComponent or UITextField, and the text
+     *  for its ToolTip, with the ToolTipManager.
+     *  This causes the ToolTipManager to display a ToolTip
+     *  when the mouse hovers over the target.
+     *
+     *
This method is called by the setter
+     *  for the toolTip property in UIComponent and UITextField.

+     *
+     *  @param target The UIComponent or UITextField that owns the ToolTip.
+     *
+     *  @param oldToolTip The old text that was displayed
+     *  in the ToolTip.
+     *
+     *  @param newToolTip The new text to display in the ToolTip.
+     *  If null, no ToolTip will be displayed when the mouse hovers
+     *  over the target.
+     */
+    public function registerToolTip(target:DisplayObject,
+                                    oldToolTip:String,
+									newToolTip:String):void
+    {
+        if (!oldToolTip && newToolTip)
+        {
+            target.addEventListener(MouseEvent.MOUSE_OVER,
+                                    toolTipMouseOverHandler);
+            target.addEventListener(MouseEvent.MOUSE_OUT,
+                                    toolTipMouseOutHandler);
+
+            // If the mouse is already over the object
+            // that's getting a toolTip, show the tip.
+            if (mouseIsOver(target))
+            	showImmediately(target);
+        }
+        else if (oldToolTip && !newToolTip)
+        {
+            target.removeEventListener(MouseEvent.MOUSE_OVER,
+                                       toolTipMouseOverHandler);
+            target.removeEventListener(MouseEvent.MOUSE_OUT,
+                                       toolTipMouseOutHandler);
+
+            // If the mouse is over the object whose toolTip
+            // is being removed, hide the tip.
+            if (mouseIsOver(target))
+            	hideImmediately(target);
+        }
+    }
+
+    /**
+     *  Registers a target UIComponent, and the text
+     *  for its error tip, with the ToolTipManager.
+     *  This causes the ToolTipManager to display an error tip
+     *  when the mouse hovers over the target.
+     *
+     *
This method is called by the setter
+     *  for the errorString property in UIComponent.

+     *
+     *  @param target The UIComponent or UITextField that owns the ToolTip.
+     *
+     *  @param oldErrorString The old text that was displayed
+     *  in the error tip.
+     *
+     *  @param newErrorString The new text to display in the error tip.
+     *  If null, no error tip will be displayed when the mouse hovers
+     *  over the target.
+     */
+    public function registerErrorString(target:DisplayObject,
+                                        oldErrorString:String,
+										newErrorString:String):void
+    {
+        if (!oldErrorString && newErrorString)
+        {
+            target.addEventListener(MouseEvent.MOUSE_OVER,
+                                    errorTipMouseOverHandler);
+            target.addEventListener(MouseEvent.MOUSE_OUT,
+                                    errorTipMouseOutHandler);
+
+            // If the mouse is already over the object
+            // that's getting an errorTip, show the tip.
+            if (mouseIsOver(target))
+            	showImmediately(target);
+        }
+        else if (oldErrorString && !newErrorString)
+        {
+            target.removeEventListener(MouseEvent.MOUSE_OVER,
+                                       errorTipMouseOverHandler);
+            target.removeEventListener(MouseEvent.MOUSE_OUT,
+                                       errorTipMouseOutHandler);
+
+            // If the mouse is over the object whose toolTip
+            // is being removed, hide the tip.
+            if (mouseIsOver(target))
+            	hideImmediately(target);
+        }
+    }
+
+    /**
+     *  @private
+     *  Returns true if the mouse is over the specified target.
+     */
+    private function mouseIsOver(target:DisplayObject):Boolean
+    {
+    	if (!target || !target.stage)
+    		return false;
+
+    	return target.hitTestPoint(target.stage.mouseX,
+    							   target.stage.mouseY, true);
+    }
+
+    /**
+     *  @private
+     *  Shows the tip immediately when the toolTip or errorTip property
+     *  becomes non-null and the mouse is over the target.
+     */
+    private function showImmediately(target:DisplayObject):void
+    {
+    	var oldShowDelay:Number = ToolTipManager.showDelay;
+    	ToolTipManager.showDelay = 0;
+    	checkIfTargetChanged(target);
+    	ToolTipManager.showDelay = oldShowDelay;
+    }
+
+    /**
+     *  @private
+     *  Hides the tip immediately when the toolTip or errorTip property
+     *  becomes null and the mouse is over the target.
+     */
+    private function hideImmediately(target:DisplayObject):void
+    {
+    	checkIfTargetChanged(null);
+    }
+
+    /**
+     *  Replaces the ToolTip, if necessary.
+     *
+     *
Determines whether the UIComponent or UITextField object
+     *  with the ToolTip assigned to it that is currently under the mouse
+     *  pointer is the most recent such object.
+     *  If not, it removes the old ToolTip and displays the new one.

+     *
+     *  @param displayObject The UIComponent or UITextField that is currently under the mouse.
+     */
+    mx_internal function checkIfTargetChanged(displayObject:DisplayObject):void
+    {
+        if (!enabled)
+            return;
+
+        findTarget(displayObject);
+
+        if (currentTarget != previousTarget)
+        {
+            targetChanged();
+            previousTarget = currentTarget;
+        }
+    }
+
+    /**
+     *  Searches from the displayObject object up the chain
+     *  of parent objects until it finds a UIComponent or UITextField object
+     *  with a toolTip or errorString property.
+     *  Treats an empty string as a valid toolTip property.
+     *  Sets the currentTarget property.
+     */
+    mx_internal function findTarget(displayObject:DisplayObject):void
+    {
+        // Walk up the DisplayObject parent chain looking for a UIComponent
+        // with a toolTip or errorString property. Note that we stop
+        // even if we find a tooltip which is an empty string. Although
+        // we don't display empty tooltips, we have to track when we
+        // are over a movieclip with an empty tooltip so that we can
+        // hide any previous tooltip. This allows a child to set
+        // toolTip="" to "cancel" its parent's toolTip.
+        while (displayObject)
+        {
+            if (displayObject is IValidatorListener)
+            {
+                currentText = IValidatorListener(displayObject).errorString;
+                if (currentText != null && currentText != "")
+                {
+                    currentTarget = displayObject;
+                    isError = true;
+                    return;
+                }
+            }
+
+            if (displayObject is IToolTipManagerClient)
+            {
+                currentText = IToolTipManagerClient(displayObject).toolTip;
+                if (currentText != null)
+                {
+                    currentTarget = displayObject;
+                    isError = false;
+                    return;
+                }
+            }
+
+            displayObject = displayObject.parent;
+        }
+
+        currentText = null;
+        currentTarget = null;
+    }
+
+    /**
+     *  Removes any ToolTip that is currently displayed and displays
+     *  the ToolTip for the UIComponent that is currently under the mouse
+     *  pointer, as determined by the currentTarget property.
+     */
+    mx_internal function targetChanged():void
+    {
+        // Do lazy creation of the Timer objects this class uses.
+        if (!initialized)
+            initialize()
+
+        var event:ToolTipEvent;
+
+        if (previousTarget && currentToolTip)
+        {
+            event = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
+            event.toolTip = currentToolTip;
+            previousTarget.dispatchEvent(event);
+        }
+
+        reset();
+
+        if (currentTarget)
+        {
+            // Don't display empty tooltips.
+            if (currentText == "")
+                return;
+
+            // Dispatch a "startToolTip" event
+            // from the object displaying the tooltip.
+            event = new ToolTipEvent(ToolTipEvent.TOOL_TIP_START);
+            currentTarget.dispatchEvent(event);
+
+            if (showDelay == 0 || scrubTimer.running)
+            {
+                // Create the tooltip and start its showEffect.
+                createTip();
+                initializeTip();
+                positionTip();
+                showTip();
+            }
+            else
+            {
+                showTimer.delay = showDelay;
+                showTimer.start();
+                // After the delay, showTimer_timerHandler()
+                // will create the tooltip and start its showEffect.
+            }
+        }
+    }
+
+    /**
+     *  Creates an invisible new ToolTip.
+     *
+     *
If the ToolTipManager's enabled property is
+     *  true this method is automatically called
+     *  when the user moves the mouse over an object that has
+     *  the toolTip property set,
+     *  The ToolTipManager makes subsequent calls to
+     *  initializeTip(), positionTip(),
+     *  and showTip() to complete the display
+     *  of the ToolTip.

+     *
+     *
The type of ToolTip that is created is determined by the
+     *  toolTipClass property.
+     *  By default, this is the ToolTip class.
+     *  This class can be styled to appear as either a normal ToolTip
+     *  (which has a yellow background by default) or as an error tip
+     *  for validation errors (which is red by default).

+     *
+     *
After creating the ToolTip with the new
+     *  operator, this method stores a reference to it in the
+     *  currentToolTip property.
+     *  It then uses addChild() to add this ToolTip to the
+     *  SystemManager's toolTips layer.

+     */
+    mx_internal function createTip():void
+    {
+        // Dispatch a "createToolTip" event
+        // from the object displaying the tooltip.
+        var event:ToolTipEvent =
+            new ToolTipEvent(ToolTipEvent.TOOL_TIP_CREATE);
+        currentTarget.dispatchEvent(event);
+
+        if (event.toolTip)
+            currentToolTip = event.toolTip;
+        else
+            currentToolTip = new toolTipClass();
+
+        currentToolTip.visible = false;
+
+        var sm:ISystemManager = getSystemManager(currentTarget);
+        sm.toolTipChildren.addChild(DisplayObject(currentToolTip));
+    }
+
+    /**
+     *  Initializes a newly created ToolTip with the appropriate text,
+     *  based on the object under the mouse.
+     *
+     *
If the ToolTipManager's enabled property is
+     *  true this method is automatically called
+     *  when the user moves the mouse over an object that has
+     *  the toolTip property set.
+     *  The ToolTipManager calls createTip() before
+     *  this method, and positionTip() and
+     *  showTip() after.

+     *
+     *
If a normal ToolTip is being displayed, this method
+     *  sets its text as specified by the toolTip
+     *  property of the object under the mouse.
+     *  If an error tip is being displayed, the text is as
+     *  specified by the errorString property
+     *  of the object under the mouse.

+     *
+     *
This method also makes the ToolTip the appropriate
+     *  size for the text that it needs to display.

+     */
+    mx_internal function initializeTip():void
+    {
+        // Set the text of the tooltip.
+        if (currentToolTip is ToolTip)
+            ToolTip(currentToolTip).text = currentText;
+
+        if (isError && currentToolTip is IStyleClient)
+            IStyleClient(currentToolTip).setStyle("styleName", "errorTip");
+
+        sizeTip(currentToolTip);
+
+        if (currentToolTip is IStyleClient)
+        {
+            // Set up its "show" and "hide" effects.
+            if (showEffect)
+                IStyleClient(currentToolTip).setStyle("showEffect", showEffect);
+            if (hideEffect)
+                IStyleClient(currentToolTip).setStyle("hideEffect", hideEffect);
+        }
+
+        if (showEffect || hideEffect)
+        {
+            currentToolTip.addEventListener(EffectEvent.EFFECT_END,
+                                            effectEndHandler);
+        }
+    }
+
+    /**
+     *  @private
+     *  Objects added to the SystemManager's ToolTip layer don't get
+     *  automatically measured or sized, so ToolTipManager has to
+     *  measure it and set its size.
+     */
+    public function sizeTip(toolTip:IToolTip):void
+    {
+        // Force measure() to be called on the tooltip.
+        // Otherwise, its measured size will be 0.
+        if (toolTip is IInvalidating)
+            IInvalidating(toolTip).validateNow();
+
+        toolTip.setActualSize(
+            toolTip.getExplicitOrMeasuredWidth(),
+            toolTip.getExplicitOrMeasuredHeight());
+    }
+
+    /**
+     *  Positions a newly created and initialized ToolTip on the stage.
+     *
+     *
If the ToolTipManager's enabled property is
+     *  true this method is automatically called
+     *  when the user moves the mouse over an object that has
+     *  the toolTip property set.
+     *  The ToolTipManager calls createTip() and
+     *  initializeTip() before this method,
+     *  and showTip() after.

+     *
+     *
If a normal ToolTip is being displayed, this method positions
+     *  its upper-left corner near the lower-right of the arrow cursor.
+     *  This method ensures that the ToolTip is completely in view.
+     */
+    mx_internal function positionTip():void
+    {
+        var x:Number;
+        var y:Number;
+
+        var screenWidth:Number = currentToolTip.screen.width;
+        var screenHeight:Number = currentToolTip.screen.height;
+
+        if (isError)
+        {
+            var targetGlobalBounds:Rectangle = getGlobalBounds(currentTarget);
+
+            x = targetGlobalBounds.right + 4;
+            y = targetGlobalBounds.top - 1;
+
+            // If there's no room to the right of the control, put it above
+            // or below, with the left edge of the error tip aligned with
+            // the left edge of the target.
+            if (x + currentToolTip.width > screenWidth)
+            {
+                var newWidth:Number = NaN;
+                var oldWidth:Number = NaN;
+
+                x = targetGlobalBounds.left - 2;
+
+                // If the error tip would be too wide for the stage,
+                // reduce the maximum width to fit onstage. Note that
+                // we have to reassign the text in order to get the tip
+                // to relayout after changing the border style and maxWidth.
+                if (x + currentToolTip.width + 4 > screenWidth)
+                {
+                    newWidth = screenWidth - x - 4;
+                    oldWidth = Object(toolTipClass).maxWidth;
+                    Object(toolTipClass).maxWidth = newWidth;
+                    if (currentToolTip is IStyleClient)
+                        IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
+                    currentToolTip["text"] = currentToolTip["text"];
+                    Object(toolTipClass).maxWidth = oldWidth;
+                }
+
+                // Even if the error tip will fit onstage, we still need to
+                // change the border style and get the error tip to relayout.
+                else
+                {
+                    if (currentToolTip is IStyleClient)
+                        IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
+                    currentToolTip["text"] = currentToolTip["text"];
+                }
+
+                if (currentToolTip.height + 2 < targetGlobalBounds.top)
+                {
+                    // There's room to put it above the control.
+                    y = targetGlobalBounds.top - (currentToolTip.height + 2);
+                }
+                else
+                {
+                    // No room above, put it below the control.
+                    y = targetGlobalBounds.bottom + 2;
+
+                    if (!isNaN(newWidth))
+                        Object(toolTipClass).maxWidth = newWidth;
+                    if (currentToolTip is IStyleClient)
+                        IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipBelow");
+                    currentToolTip["text"] = currentToolTip["text"];
+                    if (!isNaN(oldWidth))
+                        Object(toolTipClass).maxWidth = oldWidth;
+                }
+            }
+
+            // Since the border style of the error tip may have changed,
+            // we have to force a remeasurement and change its size.
+            // This is because objects in the toolTips layer
+            // don't undergo normal measurement and layout.
+            sizeTip(currentToolTip)
+
+            // We might be loaded and offset.
+            var pos:Point = new Point(x, y);
+            var ctt:IToolTip = currentToolTip;
+            pos = DisplayObject(ctt).root.globalToLocal(pos);
+            x = pos.x;
+            y = pos.y;
+        }
+        else
+        {
+            // Position the upper-left of the tooltip
+            // at the lower-right of the arrow cursor.
+            x = ApplicationGlobals.application.mouseX + 11;
+            y = ApplicationGlobals.application.mouseY + 22;
+
+            // If the tooltip is too wide to fit onstage, move it left.
+            var toolTipWidth:Number = currentToolTip.width;
+            if (x + toolTipWidth > screenWidth)
+                x = screenWidth - toolTipWidth;
+
+            // If the tooltip is too tall to fit onstage, move it up.
+            var toolTipHeight:Number = currentToolTip.height;
+            if (y + toolTipHeight > screenHeight)
+                y = screenHeight - toolTipHeight;
+        }
+
+        currentToolTip.move(x, y);
+    }
+
+    /**
+     *  Shows a newly created, initialized, and positioned ToolTip.
+     *
+     *
If the ToolTipManager's enabled property is
+     *  true this method is automatically called
+     *  when the user moves the mouse over an object that has
+     *  the toolTip property set.
+     *  The ToolTipManager calls createTip(),
+     *  initializeTip(), and positionTip()
+     *  before this method.

+     *
+     *
This method first dispatches a "showToolTip"
+     *  event from the object under the mouse.
+     *  This gives you a chance to do special processing on a
+     *  particular object's ToolTip just before it becomes visible.
+     *  It then makes the ToolTip visible, which triggers
+     *  the ToolTipManager's showEffect if one is specified.
+     */
+    mx_internal function showTip():void
+    {
+        // Dispatch a "showToolTip" event
+        // from the object displaying the tooltip.
+        var event:ToolTipEvent =
+            new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOW);
+        event.toolTip = currentToolTip;
+        currentTarget.dispatchEvent(event);
+
+        if (isError)
+        {
+            // Listen for a change event so we know when to hide the tip
+            currentTarget.addEventListener("change", changeHandler);
+        }
+        else
+        {
+            var sm:ISystemManager = getSystemManager(currentTarget);
+            sm.addEventListener(MouseEvent.MOUSE_DOWN,
+                                systemManager_mouseDownHandler);
+        }
+
+        // Make the tooltip visible.
+        // If showEffect exists, this effect will play.
+        // When the effect ends, effectEndHandler()
+        // will start the hideTimer.
+        currentToolTip.visible = true;
+
+        if (!showEffect)
+            showEffectEnded();
+    }
+
+    /**
+     *  Hides the current ToolTip.
+     */
+    mx_internal function hideTip():void
+    {
+        // Dispatch a "hideToolTip" event
+        // from the object that was displaying the tooltip.
+        if (previousTarget)
+        {
+            var event:ToolTipEvent =
+                new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
+            event.toolTip = currentToolTip;
+            previousTarget.dispatchEvent(event);
+        }
+
+        // Make the tooltip invisible.
+        // If hideEffect exists, this effect will play.
+        // When the effect ends, effectEndHandler()
+        // will reset the ToolTipManager to a no-tip state.
+        if (currentToolTip)
+            currentToolTip.visible = false;
+
+        // When to do this?
+        if (isError)
+        {
+            if (currentTarget)
+                currentTarget.removeEventListener("change", changeHandler);
+        }
+        else
+        {
+            if (previousTarget)
+            {
+                var sm:ISystemManager = getSystemManager(previousTarget);
+                sm.removeEventListener(MouseEvent.MOUSE_DOWN,
+                                       systemManager_mouseDownHandler);
+            }
+        }
+
+        if (!hideEffect)
+            hideEffectEnded();
+    }
+
+    /**
+     *  Removes any currently visible ToolTip.
+     *  If the ToolTip is starting to show or hide, this method
+     *  removes the ToolTip immediately without completing the effect.
+     */
+    mx_internal function reset():void
+    {
+        // Reset the three timers, in case any are running.
+        showTimer.reset();
+        hideTimer.reset();
+
+        // If there is a current tooltip...
+        if (currentToolTip)
+        {
+            // Remove the event handlers for the effectEnd of the showEffect
+            // and hideEffect, so that calling endEffectsForTarget() doesn't
+            // trigger effectEndHandler().
+            if (showEffect || hideEffect)
+            {
+                currentToolTip.removeEventListener(EffectEvent.EFFECT_END,
+                                                   effectEndHandler);
+            }
+
+            // End any show or hide effects that might be playing on it.
+            EffectManager.endEffectsForTarget(currentToolTip);
+
+            // Remove it.
+            var sm:ISystemManager = currentToolTip.systemManager;
+            sm.toolTipChildren.removeChild(DisplayObject(currentToolTip));
+            currentToolTip = null;
+
+            scrubTimer.delay = scrubDelay;
+            scrubTimer.reset();
+            if (scrubDelay > 0)
+			{
+                scrubTimer.delay = scrubDelay;
+                scrubTimer.start();
+			}
+        }
+    }
+
+    /**
+     *  Creates an instance of the ToolTip class with the specified text
+     *  and displays it at the specified location in stage coordinates.
+     *
+     *
ToolTips appear in their own layer, on top of everything
+     *  except cursors.

+     *
+     *
The standard way of using ToolTips is to let the ToolTipManager
+     *  automatically show and hide them as the user moves the mouse over
+     *  the objects that have the toolTip property set.
+     *  You can turn off this automatic ToolTip management by setting
+     *  the ToolTipManager's enabled property to
+     *  false.

+     *
+     *
By contrast, this method—along with hideToolTip()—gives
+     *  you programmatic control over ToolTips.
+     *  You can show them when and where you choose,
+     *  and you can even show more than one at once if you need to.
+     *  (The ToolTipManager never does this, because it is generally
+     *  confusing to the user).

+     *
+     *
This method first creates a new instance of ToolTip and calls the
+     *  addChild() method to put it into the SystemManager's
+     *  toolTips layer.
+     *  If you are showing an error tip, it sets the appropriate styles.
+     *  Then it sets the text for the ToolTip, sizes the ToolTip based on
+     *  its text, and positions it where you specified.

+     *
+     *
You must save the reference to the ToolTip that this method
+     *  returns so that you can pass it to the hideToolTip() method.

+     *
+     *  @param text The text to display in the ToolTip instance.
+     *
+     *  @param x The horizontal coordinate of the ToolTip in stage coordinates.
+     *  In case of multiple stages, the relevant stage is determined
+     *  from the context argument.
+     *
+     *  @param y The vertical coordinate of the ToolTip in stage coordinates.
+     *  In case of multiple stages, the relevant stage is determined
+     *  from the context argument.
+     *
+     *  @param errorTipBorderStyle The border style of an error tip. This method
+     *  argument can be null, "errorTipRight", "errorTipAbove", or "errorTipBelow".
+     *  If it is null, then the createToolTip() method creates a normal ToolTip. If it is
+     *  "errorTipRight", "errorTipAbove", or "errorTipBelow", then the createToolTip()
+     *  method creates an error tip, and this parameter determines where the arrow
+     *  of the error tip points to (the error's target). For example, if you pass "errorTipRight", Flex
+     *  positions the error tip (via the x and y arguments) to the
+     *  right of the error target; the arrow is on the left edge of the error tip.
+     *
+     *  @param context This property is not currently used.
+     *
+     *  @return The newly created ToolTip.
+     *
+     */
+    public function createToolTip(text:String, x:Number, y:Number,
+                                         errorTipBorderStyle:String = null,
+                                         context:IUIComponent = null):IToolTip
+    {
+        var toolTip:ToolTip = new ToolTip();
+
+        var sm:ISystemManager = context ?
+                                context.systemManager :
+                                ApplicationGlobals.application.systemManager;
+        sm.toolTipChildren.addChild(toolTip);
+
+        if (errorTipBorderStyle)
+        {
+            toolTip.setStyle("styleName", "errorTip");
+            toolTip.setStyle("borderStyle", errorTipBorderStyle);
+        }
+
+        toolTip.text = text;
+
+        sizeTip(toolTip);
+
+        toolTip.move(x, y);
+        // Ensure that tip is on screen?
+        // Should x and y for error tip be tip of pointy border?
+
+        // show effect?
+
+        return toolTip as IToolTip;
+    }
+
+    /**
+     *  Destroys a specified ToolTip that was created by the createToolTip() method.
+     *
+     *
This method calls the removeChild() method to remove the specified
+     *  ToolTip from the SystemManager's ToolTips layer.
+     *  It will then be garbage-collected unless you keep a
+     *  reference to it.

+     *
+     *
You should not call this method on the ToolTipManager's
+     *  currentToolTip.

+     *
+     *  @param toolTip The ToolTip instance to destroy.
+     */
+    public function destroyToolTip(toolTip:IToolTip):void
+    {
+        var sm:ISystemManager = toolTip.systemManager;
+        sm.toolTipChildren.removeChild(DisplayObject(toolTip));
+
+        // hide effect?
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function showEffectEnded():void
+    {
+        if (hideDelay == 0)
+        {
+            hideTip();
+        }
+        else if (hideDelay < Infinity)
+        {
+            hideTimer.delay = hideDelay;
+            hideTimer.start();
+        }
+        if (currentTarget)
+        {
+            // Dispatch a "toolTipShown" event
+            // from the object displaying the tooltip.
+            var event:ToolTipEvent =
+                new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOWN);
+            event.toolTip = currentToolTip;
+            currentTarget.dispatchEvent(event);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function hideEffectEnded():void
+    {
+        reset();
+        // Dispatch a "toolTipEnd" event
+        // from the object that was displaying the tooltip.
+        if (previousTarget)
+        {
+            var event:ToolTipEvent =
+                new ToolTipEvent(ToolTipEvent.TOOL_TIP_END);
+            event.toolTip = currentToolTip;
+            previousTarget.dispatchEvent(event);
+        }
+    }
+
+    /**
+     *  @private
+     */
+     private function getSystemManager(
+                                    target:DisplayObject):ISystemManager
+     {
+        return target is IUIComponent ?
+               IUIComponent(target).systemManager :
+               null;
+     }
+
+    /**
+     *  @private
+     */
+    private function getGlobalBounds(obj:DisplayObject):Rectangle
+    {
+        var upperLeft:Point = new Point(0, 0);
+        upperLeft = obj.localToGlobal(upperLeft);
+        return new Rectangle(upperLeft.x, upperLeft.y, obj.width, obj.height);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  This handler is called when the mouse moves over an object
+     *  with a toolTip.
+     */
+    mx_internal function toolTipMouseOverHandler(event:MouseEvent):void
+    {
+        checkIfTargetChanged(DisplayObject(event.target));
+    }
+
+    /**
+     *  @private
+     *  This handler is called when the mouse moves out of an object
+     *  with a toolTip.
+     */
+    mx_internal function toolTipMouseOutHandler(event:MouseEvent):void
+    {
+        checkIfTargetChanged(event.relatedObject);
+    }
+
+    /**
+     *  @private
+     *  This handler is called when the mouse moves over an object
+     *  with an errorString.
+     */
+    mx_internal function errorTipMouseOverHandler(event:MouseEvent):void
+    {
+        checkIfTargetChanged(DisplayObject(event.target));
+    }
+
+    /**
+     *  @private
+     *  This handler is called when the mouse moves out of an object
+     *  with an errorString.
+     */
+    mx_internal function errorTipMouseOutHandler(event:MouseEvent):void
+    {
+        checkIfTargetChanged(event.relatedObject);
+    }
+
+    /**
+     *  @private
+     *  This handler is called when the showTimer fires.
+     *  It creates the tooltip and starts its showEffect.
+     */
+    mx_internal function showTimer_timerHandler(event:TimerEvent):void
+    {
+        // Make sure we still have a currentTarget when the timer fires.
+        if (currentTarget)
+        {
+            createTip();
+            initializeTip();
+            positionTip();
+            showTip();
+        }
+    }
+
+    /**
+     *  @private
+     *  This handler is called when the hideTimer fires.
+     *  It starts the hideEffect.
+     */
+    mx_internal function hideTimer_timerHandler(event:TimerEvent):void
+    {
+        hideTip();
+    }
+
+    /**
+     *  @private
+     *  This handler is called when the showEffect or hideEffect ends.
+     *  When the showEffect ends, it starts the hideTimer,
+     *  which will automatically start hiding the tooltip when it fires,
+     *  even if the mouse is still over the target.
+     *  When the hideEffect ends, the tooltip is removed.
+     */
+    mx_internal function effectEndHandler(event:EffectEvent):void
+    {
+        if (event.effectInstance.effect == showEffect)
+            showEffectEnded();
+        else if (event.effectInstance.effect == hideEffect)
+            hideEffectEnded();
+    }
+
+    /**
+     *  @private
+     *  This handler is called when the user clicks the mouse
+     *  while a normal tooltip is displayed.
+     *  It immediately hides the tooltip.
+     */
+    mx_internal function systemManager_mouseDownHandler(event:MouseEvent):void
+    {
+        reset();
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function changeHandler(event:Event):void
+    {
+        reset();
+    }
+}
+
+}