Transferred from the Adobe Open Source Subversion Repository

Revision: 88
Author:   open-source-svn-admin@adobe.com
Date:     2008-01-03T22:47:56.499469Z

Log Message:
-----------
Perforce Change 191925 by proberts@proberts-laptop-flex on 2008/01/03 16:47:12 Severity: ignore Details: doc additions/clean up for FlexNativeMenu. Also FLEXDOCS-320 (update documentation for FlexNativeMenuEvent.MENU_SHOW to explain that the index, label, and item properties are null) Affected files ...

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/air/air_version.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Consumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/NoChannelAvailableError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemHistoryButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/DirectHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemTree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/MessagingError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/InvalidChannelError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/MessageSerializationError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXContext.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/NetConnectionChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/Grammar.jj</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ConsumerMessageDispatcher.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/InvalidDestinationError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXResult.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractMessageStore.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as
+++ frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as
@@ -1,21 +1,14 @@
-/*************************************************************************
- *
- * ADOBE CONFIDENTIAL
- * __________________
- *
- *  [2002] - [2007] Adobe Systems Incorporated
- *  All Rights Reserved.
- *
- * NOTICE:  All information contained herein is, and remains
- * the property of Adobe Systems Incorporated and its suppliers,
- * if any.  The intellectual and technical concepts contained
- * herein are proprietary to Adobe Systems Incorporated
- * and its suppliers and may be covered by U.S. and Foreign Patents,
- * patents in process, and are protected by trade secret or copyright law.
- * Dissemination of this information or reproduction of this material
- * is strictly forbidden unless prior written permission is obtained
- * from Adobe Systems Incorporated.
- */
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.messaging.config
 {

@@ -234,4 +227,4 @@
     }
 }

-}+}


Optimize mesh cloning and merging.

Optimize mesh cloning and merging.

--- src/aerys/minko/scene/node/mesh/Mesh.as
+++ src/aerys/minko/scene/node/mesh/Mesh.as
@@ -84,9 +84,7 @@
 			vertexFormat ||= _vertexStream.format.clone();

 			var meshes				: Vector.<IMesh>			= Vector.<IMesh>([this])
-			var vertexComponents	: Vector.<VertexComponent>	= vertexFormat.componentList;
-			var mergedMesh			: IMesh						= createMesh(meshes, vertexComponents, vertexFormat);
-
+			var mergedMesh			: IMesh						= createMesh(meshes, vertexFormat);
 			return mergedMesh;
 		}

@@ -106,40 +104,41 @@
 		 */
 		public static function mergeMeshes(meshes : Vector.<IMesh>) : IMesh
 		{
-			var vertexFormat		: VertexFormat				= computeVertexFormat(meshes);
+			// insersect all meshes vertexformats
+			var numMeshes		: uint			= meshes.length;
+			var vertexFormat	: VertexFormat	= meshes[0].vertexStream.format.clone();
+
+			for (var meshId : uint = 1; meshId < numMeshes; ++meshId)
+			{
+				var mesh : IMesh = meshes[meshId];
+				vertexFormat.intersectWith(mesh.vertexStream.format);
+			}
+
 			var vertexComponents	: Vector.<VertexComponent>	= vertexFormat.componentList;
-			var mergedMesh			: IMesh						= createMesh(meshes, vertexComponents, vertexFormat);
+			var mergedMesh			: IMesh						= createMesh(meshes, vertexFormat);

 			return mergedMesh;
 		}

