Transferred from the Adobe Open Source Subversion Repository

Revision: 7558
Author:   clucier@adobe.com
Date:     2009-06-04T21:36:55.218585Z

Log Message:
-----------
Performance related change. Integrated the fake Halo RectangularDropShadow into the Flex 4 Panel and DropDownLis
t skin.  Saves quite a bit of memory.
QE Notes: Changes have been cyclones, tests disabled, Jacob or Joan will need to re-baseline the excluded tests'
 bitmaps.
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RectangularDropShadow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/PanelSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as
+++ frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as
@@ -0,0 +1,486 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+package spark.primitives
+{
+	import mx.core.UIComponent;
+	import mx.graphics.RectangularDropShadow;
+
+    /**
+     *
This class optimizes drop shadows for the common case.
+     *  If you are applying a drop shadow to a rectangularly-shaped object
+     *  whose edges fall on pixel boundaries, then this class should
+     *  be used instead of using a DropShadowFilter directly.

+     *
+     *
This class accepts the first four parameters that are passed
+     *  to DropShadowFilter: alpha, angle,
+     *  color, and distance.
+     *  In addition, this class accepts the corner radii for each of the four
+     *  corners of the rectangularly-shaped object that is casting a shadow.

+     *
+     *
Once those 8 values have been set,
+     *  this class pre-computes the drop shadow in an offscreen Bitmap.
+     *  When the drawShadow() method is called, pieces of the
+     *  precomputed drop shadow are  copied onto the passed-in Graphics object.

+     *
+     *  @see flash.filters.DropShadowFilter
+     *  @see flash.display.DisplayObject
+     */
+	public class RectangularDropShadow extends UIComponent
+	{
+	    include "../core/Version.as";
+
+        //--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Constructor.
+         *
+         *  @langversion 4.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 4
+         */
+		public function RectangularDropShadow()
+		{
+		    super();
+		}
+
+        //--------------------------------------------------------------------------
+        //
+        //  Variables
+        //
+        //--------------------------------------------------------------------------
+
+		/**
+         *  @private
+         */
+        private var dropShadow:mx.graphics.RectangularDropShadow;
+
+        //--------------------------------------------------------------------------
+        //
+        //  Properties
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  alpha
+        //----------------------------------
+
+        /**
+         *  @private
+         *  Storage for the alpha property.
+         */
+        private var _alpha:Number = 0.4;
+
+    	[Inspectable]
+
+        /**
+         *  @copy flash.filters.DropShadowFilter#alpha
+         *
+         *  @langversion 4.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 4
+         */
+        override public function get alpha():Number
+        {
+            return _alpha;
+        }
+
+        /**
+         *  @private
+         */
+        override public function set alpha(value:Number):void
+        {
+        	if (_alpha != value)
+        	{
+    			_alpha = value;
+    			invalidateDisplayList();
+    		}
+        }
+
+        //----------------------------------
+        //  angle
+        //----------------------------------
+
+        /**
+         *  @private
+         *  Storage for the angle property.
+         */
+        private var _angle:Number = 45.0;
+
+    	[Inspectable]
+
+        /**
+         *  @copy flash.filters.DropShadowFilter#angle
+         *
+         *  @langversion 4.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 4
+         */
+        public function get angle():Number
+        {
+            return _angle;
+        }
+
+        /**
+         *  @private
+         */
+        public function set angle(value:Number):void
+        {
+        	if (_angle != value)
+        	{
+    			_angle = value;
+    			invalidateDisplayList();
+    		}
+        }
+
+        //----------------------------------
+        //  color
+        //----------------------------------
+
+        /**
+         *  @private
+         *  Storage for the color property.
+         */
+        private var _color:int = 0;
+
+    	[Inspectable]
+
+        /**
+         *  @copy flash.filters.DropShadowFilter#color
+         *
+         *  @langversion 4.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 4
+         */
+        public function get color():int
+        {
+            return _color;
+        }
+
+        /**
+         *  @private
+         */
+        public function set color(value:int):void
+        {
+        	if (_color != value)
+        	{
+    			_color = value;
+    			invalidateDisplayList();
+    		}
+        }
+
+        //----------------------------------
+        //  distance
+        //----------------------------------
+
+        /**
+         *  @private
+         *  Storage for the distance property.
+         */
+        private var _distance:Number = 4.0;
+
+    	[Inspectable]
+
+        /**
+         *  @copy flash.filters.DropShadowFilter#distance
+         *
+         *  @langversion 4.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 4
+         */
+        public function get distance():Number
+        {
+            return _distance;
+        }
+
+        /**
+         *  @private
+         */
+        public function set distance(value:Number):void
+        {
+        	if (_distance != value)
+        	{
+    			_distance = value;
+    			invalidateDisplayList();
+    		}
+        }
+
+        //----------------------------------
+        //  tlRadius
+        //----------------------------------
+
+        /**
+         *  @private
+         *  Storage for the tlRadius property.
+         */
+        private var _tlRadius:Number = 0;
+
+    	[Inspectable]
+
+        /**
+         *  The corner radius of the top left corner
+    	 *  of the rounded rectangle that is casting the shadow.
+    	 *  May be zero for non-rounded rectangles.
+         *
+         *  @langversion 4.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 4
+         */
+        public function get tlRadius():Number
+        {
+            return _tlRadius;
+        }
+
+        /**
+         *  @private
+         */
+        public function set tlRadius(value:Number):void
+        {
+        	if (_tlRadius != value)
+        	{
+    			_tlRadius = value;
+    			invalidateDisplayList();
+    		}
+        }
+
+        //----------------------------------
+        //  trRadius
+        //----------------------------------
+
+        /**
+         *  @private
+         *  Storage for the trRadius property.
+         */
+        private var _trRadius:Number = 0;
+
+    	[Inspectable]
+
+        /**
+         *  The corner radius of the top right corner
+    	 *  of the rounded rectangle that is casting the shadow.
+    	 *  May be zero for non-rounded rectangles.
+         *
+         *  @langversion 4.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 4
+         */
+        public function get trRadius():Number
+        {
+            return _trRadius;
+        }
+
+        /**
+         *  @private
+         */
+        public function set trRadius(value:Number):void
+        {
+        	if (_trRadius != value)
+        	{
+    			_trRadius = value;
+    			invalidateDisplayList();
+    		}
+        }
+
+        //----------------------------------
+        //  blRadius
+        //----------------------------------
+
+        /**
+         *  @private
+         *  Storage for the blRadius property.
+         */
+        private var _blRadius:Number = 0;
+
+    	[Inspectable]
+
+        /**
+         *  The corner radius of the bottom left corner
+    	 *  of the rounded rectangle that is casting the shadow.
+    	 *  May be zero for non-rounded
+         *  rectangles.
+         *
+         *  @langversion 4.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 4
+         */
+        public function get blRadius():Number
+        {
+            return _blRadius;
+        }
+
+        /**
+         *  @private
+         */
+        public function set blRadius(value:Number):void
+        {
+        	if (_blRadius != value)
+        	{
+    			_blRadius = value;
+    			invalidateDisplayList();
+    		}
+        }
+
+        //----------------------------------
+        //  brRadius
+        //----------------------------------
+
+        /**
+         *  @private
+         *  Storage for the brRadius property.
+         */
+        private var _brRadius:Number = 0;
+
+    	[Inspectable]
+
+        /**
+         *  The corner radius of the bottom right corner
+    	 *  of the rounded rectangle that is casting the shadow.
+    	 *  May be zero for non-rounded rectangles.
+         *
+         *  @langversion 4.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 4
+         */
+        public function get brRadius():Number
+        {
+            return _brRadius;
+        }
+
+        /**
+         *  @private
+         */
+        public function set brRadius(value:Number):void
+        {
+        	if (_brRadius != value)
+        	{
+    			_brRadius = value;
+    			invalidateDisplayList();
+    		}
+        }
+
+        //----------------------------------
+        //  blurX
+        //----------------------------------
+
+        /**
+         *  @private
+         *  Storage for the brRadius property.
+         */
+        private var _blurX:Number = 4;
+
+    	[Inspectable]
+
+        /**
+         *  The amount of horizontal blur.
+         *  @default 4
+         *
+         *  @langversion 4.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 4
+         */
+        public function get blurX():Number
+        {
+            return _blurX;
+        }
+
+        /**
+         *  @private
+         */
+        public function set blurX(value:Number):void
+        {
+        	if (_blurX != value)
+        	{
+    			_blurX = value;
+    			invalidateDisplayList();
+    		}
+        }
+
+        //----------------------------------
+        //  blurY
+        //----------------------------------
+
+        /**
+         *  @private
+         *  Storage for the brRadius property.
+         */
+        private var _blurY:Number = 4;
+
+    	[Inspectable]
+
+        /**
+         *  The amount of vertical blur.
+         *  @default 4
+         *
+         *  @langversion 4.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 4
+         */
+        public function get blurY():Number
+        {
+            return _blurY;
+        }
+
+        /**
+         *  @private
+         */
+        public function set blurY(value:Number):void
+        {
+        	if (_blurY != value)
+        	{
+    			_blurY = value;
+    			invalidateDisplayList();
+    		}
+        }
+
+        /**
+         *  @private
+         */
+        override protected function updateDisplayList(unscaledWidth:Number,
+                                                      unscaledHeight:Number):void
+        {
+            super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+            graphics.clear();
+
+            if (!dropShadow)
+                dropShadow = new mx.graphics.RectangularDropShadow();
+
+            dropShadow.distance = _distance;
+            dropShadow.angle = _angle;
+            dropShadow.color = _color;
+            dropShadow.blurX = _blurX;
+            dropShadow.blurY = _blurY;
+            dropShadow.alpha = _alpha;
+
+            dropShadow.tlRadius = _tlRadius;
+            dropShadow.trRadius = _trRadius;
+            dropShadow.blRadius = _blRadius;
+            dropShadow.brRadius = _brRadius;
+
+            dropShadow.drawShadow(graphics, 0, 0, unscaledWidth, unscaledHeight);
+        }
+
+	}
+}


