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

--- frameworks/projects/charts/src/mx/charts/ColumnChart.as
+++ frameworks/projects/charts/src/mx/charts/ColumnChart.as
@@ -0,0 +1,1216 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+
+import flash.filters.DropShadowFilter;
+
+import mx.charts.chartClasses.CartesianChart;
+import mx.charts.chartClasses.CartesianTransform;
+import mx.charts.chartClasses.DataTip;
+import mx.charts.chartClasses.DataTransform;
+import mx.charts.chartClasses.IChartElement;
+import mx.charts.chartClasses.IStackable;
+import mx.charts.chartClasses.NumericAxis;
+import mx.charts.chartClasses.Series;
+import mx.charts.series.ColumnSeries;
+import mx.charts.series.ColumnSet;
+import mx.charts.series.items.ColumnSeriesItem;
+import mx.charts.styles.HaloDefaults;
+import mx.controls.Label;
+import mx.core.mx_internal;
+import mx.graphics.SolidColor;
+import mx.graphics.Stroke;
+import mx.styles.CSSStyleDeclaration;
+import mx.core.IFlexModuleFactory;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  Specifies a ratio of wide to draw the columns relative to
+ *  the category width, as a percentage in the range of 0 to 1.
+ *  A value of 1 uses the entire space, while a value of 0.6
+ *  uses 60% of the column's available space.
+ *  The actual column width used is the smaller of the
+ *  columnWidthRatio property and the
+ *  maxColumnWidth property.
+ *  Clustered columns divide this space proportionally
+ *  among the columns in each cluster.
+ *  The default value is 0.65.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="columnWidthRatio", type="Number", inherit="no")]
+
+/**
+ *  Specifies how wide to draw the columns, in pixels.
+ *  The actual column width used is the smaller of this property
+ *  and the columnWidthRatio property.
+ *  Clustered columns divide this space proportionally
+ *  among the columns in each cluster.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="maxColumnWidth", type="Number", format="Length", inherit="no")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[DefaultBindingProperty(destination="dataProvider")]
+
+[DefaultTriggerEvent("itemClick")]
+
+[IconFile("ColumnChart.png")]
+
+/**
+ *  The ColumnChart control represents data as a series of vertical columns
+ *  whose height is determined by values in the data.
+ *  You can use the ColumnChart to represent a variety of different charts
+ *  including simple columns, clustered columns, stacked,
+ *  100% stacked, and high/low.
+ *
+ *
A ColumnChart control expects its series property
+ *  to contain an array of ColumnSeries objects.

+ *
+ *
Stacked and 100% column charts override the minField
+ *  property of their ColumnSeries objects.

+ *
+ *  @mxml
+ *
+ *
The <mx:ColumnChart> tag inherits all the properties
+ *  of its parent classes and adds the following properties:

+ *
+ *

+ *  <mx:ColumnChart
+ *    Properties
+ *    extendLabelToEnd="false|true"
+ *    maxLabelWidth="50"
+ *    showLabelVertically="false|true"
+ *    type="clustered|overlaid|stacked|100%"
+ *
+ *    Styles
+ *    columnWidthRatio=".65"
+ *    maxColumnWidth="No default"
+ *  />
+ *

+ *
+ *  @includeExample examples/Column_BarChartExample.mxml
+ *
+ *  @see mx.charts.series.ColumnSeries
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class ColumnChart extends CartesianChart
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class initialization
+    //
+    //--------------------------------------------------------------------------
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static var INVALIDATING_STYLES:Object =
+    {
+        columnWidthRatio: 1,
+        maxColumnWidth: 1
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function ColumnChart()
+    {
+        super();
+
+        LinearAxis(horizontalAxis).autoAdjust = false;
+
+        dataTipMode = "single";
+
+        seriesFilters = [ new DropShadowFilter(2, 45, 0.2 * 0xFFFFFF)];
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _moduleFactoryInitialized:Boolean = false;
+
+
+    /**
+     *  @private
+     */
+    private var _perSeriescolumnWidthRatio:Number;
+
+    /**
+     *  @private
+     */
+    private var _perSeriesMaxColumnWidth:Number;
+
+    /**
+     *  @private
+     */
+    private var _leftOffset:Number;
+
+    /**
+     * @private
+     */
+    mx_internal var allLabelsMeasured: Boolean = false;
+
+    /**
+     * @private
+     */
+    private var _allItems:Array /* of ChartItem */ = [];
+
+    /**
+     * @private
+     */
+    private var _needLabels:Boolean = false;
+
+    /**
+     * @private
+     */
+    private var _tempField:Label;
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //---------------------------------
+    // extendLabelToEnd
+    //---------------------------------
+    /**
+     * @private
+     * Storage for extendLabelToEnd property
+     */
+    private var _extendLabelToEnd:Boolean = false;
+
+    [Inspectable(category="General")]
+
+    /**
+     * Determines whether or not data labels can extend to the end of the chart.
+     * If you set this to true, labels can use the whole space between the item
+     * and the boundary of the chart to show its label. Otherwise, data labels are
+     * restricted to the area defined by their chart item.
+     *
+     * @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+     public function get extendLabelToEnd():Boolean
+     {
+        return _extendLabelToEnd;
+     }
+
+    /**
+     * @private
+     */
+     public function set extendLabelToEnd(value:Boolean):void
+     {
+        _extendLabelToEnd = value;
+        measureLabels();
+     }
+
+    //---------------------------------
+    // maxLabelWidth
+    //---------------------------------
+
+    /**
+     * @private
+     * Storage for maxLabelWidth property
+     */
+    private var _maxLabelWidth:int = 50;
+
+    [Inspectable(category="General")]
+
+    /**
+     * Determines maximum width in pixels of label of items.
+     *
+     * @default 50
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+     public function get maxLabelWidth():int
+     {
+        return _maxLabelWidth;
+     }
+
+    /**
+     * @private
+     */
+     public function set maxLabelWidth(value:int):void
+     {
+        _maxLabelWidth = value;
+        measureLabels();
+     }
+
+    //---------------------------------
+    // showLabelVertically
+    //---------------------------------
+    /**
+     * @private
+     * Storage for showLabelVertically property
+     */
+    private var _showLabelVertically:Boolean = false;
+
+    [Inspectable(category="General")]
+
+    /**
+     * Determines whether or not the data labels can be shown vertically.
+     * If you set this to true and if embedded fonts are used, labels will be shown vertically
+     * if they cannot be fit horizontally within the column width.
+     *
+     * @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+     public function get showLabelVertically():Boolean
+     {
+        return _showLabelVertically;
+     }
+
+    /**
+     * @private
+     */
+     public function set showLabelVertically(value:Boolean):void
+     {
+        _showLabelVertically = value;
+        measureLabels();
+     }
+
+    //----------------------------------
+    //  type
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the type property.
+     */
+    private var _type:String = "clustered";
+
+    [Inspectable(category="General", enumeration="stacked,100%,clustered,overlaid", defaultValue="clustered")]
+
+    /**
+     *  The type of the column chart.
+     *
+     *
Possible values are:

+     *

+     *
"clustered":
+     *    Values from different series are grouped by category.
+     *    This is the default type.

+     *
"overlaid":
+     *    Multiple values are rendered on top of one another by category,
+     *    with the last series on top.

+     *
"stacked":
+     *    Columns are stacked on top of each other and grouped by category.
+     *    Each column represents the cumulative value
+     *    of the columns beneath it.

+     *
"100%":
+     *    Columns are stacked on top of each other, adding up to 100%.
+     *    Each column represents the percent that it contributes
+     *    to the sum of the values for that category.

+     *

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get type():String
+    {
+        return _type;
+    }
+
+    /**
+     *  @private
+     */
+    public function set type(value:String):void
+    {
+        if (_type == value)
+            return;
+
+        _type = value;
+
+        invalidateSeries();
+        invalidateData();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private function initStyles():Boolean
+	{
+		HaloDefaults.init(styleManager);
+
+		var columnChartStyle:CSSStyleDeclaration =
+			HaloDefaults.createSelector("mx.charts.ColumnChart", styleManager);
+
+		columnChartStyle.defaultFactory = function():void
+		{
+			this.axisColor = 0xD5DEDD;
+			this.chartSeriesStyles = HaloDefaults.chartBaseChartSeriesStyles;
+			this.columnWidthRatio = 0.65;
+			this.dataTipRenderer = DataTip;
+			this.fontSize = 10;
+			this.fill = new SolidColor(0xFFFFFF, 0);
+			this.calloutStroke = new Stroke(0x888888,2);
+			this.horizontalAxisStyleName = "blockCategoryAxis";
+			this.secondHorizontalAxisStyleName = "blockCategoryAxis";
+			this.secondVerticalAxisStyleName = "blockNumericAxis";
+			this.textAlign = "left";
+			this.verticalAxisStyleName = "blockNumericAxis";
+			this.horizontalAxisStyleNames = ["blockCategoryAxis"];
+			this.verticalAxisStyleNames = ["blockNumericAxis"];
+		}
+
+		return true;
+	}
+
+
+	/**
+	 *  @inheritDoc
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	override public function set moduleFactory(factory:IFlexModuleFactory):void
+	{
+		super.moduleFactory = factory;
+
+		if (_moduleFactoryInitialized)
+			return;
+
+		_moduleFactoryInitialized = true;
+
+		// our style settings
+		initStyles();
+	}
+
+    /**
+     * @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+        _tempField = new Label();
+        _tempField.visible = false;
+        _tempField.text = "W...";
+        _tempField.toolTip = "";
+        addChild(_tempField);
+        _tempField.validateNow();
+    }
+
+    /**
+     *  @private
+     */
+    override public function styleChanged(styleProp:String):void
+    {
+        if (styleProp == null || INVALIDATING_STYLES[styleProp] != undefined)
+            invalidateSeries();
+
+        super.styleChanged(styleProp);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: ChartBase
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function customizeSeries(seriesGlyph:Series, i:uint):void
+    {
+        if (seriesGlyph is ColumnSeries || seriesGlyph is ColumnSet)
+        {
+            var series:Object = seriesGlyph;
+
+            if (!isNaN(_perSeriescolumnWidthRatio))
+                series.columnWidthRatio = _perSeriescolumnWidthRatio;
+
+            if (!isNaN(_perSeriesMaxColumnWidth))
+                series.maxColumnWidth = _perSeriesMaxColumnWidth;
+
+            if (_type == "overlaid")
+                series.offset = 0;
+            else
+                series.offset = _leftOffset + i * _perSeriescolumnWidthRatio;
+
+            if (series is IStackable)
+            {
+                var stackSeries:IStackable = IStackable(series);
+                stackSeries.stacker = null;
+                stackSeries.stackTotals = null;
+            }
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function applySeriesSet(seriesSet:Array /* of Series */,
+                                               transform:DataTransform):Array /* of Series */
+    {
+        var columnWidthRatio:Number = getStyle("columnWidthRatio");
+        var maxColumnWidth:Number = getStyle("maxColumnWidth");
+		var g:IChartElement;
+
+        switch (_type)
+        {
+            case "stacked":
+            case "100%":
+            {
+                var n:int = seriesSet.length;
+				var i:int;
+                for (i = 0; i < n; i++)
+                {
+                    seriesSet[i].offset = 0;
+				}
+
+                var newSeriesGlyph:ColumnSet = new ColumnSet();
+				newSeriesGlyph.owner = this;
+                newSeriesGlyph.series = seriesSet;
+                for (i = 0; i < n; i++)
+                {
+                	g = seriesSet[i] as IChartElement;
+					newSeriesGlyph.series[i].owner = newSeriesGlyph;
+					if (!g)
+						continue;
+					if (g.labelContainer)
+ 						newSeriesGlyph.labelContainer.addChild(seriesSet[i].labelContainer);
+                }
+
+                if (!isNaN(columnWidthRatio))
+                    newSeriesGlyph.columnWidthRatio = _perSeriescolumnWidthRatio;
+
+                if (!isNaN(maxColumnWidth))
+                    newSeriesGlyph.maxColumnWidth = _perSeriesMaxColumnWidth;
+
+                newSeriesGlyph.type = _type;
+
+                invalidateData();
+
+                return [ newSeriesGlyph ];
+            }
+
+            case "clustered":
+            default:
+            {
+
+				var columnSeriesCount:int = 0;
+				for each(var series:Series in seriesSet) {
+					if(series is ColumnSet || series is ColumnSeries)
+						columnSeriesCount++;
+				}
+
+				_perSeriescolumnWidthRatio = columnWidthRatio / columnSeriesCount;
+                _perSeriesMaxColumnWidth = maxColumnWidth / columnSeriesCount;
+
+                _leftOffset = (1 - columnWidthRatio) / 2 +
+                              _perSeriescolumnWidthRatio / 2 - 0.5;
+
+				n = seriesSet.length;
+				var count:int = 0;
+				for (i = 0; i < n; i++)
+				{
+					var newSeries:IChartElement = seriesSet[i];
+					if (newSeries is ColumnSeries || newSeries is ColumnSet)
+					{
+						customizeSeries(Series(seriesSet[i]), count);
+						count++;
+					}
+				}
+
+				return seriesSet;
+            }
+
+            case "overlaid":
+            {
+                _perSeriescolumnWidthRatio = columnWidthRatio;
+                _perSeriesMaxColumnWidth = maxColumnWidth;
+
+                _leftOffset = 0;
+                return super.applySeriesSet(seriesSet, transform);
+            }
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: CartesianChart
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function initSecondaryMode():void
+    {
+        super.initSecondaryMode();
+
+        if (!secondVerticalAxis)
+            secondVerticalAxis = new LinearAxis();
+
+        if (!secondVerticalAxisRenderer)
+            secondVerticalAxisRenderer = new AxisRenderer();
+    }
+
+    /**
+     * Determines positions and dimensions of labels for all series in the chart
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override mx_internal function measureLabels():Object
+    {
+        getSeriesLabelPosSet();
+        if (!_needLabels)
+            return null;
+        var len:int = series.length;
+        var n:int;
+        var secondSeriesLen:int = secondSeries.length;
+        var allSeriesTransform:Boolean = true;
+
+        if (type == "stacked" || type == "overlaid" || type == "100%")
+            allLabelsMeasured = false;
+
+        _allItems = [];
+        n = len;
+        for (var i:int = 0; i < n; i++)
+        {
+            findChartItems(series[i]);
+        }
+
+        n = secondSeriesLen;
+        for (i = 0; i < n; i++)
+        {
+            findChartItems(secondSeries[i]);
+        }
+        _allItems.sort(sortOnX);    //sort all items with respect to their position along X-axis
+
+        var itemsLen:Number = _allItems.length;
+        n = itemsLen;
+        for (i = 0; i < n; i++)
+        {
+            var v:ColumnSeriesItem = _allItems[i];
+            var columnSeries:ColumnSeries = ColumnSeries(ColumnSeriesItem(_allItems[i]).element);
+            var labelPosition:String = columnSeries.labelPos;
+
+            if (labelPosition == "inside" || labelPosition == "outside")
+            {
+                var base:Number = columnSeries.seriesRenderData.renderedBase;
+                var size:Number = columnSeries.getStyle('fontSize');
+                if (columnSeries.labelFunction != null)
+                    columnSeries.measuringField.text = v.labelText = columnSeries.labelFunction(v, columnSeries);
+                else if (columnSeries.labelField != null)
+                    columnSeries.measuringField.text = v.labelText = v.item[columnSeries.labelField];
+                else if (columnSeries.dataFunction != null)
+                    columnSeries.measuringField.text = v.labelText = columnSeries.dataFunction(this, v.item, 'yNumber');
+                else
+                    columnSeries.measuringField.text = v.labelText = v.item[columnSeries.yField];
+
+                columnSeries.measuringField.validateNow();
+
+                var labelRotation:Number = columnSeries.labelAngle;
+                var labelSizeLimit:Number = columnSeries.maxLabelSize;
+
+                if (labelPosition == "outside" && (type == "overlaid" || type == "stacked" || type == "100%"))
+                {
+                    columnSeries.labelPos = 'inside';
+                    labelPosition = "inside";
+                        // today, labelPosition = inside is only supported for 100%, stacked and overlaid charts
+                }
+
+
+                if (labelPosition == 'outside')
+                {
+                    if (!showLabelVertically)
+                    {
+                        v.labelIsHorizontal = true;
+                        if (extendLabelToEnd)
+                        {
+                            v.labelWidth = Math.abs((this.dataRegion.right -
+                                           (v.x + columnSeries.seriesRenderData.renderedXOffset -
+                                           columnSeries.seriesRenderData.renderedHalfWidth))/ Math.cos(0));
+                        }
+                        else
+                        {
+                            v.labelWidth = Math.min(Math.abs((this.dataRegion.right -
+                                           (v.x + columnSeries.seriesRenderData.renderedXOffset -
+                                           columnSeries.seriesRenderData.renderedHalfWidth))/ Math.cos(0)),maxLabelWidth);
+                        }
+                        v.labelHeight = columnSeries.measuringField.textHeight + 2;
+                    }
+                    else
+                    {                   //check whether labels can be rendered horizontally
+                        v.labelIsHorizontal = true;
+                        v.labelWidth = 2 * columnSeries.seriesRenderData.renderedHalfWidth;
+                        v.labelHeight = columnSeries.measuringField.textHeight + 2;
+
+                        if (columnSeries.measuringField.textWidth + 5 > 2 * columnSeries.seriesRenderData.renderedHalfWidth &&
+                        columnSeries.measuringField.embedFonts)
+                        {
+                            v.labelIsHorizontal = false;
+                            v.labelHeight = 2 * columnSeries.seriesRenderData.renderedHalfWidth;
+                            if (!(isNaN(labelRotation)) && labelRotation!=-90)
+                            {
+                                var r:Number = -labelRotation / Math.PI * 180;
+                                        //for future enhancement
+                                        //check for type of chart if we need to support labelPosition = outside for all types of charts
+                                if (type == "clustered")
+                                {
+                                    if (i < itemsLen - len)
+                                    {
+                                        v.labelWidth = Math.abs((_allItems[i + len - i%len].x + ColumnSeries(_allItems[i + len - i%len].element).seriesRenderData.renderedXOffset
+                                                       - ColumnSeries(_allItems[i + len - i%len].element).seriesRenderData.renderedHalfWidth -
+                                                       (v.x + columnSeries.seriesRenderData.renderedXOffset -
+                                                       columnSeries.seriesRenderData.renderedHalfWidth))/ Math.cos(r));
+                                    }
+                                    else
+                                        v.labelWidth = Math.abs((_allItems[itemsLen -1].x + ColumnSeries(_allItems[itemsLen - 1].element).seriesRenderData.renderedXOffset
+                                                       + ColumnSeries(_allItems[itemsLen - 1].element).seriesRenderData.renderedHalfWidth -
+                                                       (v.x + columnSeries.seriesRenderData.renderedXOffset -
+                                                       columnSeries.seriesRenderData.renderedHalfWidth))/ Math.cos(r));
+                                }
+                            }
+                            else
+                            {
+                                if (v.y < (isNaN(v.min) ? base : v.min))
+                                {
+                                    v.labelWidth = dataToLocal(0,v.yNumber).y - dataToLocal(0,NumericAxis(columnSeries.dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS)).computedMaximum).y;
+                                    v.labelY = v.y;
+                                    if (v.labelY < this.dataRegion.top)
+                                    {
+                                        v.labelWidth = Math.abs(v.y -(isNaN(v.min) ? base : v.min));
+                                        v.labelY = isNaN(v.min) ? base : v.min;
+                                    }
+                                }
+                                else
+                                {
+                                    v.labelWidth = dataToLocal(0,NumericAxis(columnSeries.dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS)).computedMinimum).y - dataToLocal(0,v.yNumber).y;
+                                    v.labelY = v.y + v.labelWidth;
+                                    if (v.labelY > this.dataRegion.bottom)
+                                    {
+                                        v.labelWidth = Math.abs(v.y -(isNaN(v.min) ? base : v.min));
+                                        v.labelY = v.y;
+                                    }
+                                }
+                            }
+
+                            v.labelX = v.x - columnSeries.seriesRenderData.renderedHalfWidth + columnSeries.seriesRenderData.renderedXOffset;
+                        }
+                    }
+
+                    var labelScale:Number = 1;
+                    if (columnSeries.measuringField.textWidth + 5 > v.labelWidth || (columnSeries.measuringField.textHeight) > v.labelHeight)
+                    {
+                        labelScale = v.labelWidth / (columnSeries.measuringField.textWidth + 5);
+                        labelScale = Math.min(labelScale, v.labelHeight / (columnSeries.measuringField.textHeight));
+                        if (size * labelScale > labelSizeLimit)
+                        {
+                            columnSeries.seriesRenderData.labelScale = Math.min(labelScale,columnSeries.seriesRenderData.labelScale);
+                            /* if (v.labelIsHorizontal)
+                            {
+                                _tempField.setStyle('fontSize',size * columnSeries.seriesRenderData.labelScale);
+                                v.labelHeight = _tempField.textHeight + 2;
+                            } */
+                        }
+                        else
+                        {
+                            _tempField.setStyle('fontSize',size);
+                            if (_tempField.textWidth > v.labelWidth || columnSeries.measuringField.textHeight > v.labelHeight)
+                            {
+                                labelScale = v.labelWidth / _tempField.textWidth;
+                                labelScale = Math.min(labelScale, v.labelHeight / (columnSeries.measuringField.textHeight));
+                                if (size * labelScale > labelSizeLimit)
+                                {
+                                    columnSeries.seriesRenderData.labelScale = Math.min(labelScale,columnSeries.seriesRenderData.labelScale);
+                                    /* if (v.labelIsHorizontal)
+                                    {
+                                        _tempField.setStyle('fontSize',size * columnSeries.seriesRenderData.labelScale);
+                                        v.labelHeight = _tempField.textHeight + 2;
+                                    } */
+                                }
+                                else
+                                {
+                                    v.labelText = "";
+                                    v.labelWidth = 1;
+                                    v.labelHeight = 0;
+                                }
+                            }
+
+                        }
+                    }
+                    if (!isNaN(labelRotation) && labelRotation!=-90 && columnSeries.measuringField.embedFonts)
+                    {
+                        v.labelHeight = columnSeries.measuringField.textHeight + 2;
+                        if (v.y < (isNaN(v.min) ? base : v.min))
+                            v.labelY = v.y - v.labelHeight;
+                        else
+                            v.labelY = v.y + v.labelHeight;
+                    }
+                    if (v.labelIsHorizontal)
+                    {
+                        if (v.y < (isNaN(v.min) ? base : v.min))
+                        {
+                            v.labelY = v.y - v.labelHeight;
+                            if (v.labelY < this.dataRegion.top)
+                                v.labelY = v.y;
+                        }
+
+                        else
+                        {
+                            v.labelY = v.y;
+                            if (v.labelY > this.dataRegion.bottom)
+                                v.labelY = v.y - v.labelHeight;
+
+                        }
+                        v.labelX = v.x - columnSeries.seriesRenderData.renderedHalfWidth +columnSeries.seriesRenderData.renderedXOffset;
+                    }
+                    v.labelTextWidth = columnSeries.measuringField.textWidth;
+                    var j:int = 0;
+                    if (!extendLabelToEnd)
+                    {
+                        //maxLabelWidth
+                        for (j = (i-1); j >= 1;)
+                        {
+                            if (_allItems[j].x >= v.x - maxLabelWidth)
+                                j--;
+                            else
+                                break;
+                        }
+                        if (j < 0)
+                            j = i;
+                    }
+
+                    for (var k:int = j; k < i; k++)
+                    {
+                        var tempItem:ColumnSeriesItem = _allItems[k];
+                                    //test for overlaps with previous labels
+                        if (tempItem.labelIsHorizontal)
+                        {
+                            if (v.labelX + 0.0001 < Math.min(tempItem.labelX + tempItem.labelWidth , tempItem.labelX + tempItem.labelTextWidth))
+                            {
+                                if (v.labelIsHorizontal)
+                                {
+                                    if ((((v.labelY + v.labelHeight) > tempItem.labelY) && ((v.labelY + v.labelHeight) < (tempItem.labelY + tempItem.labelHeight))) ||
+                                        ((v.labelY > tempItem.labelY) && (v.labelY < (tempItem.labelY + tempItem.labelHeight))) ||
+                                        ((v.labelY == tempItem.labelY) && ((tempItem.labelY + tempItem.labelHeight) == (v.labelY + v.labelHeight)) && (v.labelX > tempItem.labelX) && (v.labelX < (tempItem.labelX + tempItem.labelWidth))) ||
+                                        ((v.labelY <= tempItem.labelY) && ((v.labelY + v.labelHeight) > (tempItem.labelY + tempItem.labelHeight))) ||
+                                        ((v.labelY < tempItem.labelY) && ((v.labelY + v.labelHeight) >= (tempItem.labelY + tempItem.labelHeight))))
+                                    {
+                                        if (v.y < (isNaN(v.min) ? base : v.min))
+                                            v.labelY = tempItem.labelY - v.labelHeight;
+                                        else
+                                            v.labelY = tempItem.labelY + tempItem.labelHeight;
+                                    }
+                                }
+                                else
+                                {
+                                    if (((v.labelY > tempItem.labelY) && ((v.labelY - v.labelWidth) < (tempItem.labelY))) ||
+                                        (((v.labelY - v.labelWidth) >= tempItem.labelY) && (v.labelY > (tempItem.labelY - tempItem.labelHeight))))
+                                    {
+                                        var prevY:Number = v.labelY;
+                                        if (v.y < (isNaN(v.min) ? base : v.min))
+                                        {
+                                            v.labelY = tempItem.labelY - tempItem.labelHeight;
+                                            v.labelWidth = v.labelWidth - (prevY - v.labelY);
+                                        }
+                                        else
+                                        {
+                                            v.labelY = tempItem.labelY + tempItem.labelHeight;
+                                            v.labelWidth = v.labelWidth - (v.labelY - prevY);
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                else if (labelPosition == "inside")
+                {
+                    v.labelIsHorizontal = true;
+                    v.labelWidth = 2 * columnSeries.seriesRenderData.renderedHalfWidth;
+                    v.labelHeight = columnSeries.measuringField.textHeight + 2;
+
+                    if (columnSeries.measuringField.textWidth + 5 > 2 * columnSeries.seriesRenderData.renderedHalfWidth &&
+                        columnSeries.measuringField.embedFonts)
+                    {
+                        v.labelIsHorizontal = false;
+                        v.labelWidth = Math.abs(v.y -(isNaN(v.min) ? base : v.min));
+                        v.labelHeight = 2 * columnSeries.seriesRenderData.renderedHalfWidth;
+                        if (v.y < (isNaN(v.min) ? base : v.min))
+                            v.labelY = isNaN(v.min) ? base : v.min;
+                        else
+                            v.labelY = v.y;
+
+                        v.labelX = v.x - v.labelHeight/2 + columnSeries.seriesRenderData.renderedXOffset;
+                    }
+
+                    labelScale = 1;
+                    if (columnSeries.measuringField.textWidth + 5 > v.labelWidth || columnSeries.measuringField.textHeight > v.labelHeight)
+                    {
+                        labelScale = v.labelWidth / (columnSeries.measuringField.textWidth + 5);
+                        labelScale = Math.min(labelScale, v.labelHeight / columnSeries.measuringField.textHeight);
+                        if (size * labelScale > labelSizeLimit)
+                        {
+                            columnSeries.seriesRenderData.labelScale = Math.min(labelScale,columnSeries.seriesRenderData.labelScale);
+                            /* if (v.labelIsHorizontal)
+                            {
+                                _tempField.setStyle('fontSize',size * columnSeries.seriesRenderData.labelScale);
+                                v.labelHeight = _tempField.textHeight + 2;
+                            } */
+                        }
+                        else
+                        {
+                            _tempField.setStyle('fontSize',size);
+                            if (_tempField.textWidth > v.labelWidth || columnSeries.measuringField.textHeight > v.labelHeight)
+                            {
+                                labelScale = v.labelWidth / _tempField.textWidth;
+                                labelScale = Math.min(labelScale, v.labelHeight / (columnSeries.measuringField.textHeight));
+                                if (size * labelScale > labelSizeLimit)
+                                {
+                                    columnSeries.seriesRenderData.labelScale = Math.min(labelScale,columnSeries.seriesRenderData.labelScale);
+                                    /* if (v.labelIsHorizontal)
+                                    {
+                                        _tempField.setStyle('fontSize',size * columnSeries.seriesRenderData.labelScale);
+                                        v.labelHeight = _tempField.textHeight + 2;
+                                    } */
+                                }
+                                else
+                                {
+                                    v.labelText = "";
+                                    v.labelWidth = 1;
+                                    v.labelHeight = 0;
+                                }
+                            }
+                        }
+                    }
+                    if (v.labelIsHorizontal)
+                    {
+                        var align:String = columnSeries.getStyle('labelAlign');
+                        if (align == "top")
+                        {
+                            if (v.y < (isNaN(v.min) ? base : v.min))
+                                v.labelY = v.y;
+                            else
+                                v.labelY = v.y - v.labelHeight;
+                        }
+                        else if (align == "bottom")
+                        {
+                            if (v.y < (isNaN(v.min) ? base : v.min))
+                                v.labelY = (isNaN(v.min) ? base : v.min) - v.labelHeight;
+                            else
+                                v.labelY = isNaN(v.min) ? base : v.min;
+                        }
+                        else
+                        {
+                            if (v.y < (isNaN(v.min) ? base : v.min))
+                                v.labelY = v.y + Math.abs(v.y - (isNaN(v.min) ? base : v.min))/2 - v.labelHeight/2;
+                            else
+                                v.labelY = v.y - Math.abs(v.y - (isNaN(v.min) ? base : v.min))/2 + v.labelHeight/2;
+                        }
+                        v.labelX = v.x - columnSeries.seriesRenderData.renderedHalfWidth + columnSeries.seriesRenderData.renderedXOffset;
+                    }
+                    v.labelTextWidth = columnSeries.measuringField.textWidth;
+                    j = 0;
+                    if (!extendLabelToEnd)
+                    {
+                        //maxLabelWidth
+                        for (j = (i-1); j >= 1;)
+                        {
+                            if (_allItems[j].x >= v.x - maxLabelWidth)
+                                j--;
+                            else
+                                break;
+                        }
+                        if (j < 0)
+                            j = i;
+                    }
+
+                    for (k = j; k < i; k++)
+                    {
+                        tempItem = _allItems[k];
+                        if (tempItem.labelIsHorizontal)
+                        {
+                            if (v.labelX + 0.0001 < Math.min(tempItem.labelX + tempItem.labelWidth , tempItem.labelX + tempItem.labelTextWidth))
+                            {
+                                if (v.labelIsHorizontal)
+                                {
+                                    if ((((v.labelY + v.labelHeight) > tempItem.labelY) && ((v.labelY + v.labelHeight) < (tempItem.labelY + tempItem.labelHeight))) ||
+                                        ((v.labelY > tempItem.labelY) && (v.labelY < (tempItem.labelY + tempItem.labelHeight))) ||
+                                        ((v.labelY == tempItem.labelY) && ((tempItem.labelY + tempItem.labelHeight) == (v.labelY + v.labelHeight)) && (v.labelX > tempItem.labelX) && (v.labelX < (tempItem.labelX + tempItem.labelWidth))) ||
+                                        ((v.labelY <= tempItem.labelY) && ((v.labelY + v.labelHeight) > (tempItem.labelY + tempItem.labelHeight))) ||
+                                        ((v.labelY < tempItem.labelY) && ((v.labelY + v.labelHeight) >= (tempItem.labelY + tempItem.labelHeight))))
+                                    {
+                                        if (v.y < (isNaN(v.min) ? base : v.min))
+                                            v.labelY = tempItem.labelY - v.labelHeight;
+                                        else
+                                            v.labelY = tempItem.labelY + tempItem.labelHeight;
+                                    }
+                                    else if (((v.labelY < tempItem.labelY) && ((v.labelY + v.labelHeight) > tempItem.labelY)) ||
+                                        ((v.labelY > tempItem.labelY) && (v.labelY < (tempItem.labelY + tempItem.labelHeight))) ||
+                                        (v.labelY == tempItem.labelY))
+                                    {
+                                        if (v.yNumber >= tempItem.yNumber)
+                                        {
+                                            tempItem.labelText = "";
+                                            tempItem.labelWidth = 1;
+                                        }
+                                        else
+                                        {
+                                            v.labelText = "";
+                                            v.labelWidth = 1;
+                                        }
+                                    }
+                                }
+                                else
+                                {
+                                    if (((v.labelY > tempItem.labelY) && ((v.labelY - Math.min(v.labelWidth,v.labelTextWidth)) < (tempItem.labelY))) ||
+                                        (((v.labelY - v.labelWidth) >= tempItem.labelY) && (v.labelY > (tempItem.labelY - tempItem.labelHeight))))
+                                    {
+                                        prevY = v.labelY;
+                                        if (v.y < (isNaN(v.min) ? base : v.min))
+                                        {
+                                            v.labelY = tempItem.labelY - tempItem.labelHeight;
+                                            v.labelWidth = v.labelWidth - (prevY - v.labelY);
+                                        }
+                                        else
+                                        {
+                                            v.labelY = tempItem.labelY + tempItem.labelHeight;
+                                            v.labelWidth = v.labelWidth - (v.labelY - prevY);
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                        else
+                        {
+                            if (v.labelX == tempItem.labelX)
+                            {
+                                if (((v.labelY <= tempItem.labelY) && (v.labelY > (tempItem.labelY - Math.min(tempItem.labelWidth, tempItem.labelTextWidth) + 0.0001))) ||
+                                    ((v.labelY >= tempItem.labelY) && ((v.labelY - Math.min(v.labelWidth, v.labelTextWidth) + 0.0001) < tempItem.labelY)))
+                                {
+                                    if (v.yNumber < tempItem.yNumber)
+                                    {
+                                        v.labelText = "";
+                                        v.labelWidth = 1;
+                                    }
+                                    else
+                                    {
+                                        tempItem.labelText = "";
+                                        tempItem.labelWidth = 1;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            else
+            {
+                columnSeries.seriesRenderData.labelData = null;
+                columnSeries.labelCache.count = 0;
+            }
+        }
+        allLabelsMeasured = true;
+        n = len;
+        for (i = 0; i < n; i++)
+        {
+            invalidateDisplay(series[i]);
+        }
+        n = secondSeriesLen;
+        for (i = 0; i < n; i++)
+        {
+            invalidateDisplay(secondSeries[i]);
+        }
+        return null;
+    }
+
+
+    //---------------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //---------------------------------------------------------------------------------
+    mx_internal function getSeriesLabelPos(series:Series):void
+    {
+        if (series is ColumnSeries)
+        {
+            var columnSeries:ColumnSeries = ColumnSeries(series);
+            var position:String = columnSeries.labelPos;
+            if (position == "inside" || position == "outside" || position == "none")
+                _needLabels = true;
+        }
+        else if (series is ColumnSet)
+        {
+            var setSeries:Array /* of Series */ = ColumnSet(series).series;
+            var n:int  = setSeries.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                getSeriesLabelPos(setSeries[i]);
+            }
+        }
+    }
+
+    mx_internal function getSeriesLabelPosSet():void
+    {
+        var n:int = series.length;
+        _needLabels = false;
+        for (var i:int = 0; i < n; i++)
+        {
+            if (_needLabels)
+                return;
+            getSeriesLabelPos(series[i]);
+        }
+        n = secondSeries.length;
+        for (i = 0; i < n; i++)
+        {
+            if (_needLabels)
+                return;
+            getSeriesLabelPos(secondSeries[i]);
+        }
+    }
+
+    /**
+     * @private
+     */
+     private function sortOnX(a:ColumnSeriesItem,b:ColumnSeriesItem):int
+     {
+        var offset1:Number = ColumnSeries(a.element).seriesRenderData.renderedXOffset;
+        var offset2:Number = ColumnSeries(b.element).seriesRenderData.renderedXOffset;
+        if (a.x + offset1 > b.x + offset2)
+            return 1;
+        else if (a.x + offset1  b.yNumber)
+                return 1;
+            else if (a.yNumber < b.yNumber)
+                return -1;
+            else
+                return 0;
+        }
+
+     }
+
+     /**
+     * @private
+     */
+     private function findChartItems(series:Series):void
+     {
+     	var n:int;
+     	var i:int;
+        if (series is ColumnSeries)
+        {
+            var columnSeries:ColumnSeries = ColumnSeries(series);
+            var seriesItems:Array /* of ColumnSeriesItem */ = columnSeries.seriesRenderData.filteredCache;
+            n = seriesItems.length;
+            columnSeries.labelCache.count = n;
+            columnSeries.seriesRenderData.labelData = columnSeries.labelContainer;
+            columnSeries.seriesRenderData.labelScale = 1;
+            for (i = 0; i < n; i++)
+            {
+                _allItems.push(ColumnSeriesItem(seriesItems[i]));
+            }
+        }
+        else if (series is ColumnSet)
+        {
+            var setSeries:Array /* of Series */ = ColumnSet(series).series;
+            n = setSeries.length;
+            for (i = 0; i < n; i++)
+            {
+                findChartItems(setSeries[i]);
+            }
+        }
+     }
+    /**
+     * @private
+     */
+     private function invalidateDisplay(series:Series):void
+     {
+        if (series is ColumnSeries)
+            ColumnSeries(series).updateLabels();
+        else if (series is ColumnSet)
+        {
+            var setSeries:Array /* of Series */ = ColumnSet(series).series;
+            var n:int = setSeries.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                invalidateDisplay(setSeries[i]);
+            }
+        }
+     }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 11189
Author:   clucier@adobe.com
Date:     2009-10-27T19:33:04.160990Z

Log Message:
-----------
Adding better support for deferred instantiation and states. State overrides can now correctly override targets that are instantiated after a state change.  Moving the commitment of the initial state to earlier (during commit properties), this should avoid the secondary layout pass that used to occur after applicationComplete.  Removed creationComplete handler in UIComponent as it is no longer needed.  Fixing an issue in Group that was causing blendMode to be stuck as 'layered' when setting alpha to 0 then resetting it to a non zero value.

QE notes: None
Doc notes: None
Bugs: SDK-23105, SDK-23470, SDK-23790
Reviewer: Deepa, Glenn
Tests run: Full Cyclone, Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/OverrideBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetEventHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/AddChild.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetProperty.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/RemoveChild.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/states/AddItems.as
+++ frameworks/projects/framework/src/mx/states/AddItems.as
@@ -31,7 +31,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class AddItems extends OverrideBase implements IOverride
+public class AddItems extends OverrideBase
 {
     include "../core/Version.as";

@@ -476,7 +476,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function initialize():void
+    override public function initialize():void
     {
         if (creationPolicy == ContainerCreationPolicy.AUTO)
             createInstance();
@@ -490,10 +490,30 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function apply(parent:UIComponent):void
-    {
-        var dest:* = destination = getOverrideContext(destination, parent);
+    override public function apply(parent:UIComponent):void
+    {
+        var dest:* = getOverrideContext(destination, parent);
         var localItems:Array;
+
+        added = false;
+        parentContext = parent;
+
+        // Early exit if destination is null.
+        if (!dest)
+        {
+            if (destination != null && !applied)
+            {
+                // Our destination context is unavailable so we attempt to register
+                // a listener on our parent document to detect when/if it becomes
+                // valid.
+                addContextListener(destination);
+            }
+            applied = true;
+            return;
+        }
+
+        applied = true;
+        destination = dest;

         // Coerce to array if not already an array, or we wish
         // to treat the array as *the* item to add (isArray == true)
@@ -551,14 +571,25 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function remove(parent:UIComponent):void
+    override public function remove(parent:UIComponent):void
     {
         var dest:* = getOverrideContext(destination, parent);
         var localItems:Array;
         var i:int;

         if (!added)
+        {
+            if (dest == null)
+            {
+                // It seems our override is no longer active, but we were never
+                // able to successfully apply ourselves, so remove our context
+                // listener if applicable.
+                removeContextListener();
+                applied = false;
+                parentContext = null;
+            }
             return;
+        }

         // Coerce to array if not already an array, or we wish
         // to treat the array as *the* item to add (isArray == true)
@@ -607,7 +638,10 @@
         if (destructionPolicy == "auto")
             destroyInstance();

+        // Clear our flags and override context.
         added = false;
+        applied = false;
+        parentContext = null;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 8679
Author:   jimurphy@adobe.com
Date:     2009-07-20T13:23:31.007823Z

Log Message:
-----------
These are Asdoc edit from 3.x rev 8623.  I somehow missed committing these when they were supposed to be committed during my previous merge.

bug: no
qa: no
doc: no
checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Consumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/CallResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/HTTPRequestMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/Responder.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/XMLLoadEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/IResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Producer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncToken.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/WSDLLoadEvent.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as
+++ frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as
@@ -214,7 +214,7 @@
      * are no arguments passed, the arguments object is used as the source of
      * parameters.
      *
-     * @return AsyncToken Call using the asynchronous completion token pattern.
+     * @return AsyncToken object.
      * The same object is available in the result and
      * fault events from the token property.
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/rpc/src/mx/rpc/events/FaultEvent.as
+++ frameworks/projects/rpc/src/mx/rpc/events/FaultEvent.as
@@ -0,0 +1,200 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.rpc.events
+{
+
+import flash.events.Event;
+
+
+import mx.core.mx_internal;
+import mx.messaging.events.MessageFaultEvent;
+import mx.messaging.messages.IMessage;
+import mx.rpc.AsyncToken;
+import mx.rpc.Fault;
+
+use namespace mx_internal;
+
+/**
+ * This event is dispatched when an RPC call has a fault.
+ */
+public class FaultEvent extends AbstractEvent
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+   /**
+    * The FAULT event type.
+    *
+    *
The properties of the event object have the following values:

+    *

+    *
Property	Value

+    *
bubbles	false

+    *
cancelable	true, calling preventDefault()
+    *       from the associated token's responder.fault method will prevent
+    *       the service or operation from dispatching this event

+    *
currentTarget	The Object that defines the
+    *       event listener that handles the event. For example, if you use
+    *       myButton.addEventListener() to register an event listener,
+    *       myButton is the value of the currentTarget.

+    *
fault	The Fault object that contains the
+    *     details of what caused this event.

+    *
message	The Message associated with this event.

+    *
target	The Object that dispatched the event;
+    *       it is not always the Object listening for the event.
+    *       Use the currentTarget property to always access the
+    *       Object listening for the event.

+    *
token	The token that represents the call
+    *     to the method. Used in the asynchronous completion token pattern.

+    *

+    *  @eventType fault
+    */
+    public static const FAULT:String = "fault";
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Creates a new FaultEvent. The fault is a required parameter while the call and message are optional.
+     *
+     * @param type The event type; indicates the action that triggered the event.
+     * @param bubbles Specifies whether the event can bubble up the display list hierarchy.
+     * @param cancelable Specifies whether the behavior associated with the event can be prevented.
+     * @param fault Object that holds details of the fault, including a faultCode and faultString.
+     * @param token Token representing the call to the method. Used in the asynchronous completion token pattern.
+     * @param message Source Message of the fault.
+     */
+    public function FaultEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = true,
+                                fault:Fault = null, token:AsyncToken = null, message:IMessage = null)
+    {
+        super(type, bubbles, cancelable, token, message);
+
+        _fault = fault;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * The Fault object that contains the details of what caused this event.
+     */
+    public function get fault():Fault
+    {
+        return _fault;
+    }
+
+    /**
+     * In certain circumstances, headers may also be returned with a fault to
+     * provide further context to the failure.
+     */
+    public function get headers():Object
+    {
+        return _headers;
+    }
+
+    /**
+     * @private
+     */
+    public function set headers(value:Object):void
+    {
+        _headers = value;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Because this event can be redispatched we have to implement clone to
+     * return the appropriate type, otherwise we will get just the standard
+     * event type.
+     * @private
+     */
+    override public function clone():Event
+    {
+        return new FaultEvent(type, bubbles, cancelable, fault, token, message);
+    }
+
+     /**
+      * Returns a string representation of the FaultEvent.
+      *
+      * @return String representation of the FaultEvent.
+      */
+    override public function toString():String
+    {
+        return formatToString("FaultEvent", "fault", "messageId", "type", "bubbles", "cancelable", "eventPhase");
+    }
+
+    /*
+     * Have the token apply the fault.
+     */
+    override mx_internal function callTokenResponders():void
+    {
+        if (token != null)
+            token.applyFault(this);
+    }
+
+    /**
+     *  Given a MessageFaultEvent, this method constructs and
+     *  returns a FaultEvent.
+     *
+     *  @param value MessageFaultEvent reference to extract the appropriate
+     *  fault information from.
+     *  @param token AsyncToken [optional] associated with this fault.
+     *  @returns FaultEvent
+     */
+    public static function createEventFromMessageFault(value:MessageFaultEvent, token:AsyncToken = null):FaultEvent
+    {
+        var fault:Fault = new Fault(value.faultCode, value.faultString, value.faultDetail);
+        fault.rootCause = value.rootCause;
+        return new FaultEvent(FaultEvent.FAULT, false, true, fault, token, value.message);
+    }
+
+    /**
+     *  Given a Fault, this method constructs and
+     *  returns a FaultEvent.
+     *
+     *  @param fault Fault that contains the details of the FaultEvent.
+     *  @param token AsyncToken [optional] associated with this fault.
+     *  @param msg Message [optional] associated with this fault.
+     *  @returns FaultEvent
+     */
+    public static function createEvent(fault:Fault, token:AsyncToken = null, msg:IMessage = null):FaultEvent
+    {
+        return new FaultEvent(FaultEvent.FAULT, false, true, fault, token, msg);
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Private Variables
+    //
+    //--------------------------------------------------------------------------
+
+    private var _fault:Fault;
+    private var _headers:Object;
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12796
Author:   cframpto@adobe.com
Date:     2009-12-10T18:05:16.265768Z

Log Message:
-----------
Because TLF does not have the concept of "auto" fontLookup like we have at the Flex-level, we have had to rework the meaning of the fontLookup attribute so it is possible to have spans with device text in a component whose fontLookup is "embeddedCFF" without requiring fontLookup "device" to be explicitly specified for those spans.

For Spark text components, the default fontLookup has been changed from "auto" to "embeddedCFF".  The default fontFamily is "Arial".

If the component level fontLookup either defaults to "embeddedCFF" or is explicitly set to "embeddedCFF", for each element that is not explicitly set to fontLookup "device", it will first look for the embedded font, and failing that, will fail back to the device font.  All fonts for a given text component must be in the same swf context.

If the component-level fontLookup is "device" or the component-level fontFamily is not found in the swf context, the font lookup for all elements in the component will revert to "device".

If the player doesn't find the device font it will fallback to one of the builtin default fonts.

QE notes: probably need some new mustella tests to cover all the cases - 5 RichText truncation tests fail but I'm not sure this change has anything to do with that
Doc notes:
Bugs: SDK-24470
Reviewer: Gordon
Tests run: checkintests, TextArea, Label, RichText
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/TextUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as</path>

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -36,13 +36,12 @@

 import mx.core.IEmbeddedFontRegistry;
 import mx.core.IFlexModuleFactory;
-import mx.core.IFontContextComponent;
 import mx.core.IUIComponent;
 import mx.core.Singleton;
 import mx.core.mx_internal;
-import mx.managers.ISystemManager;

 import spark.components.supportClasses.TextBase;
+import spark.utils.TextUtil;

 use namespace mx_internal;

@@ -191,7 +190,7 @@
  *    direction="ltr"
  *    dominantBaseline="auto"
  *    fontFamily="Arial"
- *    fontLookup="device"
+ *    fontLookup="embeddedCFF"
  *    fontSize="12"
  *    fontStyle="normal"
  *    fontWeight="normal"
@@ -232,7 +231,6 @@
  *  @productversion Flex 4
  */
 public class Label extends TextBase
-    implements IFontContextComponent
 {
     include "../core/Version.as";

@@ -255,8 +253,6 @@

         staticEastAsianJustifier = new EastAsianJustifier();

-        staticTextFormat = new TextFormat();
-
         if ("recreateTextLine" in staticTextBlock)
             recreateTextLine = staticTextBlock["recreateTextLine"];
     }
@@ -292,12 +288,6 @@
      */
     private static var staticEastAsianJustifier:EastAsianJustifier;

-    /**
-     *  @private
-     *  Used in getEmbeddedFontContext().
-     */
-    private static var staticTextFormat:TextFormat;
-
     /**
      *  @private
      *  A reference to the recreateTextLine() method in staticTextBlock,
@@ -415,42 +405,6 @@
      *  to render the text.
      */
     private var elementFormat:ElementFormat;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Properties: IFontContextComponent
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  fontContext
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    private var _fontContext:IFlexModuleFactory;
-
-    /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get fontContext():IFlexModuleFactory
-    {
-        return _fontContext;
-    }
-
-    /**
-     *  @private
-     */
-    public function set fontContext(value:IFlexModuleFactory):void
-    {
-        _fontContext = value;
-    }

     //--------------------------------------------------------------------------
     //
@@ -602,6 +556,12 @@
                 s = embeddedFontContext ?
                     FontLookup.EMBEDDED_CFF :
                     FontLookup.DEVICE;
+            }
+            else if (s == FontLookup.EMBEDDED_CFF && !embeddedFontContext)
+            {
+                // If the embedded font isn't found, fall back to device font,
+                // before falling back to the player's default font.
+                s = FontLookup.DEVICE;
             }
             fontDescription.fontLookup = s;
         }
@@ -703,40 +663,6 @@
         return elementFormat;
     }

-    /**
-     *  @private
-     *  Uses the component's CSS styles to determine the module factory
-     *  that should creates its TextLines.
-     */
-    private function getEmbeddedFontContext():IFlexModuleFactory
-    {
-        var moduleFactory:IFlexModuleFactory;
-
-        var fontLookup:String = getStyle("fontLookup");
-        if (fontLookup != FontLookup.DEVICE)
-        {
-            var font:String = getStyle("fontFamily");
-            var bold:Boolean = getStyle("fontWeight") == "bold";
-            var italic:Boolean = getStyle("fontStyle") == "italic";
-
-            var localLookup:ISystemManager =
-                fontContext && fontContext is ISystemManager ?
-                ISystemManager(fontContext) : systemManager;
-
-            moduleFactory = embeddedFontRegistry.getAssociatedModuleFactory(
-                font, bold, italic, this, fontContext, localLookup, true);
-        }
-
-        if (!moduleFactory && fontLookup == FontLookup.EMBEDDED_CFF)
-        {
-            // if we couldn't find the font and somebody insists it is
-            // embedded, try the default fontContext
-            moduleFactory = fontContext;
-        }
-
-        return moduleFactory;
-    }
-
     /**
      *  @private
      */


Transferred from the Adobe Open Source Subversion Repository

Revision: 6390
Author:   cframpto@adobe.com
Date:     2009-04-29T19:13:20.108698Z

Log Message:
-----------
Vellum private build up to changelist 697517.  Will update tomorrow with mainline build with even more API changes.

API changes so code will build with new Vellum library.
Change SimpleText/SimpleText2/RichText/RichText2 to use new TextLineRecyler API.

QE Notes: we need to test this with a new Argo FP since the text line recycling code paths will only be executed with that player
Doc Notes:
Bugs:
Reviewers: Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/textLayout.swz</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextPrimitive.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/textLayout.swf</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/tlf.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -30,7 +30,9 @@
 import flash.text.engine.TextElement;
 import flash.text.engine.TextLine;
 import flash.text.engine.TextLineValidity;
+
 import flashx.textLayout.compose.ITextLineCreator;
+import flashx.textLayout.compose.TextLineRecycler;

 import mx.core.mx_internal;
 import mx.core.EmbeddedFont;
@@ -41,6 +43,7 @@
 import mx.core.IUIComponent;
 import mx.core.Singleton;
 import mx.managers.ISystemManager;
+
 import spark.primitives.supportClasses.TextGraphicElement;

 [DefaultProperty("text")]
@@ -103,9 +106,6 @@
 		staticEmbeddedFont = new EmbeddedFont("", false, false);

 		staticTextFormat = new TextFormat();
-
-		if ("recreateTextLine" in staticTextBlock)
-			recreateTextLine = staticTextBlock["recreateTextLine"];
 	}

 	initClass();
@@ -361,11 +361,10 @@
         bounds.width = width;
         bounds.height = height;

-        // Remove the text lines from the container.  If we're recycling the
-        // text lines, leave them in mx_internal::textLines.
+        // Remove the text lines from the container and then release them for
+        // reuse, if supported by the player.
         mx_internal::removeTextLines();
-        if (recreateTextLine == null)
-            mx_internal::textLines.length = 0;
+        mx_internal::releaseTextLines();

 		var allLinesComposed:Boolean = createTextLines(elementFormat);

@@ -691,6 +690,9 @@
                 	                              textLines:Array,
                 	                              bounds:Rectangle):Boolean
 	{
+       // Start with 0 text lines.
+	   mx_internal::releaseTextLines(textLines);
+
 		// Get CSS styles for formats that we have to apply ourselves.
 		var direction:String = getStyle("direction");
         var lineBreak:String = getStyle("lineBreak");
@@ -717,7 +719,6 @@

 		if (innerWidth < 0 || innerHeight < 0 || !textBlock)
 		{
-            textLines.length = 0;
 			bounds.width = 0;
 			bounds.height = 0;
 			return false;
@@ -742,7 +743,6 @@
         var maxTextWidth:Number = 0;
 		var totalTextHeight:Number = 0;
 		var n:int = 0;
-        var nRecycleLines:int = recreateTextLine != null ? textLines.length : 0;
 		var nextTextLine:TextLine;
 		var nextY:Number = 0;
 		var textLine:TextLine;
@@ -759,11 +759,9 @@
 		// (0, 0, innerWidth, innerHeight), with top-left alignment.
 		while (true)
 		{
-		    if (nRecycleLines > 0)
-		    {
-		        //trace("recreateTextLine", n);
-		        var recycleLine:TextLine = textLines[n];
-
+            var recycleLine:TextLine = TextLineRecycler.getLineForReuse();
+            if (recycleLine)
+            {
                 if (textLineCreator)
                 {
                     nextTextLine = textLineCreator.recreateTextLine(
@@ -774,8 +772,6 @@
                     nextTextLine = recreateTextLine(
                     	recycleLine, textLine, maxLineWidth);
                 }
-
-                nRecycleLines--;
 		    }
 		    else
 		    {
@@ -857,9 +853,6 @@
             }
 		}

-        // If recycling text lines, eliminate any unused lines.
-        textLines.length = n;
-
 		// At this point, n is the number of lines that fit
 		// and textLine is the last line that fit.

@@ -1061,6 +1054,9 @@
                     measuredTextLine.specifiedWidth -
                     measuredTextLine.unjustifiedTextWidth;

+                measuredTextLine = null;
+                mx_internal::releaseTextLines(indicatorLines);
+
                 // 4. Get the initial truncation position on the target
                 // line given this allowed width.
                 var truncateAtCharPosition:int =
@@ -1116,7 +1112,7 @@
         // padding.
         if (!somethingFit)
         {
-            mx_internal::textLines.length = 0;
+            mx_internal::releaseTextLines();

             var paddingBottom:Number = getStyle("paddingBottom");
             var paddingLeft:Number = getStyle("paddingLeft");


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 12918
Author:   jimurphy@adobe.com
Date:     2009-12-14T21:13:23.650378Z

Log Message:
-----------
merge 3.x rev 12824 -> trunk

 r12824 | jon.avila@ssbbartgroup.com | 2009-12-10 21:57:42 -0500 (Thu, 10 Dec 2009) | 8 lines

  Update to prevent the accessible name of components in form items from being cached and never updated.  This fixes the issue for Spark components and mx components that are not TextInput and TextArea.  This also solves late data binding issues which caused the accessible name to be empty.  Additional work is required in Player to fix the caching issue components.  This change should be merged into the trunk.
  QE notes: none
  Doc notes: none
  Bugs: related to 15830 although this commit doesn't fix the issue for MX TextInput
  Reviewer: Gordon

  Tests run: checkintests
  Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccImpl.as</path>

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

--- frameworks/projects/framework/src/mx/accessibility/AccImpl.as
+++ frameworks/projects/framework/src/mx/accessibility/AccImpl.as
@@ -145,14 +145,6 @@
         var formName:String = "";
         var resourceManager:IResourceManager = ResourceManager.getInstance();

-        const itemLabel:Label = formItem.itemLabel;
-        const accProp:AccessibilityProperties = (itemLabel ? itemLabel.accessibilityProperties : null);
-        if (accProp && accProp.silent)
-            // We already calculated this label's name below, so just return it.
-            // FIXME gosmith: Caching this will cause problems if
-            // formItem, item label, or form header changes dynamically.
-            return accProp.name;
-
         var form:UIComponent = UIComponent(formItem.parent);

         // If we are located within a Form, then look for the first FormHeading
@@ -191,21 +183,6 @@

         formName = joinWithSpace(formName, f);

-        /*
-         * Disable form item label accessibility so the form item label and the
-         * text from the form item label are not both seen in the virtual view of
-         * a screen reader.
-         * Otherwise, the formItem would appear with a name, followed
-         * by the component being labeled, with a duplicate of that name.
-         * Setting silent here also causes code above to avoid recalculating the name.
-         * FIXME gosmith: If the caching above is removed, remove the above comment also.
-         */
-        if (accProp && !accProp.silent)
-        {
-            accProp.silent = true;
-            accProp.name = formName;
-        }
-
         return formName;
     }


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

--- frameworks/projects/framework/src/mx/core/ISpriteInterface.as
+++ frameworks/projects/framework/src/mx/core/ISpriteInterface.as
@@ -12,6 +12,11 @@
 /*
  *  The ISprite interface defines the basic set of APIs
  *  for web version of flash.display.Sprite
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */

 import flash.display.DisplayObject;
@@ -22,32 +27,62 @@

     /**
      *  @copy flash.display.Sprite#graphics
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get graphics():Graphics;

     /**
      *  @copy flash.display.Sprite#buttonMode
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get buttonMode():Boolean;
     function set buttonMode(value:Boolean):void;

     /**
      *  @copy flash.display.Sprite#startDrag()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void;

     /**
      *  @copy flash.display.Sprite#stopDrag()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function stopDrag():void;

     /**
      *  @copy flash.display.Sprite#dropTarget
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get dropTarget():DisplayObject;

     /**
      *  @copy flash.display.Sprite#hitArea
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get hitArea():Sprite;
     function set hitArea(value:Sprite):void;
@@ -55,6 +90,11 @@

     /**
      *  @copy flash.display.Sprite#useHandCursor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get useHandCursor():Boolean;
     function set useHandCursor(value:Boolean):void;
@@ -62,6 +102,11 @@

     /**
      *  @copy flash.display.Sprite#soundTransform
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     function get soundTransform():SoundTransform;
     function set soundTransform(sndTransform:SoundTransform):void;


Transferred from the Adobe Open Source Subversion Repository

Revision: 3716
Author:   mhorn@adobe.com
Date:     2008-10-17T19:41:44.823118Z

Log Message:
-----------
minor asdoc update

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -257,6 +257,10 @@
      *
The image location can be a URL or file reference. If it is a file reference, its location is relative to
      *  the location of the file that is being compiled.

      *
+     *
The BitmapGraphic class is designed to work with embedded images, not with images that are
+     *  loaded at run time. You can use the Image control to load the image at run time,
+     *  and then assign the Image control to the value of the BitmapGraphic's source property.

+     *
      *  @see flash.display.Bitmap
      *  @see flash.display.BitmapData
      *  @see mx.graphics.BitmapFill


Transferred from the Adobe Open Source Subversion Repository

Revision: 9023
Author:   dloverin@adobe.com
Date:     2009-08-03T17:43:58.417800Z

Log Message:
-----------
Submit patch to SHA256.computeDigest() from Paul Robertson.

Always read the ByteArray parameter of SHA256.computeDigest from position zero.
Restore the original BytesArray position before returning.

QE notes: None.
Doc notes: None.
Bugs: SDK-17129
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/SHA256.as

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

--- frameworks/projects/framework/src/mx/utils/SHA256.as
+++ frameworks/projects/framework/src/mx/utils/SHA256.as
@@ -62,6 +62,11 @@
         public static function computeDigest(byteArray:ByteArray):String
         {
             // Preprocessing
+
+            // 0. Set the ByteArray's position to zero
+            var originalPosition:uint = byteArray.position;
+            byteArray.position = 0;
+
             // 1. Pad the message
             var paddingLength:int = byteArray.length % 64;

@@ -250,6 +255,9 @@

             }

+            // Reset the ByteArray's position to where it was previously
+            byteArray.position = originalPosition;
+
             //trace("messageSchTime = " + messageSchTime);
             //trace("hashTime = " + hashTime);


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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


FLEX-33745 fix RTE if accessibility is deactivated

--- frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -1474,7 +1474,7 @@
 					var o:PopUpData = popupInfo[i];
 					if (o && o != p && o.owner.accessibilityProperties)
 					{
-						o.owner.accessibilityProperties.silent	= true;
+						o.owner.accessibilityProperties.silent = true;
 					}
 				}

@@ -1518,7 +1518,8 @@
 				if (popupInfo.length<=1)
 				{
 					var sbRoot:Object = p.systemManager.getSandboxRoot();
-					sbRoot.document.accessibilityProperties.silent = false;
+					if (sbRoot.document.accessibilityProperties)
+						sbRoot.document.accessibilityProperties.silent = false;
 				}

 				try {