Transferred from the Adobe Open Source Subversion Repository

Revision: 4885
Author:   jszeto@adobe.com
Date:     2009-02-07T00:12:32.609062Z

Log Message:
-----------
Flex SDK Framework - Update mx.filters API and class hierarchy

- Removed BaseFilter.as, BaseDimensionFilter.as, and GradientFilter.as
- Renamed IBitmapFilter.as to IFlexBitmapFilter.as
- Changed IBitmapFilter.clone to createBitmapFilter
- Moved properties and functions from base classes up to filter subclasses
- Changed ColorMatrixFilter constructor parameter from Array to Object
- Added Change metadata to all filter classes
- Changed notifyFilterChanged from public to private
- Added ASDoc comments
- Added copyright info
- Added a number of formatting and style fixes

QE Notes: Need to update tests based on API changes. Missing tests for DisplacementMapFilter.as.
Doc Notes: Need extensive ASDoc review. Consider using @copy for properties that match the flash.filters properties
Bugs: n/a
Reviewer: Gordon

Modified Paths:
--------------
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/BevelFilter.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientFilter.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IBitmapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Parser.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IBitmapFilter.as" copyfrom-rev="4821" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IFlexBitmapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateFilterInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/filters/BevelFilter.as
+++ frameworks/projects/spark/src/spark/filters/BevelFilter.as
@@ -1,14 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
 package mx.filters
 {
 import flash.events.IEventDispatcher;
+import flash.events.Event;
+import flash.events.EventDispatcher;
 import flash.filters.BevelFilter;
 import flash.filters.BitmapFilter;
+import flash.filters.BitmapFilterQuality;
 import flash.filters.BitmapFilterType;
-import mx.filters.BaseDimensionFilter;
-import mx.filters.IBitmapFilter;
-
-public class BevelFilter extends BaseDimensionFilter implements IBitmapFilter
+import mx.filters.IFlexBitmapFilter;
+
+/**
+ *  @review
+ *  Dispatched when a property value has changed.
+ */
+[Event(name="change", type="flash.events.Event")]
+
+/**
+ *  @review
+ *
+ * 	The mx.filters.BevelFilter class supports dynamically updating property values.
+ *  When a property changes, it dispatches an event that tells the filter owner to
+ *  reapply the filter. Use this class instead of flash.filters.BevelFilter if you plan
+ *  to dynamically change the filter property values.
+ *
+ *  @see flash.filters.BevelFilter
+ */
+public class BevelFilter extends EventDispatcher implements IFlexBitmapFilter
 {
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 * @copy flash.filters.BevelFilter
+	 */
 	public function BevelFilter(distance:Number = 4.0, angle:Number = 45,
 								highlightColor:uint = 0xFFFFFF, highlightAlpha:Number = 1.0,
 								shadowColor:uint = 0x000000, shadowAlpha:Number = 1.0,
@@ -16,6 +56,8 @@
 								quality:int = 1, type:String = "inner",
 								knockout:Boolean = false)
 	{
+		super();
+
 		this.distance = distance;
 		this.angle = angle;
 		this.highlightColor = highlightColor;
@@ -29,6 +71,12 @@
 		this.type = type;
 		this.knockout = knockout;
 	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------

 	//----------------------------------
     //  angle
@@ -60,6 +108,58 @@
 	}

 	//----------------------------------
+    //  blurX
+    //----------------------------------
+
+	private var _blurX:Number = 4.0;
+
+	/**
+	 *  The amount of horizontal blur. Valid values are 0 to 255. A blur of 1
+	 *  or less means that the original image is copied as is. The default
+	 *  value is 4. Values that are a power of 2 (such as 2, 4, 8, 16, and 32)
+	 *  are optimized to render more quickly than other values.
+	 */
+	public function get blurX():Number
+	{
+		return _blurX;
+	}
+
+	public function set blurX(value:Number):void
+	{
+		if (value != _blurX)
+		{
+			_blurX = value;
+			notifyFilterChanged();
+		}
+	}
+
+	//----------------------------------
+    //  blurY
+    //----------------------------------
+
+	private var _blurY:Number = 4.0;
+
+	/**
+	 *  The amount of vertical blur. Valid values are 0 to 255. A blur of 1
+	 *  or less means that the original image is copied as is. The default
+	 *  value is 4. Values that are a power of 2 (such as 2, 4, 8, 16, and 32)
+	 *  are optimized to render more quickly than other values.
+	 */
+	public function get blurY():Number
+	{
+		return _blurY;
+	}
+
+	public function set blurY(value:Number):void
+	{
+		if (value != _blurY)
+		{
+			_blurY = value;
+			notifyFilterChanged();
+		}
+	}
+
+	//----------------------------------
     //  distance
     //----------------------------------

@@ -132,6 +232,66 @@
 		}
 	}

+	//----------------------------------
+    //  knockout
+    //----------------------------------
+
+	private var _knockout:Boolean = false;
+
+	/**
+	 *  Specifies whether the object has a knockout effect. A knockout effect
+	 *  makes the object's fill transparent and reveals the background color
+	 *  of the document. The value true specifies a knockout effect; the
+	 *  default value is false (no knockout effect).
+	 */
+	public function get knockout():Boolean
+	{
+		return _knockout;
+	}
+
+	public function set knockout(value:Boolean):void
+	{
+		if (value != _knockout)
+		{
+			_knockout = value;
+			notifyFilterChanged();
+		}
+	}
+
+	//----------------------------------
+    //  quality
+    //----------------------------------
+
+	private var _quality:int = BitmapFilterQuality.LOW;
+
+	/**
+	 *  The number of times to apply the filter. The default value is
+	 *  BitmapFilterQuality.LOW, which is equivalent to applying the filter
+	 *  once. The value BitmapFilterQuality.MEDIUM  applies the filter twice;
+	 *  the value BitmapFilterQuality.HIGH applies it three times. Filters
+	 *  with lower values are rendered more quickly.
+	 *
+	 *  For most applications, a quality value of low, medium, or high is
+	 *  sufficient. Although you can use additional numeric values up to 15
+	 *  to achieve different effects, higher values are rendered more slowly.
+	 *  Instead of increasing the value of quality, you can often get a similar
+	 *  effect, and with faster rendering, by simply increasing the values of
+	 *  the blurX and blurY properties.
+	 */
+	public function get quality():int
+	{
+		return _quality;
+	}
+
+	public function set quality(value:int):void
+	{
+		if (value != _quality)
+		{
+			_quality = value;
+			notifyFilterChanged();
+		}
+	}
+
 	//----------------------------------
     //  shadowAlpha
     //----------------------------------
@@ -182,6 +342,32 @@
 		}
 	}

+	//----------------------------------
+    //  strength
+    //----------------------------------
+
+	private var _strength:Number = 1;
+
+	/**
+	 *  The strength of the imprint or spread. The higher the value, the more
+	 *  color is imprinted and the stronger the contrast between the glow and
+	 *  the background. Valid values are 0 to 255. A value of 0 means that the
+	 *  filter is not applied. The default value is 1.
+	 */
+	public function get strength():Number
+	{
+		return _strength;
+	}
+
+	public function set strength(value:Number):void
+	{
+		if (value != _strength)
+		{
+			_strength = value;
+			notifyFilterChanged();
+		}
+	}
+
 	//----------------------------------
     //  type
     //----------------------------------
@@ -208,8 +394,36 @@
 			notifyFilterChanged();
 		}
 	}
