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

--- frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridHeader.as
+++ frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridHeader.as
@@ -0,0 +1,1524 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls.dataGridClasses
+{
+
+import flash.display.DisplayObject;
+import flash.display.GradientType;
+import flash.display.Graphics;
+import flash.display.Shape;
+import flash.display.Sprite;
+import flash.events.MouseEvent;
+import flash.geom.Matrix;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+import mx.controls.listClasses.IDropInListItemRenderer;
+import mx.controls.listClasses.IListItemRenderer;
+import mx.controls.DataGrid;
+import mx.core.EdgeMetrics;
+import mx.core.FlexSprite;
+import mx.core.FlexVersion;
+import mx.core.IFlexDisplayObject;
+import mx.core.UIComponent;
+import mx.core.UIComponentGlobals;
+import mx.events.DataGridEvent;
+import mx.managers.CursorManager;
+import mx.managers.CursorManagerPriority;
+import mx.skins.halo.DataGridColumnDropIndicator;
+import mx.styles.ISimpleStyleClient;
+import mx.styles.StyleManager;
+import mx.core.mx_internal;
+import mx.effects.easing.Back;
+
+use namespace mx_internal;
+
+/**
+ *  The DataGridHeader class defines the default header
+ *  renderer for a DataGrid control.
+ *  By default, the header renderer
+ *  draws the text associated with each header in the list, and an optional
+ *  sort arrow (if sorted by that column).
+ *
+ *  @see mx.controls.DataGrid
+ */
+public class DataGridHeader extends DataGridHeaderBase
+{
+
+    /**
+     *  Constructor.
+     */
+    public function DataGridHeader()
+    {
+        super();
+        addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
+        addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
+        addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+        addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
+    }
+
+    /**
+     *  @private
+     *  Additional affordance given to header separators.
+     */
+    private var separatorAffordance:Number = 3;
+
+    /**
+     *  a function to clear selections
+     */
+    override mx_internal function clearSelectionLayer():void
+    {
+        while (selectionLayer.numChildren > 0)
+        {
+            selectionLayer.removeChildAt(0);
+        }
+    }
+
+    /**
+     *  The DataGrid control associated with this renderer.
+     */
+    protected var dataGrid:DataGrid;
+
+    /**
+     *  An Array of header renderer instances.
+     */
+    protected var headerItems:Array = [];
+
+    /**
+     *  The cached header height, in pixels.
+     */
+    protected var cachedHeaderHeight:Number = 0;
+
+    /**
+     *  The cached padding for the bottom of the renderer, in pixels.
+     */
+    protected var cachedPaddingBottom:Number = 0;
+
+	/**
+	 *  The cached padding for the top of the renderer, in pixels.
+	 */
+	protected var cachedPaddingTop:Number = 0;
+
+	/**
+	 *  Whether we need the separator on the far right
+	 */
+	public var needRightSeparator:Boolean = false;
+
+	/**
+	 *  Whether we need the separator events on the far right
+	 */
+	public var needRightSeparatorEvents:Boolean = false;
+
+    /**
+     *  @inheritDoc
+     */
+    override protected function createChildren():void
+    {
+        dataGrid = parent as DataGrid;
+
+        // this is the layer where we draw selection indicators
+        selectionLayer = new UIComponent();
+        addChild(selectionLayer);
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    override protected function measure():void
+    {
+        super.measure();
+        var calculatedHeight:Number = dataGrid.calculateHeaderHeight();
+        cachedHeaderHeight = dataGrid._explicitHeaderHeight ? dataGrid.headerHeight : calculatedHeight;
+        cachedPaddingBottom = getStyle("paddingBottom");
+        cachedPaddingTop = getStyle("paddingTop");
+        measuredHeight = cachedHeaderHeight;
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    override protected function updateDisplayList(w:Number, h:Number):void
+    {
+        allowItemSizeChangeNotification = false;
+
+        // make new ones
+        var cols:Array = visibleColumns;
+
+        if (headerItemsChanged && (cols && cols.length > 0 || dataGrid.headerVisible))
+        {
+            headerItemsChanged = false;
+
+            var xx:Number = 0;
+            var yy:Number = 0;
+            var hh:Number = 0;
+            var ww:Number = 0;
+            var rh:Number;
+            var colNum:int = 0; // visible columns compensate for firstCol offset
+
+            var rowData:DataGridListData;
+            var item:IListItemRenderer;
+            var extraItem:IListItemRenderer;
+            var data:Object;
+            var uid:String;
+            var c:DataGridColumn;
+
+            var maxHeaderHeight:Number = 0;
+
+            while (cols && colNum < cols.length)
+            {
+                c = cols[colNum];
+                item = dataGrid.createColumnItemRenderer(c, true, c);
+                rowData = new DataGridListData((c.headerText != null) ? c.headerText : c.dataField,
+                                                                c.dataField, colNum, uid, dataGrid, 0);
+                if (item is IDropInListItemRenderer)
+                    IDropInListItemRenderer(item).listData = rowData;
+                item.data = c;
+                item.visible = true;
+                item.styleName = c;
+                addChild(DisplayObject(item));
+                var oldHeader:DisplayObject = headerItems[colNum];
+                if (oldHeader)
+                {
+                    removeChild(oldHeader);
+                }
+                headerItems[colNum] = item;
+                // set prefW so we can compute prefH
+                item.explicitWidth = ww = c.width;
+                UIComponentGlobals.layoutManager.validateClient(item, true);
+                // but size it regardless of what prefW is
+                rh = item.getExplicitOrMeasuredHeight();
+                item.setActualSize(ww, dataGrid._explicitHeaderHeight ?
+                    cachedHeaderHeight - cachedPaddingTop - cachedPaddingBottom : rh);
+                item.move(xx, yy + cachedPaddingTop);
+                xx += ww;
+                colNum++;
+                hh = Math.ceil(Math.max(hh, dataGrid._explicitHeaderHeight ?
+                    cachedHeaderHeight : rh + cachedPaddingBottom + cachedPaddingTop));
+                maxHeaderHeight = Math.max(maxHeaderHeight, dataGrid._explicitHeaderHeight ?
+                    cachedHeaderHeight - cachedPaddingTop - cachedPaddingBottom : rh);
+            }
+
+            // expand all headers to be of maximum height
+            for (var i:int = 0; i < headerItems.length; i++)
+                headerItems[i].setActualSize(headerItems[i].width, maxHeaderHeight);
+
+            while (headerItems.length > colNum)
+            {
+                // remove extra columns
+                extraItem = headerItems.pop();
+                removeChild(DisplayObject(extraItem));
+            }
+        }
+        var headerBG:UIComponent =
+            UIComponent(getChildByName("headerBG"));
+
+        if (headerBGSkinChanged)
+        {
+            headerBGSkinChanged = false;
+            if (headerBG)
+                removeChild(headerBG);
+            headerBG = null;
+        }
+
+        if (!headerBG)
+        {
+            headerBG = new UIComponent();
+            headerBG.name = "headerBG";
+            addChildAt(DisplayObject(headerBG), 0);
+
+            if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)
+            {
+                var headerBGSkinClass:Class = getStyle("headerBackgroundSkin");
+                var headerBGSkin:IFlexDisplayObject = new headerBGSkinClass();
+
+                if (headerBGSkin is ISimpleStyleClient)
+                    ISimpleStyleClient(headerBGSkin).styleName = this;
+                headerBG.addChild(DisplayObject(headerBGSkin));
+            }
+        }
+        if (dataGrid.headerVisible)
+        {
+            headerBG.visible = true;
+            if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
+            {
+                dataGrid._drawHeaderBackground(headerBG);
+            }
+            else
+            {
+                drawHeaderBackgroundSkin(IFlexDisplayObject(headerBG.getChildAt(0)));
+            }
+            dataGrid._drawSeparators();
+        }
+        else
+        {
+            headerBG.visible = false;
+            dataGrid._clearSeparators();
+        }
+
+        dataGrid._placeSortArrow();
+
+        allowItemSizeChangeNotification = true;
+    }
+
+    mx_internal function _drawHeaderBackground(headerBG:UIComponent):void
+    {
+        drawHeaderBackground(headerBG);
+    }
+
+    /**
+     *  Draws the background of the headers into the given
+     *  UIComponent. The graphics drawn may be scaled horizontally
+     *  if the component's width changes or this method will be
+     *  called again to redraw at a different width and/or height
+     *
+     *  @param headerBG A UIComponent that will contain the header
+     *  background graphics.
+     */
+    protected function drawHeaderBackground(headerBG:UIComponent):void
+    {
+        var tot:Number = width;
+
+        var hh:Number = cachedHeaderHeight;
+
+        var g:Graphics = headerBG.graphics;
+        g.clear();
+        var colors:Array = getStyle("headerColors");
+        StyleManager.getColorNames(colors);
+
+        var matrix:Matrix = new Matrix();
+        matrix.createGradientBox(tot, hh + 1, Math.PI/2, 0, 0);
+
+        colors = [ colors[0], colors[0], colors[1] ];
+        var ratios:Array = [ 0, 60, 255 ];
+        var alphas:Array = [ 1.0, 1.0, 1.0 ];
+
+        g.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matrix);
+        g.lineStyle(0, 0x000000, 0);
+        g.moveTo(0, 0);
+        g.lineTo(tot, 0);
+        g.lineTo(tot, hh - 0.5);
+        g.lineStyle(0, getStyle("borderColor"), 100);
+        g.lineTo(0, hh - 0.5);
+        g.lineStyle(0, 0x000000, 0);
+        g.endFill();
+    }
+
+    private function drawHeaderBackgroundSkin(headerBGSkin:IFlexDisplayObject):void
+    {
+        headerBGSkin.setActualSize(unscaledWidth, Math.ceil(cachedHeaderHeight));
+    }
+
+    mx_internal function _clearSeparators():void
+    {
+        clearSeparators();
+    }
+
+    /**
+     *  Removes column header separators that the user normally uses
+     *  to resize columns.
+     */
+    protected function clearSeparators():void
+    {
+        if (!separators)
+            return;
+
+        var lines:Sprite = Sprite(getChildByName("lines"));
+        while (lines.numChildren)
+        {
+            lines.removeChildAt(lines.numChildren - 1);
+            separators.pop();
+        }
+    }
+
+    mx_internal function _drawSeparators():void
+    {
+        drawSeparators();
+    }
+
+    /**
+     *  Creates and displays the column header separators that the user
+     *  normally uses to resize columns.  This implementation uses
+     *  the same Sprite as the lines and column backgrounds and adds
+     *  instances of the headerSeparatorSkin and attaches mouse
+     *  listeners to them in order to know when the user wants
+     *  to resize a column.
+     */
+    protected function drawSeparators():void
+    {
+        if (!separators)
+            separators = [];
+
+        var lines:UIComponent = UIComponent(getChildByName("lines"));
+
+        if (!lines)
+        {
+            lines = new UIComponent();
+            lines.name = "lines";
+            addChild(lines);
+        }
+        else
+            setChildIndex(lines, numChildren - 1);
+
+        // required to deal with some 2.x clipping behavior
+        lines.scrollRect = new Rectangle(0, 0, unscaledWidth, unscaledHeight + 1);
+
+        if (headerSepSkinChanged)
+        {
+            headerSepSkinChanged = false;
+            clearSeparators();
+        }
+
+        var n:int = visibleColumns ? visibleColumns.length : 0;
+
+        if (!needRightSeparator && n > 0)
+        	n--;
+
+        for (var i:int = 0; i < n; i++)
+        {
+            var sep:UIComponent;
+            var sepSkin:IFlexDisplayObject;
+
+            if (i < lines.numChildren)
+            {
+                sep = UIComponent(lines.getChildAt(i));
+                sepSkin = IFlexDisplayObject(sep.getChildAt(0));
+            }
+            else
+            {
+                var headerSeparatorClass:Class =
+                    getStyle("headerSeparatorSkin");
+                sepSkin = new headerSeparatorClass();
+                if (sepSkin is ISimpleStyleClient)
+                    ISimpleStyleClient(sepSkin).styleName = this;
+                sep = new UIComponent();
+                sep.addChild(DisplayObject(sepSkin));
+                lines.addChild(sep);
+
+                separators.push(sep);
+            }
+            // if not separator
+            if ( !(i == visibleColumns.length-1 && !needRightSeparatorEvents) )
+            {
+	            DisplayObject(sep).addEventListener(
+	                MouseEvent.MOUSE_OVER, columnResizeMouseOverHandler);
+	            DisplayObject(sep).addEventListener(
+	                MouseEvent.MOUSE_OUT, columnResizeMouseOutHandler);
+	            DisplayObject(sep).addEventListener(
+	                MouseEvent.MOUSE_DOWN, columnResizeMouseDownHandler);
+	        }
+			else
+			{
+                // if not separator
+                if ( (i == visibleColumns.length-1 && !needRightSeparatorEvents) )
+                {
+	                DisplayObject(sep).removeEventListener(
+	                    MouseEvent.MOUSE_OVER, columnResizeMouseOverHandler);
+	                DisplayObject(sep).removeEventListener(
+	                    MouseEvent.MOUSE_OUT, columnResizeMouseOutHandler);
+	                DisplayObject(sep).removeEventListener(
+	                    MouseEvent.MOUSE_DOWN, columnResizeMouseDownHandler);
+	            }
+			}
+
+            var cols:Array = visibleColumns;
+            if (!(cols && cols.length > 0 || dataGrid.headerVisible))
+            {
+                sep.visible = false;
+                continue;
+            }
+
+            sep.visible = true;
+            sep.x = headerItems[i].x +
+                    visibleColumns[i].width - Math.round(sepSkin.measuredWidth / 2);
+            if (i > 0)
+            {
+                sep.x = Math.max(sep.x,
+                                 separators[i - 1].x + Math.round(sepSkin.measuredWidth / 2));
+            }
+            sep.y = 0;
+            sepSkin.setActualSize(sepSkin.measuredWidth, Math.ceil(cachedHeaderHeight));
+
+            // Draw invisible background for separator affordance
+            sep.graphics.clear();
+            sep.graphics.beginFill(0xFFFFFF, 0);
+            sep.graphics.drawRect(-separatorAffordance, 0,
+								  sepSkin.measuredWidth + separatorAffordance,
+								  cachedHeaderHeight);
+            sep.graphics.endFill();
+			sep.mouseEnabled = true;
+        }
+
+        while (lines.numChildren > n)
+        {
+            lines.removeChildAt(lines.numChildren - 1);
+            separators.pop();
+        }
+    }
+
+     /**
+     *  Draws the highlight indicator into the given Sprite
+     *  at the position, width and height specified using the
+     *  color specified.
+     *
+     *  @param indicator A Sprite that should contain the graphics
+     *  that make a renderer look highlighted.
+     *
+     *  @param x The suggested x position for the indicator.
+     *
+     *  @param y The suggested y position for the indicator.
+     *
+     *  @param width The suggested width for the indicator.
+     *
+     *  @param height The suggested height for the indicator.
+     *
+     *  @param color The suggested color for the indicator.
+     *
+     *  @param itemRenderer The item renderer that is being highlighted.
+     *
+     */
+    protected function drawHeaderIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void
+    {
+        var g:Graphics = indicator.graphics;
+        g.clear();
+        g.beginFill(color);
+        g.drawRect(0, 0, width, height);
+        g.endFill();
+        indicator.x = x;
+        indicator.y = y;
+    }
+
+     /**
+     *  Draws the selection indicator into the given Sprite
+     *  at the position, width and height specified using the
+     *  color specified.
+     *
+     *  @param indicator A Sprite that should contain the graphics
+     *  that make a renderer look selected.
+     *
+     *  @param x The suggested x position for the indicator.
+     *
+     *  @param y The suggested y position for the indicator.
+     *
+     *  @param width The suggested width for the indicator.
+     *
+     *  @param height The suggested height for the indicator.
+     *
+     *  @param color The suggested color for the indicator.
+     *
+     *  @param itemRenderer The item renderer that is being selected.
+     *
+     */
+    protected function drawSelectionIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void
+    {
+        var g:Graphics = indicator.graphics;
+        g.clear();
+        g.beginFill(color);
+        g.drawRect(0, 0, width, height);
+        g.endFill();
+        indicator.x = x;
+        indicator.y = y;
+    }
+
+     /**
+     *  Draws the overlay on the dragged column into the given Sprite
+     *  at the position, width and height specified using the
+     *  color specified.
+     *
+     *  @param indicator A Sprite that should contain the graphics
+     *  that indicate that a column is being dragged.
+     *
+     *  @param x The suggested x position for the indicator.
+     *
+     *  @param y The suggested y position for the indicator.
+     *
+     *  @param width The suggested width for the indicator.
+     *
+     *  @param height The suggested height for the indicator.
+     *
+     *  @param color The suggested color for the indicator.
+     *
+     *  @param itemRenderer The item renderer that is being dragged.
+     *
+     */
+    protected function drawColumnDragOverlay(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void
+    {
+        var g:Graphics = indicator.graphics;
+        g.clear();
+        g.beginFill(color);
+        g.drawRect(0, 0, width, height);
+        g.endFill();
+        indicator.x = x;
+        indicator.y = y;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+    /**
+     *  @private
+     */
+    private function columnResizeMouseOverHandler(event:MouseEvent):void
+    {
+        if (!enabled || !dataGrid.resizableColumns)
+            return;
+
+        var target:DisplayObject = DisplayObject(event.target);
+        var index:int = target.parent.getChildIndex(target);
+        if (!visibleColumns[index].resizable)
+            return;
+
+        // hide the mouse, attach and show the cursor
+        var stretchCursorClass:Class = getStyle("stretchCursor");
+        resizeCursorID = cursorManager.setCursor(stretchCursorClass,
+                                                 CursorManagerPriority.HIGH, 0, 0);
+    }
+
+    /**
+     *  @private
+     */
+    private function columnResizeMouseOutHandler(event:MouseEvent):void
+    {
+        if (!enabled || !dataGrid.resizableColumns)
+            return;
+
+        var target:DisplayObject = DisplayObject(event.target);
+        var index:int = target.parent.getChildIndex(target);
+        if (!visibleColumns[index].resizable)
+            return;
+
+        cursorManager.removeCursor(resizeCursorID);
+    }
+
+    /**
+     *  @private
+     *  Indicates where the right side of a resized column appears.
+     */
+    private function columnResizeMouseDownHandler(event:MouseEvent):void
+    {
+        if (!enabled || !dataGrid.resizableColumns)
+            return;
+
+        var target:DisplayObject = DisplayObject(event.target);
+        var index:int = target.parent.getChildIndex(target);
+        if (!visibleColumns[index].resizable)
+            return;
+
+        startX = DisplayObject(event.target).x + x;
+
+        var n:int = separators.length;
+		var colIndex:int = 0;
+        for (var i:int = 0; i < n; i++)
+        {
+            if (separators[i] == event.target)
+            {
+                resizingColumn = visibleColumns[i];
+				colIndex = i;
+            }
+			else
+				separators[i].mouseEnabled = false;
+        }
+        if (!resizingColumn)
+            return;
+
+        minX = headerItems[colIndex].x + x + resizingColumn.minWidth;
+
+        systemManager.addEventListener(MouseEvent.MOUSE_MOVE, columnResizingHandler, true);
+        systemManager.addEventListener(MouseEvent.MOUSE_UP, columnResizeMouseUpHandler, true);
+
+        var resizeSkinClass:Class = getStyle("columnResizeSkin");
+        resizeGraphic = new resizeSkinClass();
+		if (resizeGraphic is Sprite)
+			Sprite(resizeGraphic).mouseEnabled = false;
+
+        dataGrid.addChild(DisplayObject(resizeGraphic));
+        resizeGraphic.move(DisplayObject(event.target).x + x, 0);
+        resizeGraphic.setActualSize(resizeGraphic.measuredWidth,
+                                    dataGrid.height / dataGrid.scaleY);
+    }
+
+    /**
+     *  @private
+     */
+    private function columnResizingHandler(event:MouseEvent):void
+    {
+        if (!MouseEvent(event).buttonDown)
+        {
+            columnResizeMouseUpHandler(event);
+            return;
+        }
+
+        var vsw:int = dataGrid.vScrollBar ? dataGrid.vScrollBar.width : 0;
+
+        var pt:Point = new Point(event.stageX, event.stageY);
+        pt = dataGrid.globalToLocal(pt);
+        resizeGraphic.move(Math.min(Math.max(minX, pt.x),
+                           (dataGrid.width / dataGrid.scaleX) - separators[0].width - vsw), 0);
+    }
+
+    /**
+     *  @private
+     *  Determines how much to resize the column.
+     */
+    private function columnResizeMouseUpHandler(event:MouseEvent):void
+    {
+        if (!enabled || !dataGrid.resizableColumns)
+            return;
+
+        // Set this to null so sort doesn't happen.
+        lastItemDown = null;
+
+        systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, columnResizingHandler, true);
+        systemManager.removeEventListener(MouseEvent.MOUSE_UP, columnResizeMouseUpHandler, true);
+
+        dataGrid.removeChild(DisplayObject(resizeGraphic));
+        resizeGraphic = null;
+
+        cursorManager.removeCursor(resizeCursorID);
+
+        var c:DataGridColumn = resizingColumn;
+        resizingColumn = null;
+
+        var vsw:int = dataGrid.vScrollBar ? dataGrid.vScrollBar.width : 0;
+
+        var pt:Point = new Point(event.stageX, event.stageY);
+        pt = dataGrid.globalToLocal(pt);
+
+        // resize the column
+        var widthChange:Number = Math.min(Math.max(minX, pt.x),
+            (dataGrid.width / dataGrid.scaleX) - separators[0].width - vsw) - startX;
+        dataGrid.resizeColumn(c.colNum, Math.floor(c.width + widthChange));
+
+        invalidateDisplayList();    // force redraw of columns
+
+        // event
+        var dataGridEvent:DataGridEvent =
+            new DataGridEvent(DataGridEvent.COLUMN_STRETCH);
+        dataGridEvent.columnIndex = c.colNum;
+        dataGridEvent.dataField = c.dataField;
+        dataGridEvent.localX = pt.x;
+        dataGrid.dispatchEvent(dataGridEvent);
+    }
+
+    /**
+     *  @private
+     */
+    private function columnDraggingMouseMoveHandler(event:MouseEvent):void
+    {
+        if (!event.buttonDown)
+        {
+            columnDraggingMouseUpHandler(event);
+            return;
+        }
+
+        var item:IListItemRenderer;
+        var c:DataGridColumn = dataGrid.movingColumn;
+        var s:Sprite;
+        var i:int = 0;
+        var n:int = headerItems.length;
+        var dgSelectionLayer:Sprite;
+
+        if (isNaN(startX))
+        {
+            // If startX is not a number, dragging has just started.
+            // Initialise and return without actually moving anything.
+
+            startX = event.stageX;
+
+            // Set this to null so sort doesn't happen.
+            lastItemDown = null;
+
+            var vm:EdgeMetrics = dataGrid.viewMetrics;
+
+            // Create, position and draw selection layer over both headers.
+            dgSelectionLayer = new UIComponent();
+            dgSelectionLayer.name = "columnDragSelectionLayer";
+            dgSelectionLayer.alpha = 0.6;
+            dataGrid.addChild(dgSelectionLayer);
+            dgSelectionLayer.x = vm.left;
+            dgSelectionLayer.y = vm.top;
+
+            // Create and position proxy.
+            var proxy:IListItemRenderer = dataGrid.createColumnItemRenderer(c, true, c);
+            proxy.name = "headerDragProxy";
+
+            var rowData:DataGridListData = new DataGridListData((c.headerText != null) ? c.headerText : c.dataField,
+                                                                c.dataField, c.colNum, uid, dataGrid, 0);
+            if (proxy is IDropInListItemRenderer)
+                IDropInListItemRenderer(proxy).listData = rowData;
+
+            dgSelectionLayer.addChild(DisplayObject(proxy));
+
+            proxy.data = c;
+            proxy.styleName = getStyle("headerDragProxyStyleName");
+            UIComponentGlobals.layoutManager.validateClient(proxy, true);
+            proxy.setActualSize(c.width, dataGrid._explicitHeaderHeight ?
+                dataGrid.headerHeight : proxy.getExplicitOrMeasuredHeight());
+
+            for (i = 0; i < n; i++)
+            {
+                item = headerItems[i];
+                if (item.data == dataGrid.movingColumn)
+                    break;
+            }
+            proxy.move(item.x + x, item.y);
+
+            // Create, position and draw column overlay.
+            s = new FlexSprite();
+            s.name = "columnDragOverlay";
+            s.alpha = 0.6;
+            dataGrid.addChild(s);
+
+            if (c.width > 0)
+            {
+                drawColumnDragOverlay(s, item.x + x, 0, c.width,
+                                        dataGrid.height / dataGrid.scaleY - vm.bottom - s.y,
+                                        getStyle("disabledColor"), item);
+            }
+
+            s = Sprite(selectionLayer.getChildByName("headerSelection"));
+            if (s)
+            {
+                s.width = dataGrid.movingColumn.width;
+                dgSelectionLayer.addChild(s);
+                s.x += x;
+            }
+
+
+            // Clip the contents so the header drag proxy doesn't show
+            // outside the list.
+            dgSelectionLayer.scrollRect = new Rectangle(0, 0,
+                    dataGrid.width / dataGrid.scaleX,
+                    unscaledHeight);
+
+            return;
+        }
+
+        var deltaX:Number = event.stageX - startX;
+        dgSelectionLayer = Sprite(dataGrid.getChildByName("columnDragSelectionLayer"));
+
+        // Move header selection.
+        s = Sprite(dgSelectionLayer.getChildByName("headerSelection"));
+        if (s)
+            s.x += deltaX;
+
+        // Move header proxy.
+        item = IListItemRenderer(dgSelectionLayer.getChildByName("headerDragProxy"));
+        if (item)
+            item.move(item.x + deltaX, item.y);
+
+        startX += deltaX;
+
+        var allVisibleColumns:Array = dataGrid.getAllVisibleColumns();
+        var pt:Point = new Point(event.stageX, event.stageY);
+        pt = dataGrid.globalToLocal(pt);
+
+        n = allVisibleColumns.length;
+        var xx:Number = dataGrid.viewMetrics.left;
+        var ww:Number;
+        for (i = 0; i < n; i++)
+        {
+            ww = allVisibleColumns[i].width;
+
+            if (pt.x < xx + ww)
+            {
+                // If the mouse pointer over the right half of the column, the
+                // drop indicator should be shown before the next column.
+                if (pt.x > xx + ww / 2)
+                {
+                    i++;
+                    xx += ww;
+                }
+
+                if (dropColumnIndex != i)
+                {
+                    dropColumnIndex = i;
+
+                    if (!columnDropIndicator)
+                    {
+                        var dropIndicatorClass:Class
+                            = getStyle("columnDropIndicatorSkin");
+                        if (!dropIndicatorClass)
+                            dropIndicatorClass = DataGridColumnDropIndicator;
+                        columnDropIndicator = IFlexDisplayObject(
+                            new dropIndicatorClass());
+
+                        if (columnDropIndicator is ISimpleStyleClient)
+                            ISimpleStyleClient(columnDropIndicator).styleName = this;
+
+                        dataGrid.addChild(
+                            DisplayObject(columnDropIndicator));
+                        var m:Shape = new Shape();
+                        m.graphics.beginFill(0xffffff);
+                        m.graphics.drawRect(0, 0, 10, 10);
+                        m.graphics.endFill();
+                        dataGrid.addChild(m);
+                        columnDropIndicator.mask = m;
+                    }
+
+                    dataGrid.setChildIndex(
+                        DisplayObject(columnDropIndicator),
+                        dataGrid.numChildren - 1);
+                    columnDropIndicator.visible = true;
+                    m = columnDropIndicator.mask as Shape;
+                    m.x = dataGrid.viewMetrics.left;
+                    m.y = dataGrid.viewMetrics.top;
+                    m.width = dataGrid.width / dataGrid.scaleX - m.x - dataGrid.viewMetrics.right;
+                    m.height = dataGrid.height / dataGrid.scaleY - m.x - dataGrid.viewMetrics.bottom;
+
+                    columnDropIndicator.x = xx - columnDropIndicator.width;
+                    columnDropIndicator.y = 0;
+                    columnDropIndicator.setActualSize(3, dataGrid.height / dataGrid.scaleY);
+                }
+                break;
+            }
+            xx += ww;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function columnDraggingMouseUpHandler(event:MouseEvent):void
+    {
+        if (!dataGrid.movingColumn)
+            return;
+
+        var origIndex:int = dataGrid.movingColumn.colNum;
+        var allVisibleColumns:Array = dataGrid.getAllVisibleColumns();
+
+        if (dropColumnIndex >= 0)
+        {
+            if (dropColumnIndex >= allVisibleColumns.length)
+            {
+                dropColumnIndex = allVisibleColumns.length - 1;
+            }
+            else
+            {
+                if (origIndex < allVisibleColumns[dropColumnIndex].colNum)
+                    dropColumnIndex--;
+            }
+
+            // dropColumnIndex is actually the index into the headerItems
+            // array.  Get the corresponding index into the _columns array.
+            dropColumnIndex = allVisibleColumns[dropColumnIndex].colNum;
+        }
+
+        // Shift columns.
+        dataGrid.shiftColumns(origIndex, dropColumnIndex, event);
+
+        systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, columnDraggingMouseMoveHandler, true);
+        systemManager.removeEventListener(MouseEvent.MOUSE_UP, columnDraggingMouseUpHandler, true);
+
+        var dgSelectionLayer:Sprite = Sprite(dataGrid.getChildByName("columnDragSelectionLayer"));
+        if (!dgSelectionLayer)
+        {
+            startX = NaN;
+            dataGrid.movingColumn = null;
+            dropColumnIndex = -1;
+            return;
+        }
+
+        var proxy:IListItemRenderer =
+            IListItemRenderer(getChildByName("headerDragProxy"));
+        if (proxy)
+            dgSelectionLayer.removeChild(DisplayObject(proxy));
+
+        var s:Sprite = Sprite(dgSelectionLayer.getChildByName("headerSelection"));
+        if (s)
+            dgSelectionLayer.removeChild(s);
+
+        if (columnDropIndicator)
+            columnDropIndicator.visible = false;
+
+        s = Sprite(dataGrid.getChildByName("columnDragOverlay"));
+        if (s)
+            dataGrid.removeChild(s);
+
+        dataGrid.removeChild(dgSelectionLayer);
+
+        startX = NaN;
+        dataGrid.movingColumn = null;
+        dropColumnIndex = -1;
+
+        invalidateDisplayList(); // force redraw
+    }
+
+    /**
+     *  @private
+     */
+    protected function mouseOverHandler(event:MouseEvent):void
+    {
+        var r:IListItemRenderer;
+        var i:int;
+
+        if (resizingColumn || dataGrid.movingColumn)
+            return;
+
+        if (dataGrid.enabled && dataGrid.sortableColumns && dataGrid.headerVisible)
+        {
+            // find out if we hit the sort arrow
+            s = Sprite(getChildByName("sortArrowHitArea"));
+
+            if (event.target == s)
+            {
+                var n:int = visibleColumns.length;
+                for (i = 0; i < n; i++)
+                {
+                    if (visibleColumns[i].colNum == dataGrid.sortIndex)
+                    {
+                        r = headerItems[i];
+                        break;
+                    }
+                }
+            }
+            else
+            {
+                for (i = 0; i < separators.length; i++)
+                {
+                    if (event.target == separators[i] && visibleColumns[i].resizable)
+                        return;
+                }
+                var pt:Point = new Point(event.stageX, event.stageY);
+                pt = globalToLocal(pt);
+                for (i = 0; i < headerItems.length; i++)
+                {
+                    if (headerItems[i].x + headerItems[i].width >= pt.x)
+                    {
+                        r = headerItems[i];
+                        break;
+                    }
+                }
+                if (i >= headerItems.length)
+                    return;
+            }
+
+            s = Sprite(getChildByName("sortArrowHitArea"));
+            if (visibleColumns[i].sortable)
+            {
+                var s:Sprite = Sprite(
+                    selectionLayer.getChildByName("headerSelection"));
+                if (!s)
+                {
+                    s = new FlexSprite();
+                    s.name = "headerSelection";
+                    s.mouseEnabled = false;
+                    selectionLayer.addChild(s);
+                }
+
+                drawHeaderIndicator(s, r.x, 0, visibleColumns[i].width, cachedHeaderHeight - 0.5, getStyle("rollOverColor"), r);
+
+            }
+        }
+
+        if (event.buttonDown)
+            lastItemDown = r;
+        else
+            lastItemDown = null;
+    }
+
+    /**
+     *  @private
+     */
+    protected function mouseOutHandler(event:MouseEvent):void
+    {
+        var r:IListItemRenderer;
+        var i:int;
+
+        if (resizeGraphic || dataGrid.movingColumn)
+            return;
+
+        if (dataGrid.enabled && dataGrid.sortableColumns && dataGrid.headerVisible)
+        {
+            // find out if we hit the sort arrow
+            s = Sprite(getChildByName("sortArrowHitArea"));
+
+            if (event.target == s)
+            {
+                var n:int = visibleColumns.length;
+                for (i = 0; i < n; i++)
+                {
+                    if (visibleColumns[i].colNum == dataGrid.sortIndex)
+                    {
+                        r = headerItems[i];
+                        break;
+                    }
+                }
+            }
+            else
+            {
+                for (i = 0; i < separators.length; i++)
+                {
+                    if (event.target == separators[i] && visibleColumns[i].resizable)
+                        return;
+                }
+                var pt:Point = new Point(event.stageX, event.stageY);
+                pt = globalToLocal(pt);
+                for (i = 0; i < headerItems.length; i++)
+                {
+                    if (headerItems[i].x + headerItems[i].width >= pt.x)
+                    {
+                        r = headerItems[i];
+                        break;
+                    }
+                }
+                if (i >= headerItems.length)
+                    return;
+            }
+
+            if (visibleColumns[i].sortable)
+            {
+                var s:Sprite = Sprite(
+                    selectionLayer.getChildByName("headerSelection"));
+                if (s)
+                    selectionLayer.removeChild(s);
+            }
+        }
+
+        if (event.buttonDown)
+            lastItemDown = r;
+        else
+            lastItemDown = null;
+
+    }
+
+    /**
+     *  @private
+     */
+    protected function mouseDownHandler(event:MouseEvent):void
+    {
+        // trace(">>mouseDownHandler");
+        var r:IListItemRenderer;
+        var s:Sprite;
+        var i:int;
+
+        // find out if we hit the sort arrow
+        s = Sprite(getChildByName("sortArrowHitArea"));
+
+        if (event.target == s)
+        {
+            var n:int = visibleColumns.length;
+            for (i = 0; i < n; i++)
+            {
+                if (visibleColumns[i].colNum == dataGrid.sortIndex)
+                {
+                    r = headerItems[i];
+                    break;
+                }
+            }
+        }
+        else
+        {
+            for (i = 0; i < separators.length; i++)
+            {
+                if (event.target == separators[i] && visibleColumns[i].resizable)
+                    return;
+            }
+            var pt:Point = new Point(event.stageX, event.stageY);
+            pt = globalToLocal(pt);
+            for (i = 0; i < headerItems.length; i++)
+            {
+                if (headerItems[i].x + headerItems[i].width >= pt.x)
+                {
+                    r = headerItems[i];
+                    break;
+                }
+            }
+            if (i >= headerItems.length)
+                return;
+        }
+
+        // if headers are visible and clickable for sorting
+        if (dataGrid.enabled && (dataGrid.sortableColumns || dataGrid.draggableColumns)
+                && dataGrid.headerVisible)
+        {
+
+            if (dataGrid.sortableColumns && visibleColumns[i].sortable)
+            {
+                lastItemDown = r;
+                s = Sprite(selectionLayer.getChildByName("headerSelection"));
+                if (!s)
+                {
+                    s = new FlexSprite();
+                    s.name = "headerSelection";
+                    selectionLayer.addChild(s);
+                }
+
+                drawSelectionIndicator(s, r.x, 0, visibleColumns[i].width, cachedHeaderHeight - 0.5, getStyle("selectionColor"), r);
+            }
+
+            // begin column dragging
+            if (dataGrid.draggableColumns && visibleColumns[i].draggable)
+            {
+                startX = NaN;
+                systemManager.addEventListener(MouseEvent.MOUSE_MOVE, columnDraggingMouseMoveHandler, true);
+                systemManager.addEventListener(MouseEvent.MOUSE_UP, columnDraggingMouseUpHandler, true);
+                dataGrid.movingColumn = visibleColumns[i];
+            }
+        }
+    }
+
+     /**
+     *  @private
+     */
+    protected function mouseUpHandler(event:MouseEvent):void
+    {
+        var dataGridEvent:DataGridEvent;
+        var r:IListItemRenderer;
+        var s:Sprite;
+        var n:int;
+        var i:int;
+
+        // find out if we hit the sort arrow
+        s = Sprite(getChildByName("sortArrowHitArea"));
+
+        if (event.target == s)
+        {
+            n = visibleColumns.length;
+            for (i = 0; i < n; i++)
+            {
+                if (visibleColumns[i].colNum == dataGrid.sortIndex)
+                {
+                    r = headerItems[i];
+                    break;
+                }
+            }
+        }
+        else
+        {
+            for (i = 0; i < separators.length; i++)
+            {
+                if (event.target == separators[i] && visibleColumns[i].resizable)
+                    return;
+            }
+            var pt:Point = new Point(event.stageX, event.stageY);
+            pt = globalToLocal(pt);
+            for (i = 0; i < headerItems.length; i++)
+            {
+                if (headerItems[i].x + headerItems[i].width >= pt.x)
+                {
+                    r = headerItems[i];
+                    break;
+                }
+            }
+            if (i >= headerItems.length)
+                return;
+        }
+
+        if (dataGrid.enabled && (dataGrid.sortableColumns || dataGrid.draggableColumns)
+                && dataGrid.dataProvider && dataGrid.headerVisible)
+        {
+            if (r == lastItemDown)
+            {
+                if (dataGrid.sortableColumns && visibleColumns[i].sortable)
+                {
+                    lastItemDown = null;
+                    dataGridEvent = new DataGridEvent(DataGridEvent.HEADER_RELEASE, false, true);
+                    // HEADER_RELEASE event is cancelable
+                    dataGridEvent.columnIndex = visibleColumns[i].colNum;
+                    dataGridEvent.dataField = visibleColumns[i].dataField;
+                    dataGridEvent.itemRenderer = r;
+                    dataGrid.dispatchEvent(dataGridEvent);
+                }
+            }
+        }
+    }
+
+    mx_internal function _placeSortArrow():void
+    {
+        placeSortArrow();
+    }
+
+    /**
+     *  Draws the sort arrow graphic on the column that is the current sort key.
+     *  This implementation creates or reuses an instance of the skin specified
+     *  by sortArrowSkin style property and places
+     *  it in the appropriate column header.  It
+     *  also shrinks the size of the column header if the text in the header
+     *  would be obscured by the sort arrow.
+     */
+    protected function placeSortArrow():void
+    {
+
+        var sortArrowHitArea:Sprite =
+            Sprite(getChildByName("sortArrowHitArea"));
+
+        if (dataGrid.sortIndex == -1 && dataGrid.lastSortIndex == -1)
+        {
+            if (sortArrow)
+                sortArrow.visible = false;
+            if (sortArrowHitArea)
+                sortArrowHitArea.visible = false;
+            return;
+        }
+
+        if (!dataGrid.headerVisible)
+        {
+            if (sortArrow)
+                sortArrow.visible = false;
+            if (sortArrowHitArea)
+                sortArrowHitArea.visible = false;
+            return;
+        }
+
+        if (!sortArrow)
+        {
+            var sortArrowClass:Class = getStyle("sortArrowSkin");
+            sortArrow = new sortArrowClass();
+            DisplayObject(sortArrow).name = enabled ? "sortArrow" : "sortArrowDisabled";
+            if (sortArrow is ISimpleStyleClient)
+                ISimpleStyleClient(sortArrow).styleName = this;
+
+            addChild(DisplayObject(sortArrow));
+        }
+        var xx:Number;
+        var n:int;
+        var i:int;
+        var found:Boolean = false;
+        if (headerItems && headerItems.length)
+        {
+            n = headerItems.length;
+            for (i = 0; i < n; i++)
+            {
+                if (visibleColumns[i].colNum == dataGrid.sortIndex)
+                {
+                    xx = headerItems[i].x + visibleColumns[i].width;
+                    headerItems[i].setActualSize(visibleColumns[i].width - sortArrow.measuredWidth - 8, headerItems[i].height);
+
+                    if (!isNaN(headerItems[i].explicitWidth))
+                        headerItems[i].explicitWidth = headerItems[i].width;
+
+                    UIComponentGlobals.layoutManager.validateClient(headerItems[i], true);
+
+                    // Create hit area to capture mouse clicks behind arrow.
+                    if (!sortArrowHitArea)
+                    {
+                        sortArrowHitArea = new FlexSprite();
+                        sortArrowHitArea.name = "sortArrowHitArea";
+                        addChild(sortArrowHitArea);
+                    }
+                    else
+                        sortArrowHitArea.visible = true;
+
+                    sortArrowHitArea.x = headerItems[i].x + headerItems[i].width;
+                    sortArrowHitArea.y = headerItems[i].y;
+
+                    var g:Graphics = sortArrowHitArea.graphics;
+                    g.clear();
+                    g.beginFill(0, 0);
+                    g.drawRect(0, 0, sortArrow.measuredWidth + 8,
+                            headerItems[i].height);
+                    g.endFill();
+                    found = true;
+                    break;
+                }
+            }
+        }
+        if (isNaN(xx))
+            sortArrow.visible = false;
+        else
+            sortArrow.visible = true;
+
+        if (visibleColumns.length && dataGrid.lastSortIndex >= 0 && dataGrid.lastSortIndex != dataGrid.sortIndex)
+            if (visibleColumns[0].colNum <= dataGrid.lastSortIndex &&
+                dataGrid.lastSortIndex <= visibleColumns[visibleColumns.length - 1].colNum)
+            {
+                n = headerItems.length;
+                for (var j:int = 0; j < n; j++)
+                {
+                    if (visibleColumns[j].colNum == dataGrid.lastSortIndex)
+                    {
+                        headerItems[j].setActualSize(visibleColumns[j].width, headerItems[j].height);
+                        UIComponentGlobals.layoutManager.validateClient(headerItems[j], true);
+                        break;
+                    }
+                }
+            }
+
+        var d:Boolean = (dataGrid.sortDirection == "ASC");
+        sortArrow.width = sortArrow.measuredWidth;
+        sortArrow.height = sortArrow.measuredHeight;
+        DisplayObject(sortArrow).scaleY = (d) ? -1.0 : 1.0;
+        sortArrow.x = xx - sortArrow.measuredWidth - 8;
+        var hh:Number = cachedHeaderHeight;
+        sortArrow.y = (hh - sortArrow.measuredHeight) / 2 + ((d) ? sortArrow.measuredHeight: 0);
+
+        if (found && sortArrow.x < headerItems[i].x)
+            sortArrow.visible = false;
+
+        if (!sortArrow.visible && sortArrowHitArea)
+            sortArrowHitArea.visible = false;
+
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function invalidateSize():void
+    {
+        if (allowItemSizeChangeNotification)
+            super.invalidateSize();
+    }
+
+
+    /**
+     *  @copy mx.core.IUIComponent#enabled
+     */
+    override public function set enabled(value:Boolean):void
+    {
+        super.enabled = value;
+        if (sortArrow)
+        {
+			removeChild(DisplayObject(sortArrow));
+            sortArrow = null;
+            placeSortArrow();
+        }
+
+    }
+
+
+    /**
+     *  @private
+     */
+    override public function styleChanged(styleProp:String):void
+    {
+        super.styleChanged(styleProp);
+        if (styleProp == "headerBackgroundSkin")
+        {
+            headerBGSkinChanged = true;
+        }
+        else if (styleProp == "headerSeparatorSkin")
+        {
+            headerSepSkinChanged = true;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private var resizeCursorID:int = CursorManager.NO_CURSOR;
+
+    /**
+     *  @private
+     *  A tmp var to store the stretching col's X coord.
+     */
+    private var startX:Number;
+
+    /**
+     *  @private
+     *  A tmp var to store the stretching col's min X coord for column's minWidth.
+     */
+    private var minX:Number;
+
+    /**
+     *  @private
+     *  List of header separators for column resizing.
+     */
+    private var separators:Array;
+
+    /**
+     *  @private
+     */
+    mx_internal function getSeparators():Array
+    {
+        return separators;
+    }
+
+    /**
+     *  @private
+     *  The column that is being resized.
+     */
+    private function get resizingColumn():DataGridColumn
+	{
+		return dataGrid.resizingColumn;
+	}
+    /**
+     *  @private
+     *  The column that is being resized.
+     */
+    private function set resizingColumn(value:DataGridColumn):void
+	{
+		dataGrid.resizingColumn = value;
+	}
+
+    /**
+     *  Specifies a graphic that shows the proposed column width as the user stretches it.
+     */
+    private var resizeGraphic:IFlexDisplayObject; //
+
+    /**
+     *  @private
+     */
+    private var lastItemDown:IListItemRenderer;
+
+    /**
+     *  @private
+     *  Index of column before which to drop
+     */
+    private var dropColumnIndex:int = -1;
+
+    /**
+     *  @private
+     */
+    mx_internal var columnDropIndicator:IFlexDisplayObject;
+
+    /**
+     *  The small arrow graphic used to show sortable columns and direction.
+     */
+    mx_internal var sortArrow:IFlexDisplayObject;
+
+    /**
+     *  diagnostics
+     */
+    mx_internal function get rendererArray():Array
+    {
+        return headerItems;
+    }
+
+    /**
+     *  The offset, in pixels, from the left side of the content of the renderer.
+     */
+    public var leftOffset:Number = 0;
+
+    /**
+     *  The offset, in pixels, from the top of the content of the renderer.
+     */
+    public var topOffset:Number = 0;
+
+    /**
+     *  The offset, in pixels, from the right side of the content of the renderer.
+     */
+    public var rightOffset:Number = 0;
+
+    /**
+     *  The offset, in pixels, from the bottom of the content of the renderer.
+     */
+    public var bottomOffset:Number = 0;
+
+    /**
+     *  @private
+     */
+    private var allowItemSizeChangeNotification:Boolean = true;
+
+    private var headerBGSkinChanged:Boolean = false;
+
+    private var headerSepSkinChanged:Boolean = false;
+}
+
+}


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

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

 package spark.components.gridClasses
 {


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

--- frameworks/projects/spark/src/spark/components/gridClasses/CellRegion.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/CellRegion.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Fix a bug that caused "ChangeMedia" to fail

--- plugins/wvPlugin/src/com/kaltura/kdpfl/plugin/WVLoader.as
+++ plugins/wvPlugin/src/com/kaltura/kdpfl/plugin/WVLoader.as
@@ -1,12 +1,32 @@
-package com.kaltura.kdpfl.plugin
-{
-	import org.osmf.traits.LoaderBase;
-
-	public class WVLoader extends LoaderBase
-	{
-		public function WVLoader()
-		{
-			super();
-		}
-	}
+package com.kaltura.kdpfl.plugin
+{
+	import flash.external.ExternalInterface;
+
+	import org.osmf.media.MediaResourceBase;
+	import org.osmf.traits.LoaderBase;
+
+	public class WVLoader extends LoaderBase
+	{
+		public function WVLoader()
+		{
+			super();
+		}
+
+		override public function canHandleResource(resource:MediaResourceBase):Boolean
+		{
+			if (resource.hasOwnProperty("url") && resource["url"].toString().indexOf(".wvm") > -1 )
+			{
+				try
+				{
+					ExternalInterface.call("mediaURL" , resource["url"].toString());
+				}
+				catch(error:Error)
+				{
+					trace("Failed to call external interface");
+				}
+				return true;
+			}
+			return false;
+		}
+	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12865
Author:   aharui@adobe.com
Date:     2009-12-11T21:51:27.725470Z

Log Message:
-----------
Fix mx.controls.HTML and mx.core.FlexHTMLLoader so the participate in the current IME scheme

QE Notes: None
Doc Notes: None
Bugs: SDK-24391
Reviewer: Corey
API Change: No
Is noteworthy for integration: No
tests: checkintests mustella/apollo/HTML

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>

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

--- frameworks/projects/airframework/src/mx/controls/HTML.as
+++ frameworks/projects/airframework/src/mx/controls/HTML.as
@@ -13,6 +13,7 @@
 {

 import flash.events.Event;
+import flash.events.FocusEvent;
 import flash.events.HTMLUncaughtScriptExceptionEvent;
 import flash.events.MouseEvent;
 import flash.html.HTMLLoader;
@@ -20,6 +21,8 @@
 import flash.html.HTMLHost;
 import flash.net.URLRequest;
 import flash.system.ApplicationDomain;
+import flash.system.IME;
+import flash.system.IMEConversionMode;
 import mx.controls.listClasses.BaseListData;
 import mx.controls.listClasses.IDropInListItemRenderer;
 import mx.controls.listClasses.IListItemRenderer;
@@ -27,6 +30,7 @@
 import mx.core.EdgeMetrics;
 import mx.core.IDataRenderer;
 import mx.core.IFactory;
+import mx.core.IIMESupport;
 import mx.core.FlexHTMLLoader;
 import mx.core.mx_internal;
 import mx.core.ScrollControlBase;
@@ -201,6 +205,8 @@
 //--------------------------------------

 [IconFile("HTML.png")]
+
+[ResourceBundle("controls")]

 /**
  *  The HTML control lets you display HTML content in your application.
@@ -381,6 +387,11 @@
      */
     private var textSet:Boolean;

+    /**
+     *  @private
+     */
+    private var errorCaught:Boolean = false;
+
     //--------------------------------------------------------------------------
     //
     //  Overridden properties
@@ -516,6 +527,7 @@
         dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
     }

+
     //----------------------------------
     //  historyLength
     //----------------------------------
@@ -768,6 +780,55 @@
     }

     //----------------------------------
+    //  imeMode
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _imeMode:String = null;
+
+    /**
+     *  Specifies the IME (input method editor) mode.
+     *  The IME enables users to enter text in Chinese, Japanese, and Korean.
+     *  Flex sets the specified IME mode when the control gets the focus,
+     *  and sets it back to the previous value when the control loses the focus.
+     *
+     *
The flash.system.IMEConversionMode class defines constants for the
+     *  valid values for this property.
+     *  You can also specify null to specify no IME.

+     *
+     *  @default null
+     *
+     *  @see flash.system.IMEConversionMode
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get imeMode():String
+    {
+        return _imeMode;
+    }
+
+    /**
+     *  @private
+     */
+    public function set imeMode(value:String):void
+    {
+        _imeMode = value;
+        // We don't call IME.conversionMode here. We call it
+        // only on focusIn. Thus fringe cases like setting
+        // imeMode dynamically without moving focus, through
+        // keyboard events, wouldn't change the mode. Also
+        // getting imeMode asynch. from the server which gets
+        // delayed and set later after focusIn is not handled
+        // as having the text partly in one script and partly
+        // in another is not desirable.
+    }
+
+    //----------------------------------
     //  listData
     //----------------------------------

@@ -1367,6 +1428,41 @@

     /**
      *  @private
+     *  Gets called by internal field so we draw a focus rect around us.
+     */
+    override protected function focusInHandler(event:FocusEvent):void
+    {
+        super.focusInHandler(event);
+
+        if (_imeMode != null &&
+            (htmlLoader is IIMESupport && IIMESupport(htmlLoader).enableIME))
+        {
+            // When IME.conversionMode is unknown it cannot be
+            // set to anything other than unknown(English)
+            try
+            {
+                if (!errorCaught &&
+                    IME.conversionMode != IMEConversionMode.UNKNOWN)
+                {
+                    IME.conversionMode = _imeMode;
+                }
+                errorCaught = false;
+            }
+            catch(e:Error)
+            {
+                // Once an error is thrown, focusIn is called
+                // again after the Alert is closed, throw error
+                // only the first time.
+                errorCaught = true;
+                var message:String = resourceManager.getString(
+                    "controls", "unsupportedMode", [ _imeMode ]);
+                throw new Error(message);
+            }
+        }
+    }
+
+    /**
+     *  @private
      */
     override protected function scrollHandler(event:Event):void
     {
@@ -1424,6 +1520,10 @@
         dispatchEvent(event);

         adjustScrollBars();
+
+        // we record this property here becuase it seems to
+        // change as you interact with the content
+        hasFocusableChildren = htmlLoader.hasFocusableContent;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 5097
Author:   gauravj@adobe.com
Date:     2009-02-27T02:06:23.424936Z

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:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/fileSystemClasses/FileSystemTreeDataDescriptor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemHistoryButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemTree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumeration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/AIREvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/StatusBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FileEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/WindowExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/ApplicationTitleBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/fileSystemClasses/FileSystemControlHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemRawChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMinimizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMaximizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/StatusBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/IWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemSizeDisplayMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeWindowBoundsEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowCloseButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>

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

--- frameworks/projects/airframework/src/mx/controls/HTML.as
+++ frameworks/projects/airframework/src/mx/controls/HTML.as
@@ -58,6 +58,10 @@
  *
  *  @see location
  *  @see htmlText
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="complete", type="flash.events.Event")]

@@ -83,6 +87,10 @@
  *
  *  @see location
  *  @see htmlText
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="htmlDOMInitialize", type="flash.events.Event")]

@@ -95,6 +103,10 @@
  *  handler that might negatively impact performance.

  *
  *  @eventType flash.events.Event.HTML_RENDER
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="htmlRender", type="flash.events.Event")]

@@ -107,6 +119,10 @@
  *  or its internal htmlLoader.

  *
  *  @eventType flash.events.Event.LOCATION_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="locationChange", type="flash.events.Event")]

@@ -119,6 +135,10 @@
  *  or its internal htmlLoader.

  *
  *  @eventType flash.events.HTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="uncaughtScriptException", type="flash.events.HTMLUncaughtScriptExceptionEvent")]