Handle uninitialized KeyValueEditor field map.

--- src/com/esri/builder/views/supportClasses/KeyValueEditor.as
+++ src/com/esri/builder/views/supportClasses/KeyValueEditor.as
@@ -146,7 +146,7 @@

     public function findMatchingField(fieldName:String):Field
     {
-        return fieldNameToFieldLookUp[fieldName];
+        return fieldNameToFieldLookUp ? fieldNameToFieldLookUp[fieldName] : null;
     }

     private function fieldFormatPopUp_closeHandler(event:PopUpEvent):void


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

--- frameworks/projects/advancedgrids/src/mx/controls/OLAPDataGrid.as
+++ frameworks/projects/advancedgrids/src/mx/controls/OLAPDataGrid.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
 {


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

--- frameworks/projects/charts/src/mx/charts/chartClasses/AxisBase.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/AxisBase.as
@@ -0,0 +1,333 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package mx.charts.chartClasses
+{
+
+import flash.events.Event;
+import flash.events.EventDispatcher;
+
+import mx.charts.ChartItem;
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+/**
+ *  The AxisBase class serves as a base class
+ *  for the various axis types supported in Flex.
+ *
+ *  @mxml
+ *
+ *
Flex components inherit the following properties
+ *  from the AxisBase class:

+ *
+ *

+ *  <mx:tagname
+ *    displayName="No default"
+ *    title="No default"
+ *  >
+ *

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class AxisBase extends EventDispatcher
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function AxisBase()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    protected var _transforms:Array /* of Object */ = [];
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  chartDataProvider
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#chartDataProvider
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set chartDataProvider(value:Object):void
+    {
+    }
+
+    //----------------------------------
+    //  displayName
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the name property.
+     */
+    private var _displayName:String = "";
+
+    [Inspectable(category="Display")]
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#displayName
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get displayName():String
+    {
+        return _displayName;
+    }
+
+    /**
+     *  @private
+     */
+    public function set displayName(value:String):void
+    {
+        _displayName = value;
+    }
+
+    //----------------------------------
+    //  title
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the title property.
+     */
+    private var _title:String = "";
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#title
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get title():String
+    {
+        return _title;
+    }
+
+    /**
+     *  @private
+     */
+    public function set title(value:String):void
+    {
+        dispatchEvent(new Event("titleChange"));
+
+        _title = value;
+    }
+
+    //----------------------------------
+    //  unitSize
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#unitSize
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get unitSize():Number
+    {
+        return 1;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Called by the governing DataTransform to obtain a description
+     *  of the data represented by this IChartElement.
+     *  Implementors fill out and return an Array of
+     *  mx.charts.chartClasses.DataDescription objects
+     *  to guarantee that their data is correctly accounted for
+     *  by any axes that are autogenerating values
+     *  from the displayed data (such as minimum, maximum,
+     *  interval, and unitSize).
+     *  Most element types return an Array
+     *  containing a single DataDescription.
+     *  Aggregate elements, such as BarSet and ColumnSet,
+     *  might return multiple DataDescription instances
+     *  that describe the data displayed by their subelements.
+     *  When called, the implementor describes the data
+     *  along the axis indicated by the dimension argument.
+     *  This function might be called for each axis
+     *  supported by the containing chart.
+     *
+     *  @param requiredFields A bitfield that indicates which values
+     *  of the DataDescription object the particular axis cares about.
+     *  Implementors can optimize by only calculating the necessary fields.
+     *
+     *  @return An Array of BoundedValue objects containing the DataDescription instances that describe
+     *  the data that is displayed.
+     *
+     *  @see mx.charts.chartClasses.BoundedValue
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected function describeData(requiredFields:uint):Array /* of BoundedValue */
+    {
+        var result:Array /* of BoundedValue */ = [];
+        var n:int  = _transforms.length;
+
+        for (var i:int = 0; i < n; i++)
+        {
+            result = result.concat(
+                _transforms[i].transform.describeData(
+                    _transforms[i].dimension, requiredFields));
+        }
+
+        return result;
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#registerDataTransform()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function registerDataTransform(transform:DataTransform,
+                                          dimensionName:String):void
+    {
+        _transforms.push({ transform:transform, dimension: dimensionName });
+
+        dataChanged();
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#unregisterDataTransform()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function unregisterDataTransform(transform:DataTransform):void
+    {
+        var n:int = _transforms.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            if (_transforms[i].transform == transform)
+            {
+                _transforms.splice(i, 1);
+                break;
+            }
+        }
+
+        dataChanged();
+    }
+
+    /**
+     *  @copy mx.charts.chartClasses.IAxis#dataChanged()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function dataChanged():void
+    {
+    }
+
+    mx_internal function highlightElements(highlight:Boolean):void
+    {
+        var elements:Array /* of ChartElement */ = [];
+
+        var n:int = _transforms.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            elements = elements.concat(_transforms[i].transform.elements);
+        }
+
+        if (highlight)
+        {
+            n = elements.length;
+            for (i = 0; i < n; i++)
+            {
+                if (elements[i] is Series)
+                    Series(elements[i]).setItemsState(ChartItem.ROLLOVER);
+            }
+        }
+        else // reset the selection - to give the same visual behavior.
+        {
+            n = elements.length;
+            for (i = 0; i < n; i++)
+            {
+                if (elements[i] is Series)
+                {
+                    if (elements[i].getChartSelectedStatus() == false)
+                        elements[i].setItemsState(ChartItem.NONE)
+                    else if (elements[i].selectedItems.length == 0)
+                        elements[i].setItemsState(ChartItem.DISABLED);
+                    else
+                        Series(elements[i]).selectedItems = elements[i].selectedItems;
+                }
+            }
+        }
+    }
+}
+
+}


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