-		private static function computeVertexFormat(meshes : Vector.<IMesh>) : VertexFormat
+		private static function createMesh(meshes		: Vector.<IMesh>,
+										   vertexFormat	: VertexFormat) : IMesh
 		{
-			var newVertexFormat : VertexFormat = meshes[0].vertexStream.format.clone();

-			for each (var mesh : IMesh in meshes)
-				newVertexFormat.intersectWith(mesh.vertexStream.format);
+			var newIndexStreamData 			: Vector.<uint>				= new Vector.<uint>();
+			var newVertexStreamData			: Vector.<Number>			= new Vector.<Number>();

-			return newVertexFormat;
-		}
-
-		private static function createMesh(meshes			: Vector.<IMesh>,
-										   vertexComponents	: Vector.<VertexComponent>,
-										   vertexFormat		: VertexFormat) : IMesh
-		{
-			var newIndexStreamData 				: Vector.<uint>				= new Vector.<uint>();
-			var newVertexStreamData				: Vector.<Number>			= new Vector.<Number>();
-
-			var componentCount					: uint						= vertexComponents.length;
-			var vertexComponentOffsets			: Vector.<uint>				= new Vector.<uint>(componentCount, true);
-			var vertexComponentSizes			: Vector.<uint>				= new Vector.<uint>(componentCount, true);
-			var vertexComponentDwordsPerVertex	: Vector.<uint>				= new Vector.<uint>(componentCount, true);
-			var vertexComponentDatas			: Vector.<Vector.<Number>>	= new Vector.<Vector.<Number>>(componentCount, true);
+			var components					: Vector.<VertexComponent>	= vertexFormat.componentList;
+			var componentCount				: uint						= components.length;
+			var componentOffsets			: Vector.<uint>				= new Vector.<uint>(componentCount, true);
+			var componentSizes				: Vector.<uint>				= new Vector.<uint>(componentCount, true);
+			var componentDwordsPerVertex	: Vector.<uint>				= new Vector.<uint>(componentCount, true);
+			var componentDatas				: Vector.<Vector.<Number>>	= new Vector.<Vector.<Number>>(componentCount, true);

 			var meshCount : uint = meshes.length;
 			for (var i : uint = 0; i < meshCount; ++i)
 			{
-				var mesh		: IMesh				= meshes[i];
+				var mesh			: IMesh			= meshes[i];
+				var vertexStream	: IVertexStream	= mesh.vertexStream;

 				// append index data
 				var indexData	: Vector.<uint>		= mesh.indexStream.getIndices();
@@ -152,13 +151,14 @@
 				// get offsets, sizes, and buffers for components in the current mesh.
 				for (var k : uint = 0; k < componentCount; ++k)
 				{
-					var vertexComponent	: VertexComponent	= vertexComponents[k];
-					var vertexStream	: VertexStream		= mesh.vertexStream.getSubStreamByComponent(vertexComponent);
+					var vertexComponent	: VertexComponent	= components[k];
+					var subVertexStream	: VertexStream		= vertexStream.getSubStreamByComponent(vertexComponent);
+					var subvertexFormat	: VertexFormat		= subVertexStream.format;

-					vertexComponentOffsets[k]				= vertexStream.format.getOffsetForComponent(vertexComponent);
-					vertexComponentDwordsPerVertex[k]		= vertexStream.format.dwordsPerVertex;
-					vertexComponentSizes[k]					= vertexComponent.dwords;
-					vertexComponentDatas[k]					= vertexStream._data;
+					componentOffsets[k]			= subvertexFormat.getOffsetForComponent(vertexComponent);
+					componentDwordsPerVertex[k]	= subvertexFormat.dwordsPerVertex;
+					componentSizes[k]			= vertexComponent.dwords;
+					componentDatas[k]			= subVertexStream._data;
 				}

 				// push vertex data into the new buffer.
@@ -166,9 +166,9 @@
 				for (var vertexId : uint = 0; vertexId < vertexCount; ++vertexId)
 					for (var componentId : uint = 0; componentId < componentCount; ++componentId)
 					{
-						var vertexData		: Vector.<Number>	= vertexComponentDatas[componentId];
-						var componentSize	: uint				= vertexComponentSizes[componentId];
-						var componentOffset	: uint				= vertexComponentOffsets[componentId] + vertexId * vertexComponentDwordsPerVertex[componentId];
+						var vertexData		: Vector.<Number>	= componentDatas[componentId];
+						var componentSize	: uint				= componentSizes[componentId];
+						var componentOffset	: uint				= componentOffsets[componentId] + vertexId * componentDwordsPerVertex[componentId];
 						var componentLimit	: uint				= componentSize + componentOffset;

 						for (var n : uint = componentOffset; n < componentLimit; ++n)


added support for Array parameter in sum() and mean().

--- WeaveCore/src/weave/compiler/StandardLib.as
+++ WeaveCore/src/weave/compiler/StandardLib.as
@@ -462,6 +462,8 @@

 		public static function mean(...args):Number
 		{
+			if (args.length == 1 && args[0] is Array)
+				args = args[0];
 			var sum:Number = 0;
 			for each (var value:Number in args)
 				sum += value;
@@ -470,6 +472,8 @@

 		public static function sum(...args):Number
 		{
+			if (args.length == 1 && args[0] is Array)
+				args = args[0];
 			var sum:Number = 0;
 			for each (var value:Number in args)
 				sum += 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@1262790 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/utils/ColorUtil.as
+++ frameworks/projects/framework/src/mx/utils/ColorUtil.as
@@ -0,0 +1,138 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.utils
+{
+
+/**
+ *  The ColorUtil class is an all-static class
+ *  with methods for working with RGB colors within Flex.
+ *  You do not create instances of ColorUtil;
+ *  instead you simply call static methods such as
+ *  the ColorUtil.adjustBrightness() method.
+ */
+public class ColorUtil
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Performs a linear brightness adjustment of an RGB color.
+	 *
+	 *
The same amount is added to the red, green, and blue channels
+	 *  of an RGB color.
+	 *  Each color channel is limited to the range 0 through 255.

+	 *
+	 *  @param rgb Original RGB color.
+	 *
+	 *  @param brite Amount to be added to each color channel.
+	 *  The range for this parameter is -255 to 255;
+	 *  -255 produces black while 255 produces white.
+	 *  If this parameter is 0, the RGB color returned
+	 *  is the same as the original color.
+	 *
+	 *  @return New RGB color.
+	 */
+	public static function adjustBrightness(rgb:uint, brite:Number):uint
+	{
+		var r:Number = Math.max(Math.min(((rgb >> 16) & 0xFF) + brite, 255), 0);
+		var g:Number = Math.max(Math.min(((rgb >> 8) & 0xFF) + brite, 255), 0);
+		var b:Number = Math.max(Math.min((rgb & 0xFF) + brite, 255), 0);
+
+		return (r << 16) | (g << 8) | b;
+	}
+
+	/**
+	 *  Performs a scaled brightness adjustment of an RGB color.
+	 *
+	 *  @param rgb Original RGB color.
+	 *
+	 *  @param brite The percentage to brighten or darken the original color.
+	 *  If positive, the original color is brightened toward white
+	 *  by this percentage. If negative, it is darkened toward black
+	 *  by this percentage.
+	 *  The range for this parameter is -100 to 100;
+	 *  -100 produces black while 100 produces white.
+	 *  If this parameter is 0, the RGB color returned
+	 *  is the same as the original color.
+	 *
+	 *  @return New RGB color.
+	 */
+	public static function adjustBrightness2(rgb:uint, brite:Number):uint
+	{
+		var r:Number;
+		var g:Number;
+		var b:Number;
+
+		if (brite == 0)
+			return rgb;
+
+		if (brite < 0)
+		{
+			brite = (100 + brite) / 100;
+			r = ((rgb >> 16) & 0xFF) * brite;
+			g = ((rgb >> 8) & 0xFF) * brite;
+			b = (rgb & 0xFF) * brite;
+		}
+		else // bright > 0
+		{
+			brite /= 100;
+			r = ((rgb >> 16) & 0xFF);
+			g = ((rgb >> 8) & 0xFF);
+			b = (rgb & 0xFF);
+
+			r += ((0xFF - r) * brite);
+			g += ((0xFF - g) * brite);
+			b += ((0xFF - b) * brite);
+
+			r = Math.min(r, 255);
+			g = Math.min(g, 255);
+			b = Math.min(b, 255);
+		}
+
+		return (r << 16) | (g << 8) | b;
+	}
+
+	/**
+	 *  Performs an RGB multiplication of two RGB colors.
+	 *
+	 *
This always results in a darker number than either
+	 *  original color unless one of them is white,
+	 *  in which case the other color is returned.

+	 *
+	 *  @param rgb1 First RGB color.
+	 *
+	 *  @param rgb2 Second RGB color.
+	 *
+	 *  @return RGB multiplication of the two colors.
+	 */
+	public static function rgbMultiply(rgb1:uint, rgb2:uint):uint
+	{
+		var r1:Number = (rgb1 >> 16) & 0xFF;
+		var g1:Number = (rgb1 >> 8) & 0xFF;
+		var b1:Number = rgb1 & 0xFF;
+
+		var r2:Number = (rgb2 >> 16) & 0xFF;
+		var g2:Number = (rgb2 >> 8) & 0xFF;
+		var b2:Number = rgb2 & 0xFF;
+
+		return ((r1 * r2 / 255) << 16) |
+			   ((g1 * g2 / 255) << 8) |
+			    (b1 * b2 / 255);
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 7862
Author:   jszeto@adobe.com
Date:     2009-06-15T22:06:23.250745Z

Log Message:
-----------
GraphicElement PARB Changes

mx.core.AdvancedLayoutFeatures
•	Rename layer -> depth
•	Rename offsets -> postLayoutTransformOffsets

mx.core.IVisualElement
•	Rename layer -> depth

mx.core.UIComponent
•	Rename offsets -> postLayoutTransformOffsets
•	Rename layer -> depth

mx.graphics.GradientBase
•	Remove scaleX

mx.graphics.GradientStroke
•	Add apply(g:Graphics, bounds:Rectangle)

mx.graphics.IStroke
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.graphics.LinearGradient
•	Add scaleX

mx.graphics.LinearGradientStroke
•	Add scaleX
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.graphics.RadialGradient
•	Add scaleX

mx.graphics.RadialGradientStroke
•	Add scaleX
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.graphics.SolidColorStroke
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.flash.UIMovieClip
•	Rename offsets -> postLayoutTransformOffsets
•	Rename layer -> depth

spark.components.PopUpAnchor
•	Change popUp type from UIComponent -> IFlexDisplayObject
•	Rename positionPopUp -> calculatePopUpPosition
•	Rename autoSizePopUpWidth -> popUpWidthMatchesAnchorWidth
•	Rename autoSizePopUpHeight -> popUpHeightMatchesAnchorHeight

spark.core.RelativePosition
•	Rename and move spark.core.RelativePosition -> spark.components.PopUpPosition
•	Rename EXACT -> TOP_LEFT (topLeft)

spark.core.SpriteVisualElement
•	Rename layer -> depth
•	Remove computeMatrix

spark.primitives.BitmapImage
•	Change _NORMAL_UINT from protected -> private
•	Change _REPEAT_UINT from protected -> private
•	Change _SCALE_UINT from protected -> private
•	Change resizeModeToUINT from protected -> private
•	Rename drawElement -> draw

spark.primitives.Line
•	Rename skipMeasure -> canSkipMeasurement
•	Rename drawElement -> draw

spark.primitives.Path
•	Change graphicsPath fro protected -> mx_internal
•	Rename skipMeasure -> canSkipMeasurement
•	Rename drawElement -> draw
•	Rename renderGraphicsAtScale -> generateGraphicsPath
•	Change generateGraphicsPath from protected -> mx_internal
•	Rename notifyElementLayerChanged -> invalidateDisplayObjectSharing

spark.primitives.Rect
•	Rename drawElement -> draw

spark.primitives.supportClasses.GraphicElement
•	Rename layer -> depth
•	Rename offsets -> postLayoutTransformOffsets
•	Rename getBitmapData -> captureBitmapData
•	Rename notifyElementLayerChanged -> invalidateDisplayObjectSharing
•	Rename skipMeasure -> canSkipMeasurement
•	Add protected hasComplexLayoutMatrix:Boolean getter
•	Remove target
•	Remove computeMatrix
•	Change DEFAULT_MAX_WIDTH from public -> private
•	Change DEFAULT_MAX_HEIGHT from public -> private
•	Change DEFAULT_MIN_WIDTH from public -> private
•	Change DEFAULT_MIN_HEIGHT from public -> private
•	Change allocateLayoutFeatures from protected -> mx_internal
•	Change invalidateTransform from protected -> private
•	Change captureBitmapData from public -> mx_internal
•	Change applyMaskType from protected -> mx_internal
•	Change dispatchPropertyChangeEvent from protected -> private
•	Change applyComputedTransform from protected -> mx_internal
•	Change filterChangedHandler from protected -> private

spark.supportClasses.StrokedElement
•	Rename drawElement -> draw
•	Remove getStroke()
•	Add getStrokeExtents() override

QE Notes: None
Doc Notes: None
Bugs: N/A
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/TransformOffsets.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/FilledElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransitionShader.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/framework/src/mx/core/UIComponent.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/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.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/SolidColorStroke.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/flex4/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradient.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/flex4/src/spark/components/supportClasses/GroupBase.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/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -827,7 +827,7 @@
 	            // Do a special check for layer, we may stumble upon an element with layer != 0
 	            // before we're done with the current shared sequence and we don't want to mark
 	            // the sequence as valid, until we reach the next sequence.
-                if (element.layer == 0)
+                if (element.depth == 0)
                 {
                     // Is this the start of a new shared sequence?
 	            	if (element.sharedIndex <= 0)
@@ -1220,7 +1220,7 @@
         if (layout)
             layout.elementAdded(index);

-        if (element.layer != 0)
+        if (element.depth != 0)
             invalidateLayering();

         // Set the font context in non-UIComponent children.
@@ -1471,7 +1471,7 @@

             if (layeringMode != ITEM_ORDERED_LAYERING)
             {
-                var layer:Number = item.layer;
+                var layer:Number = item.depth;
                 if (layer != 0)
                 {
                     if (layer > 0)


Transferred from the Adobe Open Source Subversion Repository

Revision: 17670
Author:   tkraikit@adobe.com
Date:     2010-09-10T23:08:24.545814Z

Log Message:
-----------
Fix for bug 27053: Spark Panel now has correcty metadata for its states

QE notes: Jacob has been notified that mustella test breaks due to test not implementing a state that is now required
Doc notes: n/a
Bugs: SDK-27053
Reviewer: Jason, Corey
Tests run: checkintests, mustella via cyclone server
Is noteworthy for integration: n/a

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

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

--- frameworks/projects/spark/src/spark/components/Panel.as
+++ frameworks/projects/spark/src/spark/components/Panel.as
@@ -11,247 +11,181 @@

 package spark.components
 {
-
-import mx.core.IVisualElement;
-import mx.core.mx_internal;
-import mx.utils.BitFlagUtil;
-
-import spark.core.IDisplayText;
-import spark.layouts.supportClasses.LayoutBase;
-
-use namespace mx_internal;
-
-//--------------------------------------
-//  Styles
-//--------------------------------------
-
-/**
- *  The alpha of the border for this component.
- *
- *  @default 0.5
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Style(name="borderAlpha", type="Number", inherit="no", theme="spark")]
-
-/**
- *  The color of the border for this component.
- *
- *  @default 0
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Style(name="borderColor", type="uint", format="Color", inherit="no", theme="spark")]
-
-/**
- *  Controls the visibility of the border for this component.
- *
- *  @default true
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Style(name="borderVisible", type="Boolean", inherit="no", theme="spark")]
-
-/**
- *  The radius of the corners for this component.
- *
- *  @default 0
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="spark")]
-
-/**
- *  Controls the visibility of the drop shadow for this component.
- *
- *  @default true
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Style(name="dropShadowVisible", type="Boolean", inherit="no", theme="spark")]
-
-//--------------------------------------
-//  Other metadata
-//--------------------------------------
-
-[AccessibilityClass(implementation="spark.accessibility.PanelAccImpl")]
-
-[IconFile("Panel.png")]
-
-/**
- * Because this component does not define a skin for the mobile theme, Adobe
- * recommends that you not use it in a mobile application. Alternatively, you
- * can define your own mobile skin for the component. For more information,
- * see Spark Skinning.
- */
-[DiscouragedForProfile("mobileDevice")]
-
-/**
- *  The Panel class defines a container that includes a title bar,
- *  a caption, a border, and a content area for its children.
- *
- *
The panel container has the following default characteristics:

- *

- *
Characteristic	Description

- *
Default size	Large enough to display its children

- *
Minimum size	131 pixels wide and 127 pixels high

- *
Maximum size	10000 pixels wide and 10000 pixels high

- *

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

- *
- *

- *  <s:Panel
- *   Properties
- *    controlBarContent="null"
- *    controlBarLayout="HorizontalLayout"
- *    controlBarVisible="true"
- *    title=""
- *
- *   Styles
- *    borderAlpha="0.5"
- *    borderColor="0"
- *    borderVisible="true"
- *    cornerRadius="0"
- *    dropShadowVisible="true"
- *   >
- *      ...
- *      child tags
- *      ...
- *  </s:Panel>
- *

- *
- *  @includeExample examples/PanelExample.mxml
- *
- *  @see SkinnableContainer
- *  @see spark.skins.spark.PanelSkin
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-public class Panel extends SkinnableContainer
-{
-    include "../core/Version.as";
-
-    //--------------------------------------------------------------------------
-    //
-    //  Class constants
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    mx_internal static const CONTROLBAR_PROPERTY_FLAG:uint = 1 << 0;
-
-    /**
-     *  @private
-     */
-    mx_internal static const LAYOUT_PROPERTY_FLAG:uint = 1 << 1;
-
-    /**
-     *  @private
-     */
-    mx_internal static const VISIBLE_PROPERTY_FLAG:uint = 1 << 2;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Class mixins
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  Placeholder for mixin by PanelAccImpl.
-     */
-    mx_internal static var createAccessibilityImplementation:Function;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  Constructor.
+
+    import mx.core.IVisualElement;
+    import mx.core.mx_internal;
+    import mx.utils.BitFlagUtil;
+
+    import spark.core.IDisplayText;
+    import spark.layouts.supportClasses.LayoutBase;
+
+    use namespace mx_internal;
+
+    //--------------------------------------
+    //  Styles
+    //--------------------------------------
+
+    /**
+     *  The alpha of the border for this component.
+     *
+     *  @default 0.5
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    [Style(name="borderAlpha", type="Number", inherit="no", theme="spark")]
+
+    /**
+     *  The color of the border for this component.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    [Style(name="borderColor", type="uint", format="Color", inherit="no", theme="spark")]
+
+    /**
+     *  Controls the visibility of the border for this component.
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    [Style(name="borderVisible", type="Boolean", inherit="no", theme="spark")]
+
+    /**
+     *  The radius of the corners for this component.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    [Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="spark")]
+
+    /**
+     *  Controls the visibility of the drop shadow for this component.
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    [Style(name="dropShadowVisible", type="Boolean", inherit="no", theme="spark")]
+
+    //--------------------------------------
+    //  Skin states
+    //--------------------------------------
+
+    /**
+     *  Normal State of the Panel
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function Panel()
-    {
-        super();
-
-        // default skin uses graphical dropshadow which
-        // we don't want to be hittable
-        mouseEnabled = false;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Variables
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  Several properties are proxied to controlBarGroup.  However, when controlBarGroup
-     *  is not around, we need to store values set on SkinnableContainer.  This object
-     *  stores those values.  If controlBarGroup is around, the values are stored
-     *  on the controlBarGroup directly.  However, we need to know what values
-     *  have been set by the developer on the SkinnableContainer (versus set on
-     *  the controlBarGroup or defaults of the controlBarGroup) as those are values
-     *  we want to carry around if the controlBarGroup changes (via a new skin).
-     *  In order to store this info effeciently, controlBarGroupProperties becomes
-     *  a uint to store a series of BitFlags.  These bits represent whether a
-     *  property has been explicitely set on this SkinnableContainer.  When the
-     *  controlBarGroup is not around, controlBarGroupProperties is a typeless
-     *  object to store these proxied properties.  When controlBarGroup is around,
-     *  controlBarGroupProperties stores booleans as to whether these properties
-     *  have been explicitely set or not.
-     */
-    mx_internal var controlBarGroupProperties:Object = { visible: true };
-
-    //--------------------------------------------------------------------------
-    //
-    //  Skin parts
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  controlBarGroup
-    //----------------------------------
-
-    [SkinPart(required="false")]
-
-    /**
-     *  The skin part that defines the appearance of the
-     *  control bar area of the container.
-     *  By default, the PanelSkin class defines the control bar area to appear at the bottom
-     *  of the content area of the Panel container with a grey background.
-     *
+    [SkinState("normal")]
+
+    /**
+     *  Disabled State of the Panel
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    [SkinState("disabled")]
+
+    /**
+     *  Normal State with ControlBar of the Panel
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    [SkinState("normalWithControlBar")]
+
+    /**
+     *  Disabled State with ControlBar of the Panel
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    [SkinState("disabledWithControlBar")]
+
+    //--------------------------------------
+    //  Other metadata
+    //--------------------------------------
+
+    [AccessibilityClass(implementation="spark.accessibility.PanelAccImpl")]
+
+    [IconFile("Panel.png")]
+
+    /**
+     * Because this component does not define a skin for the mobile theme, Adobe
+     * recommends that you not use it in a mobile application. Alternatively, you
+     * can define your own mobile skin for the component. For more information,
+     * see Spark Skinning.
+     */
+    [DiscouragedForProfile("mobileDevice")]
+
+    /**
+     *  The Panel class defines a container that includes a title bar,
+     *  a caption, a border, and a content area for its children.
+     *
+     *
The panel container has the following default characteristics:

+     *

+     *
Characteristic	Description

+     *
Default size	Large enough to display its children

+     *
Minimum size	131 pixels wide and 127 pixels high

+     *
Maximum size	10000 pixels wide and 10000 pixels high

+     *

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

+     *
+     *

+     *  <s:Panel
+     *   Properties
+     *    controlBarContent="null"
+     *    controlBarLayout="HorizontalLayout"
+     *    controlBarVisible="true"
+     *    title=""
+     *
+     *   Styles
+     *    borderAlpha="0.5"
+     *    borderColor="0"
+     *    borderVisible="true"
+     *    cornerRadius="0"
+     *    dropShadowVisible="true"
+     *   >
+     *      ...
+     *      child tags
+     *      ...
+     *  </s:Panel>
+     *

+     *
+     *  @includeExample examples/PanelExample.mxml
+     *
+     *  @see SkinnableContainer
      *  @see spark.skins.spark.PanelSkin
      *
      *  @langversion 3.0
@@ -259,341 +193,451 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public var controlBarGroup:Group;
-
-    //----------------------------------
-    //  titleField
-    //----------------------------------
-
-    [SkinPart(required="false")]
-
-    /**
-     *  The skin part that defines the appearance of the
-     *  title text in the container.
-     *
-     *  @see spark.skins.spark.PanelSkin
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public var titleDisplay:IDisplayText;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden properties: UIComponent
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  baselinePosition
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    override public function get baselinePosition():Number
+    public class Panel extends SkinnableContainer
     {
-        return getBaselinePositionForPart(titleDisplay as IVisualElement);
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  controlBarContent
-    //----------------------------------
-
-    [ArrayElementType("mx.core.IVisualElement")]
-
-    /**
-     *  The set of components to include in the control bar area of the
-     *  Panel container.
-     *  The location and appearance of the control bar area of the Panel container
-     *  is determined by the spark.skins.spark.PanelSkin class.
-     *  By default, the PanelSkin class defines the control bar area to appear at the bottom
-     *  of the content area of the Panel container with a grey background.
-     *  Create a custom skin to change the default appearance of the control bar.
-     *
-     *  @default null
-     *
-     *  @see spark.skins.spark.PanelSkin
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get controlBarContent():Array
-    {
-        if (controlBarGroup)
-            return controlBarGroup.getMXMLContent();
-        else
-            return controlBarGroupProperties.controlBarContent;
+        include "../core/Version.as";
+
+        //--------------------------------------------------------------------------
+        //
+        //  Class constants
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         */
+        mx_internal static const CONTROLBAR_PROPERTY_FLAG:uint = 1 << 0;
+
+        /**
+         *  @private
+         */
+        mx_internal static const LAYOUT_PROPERTY_FLAG:uint = 1 << 1;
+
+        /**
+         *  @private
+         */
+        mx_internal static const VISIBLE_PROPERTY_FLAG:uint = 1 << 2;
+
+        //--------------------------------------------------------------------------
+        //
+        //  Class mixins
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         *  Placeholder for mixin by PanelAccImpl.
+         */
+        mx_internal static var createAccessibilityImplementation:Function;
+
+        //--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function Panel()
+        {
+            super();
+
+            // default skin uses graphical dropshadow which
+            // we don't want to be hittable
+            mouseEnabled = false;
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Variables
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         *  Several properties are proxied to controlBarGroup.  However, when controlBarGroup
+         *  is not around, we need to store values set on SkinnableContainer.  This object
+         *  stores those values.  If controlBarGroup is around, the values are stored
+         *  on the controlBarGroup directly.  However, we need to know what values
+         *  have been set by the developer on the SkinnableContainer (versus set on
+         *  the controlBarGroup or defaults of the controlBarGroup) as those are values
+         *  we want to carry around if the controlBarGroup changes (via a new skin).
+         *  In order to store this info effeciently, controlBarGroupProperties becomes
+         *  a uint to store a series of BitFlags.  These bits represent whether a
+         *  property has been explicitely set on this SkinnableContainer.  When the
+         *  controlBarGroup is not around, controlBarGroupProperties is a typeless
+         *  object to store these proxied properties.  When controlBarGroup is around,
+         *  controlBarGroupProperties stores booleans as to whether these properties
+         *  have been explicitely set or not.
+         */
+        mx_internal var controlBarGroupProperties:Object = { visible: true };
+
+        //--------------------------------------------------------------------------
+        //
+        //  Skin parts
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  controlBarGroup
+        //----------------------------------
+
+        [SkinPart(required="false")]
+
+        /**
+         *  The skin part that defines the appearance of the
+         *  control bar area of the container.
+         *  By default, the PanelSkin class defines the control bar area to appear at the bottom
+         *  of the content area of the Panel container with a grey background.
+         *
+         *  @see spark.skins.spark.PanelSkin
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public var controlBarGroup:Group;
+
+        //----------------------------------
+        //  titleField
+        //----------------------------------
+
+        [SkinPart(required="false")]
+
+        /**
+         *  The skin part that defines the appearance of the
+         *  title text in the container.
+         *
+         *  @see spark.skins.spark.PanelSkin
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public var titleDisplay:IDisplayText;
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden properties: UIComponent
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  baselinePosition
+        //----------------------------------
+
+        /**
+         *  @private
+         */
+        override public function get baselinePosition():Number
+        {
+            return getBaselinePositionForPart(titleDisplay as IVisualElement);
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Properties
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  controlBarContent
+        //----------------------------------
+
+        [ArrayElementType("mx.core.IVisualElement")]
+
+        /**
+         *  The set of components to include in the control bar area of the
+         *  Panel container.
+         *  The location and appearance of the control bar area of the Panel container
+         *  is determined by the spark.skins.spark.PanelSkin class.
+         *  By default, the PanelSkin class defines the control bar area to appear at the bottom
+         *  of the content area of the Panel container with a grey background.
+         *  Create a custom skin to change the default appearance of the control bar.
+         *
+         *  @default null
+         *
+         *  @see spark.skins.spark.PanelSkin
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function get controlBarContent():Array
+        {
+            if (controlBarGroup)
+                return controlBarGroup.getMXMLContent();
+            else
+                return controlBarGroupProperties.controlBarContent;
+        }
+
+        /**
+         *  @private
+         */
+        public function set controlBarContent(value:Array):void
+        {
+            if (controlBarGroup)
+            {
+                controlBarGroup.mxmlContent = value;
+                controlBarGroupProperties = BitFlagUtil.update(controlBarGroupProperties as uint,
+                    CONTROLBAR_PROPERTY_FLAG, value != null);
+            }
+            else
+                controlBarGroupProperties.controlBarContent = value;
+
+            invalidateSkinState();
+        }
+
+        //----------------------------------
+        //  controlBarLayout
+        //----------------------------------
+
+        /**
+         *  Defines the layout of the control bar area of the container.
+         *
+         *  @default HorizontalLayout
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function get controlBarLayout():LayoutBase
+        {
+            return (controlBarGroup)
+            ? controlBarGroup.layout
+                : controlBarGroupProperties.layout;
+        }
+
+        /**
+         *  @private
+         */
+        public function set controlBarLayout(value:LayoutBase):void
+        {
+            if (controlBarGroup)
+            {
+                controlBarGroup.layout = value;
+                controlBarGroupProperties = BitFlagUtil.update(controlBarGroupProperties as uint,
+                    LAYOUT_PROPERTY_FLAG, true);
+            }
+            else
+                controlBarGroupProperties.layout = value;
+        }
+
+        //----------------------------------
+        //  controlBarVisible
+        //----------------------------------
+
+        /**
+         *  If true, the control bar is visible.
+         *  The flag has no affect if there is no value set for
+         *  the controlBarContent property.
+         *
+         *
Note: The Panel container does not monitor the
+         *  controlBarGroup property.
+         *  If other code makes it invisible, the Panel container
+         *  might not update correctly.

+         *
+         *  @default true
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function get controlBarVisible():Boolean
+        {
+            return (controlBarGroup)
+            ? controlBarGroup.visible
+                : controlBarGroupProperties.visible;
+        }
+
+        /**
+         *  @private
+         */
+        public function set controlBarVisible(value:Boolean):void
+        {
+            if (controlBarGroup)
+            {
+                controlBarGroup.visible = value;
+                controlBarGroupProperties = BitFlagUtil.update(controlBarGroupProperties as uint,
+                    VISIBLE_PROPERTY_FLAG, value);
+            }
+            else
+                controlBarGroupProperties.visible = value;
+
+            invalidateSkinState();
+            if (skin)
+                skin.invalidateSize();
+        }
+
+        //----------------------------------
+        //  title
+        //----------------------------------
+
+        /**
+         *  @private
+         */
+        private var _title:String = "";
+
+        /**
+         *  @private
+         */
+        private var titleChanged:Boolean;
+
+        [Bindable]
+
+        /**
+         *  Title or caption displayed in the title bar.
+         *
+         *  @default ""
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function get title():String
+        {
+            return _title;
+        }
+
+        /**
+         *  @private
+         */
+        public function set title(value:String):void
+        {
+            _title = value;
+
+            if (titleDisplay)
+                titleDisplay.text = title;
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden methods
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         */
+        override protected function initializeAccessibility():void
+        {
+            if (Panel.createAccessibilityImplementation != null)
+                Panel.createAccessibilityImplementation(this);
+        }
+
+        /**
+         *  @private
+         */
+        override protected function partAdded(partName:String, instance:Object):void
+        {
+            super.partAdded(partName, instance);
+
+            if (instance == titleDisplay)
+            {
+                titleDisplay.text = title;
+            }
+            else if (instance == controlBarGroup)
+            {
+                // copy proxied values from controlBarGroupProperties (if set) to contentGroup
+                var newControlBarGroupProperties:uint = 0;
+
+                if (controlBarGroupProperties.controlBarContent !== undefined)
+                {
+                    controlBarGroup.mxmlContent = controlBarGroupProperties.controlBarContent;
+                    newControlBarGroupProperties = BitFlagUtil.update(newControlBarGroupProperties,
+                        CONTROLBAR_PROPERTY_FLAG, true);
+                }
+
+                if (controlBarGroupProperties.layout !== undefined)
+                {
+                    controlBarGroup.layout = controlBarGroupProperties.layout;
+                    newControlBarGroupProperties = BitFlagUtil.update(newControlBarGroupProperties,
+                        LAYOUT_PROPERTY_FLAG, true);
+                }
+
+                if (controlBarGroupProperties.visible !== undefined)
+                {
+                    controlBarGroup.visible = controlBarGroupProperties.visible;
+                    newControlBarGroupProperties = BitFlagUtil.update(newControlBarGroupProperties,
+                        VISIBLE_PROPERTY_FLAG, true);
+                }
+
+                controlBarGroupProperties = newControlBarGroupProperties;
+            }
+        }
+
+        /**
+         *  @private
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        override protected function partRemoved(partName:String, instance:Object):void
+        {
+            super.partRemoved(partName, instance);
+
+            if (instance == controlBarGroup)
+            {
+                // copy proxied values from contentGroup (if explicitely set) to contentGroupProperties
+
+                var newControlBarGroupProperties:Object = {};
+
+                if (BitFlagUtil.isSet(controlBarGroupProperties as uint, CONTROLBAR_PROPERTY_FLAG))
+                    newControlBarGroupProperties.controlBarContent = controlBarGroup.getMXMLContent();
+
+                if (BitFlagUtil.isSet(controlBarGroupProperties as uint, LAYOUT_PROPERTY_FLAG))
+                    newControlBarGroupProperties.layout = controlBarGroup.layout;
+
+                if (BitFlagUtil.isSet(controlBarGroupProperties as uint, VISIBLE_PROPERTY_FLAG))
+                    newControlBarGroupProperties.visible = controlBarGroup.visible;
+
+                controlBarGroupProperties = newControlBarGroupProperties;
+
+                controlBarGroup.mxmlContent = null;
+                controlBarGroup.layout = null;
+            }
+        }
+
+        /**
+         *  @private
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        override protected function getCurrentSkinState():String
+        {
+            var state:String = enabled ? "normal" : "disabled";
+            if (controlBarGroup)
+            {
+                if (BitFlagUtil.isSet(controlBarGroupProperties as uint, CONTROLBAR_PROPERTY_FLAG) &&
+                    BitFlagUtil.isSet(controlBarGroupProperties as uint, VISIBLE_PROPERTY_FLAG))
+                    state += "WithControlBar";
+            }
+            else
+            {
+                if (controlBarGroupProperties.controlBarContent &&
+                    controlBarGroupProperties.visible)
+                    state += "WithControlBar";
+            }
+
+            return state;
+        }
     }
-
-    /**
-     *  @private
-     */
-    public function set controlBarContent(value:Array):void
-    {
-        if (controlBarGroup)
-        {
-            controlBarGroup.mxmlContent = value;
-            controlBarGroupProperties = BitFlagUtil.update(controlBarGroupProperties as uint,
-                                                        CONTROLBAR_PROPERTY_FLAG, value != null);
-        }
-        else
-            controlBarGroupProperties.controlBarContent = value;
-
-        invalidateSkinState();
-    }
-
-    //----------------------------------
-    //  controlBarLayout
-    //----------------------------------
-
-    /**
-     *  Defines the layout of the control bar area of the container.
-     *
-     *  @default HorizontalLayout
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get controlBarLayout():LayoutBase
-    {
-        return (controlBarGroup)
-            ? controlBarGroup.layout
-            : controlBarGroupProperties.layout;
-    }
-
-    /**
-     *  @private
-     */
-    public function set controlBarLayout(value:LayoutBase):void
-    {
-        if (controlBarGroup)
-        {
-            controlBarGroup.layout = value;
-            controlBarGroupProperties = BitFlagUtil.update(controlBarGroupProperties as uint,
-                                                        LAYOUT_PROPERTY_FLAG, true);
-        }
-        else
-            controlBarGroupProperties.layout = value;
-    }
-
-    //----------------------------------
-    //  controlBarVisible
-    //----------------------------------
-
-    /**
-     *  If true, the control bar is visible.
-     *  The flag has no affect if there is no value set for
-     *  the controlBarContent property.
-     *
-     *
Note: The Panel container does not monitor the
-     *  controlBarGroup property.
-     *  If other code makes it invisible, the Panel container
-     *  might not update correctly.

-     *
-     *  @default true
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get controlBarVisible():Boolean
-    {
-        return (controlBarGroup)
-            ? controlBarGroup.visible
-            : controlBarGroupProperties.visible;
-    }
-
-    /**
-     *  @private
-     */
-    public function set controlBarVisible(value:Boolean):void
-    {
-        if (controlBarGroup)
-        {
-            controlBarGroup.visible = value;
-            controlBarGroupProperties = BitFlagUtil.update(controlBarGroupProperties as uint,
-                                                        VISIBLE_PROPERTY_FLAG, value);
-        }
-        else
-            controlBarGroupProperties.visible = value;
-
-        invalidateSkinState();
-        if (skin)
-            skin.invalidateSize();
-    }
-
-    //----------------------------------
-    //  title
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    private var _title:String = "";
-
-    /**
-     *  @private
-     */
-    private var titleChanged:Boolean;
-
-    [Bindable]
-
-    /**
-     *  Title or caption displayed in the title bar.
-     *
-     *  @default ""
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get title():String
-    {
-        return _title;
-    }
-
-    /**
-     *  @private
-     */
-    public function set title(value:String):void
-    {
-        _title = value;
-
-        if (titleDisplay)
-            titleDisplay.text = title;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override protected function initializeAccessibility():void
-    {
-		if (Panel.createAccessibilityImplementation != null)
-			Panel.createAccessibilityImplementation(this);
-    }
-
-    /**
-     *  @private
-     */
-    override protected function partAdded(partName:String, instance:Object):void
-    {
-        super.partAdded(partName, instance);
-
-        if (instance == titleDisplay)
-        {
-            titleDisplay.text = title;
-        }
-        else if (instance == controlBarGroup)
-        {
-            // copy proxied values from controlBarGroupProperties (if set) to contentGroup
-            var newControlBarGroupProperties:uint = 0;
-
-            if (controlBarGroupProperties.controlBarContent !== undefined)
-            {
-                controlBarGroup.mxmlContent = controlBarGroupProperties.controlBarContent;
-                newControlBarGroupProperties = BitFlagUtil.update(newControlBarGroupProperties,
-                                                               CONTROLBAR_PROPERTY_FLAG, true);
-            }
-
-            if (controlBarGroupProperties.layout !== undefined)
-            {
-                controlBarGroup.layout = controlBarGroupProperties.layout;
-                newControlBarGroupProperties = BitFlagUtil.update(newControlBarGroupProperties,
-                                                               LAYOUT_PROPERTY_FLAG, true);
-            }
-
-            if (controlBarGroupProperties.visible !== undefined)
-            {
-                controlBarGroup.visible = controlBarGroupProperties.visible;
-                newControlBarGroupProperties = BitFlagUtil.update(newControlBarGroupProperties,
-                                                               VISIBLE_PROPERTY_FLAG, true);
-            }
-
-            controlBarGroupProperties = newControlBarGroupProperties;
-        }
-    }
-
-    /**
-     *  @private
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    override protected function partRemoved(partName:String, instance:Object):void
-    {
-        super.partRemoved(partName, instance);
-
-		if (instance == controlBarGroup)
-        {
-            // copy proxied values from contentGroup (if explicitely set) to contentGroupProperties
-
-            var newControlBarGroupProperties:Object = {};
-
-            if (BitFlagUtil.isSet(controlBarGroupProperties as uint, CONTROLBAR_PROPERTY_FLAG))
-                newControlBarGroupProperties.controlBarContent = controlBarGroup.getMXMLContent();
-
-            if (BitFlagUtil.isSet(controlBarGroupProperties as uint, LAYOUT_PROPERTY_FLAG))
-                newControlBarGroupProperties.layout = controlBarGroup.layout;
-
-            if (BitFlagUtil.isSet(controlBarGroupProperties as uint, VISIBLE_PROPERTY_FLAG))
-                newControlBarGroupProperties.visible = controlBarGroup.visible;
-
-            controlBarGroupProperties = newControlBarGroupProperties;
-
-            controlBarGroup.mxmlContent = null;
-            controlBarGroup.layout = null;
-        }
-    }
-
-    /**
-     *  @private
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    override protected function getCurrentSkinState():String
-    {
-        var state:String = enabled ? "normal" : "disabled";
-        if (controlBarGroup)
-        {
-            if (BitFlagUtil.isSet(controlBarGroupProperties as uint, CONTROLBAR_PROPERTY_FLAG) &&
-                BitFlagUtil.isSet(controlBarGroupProperties as uint, VISIBLE_PROPERTY_FLAG))
-                state += "WithControlBar";
-        }
-        else
-        {
-            if (controlBarGroupProperties.controlBarContent &&
-                controlBarGroupProperties.visible)
-                state += "WithControlBar";
-        }
-
-        return state;
-    }
+
 }
-
-}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6306
Author:   egeorgie@adobe.com
Date:     2009-04-28T01:17:42.359155Z

Log Message:
-----------
Layout PARB changes - rename "layout" package to "layouts"

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer:
tests: checkintests

Modified Paths:
--------------
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/BasicLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/BasicLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutElementHelper.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/RowAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/RowAlign.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/Block.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/Block.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/VerticalAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalAlign.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LinearLayoutVector.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HGroup.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText2.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutBase.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalAlign.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VGroup.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/VerticalLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/ColumnAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/ColumnAlign.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileOrientation.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileOrientation.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/RowAlign.as
+++ frameworks/projects/spark/src/spark/layouts/RowAlign.as
@@ -9,7 +9,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package spark.layout
+package spark.layouts
 {

 /**


remove unused commented out variable Player::debugLogger

--- src/Player.as
+++ src/Player.as
@@ -39,7 +39,6 @@
     [Embed(source = "../VERSION", mimeType = "application/octet-stream")] private var Version:Class;

     public static var locomoteID:String = null;
-//    public static var debugLogger:Boolean = false; //not used

     private static const EVENT_STREAM_STARTED:String  = "streamStarted";
     private static const EVENT_STREAM_PAUSED:String  = "streamPaused";


commented-out logger() statements

commented-out logger() statements

--- src/ras3r/XMLView.as
+++ src/ras3r/XMLView.as
@@ -27,7 +27,7 @@
 				if (e.target.data && e.target.data.toString().indexOf('<') == 0)
 				{
 					// parse XML
-/*					Logger.info('k: ' + klass.toString());*/
+/*					logger.info('k: ' + klass.toString());*/
 					templates_cache[klass.toString()] = XML(e.target.data);
 				}
 				callback(e);
@@ -131,9 +131,10 @@
 		{
 			removeEventListener('addedToStage', after_added_to_stage);

-/*			Logger.info('c: ' + this.constructor.toString());*/
+/*			logger.info('c: ' + this.constructor.toString());*/
 			if (! xml) xml = templates_cache[this.constructor.toString()];
-			Logger.info('xml?: ' + Boolean(xml));
+
+			//logger.info('xml?: ' + Boolean(xml));
 			if (xml)
 			{
 				// resume event chain and build()


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

--- frameworks/projects/framework/src/mx/effects/effectClasses/ZoomInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/ZoomInstance.as
@@ -0,0 +1,602 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.effects.effectClasses
+{
+
+import flash.events.Event;
+import flash.events.MouseEvent;
+import mx.core.mx_internal;
+import mx.effects.EffectManager;
+import mx.events.FlexEvent;
+
+/**
+ *  The ZoomInstance class implements the instance class for the Zoom effect.
+ *  Flex creates an instance of this class when it plays a Zoom effect;
+ *  you do not create one yourself.
+ *
+ *
Every effect class that is a subclass of the TweenEffect class
+ *  supports the following events:

+ *
+ *

+ *
tweenEnd: Dispatched when the tween effect ends.

+ *
+ *
tweenUpdate: Dispatched every time a TweenEffect
+ *      class calculates a new value.

+ *

+ *
+ *
The event object passed to the event listener for these events is of type TweenEvent.
+ *  The TweenEvent class defines the property value, which contains
+ *  the tween value calculated by the effect.
+ *  For the Zoom effect,
+ *  the TweenEvent.value property contains a 2-item Array, where:

+ *

+ *
value[0]:Number  A value between the values of the Zoom.zoomWidthFrom
+ *    and Zoom.zoomWidthTo property.

+ *
+ *
value[1]:Number  A value between the values of the Zoom.zoomHeightFrom
+ *    and Zoom.zoomHeightTo property.

+ *

+ *
+ *  @see mx.effects.Zoom
+ *  @see mx.events.TweenEvent
+ */
+public class ZoomInstance extends TweenEffectInstance
+{
+    include "../../core/Version.as";
+
+ 	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param target The Object to animate with this effect.
+	 */
+	public function ZoomInstance(target:Object)
+	{
+		super(target);
+	}
+
+ 	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var origScaleX:Number;
+
+	/**
+	 *  @private
+	 */
+	private var origScaleY:Number;
+
+	/**
+	 *  @private
+	 */
+	private var origX:Number;
+
+	/**
+	 *  @private
+	 */
+	private var origY:Number;
+
+	/**
+	 *  @private
+	 */
+	private var newX:Number;
+
+	/**
+	 *  @private
+	 */
+	private var newY:Number;
+
+	/**
+	 *  @private
+	 */
+	private var scaledOriginX:Number;
+
+	/**
+	 *  @private
+	 */
+	private var scaledOriginY:Number;
+
+	/**
+	 *  @private
+	 */
+	private var origPercentWidth:Number;
+
+	/**
+	 *  @private
+	 */
+	private var origPercentHeight:Number;
+
+	/**
+	 *  @private
+	 */
+	private var _mouseHasMoved:Boolean = false;
+
+	/**
+	 *  @private
+	 */
+	private var show:Boolean = true;
+
+ 	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  captureRollEvents
+	//----------------------------------
+
+	/**
+	 *  Prevents the rollOut and rollOver events
+	 *  from being dispatched if the mouse has not moved.
+	 *  Set this value to true in situations where the target
+	 *  toggles between a big and small state without moving the mouse.
+	 *
+	 *  @default false
+	 */
+	public var captureRollEvents:Boolean;
+
+	//----------------------------------
+	//  originX
+	//----------------------------------
+
+	/**
+	 *  Number that represents the x-position of the zoom origin,
+	 *  or registration point.
+	 *  The default value is target.width / 2,
+	 *  which is the center of the target.
+	 */
+	public var originX:Number;
+
+	//----------------------------------
+	//  originY
+	//----------------------------------
+
+	/**
+	 *  Number that represents the y-position of the zoom origin,
+	 *  or registration point.
+	 *  The default value is target.height / 2,
+	 *  which is the center of the target.
+	 */
+	public var originY:Number;
+
+	//----------------------------------
+	//  zoomHeightFrom
+	//----------------------------------
+
+	/**
+	 *  Number that represents the scale at which to start the height zoom,
+	 *  as a percent between 0.01 and 1.0.
+	 *  The default value is 0.01, which is very small.
+	 */
+	public var zoomHeightFrom:Number;
+
+	//----------------------------------
+	//  zoomHeightTo
+	//----------------------------------
+
+	/**
+	 *  Number that represents the scale at which to complete the height zoom,
+	 *  as a percent between 0.01 and 1.0.
+	 *  The default value is 1.0, which is the object's normal size.
+	 */
+	public var zoomHeightTo:Number;
+
+	//----------------------------------
+	//  zoomWidthFrom
+	//----------------------------------
+
+	/**
+	 *  Number that represents the scale at which to start the width zoom,
+	 *  as a percent between 0.01 and 1.0.
+	 *  The default value is 0.01, which is very small.
+	 */
+	public var zoomWidthFrom:Number;
+
+	//----------------------------------
+	//  zoomWidthTo
+	//----------------------------------
+
+	/**
+	 *  Number that represents the scale at which to complete the width zoom,
+	 *  as a percent between 0.01 and 1.0.
+	 *  The default value is 1.0, which is the object's normal size.
+	 */
+	public var zoomWidthTo:Number;
+
+ 	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function initEffect(event:Event):void
+	{
+		super.initEffect(event);
+
+		if (event.type == FlexEvent.HIDE || event.type == Event.REMOVED)
+		{
+			show = false;
+		}
+
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function play():void
+	{
+		super.play();
+
+		applyPropertyChanges();
+
+		if (isNaN(zoomWidthFrom) && isNaN(zoomWidthTo)
+			&& isNaN(zoomHeightFrom) && isNaN(zoomHeightTo) )
+		{
+			if (show)
+			{
+				// This is a "show" effect, so zoom from zero to original
+				// size.  (If neither show nor hide effect is specified,
+				// guess "show")
+				zoomWidthFrom = zoomHeightFrom = 0;
+				zoomWidthTo = target.scaleX;
+				zoomHeightTo = target.scaleY;
+			}
+			else
+			{
+				// This is a "hide" effect, so zoom down to zero.
+				zoomWidthFrom = target.scaleX;
+				zoomHeightFrom = target.scaleY;
+				zoomWidthTo = zoomHeightTo =  0;
+			}
+		}
+		else
+		{
+			// if only height zoom is specified, then we leave the width zoom alone
+			if (isNaN(zoomWidthFrom) && isNaN(zoomWidthTo))
+			{
+				zoomWidthFrom = zoomWidthTo = target.scaleX;
+			}
+			// if only width zoom is specified, then we leave the height zoom alone
+			else if (isNaN(zoomHeightFrom) && isNaN(zoomHeightTo))
+			{
+				zoomHeightFrom = zoomHeightTo = target.scaleY;
+			}
+
+			if (isNaN(zoomWidthFrom))
+			{
+				// If no "from" amount is specified, use the current zoom.
+				zoomWidthFrom = target.scaleX;
+			}
+			else if (isNaN(zoomWidthTo))
+			{
+				// If no "to" amount is specified, choose a "to" amount of
+				// either 1.0 or 0, but make sure "from" and "to" are different
+				zoomWidthTo = (zoomWidthFrom == 1.0) ? 0 : 1.0;
+			}
+
+			if (isNaN(zoomHeightFrom))
+			{
+				// If no "from" amount is specified, use the current zoom.
+				zoomHeightFrom = target.scaleY;
+			}
+			else if (isNaN(zoomHeightTo))
+			{
+				// If no "to" amount is specified, choose a "to" amount of
+				// either 1.0 or 0, but make sure "from" and "to" are different
+				zoomHeightTo = (zoomHeightFrom == 1.0) ? 0 : 1.0;
+			}
+		}
+		// Guard against bogus input and divide-by-zero
+		if (zoomWidthFrom < 0.01)
+			zoomWidthFrom = 0.01;
+		if (zoomWidthTo < 0.01)
+			zoomWidthTo = 0.01;
+		if (zoomHeightFrom < 0.01)
+			zoomHeightFrom = 0.01;
+		if (zoomHeightTo < 0.01)
+			zoomHeightTo = 0.01;
+
+		// Remember the original appearance
+		origScaleX = target.scaleX;
+		origScaleY = target.scaleY;
+		newX = origX = target.x;
+		newY = origY = target.y;
+
+		// Use the center position if no origin has been specified.
+		if (isNaN(originX))
+		{
+			scaledOriginX = target.width / 2;
+		}
+		else
+		{
+			// Origin position adjusted for scale
+			scaledOriginX = originX * origScaleX;
+		}
+		if (isNaN(originY))
+		{
+			scaledOriginY = target.height / 2;
+		}
+		else
+		{
+			// Origin position adjusted for scale
+			scaledOriginY = originY * origScaleY;
+		}
+
+		scaledOriginX = Number(scaledOriginX.toFixed(1));
+		scaledOriginY = Number(scaledOriginY.toFixed(1));
+
+		// If the object is flexible, set it to not be flexible for the
+		// duration of the zoom. It'll still flex when the zoom is complete,
+		// but we'll avoid hanging the player (bug 100035).
+		origPercentWidth = target.percentWidth;
+		if (!isNaN(origPercentWidth))
+			target.width = target.width; // Set width to be expressed in pixels
+		origPercentHeight = target.percentHeight;
+		if (!isNaN(origPercentHeight))
+			target.height = target.height;
+
+		// Create a tween to resize the object
+		tween = createTween(this, [zoomWidthFrom,zoomHeightFrom], [zoomWidthTo,zoomHeightTo], duration);
+
+		// Capture mouse events
+		if (captureRollEvents)
+		{
+			target.addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false);
+			target.addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false);
+			target.addEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false);
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function onTweenUpdate(value:Object):void
+	{
+		// If we're in the middle of a three-frame instantiation, let it
+		// finish before we start changing objects.  Otherwise, we'll
+		// dirty measurements after every frame, and the three-frame
+		// process will never get past the "measure" step.
+		//if (suspendBackgroundProcessing) //UIComponent.useLayoutManager &&)
+		//	return;
+
+		// Tell the EffectManager not to listen to the "move" event.
+		// Otherwise, moveEffect="Move" would cause a new Move effect
+		// to be create with each onTweenUpdate.
+		EffectManager.suspendEventHandling();
+
+		// Check if we have been moved since the last time we updated
+		if (Math.abs(newX - target.x) > 0.1)
+		{
+			origX += Number(target.x.toFixed(1)) - newX;
+		}
+
+		if (Math.abs(newY - target.y) > 0.1)
+		{
+			origY += Number(target.y.toFixed(1)) - newY;
+		}
+
+		target.scaleX = value[0];
+		target.scaleY = value[1];
+
+		var ratioX:Number = value[0] / origScaleX;
+		var ratioY:Number = value[1] / origScaleY;
+
+		var newOriginX:Number = scaledOriginX * ratioX;
+		var newOriginY:Number = scaledOriginY * ratioY;
+
+		newX = scaledOriginX - newOriginX + origX;
+		newY = scaledOriginY - newOriginY + origY;
+
+		newX = Number(newX.toFixed(1));
+		newY = Number(newY.toFixed(1));
+
+		// Adjust position relative to the origin
+		target.move(newX,newY);
+
+		// Set a flag indicating that LayoutManager.validateNow() should
+		// be called after we're finished processing all the effects for
+		// this frame.
+		tween.mx_internal::needToLayout = true;
+
+		EffectManager.resumeEventHandling();
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function onTweenEnd(value:Object):void
+	{
+		// If object's size was originally specified using percentages,
+		// then restore percentages now. That way, the object will
+		// resize when its parent is resized.
+		if (!isNaN(origPercentWidth))
+		{
+			var curWidth:Number = target.width;
+
+			target.percentWidth = origPercentWidth;
+
+			// Setting an object to have percentage widths will set its
+			// actual width to undefined. If the parent's autoLayout is
+			// false, setting its actual width to undefined will cause it
+			// to be rendered as with a width and height of zero. To
+			// avoid that situation, set its _width and _height explicitly.
+			if (target.parent && target.parent.autoLayout == false)
+				target.mx_internal::_width = curWidth;
+		}
+		if (!isNaN(origPercentHeight))
+		{
+			var curHeight:Number = target.height;
+
+			target.percentHeight = origPercentHeight;
+
+			if (target.parent && target.parent.autoLayout == false)
+				target.mx_internal::_height = curHeight;
+		}
+
+		super.onTweenEnd(value);
+
+		if (mx_internal::hideOnEffectEnd)
+		{
+			EffectManager.suspendEventHandling();
+
+			target.scaleX = origScaleX;
+			target.scaleY = origScaleY;
+			target.move(origX, origY);
+			EffectManager.resumeEventHandling();
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function finishEffect():void
+	{
+		// Remove the event listeners
+		if (captureRollEvents)
+		{
+			target.removeEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false);
+			target.removeEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false);
+			target.removeEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false);
+		}
+		super.finishEffect();
+	}
+
+ 	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private function applyPropertyChanges():void
+	{
+		// Apply the properties in the following priority:
+		// scaleX/scaleY, width/height, visible
+		var values:PropertyChanges = propertyChanges;
+
+		if (values)
+		{
+			var useSize:Boolean = false;
+			var useScale:Boolean = false;
+
+			if (values.end["scaleX"] !== undefined)
+			{
+				zoomWidthFrom = isNaN(zoomWidthFrom) ? target.scaleX : zoomWidthFrom;
+				zoomWidthTo = isNaN(zoomWidthTo) ? values.end["scaleX"] : zoomWidthTo;
+				useScale = true;
+			}
+
+			if (values.end["scaleY"] !== undefined)
+			{
+				zoomHeightFrom = isNaN(zoomHeightFrom) ? target.scaleY : zoomHeightFrom;
+				zoomHeightTo = isNaN(zoomHeightTo) ? values.end["scaleY"] : zoomHeightTo;
+				useScale = true;
+			}
+
+			if (useScale)
+				return;
+
+			if (values.end["width"] !== undefined)
+			{
+				zoomWidthFrom = isNaN(zoomWidthFrom) ?
+						   getScaleFromWidth(target.width) :
+						   zoomWidthFrom;
+				zoomWidthTo = isNaN(zoomWidthTo) ?
+						 getScaleFromWidth(values.end["width"]) :
+						 zoomWidthTo;
+				useSize = true;
+			}
+
+			if (values.end["height"] !== undefined)
+			{
+				zoomHeightFrom = isNaN(zoomHeightFrom) ?
+						   getScaleFromHeight(target.height) :
+						   zoomHeightFrom;
+				zoomHeightTo = isNaN(zoomHeightTo) ?
+						 getScaleFromHeight(values.end["height"]) :
+						 zoomHeightTo;
+				useSize = true;
+			}
+
+			if (useSize)
+				return;
+
+			if (values.end["visible"] !== undefined)
+				show = values.end["visible"];
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	private function getScaleFromWidth(value:Number):Number
+	{
+		return value / (target.width / Math.abs(target.scaleX));
+	}
+
+	/**
+	 *  @private
+	 */
+	private function getScaleFromHeight(value:Number):Number
+	{
+		return value / (target.height / Math.abs(target.scaleY));
+	}
+
+ 	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private function mouseEventHandler(event:MouseEvent):void
+	{
+		// The purpose of this logic is to prevent the situation
+		// where the target toggles between the mouseOver and mouseOut
+		// effects when the mouse is placed at certain positions.
+		// Now we stop sending mouseOut and mouseOver events if the
+		// mouse has not moved.
+
+		if (event.type == MouseEvent.MOUSE_MOVE)
+		{
+			_mouseHasMoved = true;
+		}
+		else if (event.type == MouseEvent.ROLL_OUT ||
+				 event.type == MouseEvent.ROLL_OVER)
+		{
+			if (!_mouseHasMoved)
+				event.stopImmediatePropagation();
+
+			_mouseHasMoved = false;
+		}
+	}
+}
+
+}


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

--- frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as
+++ frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2011 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: 23167
Author:   chiedozi@adobe.com
Date:     2011-11-01T17:05:36.732777Z

Log Message:
-----------
Fixed an issue where child ViewNavigators in a TabbedViewNavigator were improperly initialized if the navigators property was used
Fixed a typo in ViewNavigator

QE notes:
Doc notes:
Bugs: SDK-31987
Reviewer: Evtim
Tests run: mustella-mobile, checkintests
Is noteworthy for integration: No

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -187,7 +187,7 @@
     /**
      *  @private
      */
-    private static var viewTransitonSuspendCount:int = 0;
+    private static var viewTransitionSuspendCount:int = 0;
     private static var eventDispatcher:EventDispatcher;

     //--------------------------------------------------------------------------
@@ -2160,7 +2160,7 @@
         }

         // Only dispatch this event if the stage exists.
-        if (stage && viewTransitonSuspendCount > 0)
+        if (stage && viewTransitionSuspendCount > 0)
         {
            if (!eventDispatcher)
                eventDispatcher = new EventDispatcher();
@@ -2178,7 +2178,7 @@
      */
     mx_internal static function suspendTransitions():void
     {
-        viewTransitonSuspendCount++;
+        viewTransitionSuspendCount++;
     }

     /**
@@ -2186,12 +2186,12 @@
      */
     mx_internal static function resumeTransitions():void
     {
-        if (viewTransitonSuspendCount == 0)
+        if (viewTransitionSuspendCount == 0)
             return;

-        viewTransitonSuspendCount--;
-
-        if (viewTransitonSuspendCount == 0)
+        viewTransitionSuspendCount--;
+
+        if (viewTransitionSuspendCount == 0)
             eventDispatcher.dispatchEvent(new Event("viewTransitionReady"));
     }