@@ -131,6 +151,10 @@
  *  and the bottom edge of its HTML content area.
  *
  *  @default 0
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="paddingBottom", type="Number", format="Length", inherit="no")]

@@ -139,6 +163,10 @@
  *  and the left edge of its HTML content area.
  *
  *  @default 0
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="paddingLeft", type="Number", format="Length", inherit="no")]

@@ -147,6 +175,10 @@
  *  and the right edge of its HTML content area.
  *
  *  @default 0
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="paddingRight", type="Number", format="Length", inherit="no")]

@@ -155,6 +187,10 @@
  *  and the top edge of its HTML content area.
  *
  *  @default 0
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Style(name="paddingTop", type="Number", format="Length", inherit="no")]

@@ -208,6 +244,10 @@
  *
  *  @see ../../flash/html/HTMLLoader.html HTMLLoader
  *
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
  public class HTML extends ScrollControlBase
     implements IDataRenderer, IDropInListItemRenderer,
@@ -294,6 +334,10 @@
      *         An HTML object cannot display PDF content.
      *

      *

+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function get pdfCapability():int
     {
@@ -308,6 +352,10 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function HTML()
     {
@@ -368,6 +416,10 @@

     /**
      *  The height, in pixels, of the HTML content.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get contentHeight():Number
     {
@@ -383,6 +435,10 @@

     /**
      *  The width, in pixels, of the HTML content.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get contentWidth():Number
     {
@@ -419,6 +475,10 @@
      *
      *  @default null
      *  @see mx.core.IDataRenderer
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get data():Object
     {
@@ -468,6 +528,10 @@
      *  JavaScript property of the the HTML content.
      *
      *  @see #historyPosition
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get historyLength():int
     {
@@ -491,6 +555,10 @@
      *  Attempting to set the position beyond the end sets it to the end.

      *
      *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get historyPosition():int
     {
@@ -516,6 +584,10 @@
     /**
      *  The internal HTMLLoader object that renders
      *  the HTML content for this control.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public var htmlLoader:HTMLLoader;

@@ -536,6 +608,10 @@
      *  to use as the htmlLoader.
      *
      *
The default value is an IFactory for HTMLLoader.

+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get htmlLoaderFactory():IFactory
     {
@@ -579,6 +655,10 @@
      *  and set this property to an instance of your subclass.

      *
      *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get htmlHost():HTMLHost
     {
@@ -630,6 +710,10 @@
      *  @default ""
      *
      *  @see #location
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get htmlText():String
     {
@@ -669,6 +753,10 @@
      *  htmlDOMInitialize event has been dispatched.

      *
      *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get domWindow():Object
     {
@@ -705,6 +793,10 @@
      *
      *  @default null
      *  @see mx.controls.listClasses.IDropInListItemRenderer
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get listData():BaseListData
     {
@@ -737,6 +829,10 @@
      *  in which the complete event is never dispatched.

      *
      *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get loaded():Boolean
     {
@@ -773,6 +869,10 @@
      *  @default ""
      *
      *  @see #htmlText
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get location():String
     {
@@ -828,6 +928,10 @@
      *  then that background appears behind that element.

      *
      *  @default false;
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get paintsDefaultBackground():Boolean
     {
@@ -870,6 +974,10 @@
      *  ApplicationDomain for the page's domain.

      *
      *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get runtimeApplicationDomain():ApplicationDomain
     {
@@ -931,6 +1039,10 @@
      *
      *  @see flash.net.URLRequest#userAgent
      *  @see flash.net.URLRequestDefaults#userAgent
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get userAgent():String
     {
@@ -1097,6 +1209,10 @@
      *
      *
This method does nothing if it is called before this component's
      *  internal HTMLLoader (the htmlLoader property) has been created.

+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function cancelLoad():void
     {
@@ -1117,6 +1233,10 @@
      *  for the history entry  at the specified position.
      *
      *  @see historyPosition
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function getHistoryAt(position:int):HTMLHistoryItem
     {
@@ -1139,6 +1259,10 @@
      *
      *  @see #historyPosition
      *  @see #historyForward()
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function historyBack():void
     {
@@ -1161,6 +1285,10 @@
      *
      *  @see #historyPosition
      *  @see #historyBack()
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function historyForward():void
     {
@@ -1185,6 +1313,10 @@
      *
      *  @param steps The number of steps in the history list
      *  to move forward (positive) or backward (negative).
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function historyGo(steps:int):void
     {
@@ -1197,6 +1329,10 @@
      *
      *
This method does nothing if it is called before this component's
      *  internal HTMLLoader (the htmlLoader property) has been created.

+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function reload():void
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12864
Author:   mhorn@adobe.com
Date:     2009-12-11T21:35:24.243046Z

Log Message:
-----------
asdoc minor fixes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SpriteAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/MovieClipAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/BitmapAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -6321,7 +6321,7 @@
      *  or an IStyleClient.
      *
      *
If this is a String, it is the name of one or more whitespace delimited class
-     *  declarations in an mx:Style tag or CSS file. You do not include the period
+     *  declarations in an <fx:Style> tag or CSS file. You do not include the period
      *  in the styleName. For example, if you have a class style named ".bigText",
      *  set the styleName property to "bigText" (no period).

      *