--- frameworks/projects/charts/src/mx/charts/events/ChartItemEvent.as
+++ frameworks/projects/charts/src/mx/charts/events/ChartItemEvent.as
@@ -0,0 +1,260 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.charts.events
+{
+
+import flash.events.Event;
+import flash.events.MouseEvent;
+import mx.charts.HitData;
+import mx.charts.chartClasses.ChartBase;
+import flash.display.InteractiveObject;
+import flash.geom.Point;
+
+/**
+ * The ChartItemEvent class represents events that are specific
+ * to the chart components, such as when a chart item is clicked.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class ChartItemEvent extends MouseEvent
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Event type constant; indicates that the user clicked the mouse button
+	 *  over a chart item representing data in the chart.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public static const ITEM_CLICK:String = "itemClick";
+
+	/**
+	 *  Event type constant; indicates that the user double-clicked
+	 *  the mouse button over a chart item representing data in the chart.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick";
+
+	/**
+	 *  Event type constant; indicates that the user pressed the mouse button
+	 *  over a chart item representing data in the chart.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public static const ITEM_MOUSE_DOWN:String = "itemMouseDown";
+
+	/**
+	 *  Event type constant; indicates that the user moved the mouse pointer
+	 *  while hovering over a chart item representing data in the chart.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public static const ITEM_MOUSE_MOVE:String = "itemMouseMove";
+
+	/**
+	 *  Event type constant; indicates that the user rolled the mouse pointer
+	 *  away from a chart item representing data in the chart.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public static const ITEM_ROLL_OUT:String = "itemRollOut";
+
+	/**
+	 *  Event type constant; indicates that the user rolled the mouse pointer
+	 *  over  a chart item representing data in the chart.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public static const ITEM_ROLL_OVER:String = "itemRollOver";
+
+	/**
+	 *  Event type constant; indicates that the user released the mouse button
+	 *  while over  a chart item representing data in the chart.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public static const ITEM_MOUSE_UP:String = "itemMouseUp";
+
+	/**
+	 *  Event type constant; indicates that the selection in the chart has
+	 *  changed.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+
+	public static const CHANGE:String = "change"
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *	Constructor.
+	 *
+	 *	@param type The type of the event.
+	 *
+	 *	@param hitSet An array of HitData structures describing
+	 *  the ChartItems that triggered the event.
+	 *
+	 *	@param triggerEvent The MouseEvent that triggered this ChartItemEvent.
+	 *
+	 *	@param target The chart on which the event was triggered.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public function ChartItemEvent(type:String, hitSet:Array /* of HitData */=null,
+								   triggerEvent:MouseEvent=null, target:ChartBase=null)
+	{
+		var relPt:Point;
+		if (triggerEvent && triggerEvent.target)
+		{
+			relPt = target.globalToLocal(triggerEvent.target.localToGlobal(
+				new Point(triggerEvent.localX, triggerEvent.localY)));
+		}
+		else
+		{
+		    if (target)
+				relPt = new Point(target.mouseX,target.mouseY);
+			else
+				relPt = new Point(0,0);
+		}
+
+		var bubbles:Boolean = true;
+		var cancelable:Boolean = false;
+		var relatedObject:InteractiveObject = null;
+		var ctrlKey:Boolean = false;
+		var shiftKey:Boolean = false;
+		var altKey:Boolean = false;
+		var buttonDown:Boolean = false;
+		var delta:int = 0;
+
+		if (triggerEvent)
+		{
+        	bubbles = triggerEvent.bubbles;
+			cancelable = triggerEvent.cancelable;
+			relatedObject = triggerEvent.relatedObject;
+			ctrlKey = triggerEvent.ctrlKey;
+			altKey = triggerEvent.altKey;
+			shiftKey = triggerEvent.shiftKey;
+			buttonDown = triggerEvent.buttonDown;
+			delta = triggerEvent.delta;
+		}
+
+
+		super(type, bubbles, cancelable,
+			  relPt.x, relPt.y, relatedObject,
+			  ctrlKey, altKey, shiftKey, buttonDown, delta);
+
+		this.hitSet = hitSet;
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+	//  hitData
+    //----------------------------------
+
+	[Inspectable(environment="none")]
+
+	/**
+	 *  The first item in the hitSet array.
+	 *  This is a convenience function for developers who don't care
+	 *  about events corresponding to multiple items.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public function get hitData():HitData
+	{
+		return (hitSet && hitSet.length > 0)? hitSet[0]:null;
+	}
+
+    //----------------------------------
+	//  hitSet
+    //----------------------------------
+
+	[Inspectable(environment="none")]
+
+	/**
+	 *  A set of HitData structures describing the chart items
+	 *  that triggered the event.
+	 *  This array is in depth order; the first item in the array
+	 *  is the top-most item, and the last is the deepest.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public var hitSet:Array /* of HitData */;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Event
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *	@private
+	 */
+	override public function clone():Event
+	{
+		return new ChartItemEvent(type, hitSet, this,ChartBase(this.target));
+	}
+}
+
+}


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

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

 package mx.binding
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/resources/ResourceManager.as
+++ frameworks/projects/framework/src/mx/resources/ResourceManager.as
@@ -40,6 +40,11 @@
  *
  *  @see mx.resources.IResourceManager
  *  @see mx.resources.IResourceBundle
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ResourceManager
 {
@@ -74,6 +79,11 @@
      *  This object manages all localized resources for a Flex application.
      *
      *  @return An object implementing IResourceManager.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function getInstance():IResourceManager
     {
@@ -107,6 +117,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function ResourceManager()
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/mx/src/mx/skins/halo/ApplicationBackground.as
+++ frameworks/projects/mx/src/mx/skins/halo/ApplicationBackground.as
@@ -18,6 +18,11 @@

 /**
  *  The skin for application background gradient.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ApplicationBackground extends ProgrammaticSkin
 {
@@ -31,6 +36,11 @@

     /**
      *  Constructor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function ApplicationBackground()
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12016
Author:   egeorgie@adobe.com
Date:     2009-11-19T22:37:57.656940Z

Log Message:
-----------
Fix MXMLC compilers don't honor bitmapfill x,y translation http://bugs.adobe.com/jira/browse/SDK-24272

Problems fixed:
1. BitmapFill - Explicit matrix was offset relative to the natural bounds top left, should ignore natural bounds.
2. BitmapFill - Explicit x/y overrides were applied relative to the natural bounds top-left, should be applied relative to (0,0) - test case in this bug.
3. BitmapFill - Explicit scaleX/scaleY were always combined with the default fill transform (problem for fillMode="scale").
4. Path - Stroke bounds for path only were wrong - the fill bounds were used instead.

QE notes: Add additional tests for problems described above.
Doc notes: None
Bugs: SDK-24272
Reviewer: Jason
Tests run: checkintests + mustella cyclone
Is noteworthy for integration: No

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

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

--- frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as
+++ frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as
@@ -165,7 +165,7 @@
      */
     public function get scaleX():Number
     {
-        return _scaleX;
+        return compoundTransform ? compoundTransform.scaleX : _scaleX;
     }

     /**
@@ -173,10 +173,20 @@
      */
     public function set scaleX(value:Number):void
     {
-        var oldValue:Number = _scaleX;
-        if (value != oldValue && !compoundTransform)
+        if (value != scaleX)
         {
-            _scaleX = value;
+            var oldValue:Number = scaleX;
+
+            if (compoundTransform)
+            {
+                // If we have a compoundTransform, only non-NaN values are allowed
+                if (!isNaN(value))
+                    compoundTransform.scaleX = value;
+            }
+            else
+            {
+                _scaleX = value;
+            }
             dispatchGradientChangedEvent("scaleX", oldValue, value);
         }
     }


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

--- frameworks/projects/framework/src/mx/managers/ILayoutManagerClient.as
+++ frameworks/projects/framework/src/mx/managers/ILayoutManagerClient.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.managers
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/mx/src/mx/effects/effectClasses/WipeUpInstance.as
+++ frameworks/projects/mx/src/mx/effects/effectClasses/WipeUpInstance.as
@@ -21,6 +21,11 @@
  *  you do not create one yourself.
  *
  *  @see mx.effects.WipeUp
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class WipeUpInstance extends MaskEffectInstance
 {
@@ -36,6 +41,11 @@
 	 *  Constructor.
 	 *
 	 *  @param target The Object to animate with this effect.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function WipeUpInstance(target:Object)
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/messaging/management/ObjectInstance.as
+++ frameworks/projects/rpc/src/mx/messaging/management/ObjectInstance.as
@@ -18,11 +18,23 @@

 /**
  * Client representation of an object name instance for server-side management controls.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 public class ObjectInstance
 {
     /**
      *  Creates a new instance of an empty ObjectInstance.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function ObjectInstance()
     {
@@ -31,11 +43,23 @@

     /**
      * The object name.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public var objectName:ObjectName;

     /**
      * The class name.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public var className:String;

@@ -43,6 +67,12 @@
      *  Returns a string representation of the object name instance.
      *
      *  @return String representation of the object name instance.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function toString():String
     {


Fixed bug where SessionManager was not disposing non-ILinkableObjects.

Change-Id: Iee4ebdfb56f36af194946106b1931f8ba592be1f

--- WeaveCore/src/weave/core/SessionManager.as
+++ WeaveCore/src/weave/core/SessionManager.as
@@ -686,7 +686,7 @@
 						delete parentToChildDictionaryMap[linkableObject];
 						// dispose of the children this object owned
 						for (var child:Object in children)
-							disposeObjects(child as ILinkableObject);
+							disposeObjects(child);
 					}

 					// FOR DEBUGGING PURPOSES


optimize loop

optimize loop

--- src/org/mangui/hls/utils/Hex.as
+++ src/org/mangui/hls/utils/Hex.as
@@ -20,8 +20,9 @@
         public static function toArray(hex : String) : ByteArray {
             hex = hex.replace(/^0x|\s|:/gm, '');
             var a : ByteArray = new ByteArray;
-            if ((hex.length & 1) == 1) hex = "0" + hex;
-            for (var i : uint = 0; i < hex.length; i += 2) {
+            var len : uint = hex.length;
+            if ((len & 1) == 1) hex = "0" + hex;
+            for (var i : uint = 0; i < len; i += 2) {
                 a[i / 2] = parseInt(hex.substr(i, 2), 16);
             }
             return a;
@@ -32,10 +33,11 @@
          */
         public static function fromArray(array : ByteArray, colons : Boolean = false) : String {
             var s : String = "";
-            for (var i : uint = 0; i < array.length; i++) {
+            var len : uint = array.length;
+            for (var i : uint = 0; i < len; i++) {
                 s += ("0" + array[i].toString(16)).substr(-2, 2);
                 if (colons) {
-                    if (i < array.length - 1) s += ":";
+                    if (i < len - 1) s += ":";
                 }
             }
             return s;


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

--- frameworks/projects/advancedgrids/src/mx/olap/OLAPSet.as
+++ frameworks/projects/advancedgrids/src/mx/olap/OLAPSet.as
@@ -0,0 +1,506 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.olap
+{
+
+import mx.collections.ArrayCollection;
+import mx.collections.IList;
+import mx.core.mx_internal;
+import mx.resources.ResourceManager;
+
+use namespace mx_internal;
+
+[ResourceBundle("olap")]
+
+/**
+ *  The OLAPSet class represents a set,
+ *  which is used to configure the axis of an OLAP query.
+ *  A set consists of zero or more tuples;
+ *  a set that does not contain any tuples is known as an empty set.
+ *
+ *  @see mx.olap.IOLAPSet
+ *  @see mx.olap.OLAPQueryAxis
+ *  @see mx.olap.IOLAPResultAxis
+ *  @see mx.olap.OLAPResultAxis
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class OLAPSet implements IOLAPSet
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function OLAPSet()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  flag to indicate the mode in which compareMembers should
+     *  return the values.
+     */
+    private var reverseCompare:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    // tuples
+    //----------------------------------
+
+    private var _tuples:Array = [];
+
+    /**
+     *  The tuples contained by this set instance,
+     *  as an Array of IOLAPTuple instances.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get tuples():Array
+    {
+        return _tuples;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function addElement(e:IOLAPElement):void
+    {
+        var members:IList = new ArrayCollection;
+        if (e is IOLAPDimension)
+            members.addItem((e as IOLAPDimension).defaultMember);
+        if (e is IOLAPHierarchy)
+            members.addItem((e as IOLAPHierarchy).defaultMember);
+        if (e is IOLAPLevel)
+            members = (e as IOLAPLevel).members;
+        if (e is IOLAPMember)
+            members.addItem(e);
+
+        var t:OLAPTuple;
+        if (members.length > 0)
+        {
+        	var n:int = members.length;
+            for (var i:int = 0; i < n; ++i)
+            {
+                var m:IOLAPMember = members[i];
+                t = new OLAPTuple();
+                t.addMember(m);
+                _tuples.push(t);
+            }
+        }
+        else
+        {
+            OLAPTrace.traceMsg("Members were not added for " + e.uniqueName, OLAPTrace.TRACE_LEVEL_1);
+        }
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function addElements(members:IList):void
+    {
+        var t:OLAPTuple;
+        var n:int = members.length;
+        for (var i:int = 0; i < n; ++i)
+        {
+            var m:IOLAPMember = members[i];
+            t = new OLAPTuple();
+            t.addMember(m);
+            _tuples.push(t);
+        }
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function addTuple(tuple:IOLAPTuple):void
+    {
+        _tuples.push(tuple);
+    }
+
+    /**
+     * @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function crossJoin(input:IOLAPSet):IOLAPSet
+    {
+        var join:OLAPSet = input as OLAPSet;
+        validateCrossJoin(join);
+        var newSet:OLAPSet = new OLAPSet();
+
+        var tuple:OLAPTuple = new OLAPTuple();
+        for each (var tuple1:OLAPTuple in _tuples)
+        {
+            for each (var tuple2:OLAPTuple in join.tuples)
+            {
+                tuple.addMembers(tuple1.explicitMembers);
+                tuple.addMembers(tuple2.explicitMembers);
+                if (tuple.isValid)
+                {
+                    newSet.addTuple(tuple);
+                    tuple = new OLAPTuple();
+            	}
+            	else
+            	{
+            		tuple.clear();
+            	}
+            }
+        }
+
+        return newSet;
+    }
+
+    /**
+     *  @private
+     *  Validates a crossjoin defined by an IOLAPSet instance.
+     *
+     *  This method throws an error if the crossjoin is invalid.
+     *
+     *  @param input The IOLAPSet instance that contains a crossjoin
+     *  of two IOLAPSet instances.
+     */
+    protected function validateCrossJoin(input:IOLAPSet):void
+    {
+        var join:OLAPSet = input as OLAPSet;
+        for each (var t1:OLAPTuple in _tuples)
+        {
+            for each (var t2:OLAPTuple in join.tuples)
+            {
+                var hierarchy:IOLAPHierarchy = findCommonHierarchy(t1, t2);
+                if (hierarchy)
+                {
+                    var message:String = ResourceManager.getInstance().getString(
+                            "olap", "crossJoinSameHierarchyError", [hierarchy.uniqueName]);
+                    throw Error(message);
+                }
+            }
+        }
+
+    }
+
+    /**
+     *  Returns the common IOLAPHierarchy instance for two tuples,
+     *  or null if the tuples do not share a hierarchy.
+     *
+     *  @param t1 The first tuple.
+     *
+     *  @param t2 The second tuple.
+     *
+     *  @return The common IOLAPHierarchy instance for the two tuples,
+     *  or null if the tuples do not share a hierarchy.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected function findCommonHierarchy(t1:OLAPTuple, t2:OLAPTuple):IOLAPHierarchy
+    {
+        for each (var m1:OLAPMember in t1.explicitMembers)
+        {
+            for each (var m2:OLAPMember in t2.explicitMembers)
+            {
+                if (m1.hierarchy == m2.hierarchy)
+                    return m1.hierarchy;
+            }
+        }
+        //no common hierarchy found
+        return null;
+    }
+
+    /**
+     * @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function hierarchize(post:Boolean=false):IOLAPSet
+    {
+        var newSet:OLAPSet = new OLAPSet;
+
+        reverseCompare = post;
+        // go through all the tuples of the set and arrange them in
+        // their natural order.
+        var arrayIndices:Array = tuples.sort(sortTuple, Array.RETURNINDEXEDARRAY);
+
+        for each (var index:int in arrayIndices)
+            newSet.addTuple(_tuples[index]);
+
+        //reset the flag because union also uses compareMembers function.
+        reverseCompare = false;
+        return newSet;
+    }
+
+    /**
+     *  Returns information about the relative location of
+     *  two members in the set.
+     *
+     *  @param m1 The first member.
+     *
+     *  @param m2 The second member.
+     *
+     *  @return The following:
+     *

+     *
0 if the members are at the same level

+     *
1 if m2 is higher in the hierarchy than m1

+     *
-1 if m1 is higher in the hierarchy than m2

+     *

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected function compareMembers(m1:IOLAPMember, m2:IOLAPMember):int
+    {
+        //trace("Comparing " + m1.name + " " + m2.name);
+        if (m1 == m2)
+            return 0;
+
+        while (true)
+        {
+            if (m1 && !m2)
+                return reverseCompare ? -1 : 1;
+            if (!m1 && m2)
+                return reverseCompare ? 1 : -1;
+
+            if (m1.level.depth < m2.level.depth)
+            {
+                m2 = m2.parent;
+                if (m1 == m2)
+                    return reverseCompare ? 1 : -1;
+            }
+            else if (m1.level.depth > m2.level.depth)
+            {
+                m1 = m1.parent;
+                if (m1 == m2)
+                    return reverseCompare ? -1 : 1;
+            }
+            else
+            {
+                if (m1.parent == m2.parent)
+                {
+                    var compResult:int = m1.name.localeCompare(m2.name);
+
+                    if (compResult == 0)
+                        return 0;
+                    else if (compResult > 0)
+                        return 1;
+                    else
+                        return -1;
+                }
+                m1 = m1.parent;
+                m2 = m2.parent;
+            }
+        }
+
+        return 0;
+    }
+
+    /**
+     *  Returns information about the relative location of
+     *  two tuples in the set.
+     *
+     *  @param t1 The first tuple.
+     *
+     *  @param t2 The second tuple.
+     *
+     *  @return The following:
+     *

+     *
0 if the tuples are at the same level

+     *
1 if t2 is higher than t1

+     *
-1 if t1 is higher than t2

+     *

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected function sortTuple(t1:OLAPTuple, t2:OLAPTuple):int
+    {
+        var t1Mems:Array = t1.explicitMembers.toArray();
+        var t2Mems:Array = t2.explicitMembers.toArray();
+
+        var n:int = t1Mems.length;
+        for (var i:int = 0; i < n; ++i)
+        {
+            var m1:IOLAPMember = t1Mems[i];
+            var m2:IOLAPMember = t2Mems[i];
+            var result:int = compareMembers(m1, m2);
+            if (result != 0)
+                break;
+        }
+
+        return result;
+    }
+
+    /**
+    * @private
+    */
+    private function isDuplicate(t1:OLAPTuple, t2:OLAPTuple):Boolean
+    {
+        var m1:IList = t1.explicitMembers;
+        var m2:IList = t2.explicitMembers;
+
+        var n:int = m1.length;
+        for (var i:int = 0; i < n; ++i)
+        {
+            if (m1.getItemAt(i) != m2.getItemAt(i))
+                return false;
+        }
+
+        return true;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function union(secondSet:IOLAPSet):IOLAPSet
+    {
+        //TODO should we handle null sets?
+
+        var input:OLAPSet = secondSet as OLAPSet;
+        var newSet:OLAPSet = new OLAPSet;
+        //check for same hierarchy
+        var ts1:Array = tuples;
+        var ts2:Array = input.tuples;
+
+        //create a hierarchy array which can be used for comparision
+        var hierarchies:Array = [];
+        var t1:IOLAPTuple = ts1[0];
+        var m1:IList = t1.explicitMembers;
+        var explicitMemberLength:int = m1.length;
+        for (var i:int = 0; i < explicitMemberLength; ++i)
+        {
+            hierarchies.push(m1.getItemAt(i).hierarchy);
+        }
+
+        checkTupleHierarchies(this, explicitMemberLength, hierarchies);
+        checkTupleHierarchies(input, explicitMemberLength, hierarchies);
+
+        var newTuples:Array = tuples.concat(input._tuples);
+
+        //TODO remove duplicates
+        var arrayIndices:Array = newTuples.sort(sortTuple, Array.RETURNINDEXEDARRAY);
+
+        var end:int = arrayIndices.length - 1;
+        var duplicates:Array = [];
+        for (i = 0; i < end; ++i)
+        {
+	        if (isDuplicate(newTuples[arrayIndices[i]], newTuples[arrayIndices[i + 1]]))
+	        {
+	            duplicates.push(arrayIndices[i]);
+	        }
+        }
+
+        //we remove items backwards as otherwise indices will change
+        //with each item removal
+        duplicates = duplicates.sort(Array.NUMERIC | Array.DESCENDING);
+        for each (i in duplicates)
+            newTuples.splice(i, 1);
+
+        newSet._tuples = newTuples;
+
+        return newSet;
+    }
+
+    /**
+    * @private
+    */
+    private function checkTupleHierarchies(olapSet:OLAPSet, length:int, hierarchies:Array):void
+    {
+        var tuples:Array = olapSet.tuples;
+        var message:String = ResourceManager.getInstance().getString(
+            "olap", "unionError");
+        //validate input set
+        var n:int = tuples.length;
+        for (var i:int = 0; i < n; ++i)
+        {
+            var tuple:OLAPTuple = tuples[i];
+            var members:IList = tuple.explicitMembers;
+
+            if (members.length != length)
+                throw Error(message);
+
+            for (var j:int = 0; j < length; ++j)
+            {
+                var hierarchy:IOLAPHierarchy = members.getItemAt(j).hierarchy;
+                if (hierarchy != hierarchies[j])
+                    throw Error(message);
+            }
+        }
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3916
Author:   gosmith@adobe.com
Date:     2008-10-27T22:45:53.541205Z

Log Message:
-----------
Renamed the getAttributes() and setAttributes() methods of TextView and FxTextArea to getSelectionFormat() and setSelectionFormat(), to match the spec.

Also, the contentWidth, contentHeight, horizontalScrollPosition, and verticalScrollPosition properties of TextView now implement binding using a PropertyChangeEvent, because this is what a Scroller expects. As part of this, I've moved the dispatchPropertyChangeEvent() utility method from GroupBase to UIComponent.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Hans

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -7515,12 +7515,28 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  Helper method for dispatching a PropertyChangeEvent
+     *  when a property is updated.
+     *
+     *  @param prop Name of the property that changed.
+     *
+     *  @param oldValue Old value of the property.
+     *
+     *  @param value New value of the property.
+     */
+    protected function dispatchPropertyChangeEvent(prop:String, oldValue:*,
+                                                   value:*):void
+    {
+        dispatchEvent(PropertyChangeEvent.createUpdateEvent(
+                            this, prop, oldValue, value));
+    }
+
     /**
      *  @private
      */
     private function dispatchMoveEvent():void
     {
-
         var moveEvent:MoveEvent = new MoveEvent(MoveEvent.MOVE);
         moveEvent.oldX = oldX;
         moveEvent.oldY = oldY;


Transferred from the Adobe Open Source Subversion Repository

Revision: 17152
Author:   cframpto@adobe.com
Date:     2010-08-02T18:38:05.626205Z

Log Message:
-----------
Integrate with TLF2 build 129.

- Set compatibilityVersion in configuration to 1.1 so that the selection does not include the final paragraph terminator.
The flag tells TLF that we want TLF1.1 compatibility for the selection length.  Pre TLF2, the selection length was textFlow.length-1 and did not include the final paragraph terminator.  For TLF2, the selection length is textFlow.length which includes the final paragraph terminator.

- When auto-sizing RET, if the unscaled width/height differs from the last unscaled width/height, redraw the background.  The EditManager calls updateAllControllers() directly when there is interactive input such as typing or cut/paste. This bypasses our update cycle which matters if we are auto-sizing.  compositionWidth/Height are NaN and the background is drawn with the old width/height because measureTextSize hasn't had a chance to update the layout manager yet.  Once the layoutManager has been updated, the compositionWidth/Height are still NaN so TLF doesn't think there is anything to compose.  The text hasn't changed shape, but the background has.

For TLF1.1 this was not necessary for most cases but there were some cases it should have been done and this was a bug.  TLF changed TextContainerManager.updateContainer() so now it is an issue for all cases.  It used to call compose() and it no longer does.

- The width of selection highlighting when full line is selected changed slightly for performance reasons.  Peter D and I decided this did not need to be put under the compatibilityVersion flag.

Full mustella test suite has been run.

Modified Paths:
--------------
120 paths were modified

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -8733,11 +8733,11 @@
     /**
      *  @private
      */
-    private var lastUnscaledWidth:Number;
-    /**
-     *  @private
-     */
-    private var lastUnscaledHeight:Number;
+    mx_internal var lastUnscaledWidth:Number;
+    /**
+     *  @private
+     */
+    mx_internal var lastUnscaledHeight:Number;

     /**
      *  @private


Transferred from the Adobe Open Source Subversion Repository

Revision: 12568
Author:   gruehle@adobe.com
Date:     2009-12-05T00:33:54.244586Z

Log Message:
-----------
Fix the theme attribute for cornerRadius metadata on mx components. This required moving the metadata out of BorderStyles.as and into each file that includes BorderStyle.as

QE notes: -
Doc notes: -
Bugs: SDK-24437
Reviewer: Kevin
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToolTip.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/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/mx/src/mx/controls/NumericStepper.as
+++ frameworks/projects/mx/src/mx/controls/NumericStepper.as
@@ -107,6 +107,19 @@
  *  @productversion Flex 4
  */
 [Style(name="contentBackgroundColor", type="uint", format="Color", inherit="yes", theme="spark")]
+
+/**
+ *  Radius of component corners.
+ *  The default value depends on the component class;
+ *  if not overridden for the class, the default value
+ *  for the Halo theme is 5 and for the Spark theme is 2.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="halo, spark")]

 /**
  *  Name of the class to use as the default skin for the down arrow.


Transferred from the Adobe Open Source Subversion Repository

Revision: 5223
Author:   egeorgie@adobe.com
Date:     2009-03-10T20:10:07.223108Z

Log Message:
-----------
Introduce ButtonBase and ToggleButtonBase classes and make FxButton extend ButtonBase, ToggleButtonBase extend ButtonBase, FxToggleButton, FxCheckBox, FxRadioButton extend ToggleButtonBase.as.
The emphasized property and IButton are pushed down to the FxButton, so the rest of the buttons don't have them.

QE Notes: None
Doc Notes:
Bugs: SDK-19671, SDK-19670
Reviewer: Glenn
tests: checkintests, mustella (gumbo/components)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxCheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxRadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ButtonBarButton.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/ButtonBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/ToggleButtonBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/Button.as
+++ frameworks/projects/spark/src/spark/components/Button.as
@@ -11,123 +11,13 @@

 package mx.components
 {
-
-import flash.events.Event;
-import flash.events.FocusEvent;
-import flash.events.KeyboardEvent;
-import flash.events.MouseEvent;
-import flash.events.TimerEvent;
-import flash.ui.Keyboard;
-import flash.utils.Timer;

-import mx.components.baseClasses.FxComponent;
+import mx.components.baseClasses.ButtonBase;
 import mx.core.IButton;
-import mx.events.FlexEvent;
-import mx.events.SandboxMouseEvent;
-import mx.graphics.baseClasses.TextGraphicElement;
-import mx.managers.IFocusManagerComponent;
-import mx.utils.StringUtil;
-
-include "../styles/metadata/BasicTextLayoutFormatStyles.as"
-
-/**
- *  @copy mx.components.baseClasses.GroupBase#focusColor
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Style(name="focusColor", type="uint", format="Color", inherit="yes")]
-
-/**
- *  Dispatched when the user presses the FxButton control.
- *  If the autoRepeat property is true,
- *  this event is dispatched repeatedly as long as the button stays down.
- *
- *  @eventType mx.events.FlexEvent.BUTTON_DOWN
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Event(name="buttonDown", type="mx.events.FlexEvent")]
-
-/**
- *  Number of milliseconds to wait after the first buttonDown
- *  event before repeating buttonDown events at each
- *  repeatInterval.
- *
- *  @default 500
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Style(name="repeatDelay", type="Number", format="Time", inherit="no")]
-
-/**
- *  Number of milliseconds between buttonDown events
- *  if the user presses and holds the mouse on a button.
- *
- *  @default 35
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Style(name="repeatInterval", type="Number", format="Time", inherit="no")]
-
-/**
- *  Up State of the Button
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("up")]
-
-/**
- *  Over State of the Button
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("over")]
-
-/**
- *  Down State of the Button
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("down")]
-
-/**
- *  Disabled State of the Button
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[SkinState("disabled")]

 //--------------------------------------
 //  Other metadata
 //--------------------------------------
-
-[DefaultTriggerEvent("click")]
-
-[DefaultProperty("label")]

 [IconFile("FxButton.png")]

@@ -152,7 +42,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class FxButton extends FxComponent implements IFocusManagerComponent, IButton
+public class FxButton extends ButtonBase implements IButton
 {
     include "../core/Version.as";

@@ -173,318 +63,13 @@
     public function FxButton()
     {
         super();
-
-        // DisplayObjectContainer properties.
-        // Setting mouseChildren to false ensures that mouse events
-        // are dispatched from the Button itself,
-        // not from its skins, icons, or TextField.
-        // One reason for doing this is that if you press the mouse button
-        // while over the TextField and release the mouse button while over
-        // a skin or icon, we want the player to dispatch a "click" event.
-        // Another is that if mouseChildren were true and someone uses
-        // Sprites rather than Shapes for the skins or icons,
-        // then we we wouldn't get a click because the current skin or icon
-        // changes between the mouseDown and the mouseUp.
-        // (This doesn't happen even when mouseChildren is true if the skins
-        // and icons are Shapes, because Shapes never dispatch mouse events;
-        // they are dispatched from the Button in this case.)
-        mouseChildren = false;
-
-        // add event listeners to the button
-        addHandlers();
     }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Skin Parts
-    //
-    //--------------------------------------------------------------------------
-
-    [SkinPart(required="false")]
-
-    /**
-     *  A skin part that defines the  label of the button.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public var labelElement:TextGraphicElement;

     //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  content
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the content property.
-     */
-    private var _content:Object;
-
-    [Bindable("contentChange")]
-
-    /**
-     *  The content property lets you pass an arbitrary object
-     *  to be used in a custom skin of the button.
-     *
-     *  When a skin defines the optional part labelElement then
-     *  a string representation of content will be pushed down to
-     *  that part's text property.
-     *
-     *  The default skin uses this mechanism to render the content
-     *  as the button label.
-     *
-     *
The label property is a String typed
-     *  facade of this property.  This property is bindable and it shares
-     *  the "contentChange" event with the label property.

-     *
-     *  @default null
-     *  @eventType contentChange
-     *  @see #label
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get content():Object
-    {
-        return _content;
-    }
-
-    /**
-     *  @private
-     */
-    public function set content(value:Object):void
-    {
-        _content = value;
-
-        // Push to the optional labelElement skin part
-        if (labelElement)
-            labelElement.text = label;
-        dispatchEvent(new Event("contentChange"));
-    }
-
-    //----------------------------------
-    //  label
-    //----------------------------------
-
-    [Bindable("contentChange")]
-
-    /**
-     *  Text to appear on the FxButton control.
-     *
-     *
If the label is wider than the FxButton control,
-     *  the label is truncated and terminated by an ellipsis (...).
-     *  The full label displays as a tooltip
-     *  when the user moves the mouse over the control.
-     *  If you have also set a tooltip by using the tooltip
-     *  property, the tooltip is displayed rather than the label text.

-     *
-     *
This is the default FxButton property.

-     *
-     *
This property is a String typed facade to the
-     *  content property.  This property is bindable and it shares
-     *  dispatching the "contentChange" event with the content
-     *  property.

-     *
-     *  @default ""
-     *  @see #content
-     *  @eventType contentChange
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function set label(value:String):void
-    {
-        // label property is just a proxy to the content.
-        // The content setter will dispatch the event.
-        content = value;
-    }
-
-    /**
-     *  @private
-     */
-    public function get label():String
-    {
-        return (content != null) ? content.toString() : "";
-    }
-
-    //----------------------------------
-    //  hovered
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the hovered property
-     */
-    private var _hovered:Boolean = false;
-
-    /**
-     *  Indicates whether the mouse pointer is over the button.
-     *  Used to determine the skin state.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    protected function get hovered():Boolean
-    {
-        return _hovered;
-    }
-
-    /**
-     *  @private
-     */
-    protected function set hovered(value:Boolean):void
-    {
-        if (value == _hovered)
-            return;
-
-        _hovered = value;
-        invalidateButtonState();
-    }
-
-    //----------------------------------
-    //  mouseCaptured
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the mouseCaptured property
-     */
-    private var _mouseCaptured:Boolean = false;
-
-    /**
-     *  Indicates whether the mouse is down and the mouse pointer was
-     *  over the button when MouseEvent.MOUSE_DOWN was first dispatched.
-     *  Used to determine the skin state.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    protected function get mouseCaptured():Boolean
-    {
-        return _mouseCaptured;
-    }
-
-    /**
-     *  @private
-     */
-    protected function set mouseCaptured(value:Boolean):void
-    {
-        if (value == _mouseCaptured)
-            return;
-
-        _mouseCaptured = value;
-        invalidateButtonState();
-
-        // System mouse handlers are not needed when the button is not mouse captured
-        if (!value)
-            removeSystemMouseHandlers();
-    }
-
-    /**
-     *  @private
-     */
-    override public function set enabled(value:Boolean):void
-    {
-        if (enabled == value)
-            return;
-
-        super.enabled = value;
-        invalidateButtonState();
-    }
-
-    //----------------------------------
-    //  keyboardPressed
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the keyboardPressed property
-     */
-    private var _keyboardPressed:Boolean = false;
-
-    /**
-     *  Indicates whether a keyboard key is pressed while the button is in focus.
-     *  Used to determine the skin state.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    protected function get keyboardPressed():Boolean
-    {
-        return _keyboardPressed;
-    }
-
-    /**
-     *  @private
-     */
-    protected function set keyboardPressed(value:Boolean):void
-    {
-        if (value == _keyboardPressed)
-            return;
-
-        _keyboardPressed = value;
-        invalidateButtonState();
-    }
-
-    //----------------------------------
-    //  stickyHighlighting
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the stickyHighlighting property
-     */
-    private var _stickyHighlighting:Boolean = false;
-
-    /**
-     *  If false, the button displays its down skin
-     *  when the user presses it but changes to its over skin when
-     *  the user drags the mouse off of it.
-     *  If true, the button displays its down skin
-     *  when the user presses it, and continues to display this skin
-     *  when the user drags the mouse off of it.
-     *
-     *  @default false
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get stickyHighlighting():Boolean
-    {
-        return _stickyHighlighting
-    }
-
-    /**
-     *  @private
-     */
-    public function set stickyHighlighting(value:Boolean):void
-    {
-        if (value == _stickyHighlighting)
-            return;
-
-        _stickyHighlighting = value;
-        invalidateButtonState();
-    }

     //----------------------------------
     //  emphasized
@@ -533,464 +118,5 @@
                 styleName = style.split(" emphasized").join("");
         }
     }
-
-    //----------------------------------
-    //  autoRepeat
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    private var _autoRepeat:Boolean;
-
-    [Inspectable(defaultValue="false")]
-
-    /**
-     *  Specifies whether to dispatch repeated buttonDown
-     *  events if the user holds down the mouse button.
-     *
-     *  @default false
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get autoRepeat():Boolean
-    {
-        return _autoRepeat;
-    }
-
-    /**
-     *  @private
-     */
-    public function set autoRepeat(value:Boolean):void
-    {
-        if (value == _autoRepeat)
-            return;
-
-        _autoRepeat = value;
-        checkAutoRepeatTimerConditions(isDown());
-    }
-
-    //----------------------------------
-    //  toolTip
-    //----------------------------------
-
-    [Inspectable(category="General", defaultValue="null")]
-
-    private var _explicitToolTip:Boolean = false;
-
-    /**
-     *  @private
-     */
-    override public function set toolTip(value:String):void
-    {
-        super.toolTip = value;
-
-        // If explicit tooltip is cleared, we need to make sure our
-        // updateDisplayList is called, so that we add automatic tooltip
-        // in case the label is truncated.
-        if (_explicitToolTip && !value)
-            invalidateDisplayList();
-
-        _explicitToolTip = value != null;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden properties: UIComponent
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  baselinePosition
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    override public function get baselinePosition():Number
-    {
-        return getBaselinePositionForPart(labelElement);
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override protected function partAdded(partName:String, instance:Object):void
-    {
-        super.partAdded(partName, instance);
-
-        if (instance == labelElement)
-        {
-            labelElement.text = label;
-
-            // Temporary ...
-            labelElement.setStyle("verticalAlign", getStyle("verticalAlign"));
-        }
-    }
-
-    /**
-     *  @private
-     *  Remember whether we have fired an event already,
-     *  so that we don't fire a second time.
-     */
-    private var _downEventFired:Boolean = false;
-
-    /**
-     *  @private
-     */
-    override protected function commitProperties():void
-    {
-        super.commitProperties();
-
-        if (checkForButtonDownConditions)
-        {
-            var isCurrentlyDown:Boolean = isDown();
-
-            // Only if down state has changed, do we need to do something
-            if (_downEventFired != isCurrentlyDown)
-            {
-                if (isCurrentlyDown)
-                    dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
-
-                _downEventFired = isCurrentlyDown;
-                checkAutoRepeatTimerConditions(isCurrentlyDown);
-            }
-
-            checkForButtonDownConditions = false;
-        }
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  States
-    //
-    //--------------------------------------------------------------------------
-
-    private function isDown():Boolean
-    {
-        if (!enabled)
-            return false;
-
-        if (keyboardPressed)
-            return true;
-
-        if (mouseCaptured && (hovered || stickyHighlighting))
-            return true;
-        return false;
-    }
-
-    /**
-     *  @private
-     *  Marks the button state invalid, so that the button skin's state
-     *  can be set properly and "buttonDown" events can be dispatched where
-     *  appropriate.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    private function invalidateButtonState():void
-    {
-        checkForButtonDownConditions = true;
-        invalidateProperties();
-        invalidateSkinState();
-    }
-
-    /**
-     *  @private
-     */
-    override protected function getCurrentSkinState():String
-    {
-        if (!enabled)
-            return "disabled";
-
-        if (isDown())
-            return "down";
-
-        if (hovered || mouseCaptured)
-            return "over";
-
-        return "up";
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Event handling
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    protected function addHandlers():void
-    {
-        addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler);
-        addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler);
-        addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler);
-        addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler);
-        addEventListener(MouseEvent.CLICK, mouseEventHandler);
-    }
-
-    /**
-     *  @private
-     *  This method adds the mouseEventHandler as an event listener to
-     *  the stage and the systemManager so that it gets called even if mouse events
-     *  are dispatched outside of the button. This is needed for example when the
-     *  user presses the button, drags out and releases the button.
-     */
-    private function addSystemMouseHandlers():void
-    {
-        systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, true /*useCapture*/);
-        systemManager.getSandboxRoot().addEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, mouseEventHandler);
-    }
-
-    /**
-     *  @private
-     *  This method removes the mouseEventHandler as an event listener from
-     *  the stage and the systemManager.
-     */
-    private function removeSystemMouseHandlers():void
-    {
-        systemManager.getSandboxRoot().removeEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, true /*useCapture*/);
-        systemManager.getSandboxRoot().removeEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, mouseEventHandler);
-    }
-
-    /**
-     *  This method handles the mouse events, calls the clickHandler method
-     *  where appropriate and updates the hovered and
-     *  mouseCaptured properties.
-     *
This method gets called to handle MouseEvent.ROLL_OVER, MouseEvent.ROLL_OUT,
-     *  MouseEvent.MOUSE_DOWN, MouseEvent.MOUSE_UP, MouseEvent.CLICK and
-     *  SandboxMouseEvent.MOUSE_UP_SOMEWHERE.

-     *
For MouseEvent.MOUSE_UP and SandboxMouseEvent.MOUSE_UP_SOMEWHERE, the event
-     *  target can be other than the FxButton - for example when the user presses the
-     *  FxButton, we listen for MOUSE_UP and MOUSE_UP_SOMEWHERE to handle cases where the user drags
-     *  outside the FxButton and releases the mouse.

-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    protected function mouseEventHandler(event:Event):void
-    {
-        var mouseEvent:MouseEvent = event as MouseEvent;
-        switch (event.type)
-        {
-            case MouseEvent.ROLL_OVER:
-            {
-                // if the user rolls over while holding the mouse button
-                if (mouseEvent.buttonDown && !mouseCaptured)
-                    return;
-                    hovered = true;
-                break;
-            }
-
-            case MouseEvent.ROLL_OUT:
-            {
-                hovered = false;
-                break;
-            }
-
-            case MouseEvent.MOUSE_DOWN:
-            {
-                // When the button is down we need to listen for mouse events outsied the button so that
-                // we update the state appropriately on mouse up.  Whenever mouseCaptured changes to false,
-                // it will take care to remove those handlers.
-                addSystemMouseHandlers();
-                mouseCaptured = true;
-                break;
-            }
-
-            case MouseEvent.MOUSE_UP:
-            {
-                if (event.currentTarget == this)
-                    hovered = true;
-            } //fallthrough:
-            case SandboxMouseEvent.MOUSE_UP_SOMEWHERE:
-            {
-                mouseCaptured = false;
-                break;
-            }
-
-            // Prevent the propagation of click from a disabled Button.
-            // This is conceptually a higher-level event and
-            // developers will expect their click handlers not to fire
-            // if the Button is disabled.
-            case MouseEvent.CLICK:
-            {
-                if (!enabled)
-                    event.stopImmediatePropagation();
-                else
-                    clickHandler(MouseEvent(event));
-                return;
-            }
-        }
-        if (mouseEvent)
-            mouseEvent.updateAfterEvent();
-    }
-
-    /**
-     *  Override in subclasses to handle the click event rather than
-     *  adding a separate handler. clickHandler will not get called if the
-     *  button is disabled.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    protected function clickHandler(event:MouseEvent):void
-    {
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden event handlers: UIComponent
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override protected function focusOutHandler(event:FocusEvent):void
-    {
-        // Most of the time the system sends a rollout, but there are
-        // situations where the mouse is over something else
-        // that you don't get one so we force one on FOCUS_OUT.
-        super.focusOutHandler(event);
-
-        mouseCaptured = false;
-        keyboardPressed = false;
-    }
-
-    /**
-     *  @private
-     */
-    override protected function keyDownHandler(event:KeyboardEvent):void
-    {
-        if (event.keyCode != Keyboard.SPACE)
-            return;
-        keyboardPressed = true;
-        event.updateAfterEvent();
-    }
-
-    /**
-     *  @private
-     */
-    override protected function keyUpHandler(event:KeyboardEvent):void
-    {
-        if (event.keyCode != Keyboard.SPACE)
-            return;
-        keyboardPressed = false;
-
-        if (enabled)
-            dispatchEvent(new MouseEvent(MouseEvent.CLICK));
-        event.updateAfterEvent();
-    }
-
-    /**
-     *  @private
-     *  true when we need to check whether to dispatch
-     *  a button down event
-     */
-    private var checkForButtonDownConditions:Boolean = false;
-
-    /**
-     *  @private
-     *  Timer for doing auto-repeat.
-     */
-    private var autoRepeatTimer:Timer;
-
-    /**
-     *  @private
-     */
-    private function checkAutoRepeatTimerConditions(buttonDown:Boolean):void
-    {
-        var needsTimer:Boolean = autoRepeat && buttonDown;
-        var hasTimer:Boolean = autoRepeatTimer != null;
-
-        if (needsTimer == hasTimer)
-            return;
-
-        if (needsTimer)
-            startTimer();
-        else
-            stopTimer();
-    }
-
-    /**
-     *  @private
-     */
-    private function startTimer():void
-    {
-        autoRepeatTimer = new Timer(1);
-        autoRepeatTimer.delay = getStyle("repeatDelay");
-        autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeat_timerDelayHandler);
-        autoRepeatTimer.start();
-    }
-
-    /**
-     *  @private
-     */
-    private function stopTimer():void
-    {
-        autoRepeatTimer.stop();
-        autoRepeatTimer = null;
-    }
-
-    /**
-     *  @private
-     */
-    private function autoRepeat_timerDelayHandler(event:TimerEvent):void
-    {
-        autoRepeatTimer.reset();
-        autoRepeatTimer.removeEventListener( TimerEvent.TIMER, autoRepeat_timerDelayHandler);
-
-        autoRepeatTimer.delay = getStyle("repeatInterval");
-        autoRepeatTimer.addEventListener( TimerEvent.TIMER, autoRepeat_timerHandler);
-        autoRepeatTimer.start();
-    }
-
-    /**
-     *  @private
-     */
-    private function autoRepeat_timerHandler(event:TimerEvent):void
-    {
-        dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
-    }
-
-    /**
-     *  @private
-     */
-    override protected function updateDisplayList(unscaledWidth:Number,
-                                                  unscaledHeight:Number):void
-    {
-        super.updateDisplayList(unscaledWidth, unscaledHeight);
-
-        // Bail out if we don't have a label or the tooltip is explicitly set.
-        if (!labelElement || _explicitToolTip)
-            return;
-
-        // Check if the label text is truncated
-        // TODO EGeorgie: use TextGraphicElement API to check for truncated text.
-        labelElement.validateNow();
-        var truncated:Boolean = labelElement.getLayoutBoundsWidth() < labelElement.getPreferredBoundsWidth() ||
-                                labelElement.getLayoutBoundsHeight() < labelElement.getPreferredBoundsHeight();
-
-        // If the label is truncated, show the whole label string as a tooltip
-        super.toolTip = truncated ? labelElement.text : null;
-    }
 }
-
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 16904
Author:   smgilson@adobe.com
Date:     2010-07-13T17:25:46.841130Z

Log Message:
-----------
Add ASDoc comment about using the component as an item renderer

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>

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

--- frameworks/projects/spark/src/spark/components/Button.as
+++ frameworks/projects/spark/src/spark/components/Button.as
@@ -51,6 +51,12 @@
  *  mouseOver, mouseOut, rollOver,
  *  rollOut, mouseDown, and
  *  mouseUp events whether enabled or disabled.

+ *
+ *
An item renderer lets you customize the display of a list-based component,
+ *  such as a List or DataGrid control.
+ *  For information about using this component in an item renderer, see
+ *
+ *  Custom Spark item renderers.

  *
  *
The Button control has the following default characteristics:

  *