-
-	public function clone():BitmapFilter
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+   	/**
+     * @private
+     * Notify of a change to our filter, so that filter stack is ultimately
+     * re-applied by the framework.
+     */
+	private function notifyFilterChanged():void
+	{
+		dispatchEvent(new Event(Event.CHANGE));
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  IFlexBitmapFilter
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Creates a flash.filters.BevelFilter instance using the current
+	 *  property values.
+	 *
+	 *  @return flash.filters.BevelFilter instance
+	 */
+	public function createBitmapFilter():BitmapFilter
 	{
 		return new flash.filters.BevelFilter(distance, angle, highlightColor, highlightAlpha,
 											 shadowColor, shadowAlpha, blurX, blurY, strength,


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/automation/src/mx/automation/tabularData/CartesianChartTabularData.as
+++ frameworks/projects/automation/src/mx/automation/tabularData/CartesianChartTabularData.as
@@ -0,0 +1,213 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.automation.tabularData
+{
+
+
+	import mx.automation.AutomationManager;
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationTabularData;
+	import mx.charts.chartClasses.CartesianChart;
+	import mx.charts.chartClasses.Series;
+	import mx.core.mx_internal;
+	import mx.automation.Automation;
+
+	use namespace mx_internal;
+
+	/**
+	 *  @private
+	 */
+	public class CartesianChartTabularData
+		implements IAutomationTabularData
+	{
+
+		private var chart:CartesianChart;
+		private var delegate:IAutomationObject;
+		private var maxItems:int = 0;
+
+
+		/**
+		 *  Constructor
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function CartesianChartTabularData(delegate:IAutomationObject)
+		{
+			super();
+
+			this.delegate = delegate;
+			this.chart = delegate as CartesianChart;
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function get firstVisibleRow():int
+		{
+			return 0;
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function get lastVisibleRow():int
+		{
+			return chart.series.length + chart.secondSeries.length-1;
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function get numRows():int
+		{
+			return chart.series.length + chart.secondSeries.length;
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function get numColumns():int
+		{
+			maxItems = 0;
+			// code modified to avoid the usage of numAutomationChildren and
+			// getAutomationChildAt in a loop
+			//var childList:Array  = delegate.getAutomationChildren();
+			var childList:Array  = Automation.automationManager2.getAutomationChildrenArray(delegate);
+			var n:int = childList.length;
+			//for(var i:int = 0; i < delegate.numAutomationChildren; ++i)
+			for (var i:int = 0; i < n; ++i)
+			{
+				//var child:IAutomationObject = delegate.getAutomationChildAt(i);
+				var child:IAutomationObject = childList[i];
+				if (child && (child is Series))
+				{
+					var series:Object = child;
+					var items:Array = series.items;
+					if (maxItems < items.length)
+						maxItems = items.length
+				}
+
+			}
+			return maxItems;
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function get columnNames():Array
+		{
+			var names:Array = [];
+			maxItems = numColumns;
+			for (var i:int = 0; i < maxItems; ++i)
+				names.push(i);
+
+			return names;
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function getValues(start:uint = 0, end:uint = 0):Array
+		{
+			var _values:Array = [];
+			var longestRow:int = 0;
+			var i:int;
+			var j:int;
+			// code modified to avoid the usage of numAutomationChildren and
+			// getAutomationChildAt in a loop
+			//var childList:Array  = delegate.getAutomationChildren();
+			var childList:Array  = Automation.automationManager2.getAutomationChildrenArray(delegate);
+			var n:int = childList.length;
+			end = end>n?n:end;
+			for (i = start; i <= end; ++i)
+			{
+				//var child:IAutomationObject = delegate.getAutomationChildAt(i);
+				var child:IAutomationObject = childList[i];
+				var childValues:Array = [];
+				if (child && (child is Series))
+				{
+					var series:Object = child;
+					var seriesContainer:IAutomationObject = series as IAutomationObject;
+					var tabularData:IAutomationTabularData =
+						seriesContainer.automationTabularData as IAutomationTabularData;
+					var items:Array = series.items;
+					var n2:int  = items.length;
+					for (j = 0; j < n2; ++j)
+					{
+						var values:Array = tabularData.getAutomationValueForData(items[j]);
+						childValues.push(values.join("|"));
+					}
+					_values.push(childValues);
+					if (longestRow < n2)
+						longestRow = n2;
+				}
+			}
+
+			// normalize the grid so all rows have the same number of columns
+			var n1:int =  _values.length;
+			for (i = 0; i < n1; i++)
+			{
+				for (j = _values[i].length; j < longestRow; j++)
+				{
+					_values[i].push("");
+				}
+			}
+			return _values;
+		}
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function getAutomationValueForData(data:Object):Array
+		{
+			return [];
+		}
+	}
+}


覆盖 discard

覆盖 discard

--- ageb/src/ageb/modules/avatar/timelineClasses/FrameCellHeader.as
+++ ageb/src/ageb/modules/avatar/timelineClasses/FrameCellHeader.as
@@ -59,5 +59,15 @@
 				}
 			}
 		}
+
+		/**
+		 * @inheritDoc
+		 * @param willBeRecycled
+		 *
+		 */
+		override public function discard(willBeRecycled:Boolean):void
+		{
+			// Do nothing
+		}
 	}
 }


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

--- frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/BubbleSeriesAutomationImpl.as
+++ frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/BubbleSeriesAutomationImpl.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


A few bits I'd marked as part of the pathing overhaul that I can just get now.

git-svn-id: a3e1eb16dde062992de22c830ed8045c8013209a@946 c613c5cb-e716-0410-b11b-feb51c14d237

--- src/as/com/threerings/stage/client/CrowdStageScenePanel.as
+++ src/as/com/threerings/stage/client/CrowdStageScenePanel.as
@@ -20,6 +20,7 @@
 package com.threerings.stage.client {

 import flash.geom.Point;
+import flash.geom.Rectangle;

 import flash.events.MouseEvent;

@@ -71,6 +72,8 @@
         _proxrad = int(Math.max(_proxrad, Math.sqrt(_isoView.size.x*_isoView.size.x +
             _isoView.size.y*_isoView.size.y)));
         recomputeProximate();
+
+        _vbounds = new Rectangle(0, 0, _isoView.size.x, _isoView.size.y);
     }

     override public function willEnterPlace (plObj :PlaceObject) :void
@@ -285,7 +288,7 @@
         if (!isProximateToLoc(nloc)) {
             if (sprite != null) {
                 // if they are visible, walk them to their new location
-                if (true/*TODO Path _vbounds.intersects(sprite.getBounds())*/) {
+                if (_vbounds.intersects(sprite.screenBounds)) {
                     moveSpriteToLoc(sprite, nloc.loc);
                 }
                 // now queue them up for removal on arrival as appropriate
@@ -357,6 +360,8 @@
     {
         var cx :int = sprite.x;
         var cy :int = sprite.y;
+        var nx :int = MisoUtil.fullToTile(loc.x);
+        var ny :int = MisoUtil.fullToTile(loc.y);

         // if this panel is not yet showing, warp the sprite directly
         if (!visible) {
@@ -367,8 +372,8 @@

         // if the source and destination are both offscreen, warp the
         // sprite to where they are going
-        // TODO Path boolean endsOff = !_vbounds.contains(nx, ny);
-        if (false /*TODO Path!_vbounds.intersects(sprite.getBounds()) && endsOff*/) {
+        var endsOff :Boolean = !_vbounds.contains(nx, ny);
+        if (!_vbounds.intersects(sprite.screenBounds) && endsOff) {
             sprite.cancelMove();
             sprite.placeAtLoc(loc);
             return true;
@@ -376,12 +381,12 @@

         // if we are obviously warping (i.e. we moved a great distance),
         // just blink into position and attempt to do so cleanly
-        //TODO Path int dx = Math.abs(nx - (_vbounds.x + _vbounds.width/2));
-        //TODO Path int dy = Math.abs(ny - (_vbounds.y + _vbounds.height/2));
-        if (sprite == _selfSprite/*TODO Path (dx > 2*_vbounds.width || dy > 2*_vbounds.height) &&
-              (sprite == _selfSprite)*/) {
-            //TODO Path log.info("Warp-a-saurus! " + StringUtil.toString(_vbounds) +
-            //TODO Path         " -> " + StringUtil.toCoordsString(loc.x, loc.y));
+        var dx :int = Math.abs(nx - (_vbounds.x + _vbounds.width/2));
+        var dy :int = Math.abs(ny - (_vbounds.y + _vbounds.height/2));
+        if ((dx > 2*_vbounds.width || dy > 2*_vbounds.height) &&
+              (sprite == _selfSprite)) {
+            log.info("Warp-a-saurus! " + StringUtil.toString(_vbounds) +
+                " -> " + StringUtil.toCoordsString(loc.x, loc.y));
             sprite.cancelMove();
             sprite.placeAtLoc(loc);

@@ -695,6 +700,8 @@

     protected var _scObj :StageSceneObject;

+    protected var _vbounds :Rectangle;
+
     /** Our sprite path velocity. */
     // if we had more frames, maybe we could only update their
     // location when their frame changed. Alas, we do not.


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls.advancedDataGridClasses
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/ButtonBar.as
+++ frameworks/projects/mx/src/mx/controls/ButtonBar.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.controls
 {


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

--- frameworks/projects/mx/src/mx/controls/ComboBase.as
+++ frameworks/projects/mx/src/mx/controls/ComboBase.as
@@ -0,0 +1,1458 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2002-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.controls
+{
+
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+import flash.events.TextEvent;
+import mx.collections.ArrayCollection;
+import mx.collections.CursorBookmark;
+import mx.collections.ICollectionView;
+import mx.collections.IList;
+import mx.collections.IViewCursor;
+import mx.collections.ListCollectionView;
+import mx.collections.XMLListCollection;
+import mx.core.EdgeMetrics;
+import mx.core.FlexVersion;
+import mx.core.IBorder;
+import mx.core.IFlexDisplayObject;
+import mx.core.IIMESupport;
+import mx.core.IUITextField;
+import mx.core.UIComponent;
+import mx.core.UITextField;
+import mx.core.mx_internal;
+import mx.events.CollectionEvent;
+import mx.events.CollectionEventKind;
+import mx.events.FlexEvent;
+import mx.managers.IFocusManager;
+import mx.managers.IFocusManagerComponent;
+import mx.styles.ISimpleStyleClient;
+import mx.styles.StyleProxy;
+import mx.utils.UIDUtil;
+
+
+use namespace mx_internal;
+
+/**
+ *  Name of the class to use as the default skin for the background and border.
+ *  For the ComboBase class, there is no default value.
+ *  For the ComboBox class, the default value is the ComboBoxArrowSkin class.
+ */
+[Style(name="skin", type="Class", inherit="no", states=" up, over, down, disabled,  editableUp, editableOver, editableDown, editableDisabled")]
+
+/**
+ *  Name of the class to use as the skin for the background and border
+ *  when the mouse is not over the control.
+ *  For the ComboBase class, there is no default value.
+ *  For the ComboBox class, the default value is the ComboBoxArrowSkin class.
+ */
+[Style(name="upSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the background and border
+ *  when the mouse is over the control.
+ *  For the ComboBase class, there is no default value.
+ *  For the ComboBox class, the default value is the ComboBoxArrowSkin class.
+ *  For the ColorPicker class, the default value is the ColorPickerSkin class.
+ *  For the DateField class, the default value is the ScrollArrowDownSkin class.
+ */
+[Style(name="overSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the background and border
+ *  when the user holds down the mouse button.
+ *  For the ComboBase class, there is no default value.
+ *  For the ComboBox class, the default value is the ComboBoxArrowSkin class.
+ *  For the ColorPicker class, the default value is the ColorPickerSkin class.
+ *  For the DateField class, the default value is the ScrollArrowDownSkin class.
+ */
+[Style(name="downSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the background and border
+ *  when the control is disabled.
+ *  For the ComboBase class, there is no default value.
+ *  For the ComboBox class, the default value is the ComboBoxArrowSkin class.
+ *  For the ColorPicker class, the default value is the ColorPickerSkin class.
+ *  For the DateField class, the default value is the ScrollArrowDownSkin class.
+ */
+[Style(name="disabledSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the background and border
+ *  when the mouse is not over the control, and the editable
+ *  property is true. This skin is only used by the ComboBox class.
+ *  For the ComboBase class, there is no default value.
+ *  For the ComboBox class, the default value is the ComboBoxArrowSkin class.
+ */
+[Style(name="editableUpSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the background and border
+ *  when the mouse is over the control, and the editable
+ *  property is true. This skin is only used by the ComboBox class.
+ *  For the ComboBase class, there is no default value.
+ *  For the ComboBox class, the default value is the ComboBoxArrowSkin class.
+ */
+[Style(name="editableOverSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the background and border
+ *  when the user holds down the mouse button, and the editable
+ *  property is true. This skin is only used by the ComboBox class.
+ *  For the ComboBase class, there is no default value.
+ *  For the ComboBox class, the default value is the ComboBoxArrowSkin class.
+ */
+[Style(name="editableDownSkin", type="Class", inherit="no")]
+
+/**
+ *  Name of the class to use as the skin for the background and border
+ *  when the control is disabled, and the editable
+ *  property is true. This skin is only used by the ComboBox class.
+ *  For the ComboBase class, there is no default value.
+ *  For the ComboBox class, the default value is the ComboBoxArrowSkin class.
+ */
+[Style(name="editableDisabledSkin", type="Class", inherit="no")]
+
+/**
+ *  The style declaration for the internal TextInput subcomponent
+ *  that displays the current selection.
+ *  If no value is specified, then the TextInput subcomponent uses
+ *  the default text styles defined by the ComboBase class.
+ *
+ *  @default ""
+ */
+[Style(name="textInputStyleName", type="String", inherit="no")]
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[AccessibilityClass(implementation="mx.accessibility.ComboBaseAccImpl")]
+
+/**
+ *  The ComboBase class is the base class for controls that display text in a
+ *  text field and have a button that causes a drop-down list to appear where
+ *  the user can choose which text to display.
+ *  The ComboBase class is not used directly as an MXML tag.
+ *
+ *  @mxml
+ *
+ *
The <mx:ComboBase> tag inherits all the tag attributes
+ *  of its superclass, and adds the following tag attributes:

+ *
+ *

+ *  <mx:tagname
+ *    Properties
+ *    dataProvider="null"
+ *    editable="false|true"
+ *    imeMode="null"
+ *    restrict="null"
+ *    selectedIndex="-1"
+ *    selectedItem="null"
+ *    text=""
+ *
+ *    Styles
+ *    disabledSkin="Depends on class"
+ *    downSkin="Depends on class"
+ *    editableDisabledSkin="Depends on class"
+ *    editableDownSkin="Depends on class"
+ *    editableOverSkin="Depends on class"
+ *    editableUpSkin="Depends on class"
+ *    overSkin="Depends on class"
+ *    textInputStyleName=""
+ *    upSkin="Depends on class"
+ *
+ *  />
+ *

+ *
+ *  @see mx.controls.Button
+ *  @see mx.controls.TextInput
+ *  @see mx.collections.ICollectionView
+ */
+public class ComboBase extends UIComponent implements IIMESupport, IFocusManagerComponent
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class mixins
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Placeholder for mixin by ComboBaseAccImpl.
+     */
+    mx_internal static var createAccessibilityImplementation:Function;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function ComboBase()
+    {
+        super();
+
+        tabEnabled = true;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The ICollectionView of items this component displays.
+     */
+    protected var collection:ICollectionView;
+
+    /**
+     *  The main IViewCursor used to fetch items from the
+     *  dataProvider and pass the items to the renderers.
+     *  At the end of any sequence of code, it must always be positioned
+     *  at the topmost visible item on screen.
+     */
+    protected var iterator:IViewCursor;
+
+    /**
+     *  @private
+     *  A separate IViewCursor used to find indices of items and other things.
+     *  The collectionIterator can be at any place within the set of items.
+     */
+    mx_internal var collectionIterator:IViewCursor;
+
+    /**
+     *  @private
+     *  The internal object that draws the border.
+     */
+    mx_internal var border:IFlexDisplayObject;
+
+    /**
+     *  @private
+     *  The internal Button property that causes the drop-down list to appear.
+     */
+    mx_internal var downArrowButton:Button;
+
+    /**
+     *  @private
+     */
+    mx_internal var wrapDownArrowButton:Boolean = true;
+
+    /**
+     *  @private
+     */
+    mx_internal var useFullDropdownSkin:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var selectedUID:String;
+
+    /**
+     *  @private
+     *  A flag indicating that selection has changed
+     */
+    mx_internal var selectionChanged:Boolean = false;
+
+    /**
+     *  @private
+     *  A flag indicating that selectedIndex has changed
+     */
+    mx_internal var selectedIndexChanged:Boolean = false;
+
+    /**
+     *  @private
+     *  A flag indicating that selectedItem has changed
+     */
+    mx_internal var selectedItemChanged:Boolean = false;
+
+    /**
+     *  @private
+     *  Stores the old value of the borderStyle style
+     */
+    mx_internal var oldBorderStyle:String;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     *  @private
+     *  The baselinePosition of a ComboBase is calculated for its TextInput.
+     */
+    override public function get baselinePosition():Number
+    {
+        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
+            return textInput.y  + textInput.baselinePosition;
+
+        if (!validateBaselinePosition())
+            return NaN;
+
+        return textInput.y  + textInput.baselinePosition;
+    }
+
+    //----------------------------------
+    //  enabled
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for enabled property.
+     */
+    private var _enabled:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var enabledChanged:Boolean = false;
+
+    [Inspectable(category="General", enumeration="true,false", defaultValue="true")]
+
+    /**
+     *  @private
+     */
+    override public function set enabled(value:Boolean):void
+    {
+        super.enabled = value;
+        _enabled = value;
+
+        enabledChanged = true;
+        invalidateProperties();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+     //----------------------------------
+    //  arrowButtonStyleFilters
+    //----------------------------------
+
+    /**
+     *  Set of styles to pass from the ComboBase to the down arrow button
+     *  @see mx.styles.StyleProxy
+     */
+    protected function get arrowButtonStyleFilters():Object
+    {
+        return null;
+    }
+    //----------------------------------
+    //  borderMetrics
+    //----------------------------------
+
+    /**
+     *  Returns an EdgeMetrics object that has four properties:
+     *  left, top, right,
+     *  and bottom.
+     *  The value of each property is equal to the thickness of the
+     *  corresponding side of the border, expressed in pixels.
+     *
+     *  @return EdgeMetrics object with the left, right, top,
+     *  and bottom properties.
+     */
+    protected function get borderMetrics():EdgeMetrics
+    {
+        if (border && border is IBorder)
+            return IBorder(border).borderMetrics;
+
+        return EdgeMetrics.EMPTY;
+    }
+
+    //----------------------------------
+    //  dataProvider
+    //----------------------------------
+
+    [Bindable("collectionChange")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  The set of items this component displays. This property is of type
+     *  Object because the derived classes can handle a variety of data
+     *  types such as Arrays, XML, ICollectionViews, and other classes.  All
+     *  are converted into an ICollectionView and that ICollectionView is
+     *  returned if you get the value of this property; you will not get the
+     *  value you set if it was not an ICollectionView.
+     *
+     *
Setting this property will adjust the selectedIndex
+     *  property (and therefore the selectedItem property) if
+     *  the selectedIndex property has not otherwise been set.
+     *  If there is no prompt property, the selectedIndex
+     *  property will be set to 0; otherwise it will remain at -1,
+     *  the index used for the prompt string.
+     *  If the selectedIndex property has been set and
+     *  it is out of range of the new data provider, unexpected behavior is
+     *  likely to occur.

+     *
+     */
+    public function get dataProvider():Object
+    {
+        return collection;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dataProvider(value:Object):void
+    {
+        if (value is Array)
+        {
+            collection = new ArrayCollection(value as Array);
+        }
+        else if (value is ICollectionView)
+        {
+            collection = ICollectionView(value);
+        }
+        else if (value is IList)
+        {
+            collection = new ListCollectionView(IList(value));
+        }
+        else if (value is XMLList)
+        {
+            collection = new XMLListCollection(value as XMLList);
+        }
+        else
+        {
+            // convert it to an array containing this one item
+            var tmp:Array = [value];
+            collection = new ArrayCollection(tmp);
+        }
+        // get an iterator for the displaying rows.  The CollectionView's
+        // main iterator is left unchanged so folks can use old DataSelector
+        // methods if they want to
+        iterator = collection.createCursor();
+        collectionIterator = collection.createCursor(); //IViewCursor(collection);
+
+        // trace("ListBase added change listener");
+        // weak listeners to collections and dataproviders
+        collection.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true);
+
+        var event:CollectionEvent =
+            new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
+        event.kind = CollectionEventKind.RESET;
+        collectionChangeHandler(event);
+        dispatchEvent(event);
+
+        invalidateSize();
+        invalidateDisplayList();
+    }
+
+    //----------------------------------
+    //  editable
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for editable property.
+     */
+    private var _editable:Boolean = false;
+
+    /**
+     *  @private
+     */
+    mx_internal var editableChanged:Boolean = true;
+
+    [Bindable("editableChanged")]
+    [Inspectable(category="General", defaultValue="false")]
+
+    /**
+     *  A flag that indicates whether the control is editable,
+     *  which lets the user directly type entries that are not specified
+     *  in the dataProvider, or not editable, which requires the user select
+     *  from the items in the dataProvider.
+     *
+     *
If true keyboard input will be entered in the
+     *  editable text field; otherwise it will be used as shortcuts to
+     *  select items in the dataProvider.

+     *
+     *  @default false.
+     *  This property is ignored by the DateField control.
+     *
+     */
+    public function get editable():Boolean
+    {
+        return _editable;
+    }
+
+    /**
+     *  @private
+     */
+    public function set editable(value:Boolean):void
+    {
+        _editable = value;
+        editableChanged = true;
+
+        invalidateProperties();
+
+        dispatchEvent(new Event("editableChanged"));
+    }
+
+    //----------------------------------
+    //  imeMode
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _imeMode:String = null;
+
+    /**
+     *  @copy mx.controls.TextInput#imeMode
+     *
+     *  @default null
+     **/
+    public function get imeMode():String
+    {
+        return _imeMode;
+    }
+
+    /**
+     *  @private
+     */
+    public function set imeMode(value:String):void
+    {
+        _imeMode = value;
+
+        if (textInput)
+            textInput.imeMode = _imeMode;
+    }
+
+    //----------------------------------
+    //  restrict
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for restrict property.
+     */
+    private var _restrict:String;
+
+    [Bindable("restrictChanged")]
+    [Inspectable(category="Other")]
+
+    /**
+     *  Set of characters that a user can or cannot enter into the text field.
+     *
+     *  @default null
+     *
+     *  @see flash.text.TextField#restrict
+     *
+     */
+    public function get restrict():String
+    {
+        return _restrict;
+    }
+
+    /**
+     *  @private
+     */
+    public function set restrict(value:String):void
+    {
+        _restrict = value;
+
+        invalidateProperties();
+
+        dispatchEvent(new Event("restrictChanged"));
+    }
+
+    //----------------------------------
+    //  selectedIndex
+    //----------------------------------
+
+    private var _selectedIndex:int = -1;
+
+    [Bindable("change")]
+    [Bindable("valueCommit")]
+    [Inspectable(category="General", defaultValue="-1")]
+
+    /**
+     *  The index in the data provider of the selected item.
+     *  If there is a prompt property, the selectedIndex
+     *  value can be set to -1 to show the prompt.
+     *  If there is no prompt, property then selectedIndex
+     *  will be set to 0 once a dataProvider is set.
+     *
+     *
If the ComboBox control is editable, the selectedIndex
+     *  property is -1 if the user types any text
+     *  into the text field.

+     *
+     *
Unlike many other Flex properties that are invalidating (setting
+     *  them does not have an immediate effect), the selectedIndex and
+     *  selectedItem properties are synchronous; setting one immediately
+     *  affects the other.

+     *
+     *  @default -1
+     */
+    public function get selectedIndex():int
+    {
+        return _selectedIndex;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectedIndex(value:int):void
+    {
+        _selectedIndex = value;
+        if (value == -1)
+        {
+            _selectedItem = null;
+            selectedUID = null;
+        }
+
+        //2 code paths: one for before collection, one after
+        if (!collection || collection.length == 0)
+        {
+            selectedIndexChanged = true;
+        }
+        else
+        {
+            if (value != -1)
+            {
+                value = Math.min(value, collection.length - 1);
+                var bookmark:CursorBookmark = iterator.bookmark;
+                var len:int = value;
+                iterator.seek(CursorBookmark.FIRST, len);
+                var data:Object = iterator.current;
+                var uid:String = itemToUID(data);
+                iterator.seek(bookmark, 0);
+                _selectedIndex = value;
+                _selectedItem = data;
+                selectedUID = uid;
+            }
+        }
+
+        selectionChanged = true;
+
+        invalidateDisplayList();
+
+        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+    }
+
+
+    //----------------------------------
+    //  selectedItem
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the selectedItem property.
+     */
+    private var _selectedItem:Object;
+
+    [Bindable("change")]
+    [Bindable("valueCommit")]
+    [Inspectable(environment="none")]
+
+    /**
+     *  The item in the data provider at the selectedIndex.
+     *
+     *
If the data is an object or class instance, modifying
+     *  properties in the object or instance modifies the
+     *  dataProvider object but may not update the views
+     *  unless the instance is Bindable or implements IPropertyChangeNotifier
+     *  or a call to dataProvider.itemUpdated() occurs.

+     *
+     *  Setting the selectedItem property causes the
+     *  ComboBox control to select that item (display it in the text field and
+     *  set the selectedIndex) if it exists in the data provider.
+     *  If the ComboBox control is editable, the selectedItem
+     *  property is null if the user types any text
+     *  into the text field.
+     *
+     *
Unlike many other Flex properties that are invalidating (setting
+     *  them does not have an immediate effect), selectedIndex and
+     *  selectedItem are synchronous; setting one immediately
+     *  affects the other.

+     *
+     *  @default null;
+     */
+    public function get selectedItem():Object
+    {
+        return _selectedItem;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectedItem(data:Object):void
+    {
+        setSelectedItem(data);
+    }
+
+    /**
+     *  @private
+     */
+    private function setSelectedItem(data:Object, clearFirst:Boolean = true):void
+    {
+        //2 code paths: one for before collection, one after
+        if (!collection || collection.length == 0)
+        {
+            _selectedItem = value;
+            selectedItemChanged = true;
+            invalidateDisplayList();
+            return;
+        }
+
+        var found:Boolean = false;
+        var listCursor:IViewCursor = collection.createCursor();
+        var i:int = 0;
+        do
+        {
+            if (data == listCursor.current)
+            {
+                _selectedIndex = i;
+                _selectedItem = data;
+                selectedUID = itemToUID(data);
+                selectionChanged = true;
+                found = true;
+                break;
+            }
+            i++;
+        }
+        while (listCursor.moveNext());
+
+        if (!found)
+        {
+            selectedIndex = -1;
+            _selectedItem = null;
+            selectedUID = null;
+        }
+
+        invalidateDisplayList();
+    }
+
+    //----------------------------------
+    //  text
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the text property.
+     */
+    private var _text:String = "";
+
+    /**
+     *  @private
+     */
+    mx_internal var textChanged:Boolean;
+
+    [Bindable("collectionChange")]
+    [Bindable("valueCommit")]
+    [Inspectable(category="General", defaultValue="")]
+    [NonCommittingChangeEvent("change")]
+
+    /**
+     *  Contents of the text field.  If the control is non-editable
+     *  setting this property has no effect. If the control is editable,
+     *  setting this property sets the contents of the text field.
+     *
+     *  @default ""
+     */
+    public function get text():String
+    {
+        return _text;
+    }
+
+    /**
+     *  @private
+     */
+    public function set text(value:String):void
+    {
+        _text = value;
+        textChanged = true;
+
+        invalidateProperties();
+
+        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+    }
+
+    //----------------------------------
+    //  textInput
+    //----------------------------------
+
+    /**
+     *  The internal TextInput subcomponent that displays
+     *  the current selection.
+     */
+    protected var textInput:TextInput;
+
+
+    //----------------------------------
+    //  textInputStyleFilters
+    //----------------------------------
+
+    /**
+     *  The set of styles to pass from the ComboBase to the text input.
+     *  These styles are ignored if you set
+     *  the textInputStyleName style property.
+     *  @see mx.styles.StyleProxy
+     */
+    protected function get textInputStyleFilters():Object
+    {
+        return _textInputStyleFilters;
+    }
+
+    private static var _textInputStyleFilters:Object =
+    {
+        "backgroundAlpha" : "backgroundAlpha",
+        "backgroundColor" : "backgroundColor",
+        "backgroundImage" : "backgroundImage",
+        "backgroundDisabledColor" : "backgroundDisabledColor",
+        "backgroundSize" : "backgroundSize",
+        "borderAlpha" : "borderAlpha",
+        "borderColor" : "borderColor",
+        "borderSides" : "borderSides",
+        "borderSkin" : "borderSkin",
+        "borderStyle" : "borderStyle",
+        "borderThickness" : "borderThickness",
+        "dropShadowColor" : "dropShadowColor",
+        "dropShadowEnabled" : "dropShadowEnabled",
+        "embedFonts" : "embedFonts",
+        "focusAlpha" : "focusAlpha",
+        "focusBlendMode" : "focusBlendMode",
+        "focusRoundedCorners" : "focusRoundedCorners",
+        "focusThickness" : "focusThickness",
+        "leading" : "leading",
+        "paddingLeft" : "paddingLeft",
+        "paddingRight" : "paddingRight",
+        "shadowDirection" : "shadowDirection",
+        "shadowDistance" : "shadowDistance",
+        "textDecoration" : "textDecoration"
+     };
+
+    //----------------------------------
+    //  value
+    //----------------------------------
+
+    [Bindable("change")]
+    [Bindable("valueCommit")]
+
+    /**
+     *  The value of the selected item. If the item is a Number or String,
+     *  the value is the item. If the item is an object, the value is
+     *  the data property, if it exists, or the label
+     *  property, if it exists.
+     *
+     *
Note: Using the selectedItem property
+     *  is often preferable to using this property. The value
+     *  property exists for backward compatibility with older applications

+     *
+     */
+    public function get value():Object
+    {
+        if (_editable)
+            return text;
+
+        var item:Object = selectedItem;
+
+        if (item == null || typeof(item) != "object")
+            return item;
+
+        // Note: the explicit comparison with null is important, because otherwise when
+        // the data is zero, the label will be returned.  See bug 183294 for an example.
+        return item.data != null ? item.data : item.label;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function initializeAccessibility():void
+    {
+        if (ComboBase.createAccessibilityImplementation != null)
+            ComboBase.createAccessibilityImplementation(this);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        // Create the border first, in the back.
+        if (!border)
+        {
+            var borderClass:Class = getStyle("borderSkin");
+
+            if (borderClass)
+            {
+                border = new borderClass();
+
+                if (border is IFocusManagerComponent)
+                    IFocusManagerComponent(border).focusEnabled = false;
+
+                if (border is ISimpleStyleClient)
+                    ISimpleStyleClient(border).styleName = this;
+
+                addChild(DisplayObject(border));
+            }
+        }
+
+        // Next, create the downArrowButton before creating the textInput,
+        // because it can be as large as the entire control.
+        if (!downArrowButton)
+        {
+            downArrowButton = new Button();
+            downArrowButton.styleName = new StyleProxy(this, arrowButtonStyleFilters);
+            downArrowButton.focusEnabled = false;
+
+            addChild(downArrowButton);
+
+            downArrowButton.addEventListener(FlexEvent.BUTTON_DOWN,
+                                             downArrowButton_buttonDownHandler);
+
+        }
+
+        // Create the textInput on top.
+        if (!textInput)
+        {
+            var textInputStyleName:Object = getStyle("textInputStyleName");
+            if (!textInputStyleName)
+                textInputStyleName = new StyleProxy(this, textInputStyleFilters);
+
+            textInput = new TextInput();
+
+            textInput.editable = _editable;
+            editableChanged = true;
+            // Don't show ESC characters in the text field.
+            textInput.restrict = "^\u001b";
+            textInput.focusEnabled = false;
+            textInput.imeMode = _imeMode;
+            textInput.styleName = textInputStyleName;
+
+            textInput.addEventListener(Event.CHANGE, textInput_changeHandler);
+            textInput.addEventListener(FlexEvent.ENTER, textInput_enterHandler);
+            textInput.addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
+            textInput.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
+            textInput.addEventListener(FlexEvent.VALUE_COMMIT,
+                                       textInput_valueCommitHandler);
+
+            addChild(textInput);
+
+            textInput.move(0, 0);
+
+            textInput.parentDrawsFocus = true;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override public function styleChanged(styleProp:String):void
+    {
+        if (downArrowButton)
+            downArrowButton.styleChanged(styleProp);
+
+        if (textInput)
+            textInput.styleChanged(styleProp);
+
+        if (border && border is ISimpleStyleClient)
+            ISimpleStyleClient(border).styleChanged(styleProp);
+
+        super.styleChanged(styleProp);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        // A TextField interprets restrict="" as meaning
+        // don't allow any characters, and restrict = null
+        // as meaning allow all characters.
+        // The former is useless (the TextField should be disabled
+        // instead) and the latter is useful, but MXML doesn't
+        // have a way to specify restrict = null. So Flex changes
+        // the semantics of restrict="" to mean allow all characters.
+        textInput.restrict = _restrict;
+
+        if (textChanged)
+        {
+            textInput.text = _text;
+            textChanged = false;
+        }
+
+        if (enabledChanged)
+        {
+            textInput.enabled = _enabled;
+            editableChanged = true;
+            downArrowButton.enabled = _enabled;
+            enabledChanged = false;
+        }
+
+        if (editableChanged)
+        {
+            editableChanged = false;
+            var e:Boolean = _editable;
+
+            if (wrapDownArrowButton == false)
+            {
+                if (e)
+                {
+                    if (oldBorderStyle)
+                        setStyle("borderStyle", oldBorderStyle);
+                }
+                else
+                {
+                    oldBorderStyle = getStyle("borderStyle");
+                    setStyle("borderStyle", "comboNonEdit");
+                }
+            }
+
+            // Swap the button skins if we have different skins for editable and
+            // non-editable states.
+            if (useFullDropdownSkin)
+            {
+                downArrowButton.upSkinName = e ? "editableUpSkin" : "upSkin";
+                downArrowButton.overSkinName = e ? "editableOverSkin" : "overSkin";
+                downArrowButton.downSkinName = e ? "editableDownSkin" : "downSkin";
+                downArrowButton.disabledSkinName = e ? "editableDisabledSkin" : "disabledSkin";
+                downArrowButton.changeSkins();
+                downArrowButton.invalidateDisplayList();
+            }
+
+            if (textInput)
+            {
+                textInput.editable = e;
+                textInput.selectable = e;
+                if (e)
+                {
+                    textInput.removeEventListener(MouseEvent.MOUSE_DOWN,
+                                                  textInput_mouseEventHandler);
+                    textInput.removeEventListener(MouseEvent.MOUSE_UP,
+                                                  textInput_mouseEventHandler);
+                    textInput.removeEventListener(MouseEvent.ROLL_OVER,
+                                                  textInput_mouseEventHandler);
+                    textInput.removeEventListener(MouseEvent.ROLL_OUT,
+                                                  textInput_mouseEventHandler);
+                    textInput.addEventListener(KeyboardEvent.KEY_DOWN,
+                                               keyDownHandler);
+                }
+                else
+                {
+                    // Trap all mouse actions on the textfield and feed them to the button
+                    textInput.addEventListener(MouseEvent.MOUSE_DOWN,
+                                               textInput_mouseEventHandler);
+                    textInput.addEventListener(MouseEvent.MOUSE_UP,
+                                              textInput_mouseEventHandler);
+                    textInput.addEventListener(MouseEvent.ROLL_OVER,
+                                               textInput_mouseEventHandler);
+                    textInput.addEventListener(MouseEvent.ROLL_OUT,
+                                               textInput_mouseEventHandler);
+                    textInput.removeEventListener(KeyboardEvent.KEY_DOWN,
+                                                  keyDownHandler);
+                }
+            }
+        }
+    }
+
+    /**
+     *  Determines the measuredWidth and
+     *  measuredHeight properties of the control.
+     *  The measured width is the width of the widest text
+     *  in the dataProvider
+     *  plus the width of the drop-down button.
+     *  The measured height is the larger of either the button or the text.
+     *  If no data provider has been set or there are no items
+     *  in the data provider, the measuredWidth property is set to
+     *  UIComponent.DEFAULT_MEASURED_WIDTH and the
+     *  measuredHeight property is set
+     *  to UIComponent.DEFAULT_MEASURED_HEIGHT.
+     *
+     *  @see mx.core.UIComponent#measure()
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        var buttonWidth:Number = getStyle("arrowButtonWidth");
+        var buttonHeight:Number = downArrowButton.getExplicitOrMeasuredHeight();
+
+        // Text fields have 4 pixels of white space added to each side
+        // by the player, so fudge this amount.
+        // If we don't have any data, measure a single space char for defaults
+        if (collection && collection.length > 0)
+        {
+            var prefSize:Object = calculatePreferredSizeFromData(collection.length);
+
+            var bm:EdgeMetrics = borderMetrics;
+
+            var textWidth:Number = prefSize.width + bm.left + bm.right + 8;
+            var textHeight:Number = prefSize.height + bm.top + bm.bottom
+                        + UITextField.TEXT_HEIGHT_PADDING;
+
+            measuredMinWidth = measuredWidth = textWidth + buttonWidth;
+            measuredMinHeight = measuredHeight = Math.max(textHeight, buttonHeight);
+        }
+        else
+        {
+            measuredMinWidth = DEFAULT_MEASURED_MIN_WIDTH;
+            measuredWidth = DEFAULT_MEASURED_WIDTH;
+            measuredMinHeight = DEFAULT_MEASURED_MIN_HEIGHT;
+            measuredHeight = DEFAULT_MEASURED_HEIGHT;
+        }
+
+        if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)
+        {
+            // Add in the paddingTop and paddingBottom values
+            var padding:Number = getStyle("paddingTop") + getStyle("paddingBottom");
+            measuredMinHeight += padding;
+            measuredHeight += padding;
+        }
+    }
+
+    /**
+     *  Sizes and positions the internal components in the given width
+     *  and height.  The drop-down button is placed all the way to the right
+     *  and the text field fills the remaining area.
+     *
+     *  @param unscaledWidth Specifies the width of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleX property of the component.
+     *
+     *  @param unscaledHeight Specifies the height of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleY property of the component.
+     *
+     *  @see mx.core.UIComponent#updateDisplayList()
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        var w:Number = unscaledWidth;
+        var h:Number = unscaledHeight;
+
+        var arrowWidth:Number = getStyle("arrowButtonWidth");
+        var textInputHeight:Number = textInput.getExplicitOrMeasuredHeight();
+
+        if (isNaN(arrowWidth))
+            arrowWidth = 0;
+
+        if (wrapDownArrowButton)
+        {
+            var vm:EdgeMetrics = borderMetrics;
+            var wh:Number = h - vm.top - vm.bottom;
+            downArrowButton.setActualSize(wh, wh);
+            downArrowButton.move(w - arrowWidth - vm.right, vm.top);
+            border.setActualSize(w, h);
+            textInput.setActualSize(w - arrowWidth, textInputHeight);
+        }
+        else
+        {
+            if (!_editable && useFullDropdownSkin)
+            {
+                var paddingTop:Number = getStyle("paddingTop");
+                var paddingBottom:Number = getStyle("paddingBottom");
+
+                downArrowButton.move(0, 0);
+                border.setActualSize(w, h);
+                textInput.setActualSize(w - arrowWidth, textInputHeight);
+                textInput.border.visible = false;
+                if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)
+                    textInput.move(textInput.x, ((h - textInputHeight - paddingTop - paddingBottom) / 2) + paddingTop);
+                downArrowButton.setActualSize(unscaledWidth, unscaledHeight);
+            }
+            else
+            {
+                downArrowButton.move(w - arrowWidth, 0);
+                border.setActualSize(w - arrowWidth, h);
+                textInput.setActualSize(w - arrowWidth, h);
+                downArrowButton.setActualSize(arrowWidth, unscaledHeight);
+                textInput.border.visible = true;
+            }
+        }
+
+
+        if (selectedIndexChanged)
+        {
+            selectedIndex = selectedIndex;
+            selectedIndexChanged = false;
+        }
+
+        if (selectedItemChanged)
+        {
+            selectedItem = selectedItem;
+            selectedItemChanged = false;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override public function setFocus():void
+    {
+        if (textInput && _editable)
+            textInput.setFocus();
+        else
+            super.setFocus();
+    }
+
+    /**
+     *  @private
+     */
+    override protected function isOurFocus(target:DisplayObject):Boolean
+    {
+        return target == textInput || super.isOurFocus(target);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Determines default values of the height and width to use for the
+     *  entries in the drop-down list.
+     *  Each subclass of ComboBase must implement this method and return
+     *  an Object containing two properties: width and
+     *  height.
+     *
+     *  @param numItems The number of items to check to determine the size
+     *
+     *  @return An Object with width and height
+     *  properties
+     */
+    protected function calculatePreferredSizeFromData(numItems:int):Object
+    {
+        return null;
+    }
+
+    /**
+     *  Determines the UID for a dataProvider item.
+     *  Every dataProvider item must have or will be assigned a unique
+     *  identifier (UID).
+     *
+     *  @param data A dataProvider item
+     *
+     *  @return A unique identifier.
+     */
+    protected function itemToUID(data:Object):String
+    {
+        if (!data)
+            return "null";
+
+        return UIDUtil.getUID(data);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function focusInHandler(event:FocusEvent):void
+    {
+        super.focusInHandler(event);
+
+        var fm:IFocusManager = focusManager;
+        if (fm)
+            fm.defaultButtonEnabled = false;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function focusOutHandler(event:FocusEvent):void
+    {
+        super.focusOutHandler(event);
+
+        var fm:IFocusManager = focusManager;
+
+        if (fm)
+            fm.defaultButtonEnabled = true;
+
+        if (_editable)
+            dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Responds to changes to the data provider.  The component will adjust
+     *  the selectedIndex property if items are added or removed
+     *  before the component's selected item.
+     *
+     *  @param event The CollectionEvent dispatched from the collection
+     *
+     *  @see mx.events.CollectionEvent
+     */
+    protected function collectionChangeHandler(event:Event):void
+    {
+        if (event is CollectionEvent)
+        {
+            var requiresValueCommit:Boolean = false;
+
+            var len:Number;
+
+            var ind:Object;
+
+            var ce:CollectionEvent = CollectionEvent(event);
+            if (ce.kind == CollectionEventKind.ADD)
+            {
+                if (selectedIndex >= ce.location)
+                    _selectedIndex++;
+            }
+            if (ce.kind == CollectionEventKind.REMOVE)
+            {
+                for (var i:int = 0; i < ce.items.length; i++)
+                {
+                    var uid:String = itemToUID(ce.items[i]);
+                    if (selectedUID == uid)
+                    {
+                        selectionChanged = true;
+                    }
+                }
+                if (selectionChanged)
+                {
+                    if (_selectedIndex >= collection.length)
+                        _selectedIndex = collection.length - 1;
+
+                    selectedIndexChanged = true;
+                    requiresValueCommit = true;
+                    invalidateDisplayList();
+                }
+                else if (selectedIndex >= ce.location)
+                {
+                    _selectedIndex--;
+                    selectedIndexChanged = true;
+                    requiresValueCommit = true;
+                    invalidateDisplayList();
+                }
+
+            }
+            if (ce.kind == CollectionEventKind.REFRESH)
+            {
+                selectedItemChanged = true;
+                // Sorting always changes the selection array
+                requiresValueCommit = true;
+            }
+
+            invalidateDisplayList();
+
+            if (requiresValueCommit)
+                dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+        }
+    }
+
+    /**
+     *  @private
+     *  Forward an event to the down arrow button.
+     */
+    private function textInput_mouseEventHandler(event:Event):void
+    {
+        downArrowButton.dispatchEvent(event);
+    }
+
+    /**
+     *  Handles changes to the TextInput that serves as the editable
+     *  text field in the component.  The method sets
+     *  selectedIndex to -1 (and therefore
+     *  selectedItem to null).
+     */
+    protected function textInput_changeHandler(event:Event):void
+    {
+        // update _text as the user types
+        _text = textInput.text;
+        if (_selectedIndex != -1)
+        {
+            _selectedIndex = -1;
+            _selectedItem = null;
+            selectedUID = null;
+        }
+    }
+
+    /**
+     *  @private
+     *  valueCommit handler for the textInput
+     */
+    private function textInput_valueCommitHandler(event:FlexEvent):void
+    {
+        // update _text if textInput.text is changed programatically
+        _text = textInput.text;
+        dispatchEvent(event);
+    }
+
+    /**
+     *  @private
+     */
+    private function textInput_enterHandler(event:FlexEvent):void
+    {
+        dispatchEvent(event);
+        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+    }
+
+    /**
+     *  Performs some action when the drop-down button is pressed.  This is
+     *  an abstract base class implementation, so it has no effect and is
+     *  overridden by the subclasses.
+     */
+    protected function downArrowButton_buttonDownHandler(event:FlexEvent):void
+    {
+        // overridden by subclasses
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function getTextInput():TextInput
+    {
+        return textInput;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function get ComboDownArrowButton():Button
+    {
+        return downArrowButton;
+    }
+
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.managers
 {


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

--- frameworks/projects/framework/src/mx/managers/ICursorManager.as
+++ frameworks/projects/framework/src/mx/managers/ICursorManager.as
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.managers
+{
+
+[ExcludeClass]
+
+import mx.core.IUIComponent;
+
+/**
+ *  @private
+ */
+public interface ICursorManager
+{
+	function get currentCursorID():int;
+	function set currentCursorID(value:int):void;
+    function get currentCursorXOffset():Number
+	function set currentCursorXOffset(value:Number):void;
+    function get currentCursorYOffset():Number
+	function set currentCursorYOffset(value:Number):void;
+
+	function showCursor():void;
+	function hideCursor():void;
+	function setCursor(cursorClass:Class, priority:int = 2,
+			xOffset:Number = 0, yOffset:Number = 0):int;
+	function removeCursor(cursorID:int):void;
+	function removeAllCursors():void;
+	function setBusyCursor():void;
+	function removeBusyCursor():void;
+
+	function registerToUseBusyCursor(source:Object):void;
+	function unRegisterToUseBusyCursor(source:Object):void;
+}
+
+}
+


Transferred from the Adobe Open Source Subversion Repository

Revision: 7531
Author:   jimurphy@adobe.com
Date:     2009-06-03T19:20:35.382331Z

Log Message:
-----------
Merge 3.x revisions 7044,7172,7175,7177,7197,7475,7477,7479,7488,7495,7499 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/CommandMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageAgent.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/framework/src/mx/core/ContainerRawChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/Application.java</path>

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

--- frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as
+++ frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as
@@ -732,7 +732,7 @@
         {
             channelIds = getChannelIds(destinationConfig);
             clustered = (destinationConfig.properties.network.cluster.length() > 0) ? true : false;
-        }
+        }

         var channelSetId:String = channelIds.join(",") + ":" + clustered;

@@ -743,11 +743,10 @@
         else
         {
             var channelSet:ChannelSet = new channelSetFactory(channelIds, clustered);
-            if (clustered)
-            {
-                channelSet.initialDestinationId = destinationId;
-            }
-            _channelSets[channelSetId] = channelSet;
+            var heartbeatMillis:int = serverConfigData["flex-client"]["heartbeat-interval-millis"];
+            if (heartbeatMillis > 0) channelSet.heartbeatInterval = heartbeatMillis;
+            if (clustered) channelSet.initialDestinationId = destinationId;
+            _channelSets[channelSetId] = channelSet;
             return channelSet;
         }
     }


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

--- frameworks/projects/spark/src/spark/core/CSSTextLayoutFormat.as
+++ frameworks/projects/spark/src/spark/core/CSSTextLayoutFormat.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009-2010 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: 4889
Author:   jszeto@adobe.com
Date:     2009-02-07T01:21:29.010759Z

Log Message:
-----------
Reverting revision 4885

Something in this checkin is causing an ASDoc compile failure. I will track this down later and resubmit the changes.

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as" copyfrom-rev="4884" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/BevelFilter.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientFilter.as" copyfrom-rev="4884" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientFilter.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IBitmapFilter.as" copyfrom-rev="4884" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IBitmapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Parser.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IFlexBitmapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateFilterInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseFilter.as" copyfrom-rev="4884" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/filters/DropShadowFilter.as
+++ frameworks/projects/spark/src/spark/filters/DropShadowFilter.as
@@ -1,53 +1,12 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-2008 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////
-
 package mx.filters
 {
-import flash.events.Event;
-import flash.events.EventDispatcher;
 import flash.filters.BitmapFilter;
-import flash.filters.BitmapFilterQuality;
 import flash.filters.DropShadowFilter;
-import mx.filters.IFlexBitmapFilter;
+import mx.filters.BaseDimensionFilter;
+import mx.filters.IBitmapFilter;

-/**
- *  @review
- *  Dispatched when a property value has changed.
- */
-[Event(name="change", type="flash.events.Event")]
-
-/**
- *  @review
- *
- * 	The mx.filters.DropShadowFilter class is based on flash.filters.DropShadowFilter
- *  but adds support for dynamically updating property values.
- *  When a property changes, it dispatches an event that tells the filter owner to
- *  reapply the filter. Use this class instead of flash.filters.DropShadowFilter if
- *  you plan to dynamically change the filter property values.
- *
- *  @see flash.filters.DropShadowFilter
- */
-public class DropShadowFilter extends EventDispatcher implements IFlexBitmapFilter
+public class DropShadowFilter extends BaseDimensionFilter implements IBitmapFilter
 {
-	include "../core/Version.as";
-
-    //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-
-	/**
-	 * @copy flash.filters.DropShadowFilter
-	 */
 	public function DropShadowFilter(distance:Number = 4.0, angle:Number = 45,
 									 color:uint = 0, alpha:Number = 1.0,
 									 blurX:Number = 4.0, blurY:Number = 4.0,
@@ -56,8 +15,6 @@
 									 knockout:Boolean = false,
 									 hideObject:Boolean = false)
 	 {
-	 	super();
-
 	 	this.distance = distance;
 	 	this.angle = angle;
 	 	this.color = color;
@@ -70,12 +27,6 @@
 	 	this.knockout = knockout;
 	 	this.hideObject = hideObject;
 	 }
-
-	//--------------------------------------------------------------------------
-	//
-	//  Properties
-	//
-	//--------------------------------------------------------------------------

 	//----------------------------------
     //  alpha
@@ -131,58 +82,7 @@
 			notifyFilterChanged();
 		}
 	}
-
-	//----------------------------------
-    //  blurX
-    //----------------------------------

-	private var _blurX:Number = 4.0;
-
-	/**
-	 *  The amount of horizontal blur. Valid values are 0 to 255. A blur of 1
-	 *  or less means that the original image is copied as is. The default
-	 *  value is 4. Values that are a power of 2 (such as 2, 4, 8, 16, and 32)
-	 *  are optimized to render more quickly than other values.
-	 */
-	public function get blurX():Number
-	{
-		return _blurX;
-	}
-
-	public function set blurX(value:Number):void
-	{
-		if (value != _blurX)
-		{
-			_blurX = value;
-			notifyFilterChanged();
-		}
-	}
-
-	//----------------------------------
-    //  blurY
-    //----------------------------------
-
-	private var _blurY:Number = 4.0;
-
-	/**
-	 *  The amount of vertical blur. Valid values are 0 to 255. A blur of 1
-	 *  or less means that the original image is copied as is. The default
-	 *  value is 4. Values that are a power of 2 (such as 2, 4, 8, 16, and 32)
-	 *  are optimized to render more quickly than other values.
-	 */
-	public function get blurY():Number
-	{
-		return _blurY;
-	}
-
-	public function set blurY(value:Number):void
-	{
-		if (value != _blurY)
-		{
-			_blurY = value;
-			notifyFilterChanged();
-		}
-	}
 	//----------------------------------
     //  color
     //----------------------------------
@@ -280,122 +180,8 @@
 			notifyFilterChanged();
 		}
 	}
-
-	//----------------------------------
-    //  knockout
-    //----------------------------------

-	private var _knockout:Boolean = false;
-
-	/**
-	 *  Specifies whether the object has a knockout effect. A knockout effect
-	 *  makes the object's fill transparent and reveals the background color
-	 *  of the document. The value true specifies a knockout effect; the
-	 *  default value is false (no knockout effect).
-	 */
-	public function get knockout():Boolean
-	{
-		return _knockout;
-	}
-
-	public function set knockout(value:Boolean):void
-	{
-		if (value != _knockout)
-		{
-			_knockout = value;
-			notifyFilterChanged();
-		}
-	}
-
-	//----------------------------------
-    //  quality
-    //----------------------------------
-
-	private var _quality:int = BitmapFilterQuality.LOW;
-
-	/**
-	 *  The number of times to apply the filter. The default value is
-	 *  BitmapFilterQuality.LOW, which is equivalent to applying the filter
-	 *  once. The value BitmapFilterQuality.MEDIUM  applies the filter twice;
-	 *  the value BitmapFilterQuality.HIGH applies it three times. Filters
-	 *  with lower values are rendered more quickly.
-	 *
-	 *  For most applications, a quality value of low, medium, or high is
-	 *  sufficient. Although you can use additional numeric values up to 15
-	 *  to achieve different effects, higher values are rendered more slowly.
-	 *  Instead of increasing the value of quality, you can often get a similar
-	 *  effect, and with faster rendering, by simply increasing the values of
-	 *  the blurX and blurY properties.
-	 */
-	public function get quality():int
-	{
-		return _quality;
-	}
-
-	public function set quality(value:int):void
-	{
-		if (value != _quality)
-		{
-			_quality = value;
-			notifyFilterChanged();
-		}
-	}
-
-	//----------------------------------
-    //  strength
-    //----------------------------------
-
-	private var _strength:Number = 1;
-
-	/**
-	 *  The strength of the imprint or spread. The higher the value, the more
-	 *  color is imprinted and the stronger the contrast between the glow and
-	 *  the background. Valid values are 0 to 255. A value of 0 means that the
-	 *  filter is not applied. The default value is 1.
-	 */
-	public function get strength():Number
-	{
-		return _strength;
-	}
-
-	public function set strength(value:Number):void
-	{
-		if (value != _strength)
-		{
-			_strength = value;
-			notifyFilterChanged();
-		}
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Methods
-	//
-	//--------------------------------------------------------------------------
-
-   	/**
-     * @private
-     * Notify of a change to our filter, so that filter stack is ultimately
-     * re-applied by the framework.
-     */
-	private function notifyFilterChanged():void
-	{
-		dispatchEvent(new Event(Event.CHANGE));
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  IFlexBitmapFilter
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  Creates a flash.filters.DropShadowFilter instance using the current
-	 *  property values.
-	 *
-	 *  @return flash.filters.DropShadowFilter instance
-	 */
-	public function createBitmapFilter():BitmapFilter
+	public function clone():BitmapFilter
 	{
 		return new flash.filters.DropShadowFilter(distance, angle, color, alpha, blurX,
 												  blurY, strength, quality, inner,


receive PUBLISH message length bug

receive PUBLISH message length bug

receive PUBLISH message length bug

--- MQTTClient_AS3/src/com/godpaper/mqtt/as3/impl/MQTTSocket.as
+++ MQTTClient_AS3/src/com/godpaper/mqtt/as3/impl/MQTTSocket.as
@@ -633,10 +633,11 @@
 			var topicName:String = varHead.readMultiByte(length, "utf8");
 			var messageId:uint = (varHead.readUnsignedByte() << 8) + varHead.readUnsignedByte();
 			var payLoad:ByteArray = packet.readPayLoad();
-			if( packet.readQoS() )
-				length = (payLoad.readUnsignedByte() << 8) + payLoad.readUnsignedByte();
-			else
-				length = packet.readPayLoad().length;
+			length = (payLoad.readUnsignedByte() << 8) + payLoad.readUnsignedByte();
+			if( length > payLoad.length ){
+				length = payLoad.length;
+				payLoad.position = 0;
+			}
 			var topicContent:String = payLoad.readMultiByte(length, "utf8");

 			LOG.info("Publish Message ID {0}", messageId);


Abort event handling on failure

Abort event handling on failure

--- test/src/FRESteamWorksTest.as
+++ test/src/FRESteamWorksTest.as
@@ -13,6 +13,7 @@
 	import com.amanitadesign.steam.FRESteamWorks;
 	import com.amanitadesign.steam.SteamConstants;
 	import com.amanitadesign.steam.SteamEvent;
+	import com.amanitadesign.steam.SteamResults;
 	import com.amanitadesign.steam.WorkshopConstants;

 	import flash.desktop.NativeApplication;
@@ -257,12 +258,14 @@
 					break;
 				case SteamConstants.RESPONSE_OnPublishWorkshopFile:
 					log("RESPONSE_OnPublishWorkshopFile: " + e.response);
+					if(e.response != SteamResults.OK) return;
 					file = Steamworks.publishWorkshopFileResult();
 					log("File published as " + file);
 					log("subscribePublishedFile(...) == " + Steamworks.subscribePublishedFile(file));
 					break;
 				case SteamConstants.RESPONSE_OnEnumerateUserSubscribedFiles:
 					log("RESPONSE_OnEnumerateUserSubscribedFiles: " + e.response);
+					if(e.response != SteamResults.OK) return;
 					var subRes:SubscribedFilesResult = Steamworks.enumerateUserSubscribedFilesResult();
 					log("User subscribed files: " + subRes.resultsReturned + "/" + subRes.totalResults);
 					for(i = 0; i < subRes.resultsReturned; i++) {
@@ -273,6 +276,7 @@
 					break;
 				case SteamConstants.RESPONSE_OnEnumerateUserSharedWorkshopFiles:
 					log("RESPONSE_OnEnumerateUserSharedWorkshopFiles: " + e.response);
+					if(e.response != SteamResults.OK) return;
 					var userRes:UserFilesResult = Steamworks.enumerateUserSharedWorkshopFilesResult();
 					log("User shared files: " + userRes.resultsReturned + "/" + userRes.totalResults);
 					for(i = 0; i < userRes.resultsReturned; i++) {
@@ -285,6 +289,7 @@
 					break;
 				case SteamConstants.RESPONSE_OnEnumeratePublishedWorkshopFiles:
 					log("RESPONSE_OnEnumeratePublishedWorkshopFiles: " + e.response);
+					if(e.response != SteamResults.OK) return;
 					var fileRes:WorkshopFilesResult = Steamworks.enumeratePublishedWorkshopFilesResult();
 					log("Workshop files: " + fileRes.resultsReturned + "/" + fileRes.totalResults);
 					for(i = 0; i < fileRes.resultsReturned; i++) {
@@ -299,6 +304,7 @@
 					break;
 				case SteamConstants.RESPONSE_OnGetPublishedFileDetails:
 					log("RESPONSE_OnGetPublishedFileDetails: " + e.response);
+					if(e.response != SteamResults.OK) return;
 					var res:FileDetailsResult = Steamworks.getPublishedFileDetailsResult(id);
 					log("Result for " + id + ": " + res);
 					if(res) {
@@ -310,6 +316,7 @@
 					break;
 				case SteamConstants.RESPONSE_OnUGCDownload:
 					log("RESPONSE_OnUGCDownload: " + e.response);
+					if(e.response != SteamResults.OK) return;
 					var ugcResult:DownloadUGCResult = Steamworks.getUGCDownloadResult(ugcHandle);
 					log("Result for " + ugcHandle + ": " + ugcResult);
 					if(ugcResult) {


Fix showing loading progress for streams

--- src/SoundManager2_AS3.as
+++ src/SoundManager2_AS3.as
@@ -293,6 +293,7 @@
           bT = oSound.ns.bytesTotal;
           nD = int(oSound.duration || 0); // can sometimes be null with short MP3s? Wack.
           nP = oSound.ns.time * 1000;
+
           if (nP != oSound.lastValues.position) {
             oSound.lastValues.position = nP;
             hasNew = true;
@@ -313,21 +314,21 @@
             oSound.lastValues.bufferLength = bufferLength;
             hasNew = true;
           }
-          if (oSound.loaded != true && nD > 0 && bL == bT) {
+
+          // bytesLoaded and bytesTotal are always 0 for streams, so only set loaded
+          // to true if they are not both 0
+          //writeDebug('ns: loaded paused time duration bytesloaded bytesTotal bufferLength hasNew: '+oSound.loaded+', '+oSound.paused+', '+nP+', '+nD+', '+bL+', '+bT+', '+bufferLength+', '+hasNew);
+          if (oSound.loaded != true && nD > 0 && bL == bT && bL != 0 && bT != 0) {
             // non-MP3 has loaded
-            // writeDebug('ns: time/duration, bytesloaded/total: '+nP+'/'+nD+', '+bL+'/'+bT);
             oSound.loaded = true;
             try {
-              ExternalInterface.call(sMethod, bL, bT, nD); // _whileloading()
+              ExternalInterface.call(sMethod, bL, bT, nD, bufferLength); // _whileloading()
               ExternalInterface.call(baseJSObject + "['" + oSound.sID + "']._onload", oSound.duration > 0 ? 1 : 0);
             } catch(e: Error) {
               writeDebug('_whileLoading/_onload error: ' + e.toString());
             }
           } else if (oSound.loaded != true && hasNew) {
-            // writeDebug('whileloading() loaded/total/duration: '+bL+', '+bT+', '+nD);
-            ExternalInterface.call(sMethod, bL, bT, nD); // _whileloading()
-          } else if (!oSound.loaded && bL == 0 && bT && oSound.ns.bufferLength != oSound.lastValues.bufferLength) {
-            ExternalInterface.call(sMethod, bL, bT, nD, bufferLength);
+            ExternalInterface.call(sMethod, bL, bT, nD, bufferLength); // _whileloading()
           }

         } else {


minor trace message change

minor trace message change

--- flexEditor/src/org/arisgames/editor/services/AppServices.as
+++ flexEditor/src/org/arisgames/editor/services/AppServices.as
@@ -136,7 +136,7 @@
         }
         else
         {
-            trace("This NPC has an Id (" + npc.npcId + "), so call update NPC.  BTW, the game number is = '" + gid + "'; name = '" + npc.name + "'");
+            trace("This NPC has an Id (" + npc.npcId + "), so call update NPC. gameid:" + gid + " name:" + npc.name + "greeting:" + npc.greeting);
             r = AppDAO.getInstance().getNPCServer().updateNpc(gid, npc.npcId, npc.name, npc.description, npc.greeting, npc.mediaId, npc.iconMediaId);
         }
         r.addResponder(resp);