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

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderInfo.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderInfo.as
@@ -0,0 +1,290 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls.advancedDataGridClasses
+{
+
+import mx.controls.listClasses.IListItemRenderer;
+/**
+  *  The AdvancedDataGridHeaderInfo class contains information that describes the
+  *  hierarchy of the columns of the AdvancedDataGrid control.
+  *
+  *  @langversion 3.0
+  *  @playerversion Flash 9
+  *  @playerversion AIR 1.1
+  *  @productversion Flex 3
+  */
+public class AdvancedDataGridHeaderInfo
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param column A reference to the AdvancedDataGridColumn instance
+     *  that this AdvancedDataGridHeaderInfo instance corresponds to.
+     *
+     *  @param parent The parent AdvancedDataGridHeaderInfo instance
+     *  of this AdvancedDataGridHeaderInfo instance.
+     *
+     *  @param index The index of this AdvancedDataGridHeaderInfo instance
+     *  in the AdvancedDataGrid control.
+     *
+     *  @param depth The depth of this AdvancedDataGridHeaderInfo instance
+     *  in the columns hierarchy of the AdvancedDataGrid control.
+     *
+     *  @param children An Array of all of the child AdvancedDataGridHeaderInfo instances
+     *  of this AdvancedDataGridHeaderInfo instance.
+     *
+     *  @param internalLabelFunction A function that gets created if the column grouping
+     *  requires extracting data from nested objects.
+     *
+     *  @param headerItem A reference to IListItemRenderer instance used to
+     *  render the column header.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public function AdvancedDataGridHeaderInfo(column:AdvancedDataGridColumn,
+                                      parent:AdvancedDataGridHeaderInfo,
+                                      index:int,
+                                      depth:int,
+                                      children:Array = null,
+                                      internalLabelFunction:Function = null,
+                                      headerItem:IListItemRenderer = null)
+    {
+       this.column = column;
+       this.parent = parent;
+       this.index = index;
+       this.depth = depth;
+       this.children = children;
+       this.internalLabelFunction = internalLabelFunction;
+       this.headerItem = headerItem;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    // column
+    //----------------------------------
+
+    /**
+    *  A reference to the AdvancedDataGridColumn instance
+    *  corresponding to this AdvancedDataGridHeaderInfo instance.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var column:AdvancedDataGridColumn;
+
+    //----------------------------------
+    // parent
+    //----------------------------------
+
+    /**
+    *  The parent AdvancedDataGridHeaderInfo instance
+    *  of this AdvancedDataGridHeaderInfo instance
+    *  if this column is part of a column group.
+    *
+    *  @default null
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var parent:AdvancedDataGridHeaderInfo;
+
+    //----------------------------------
+    // index
+    //----------------------------------
+
+    /**
+    *  The index of this AdvancedDataGridHeaderInfo instance
+    *  in the AdvancedDataGrid control.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var index:int;
+
+    //----------------------------------
+    // depth
+    //----------------------------------
+
+    /**
+    *  The depth of this AdvancedDataGridHeaderInfo instance
+    *  in the columns hierarchy of the AdvancedDataGrid control,
+    *  if this column is part of a column group.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var depth:int;
+
+    //----------------------------------
+    // children
+    //----------------------------------
+
+    /**
+    *  An Array of all of the child AdvancedDataGridHeaderInfo instances
+    *  of this AdvancedDataGridHeaderInfo instance,
+    *  if this column is part of a column group.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var children:Array;
+
+    //----------------------------------
+    // headerItem
+    //----------------------------------
+
+    /**
+    *  A reference to IListItemRenderer instance used to render the column header.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var headerItem:IListItemRenderer;
+
+    //----------------------------------
+    // internalLabelFunction
+    //----------------------------------
+
+    /**
+    *  A function that gets created if the
+    *  column grouping requires extracting data from nested objects.
+    *
+    *
For example, if each data row appears as:

+    *
row = {.., .., Q1: { y2005: 241, y2006:353}};

+    *
+    *
and you define a column group as:

+    *
     <mx:AdvancedDataGridColumnGroup dataField="Q1">
+    *     <mx:AdvancedDataGridColumn dataField="y2005">
+    *     <mx:AdvancedDataGridColumn dataField="y2006">
+    *  </mx:AdvancedDataGridColumnGroup>

+    *
+    *
The function for the column corresponding to y2005 is defined as:

+    *
     function foo():String
+    *  {
+    *     return row["Q1"]["2005"];
+    *  }

+    *
+    *
The function also handles the case when any of the column or column groups
+    *  uses a label function instead of a data field.

+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var internalLabelFunction:Function;
+
+    //----------------------------------
+    // columnSpan
+    //----------------------------------
+
+    /**
+    *  Number of actual columns spanned by the column header when using column groups.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var columnSpan:int;
+
+    //----------------------------------
+    // actualColNum
+    //----------------------------------
+
+    /**
+    *  The actual column index at which the header starts,
+    *  relative to the currently displayed columns.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var actualColNum:int;
+
+    //----------------------------------
+    // visible
+    //----------------------------------
+
+    /**
+    *  Contains true if the column is currently visible.
+    *
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var visible:Boolean;
+
+    //----------------------------------
+    // visibleChildren
+    //----------------------------------
+
+    /**
+    *  An Array of the currently visible child AdvancedDataGridHeaderInfo instances.
+    *  if this column is part of a column group.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var visibleChildren:Array;
+
+    //----------------------------------
+    // visibleIndex
+    //----------------------------------
+
+    /**
+    *  The index of this column in the list of visible children of its parent
+    *  AdvancedDataGridHeaderInfo instance,
+    *  if this column is part of a column group.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var visibleIndex:int;
+}
+
+}


AS3: fixed imports

AS3: fixed imports

--- as3/src/aerys/qark/Qark.as
+++ as3/src/aerys/qark/Qark.as
@@ -2,6 +2,7 @@
 {
 	import flash.display.BitmapData;
 	import flash.utils.ByteArray;
+	import flash.utils.Endian;
 	import flash.utils.describeType;
 	import flash.utils.getQualifiedClassName;


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

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridItemRenderer.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridItemRenderer.as
@@ -0,0 +1,751 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls.advancedDataGridClasses
+{
+import flash.display.DisplayObject;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+import flash.utils.getDefinitionByName;
+import flash.utils.getQualifiedClassName;
+import flash.utils.getQualifiedSuperclassName;
+
+import mx.controls.AdvancedDataGrid;
+import mx.controls.listClasses.BaseListData;
+import mx.controls.listClasses.IDropInListItemRenderer;
+import mx.controls.listClasses.IListItemRenderer;
+import mx.core.IDataRenderer;
+import mx.core.IFlexDisplayObject;
+import mx.core.IToolTip;
+import mx.core.UIComponentGlobals;
+import mx.core.UITextField;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+import mx.events.ToolTipEvent;
+import mx.managers.ILayoutManagerClient;
+import mx.managers.ISystemManager;
+import mx.styles.CSSStyleDeclaration;
+import mx.styles.IStyleClient;
+import mx.styles.StyleProtoChain;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the data property changes.
+ *
+ *
When you use a component as an item renderer,
+ *  the data property contains the data to display.
+ *  You can listen for this event and update the component
+ *  when the data property changes.

+ *
+ *  @eventType mx.events.FlexEvent.DATA_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Event(name="dataChange", type="mx.events.FlexEvent")]
+
+/**
+ *  The AdvancedDataGridItemRenderer class defines the default item renderer for a AdvancedDataGrid control.
+ *  By default, the item renderer
+ *  draws the text associated with each item in the grid.
+ *
+ *
You can override the default item renderer by creating a custom item renderer.

+ *
+ *  @see mx.controls.AdvancedDataGrid
+ *  @see mx.core.IDataRenderer
+ *  @see mx.controls.listClasses.IDropInListItemRenderer
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class AdvancedDataGridItemRenderer extends UITextField
+                                  implements IDataRenderer,
+                                  IDropInListItemRenderer, ILayoutManagerClient,
+                                  IListItemRenderer, IStyleClient
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function AdvancedDataGridItemRenderer()
+    {
+        super();
+
+        tabEnabled = false;
+		mouseWheelEnabled = false;
+
+        ignorePadding = false;
+
+        addEventListener(ToolTipEvent.TOOL_TIP_SHOW, toolTipShowHandler);
+
+        inheritingStyles = nonInheritingStyles =
+            StyleProtoChain.STYLE_UNINITIALIZED;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var invalidatePropertiesFlag:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var invalidateSizeFlag:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  nestLevel
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set nestLevel(value:int):void
+    {
+        super.nestLevel = value;
+
+        UIComponentGlobals.layoutManager.invalidateProperties(this);
+        invalidatePropertiesFlag = true;
+
+        UIComponentGlobals.layoutManager.invalidateSize(this);
+        invalidateSizeFlag = true;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _data:Object;
+
+    [Bindable("dataChange")]
+
+    /**
+     *  The implementation of the data property as
+     *  defined by the IDataRenderer interface.
+     *  The value is ignored.  Only the listData property is used.
+     *
+     *  @see mx.core.IDataRenderer
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get data():Object
+    {
+        return _data;
+    }
+
+    /**
+     *  @private
+     */
+    public function set data(value:Object):void
+    {
+        _data = value;
+
+        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
+    }
+
+    //----------------------------------
+    //  listData
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _listData:AdvancedDataGridListData;
+
+    [Bindable("dataChange")]
+
+    /**
+     *  The implementation of the listData property as
+     *  defined by the IDropInListItemRenderer interface.
+     *  The text of the renderer is set to the label
+     *  property of this property.
+     *
+     *  @see mx.controls.listClasses.IDropInListItemRenderer
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get listData():BaseListData
+    {
+        return _listData;
+    }
+
+    /**
+     *  @private
+     */
+    public function set listData(value:BaseListData):void
+    {
+        _listData = AdvancedDataGridListData(value);
+        if (nestLevel && !invalidatePropertiesFlag)
+        {
+            UIComponentGlobals.layoutManager.invalidateProperties(this);
+            invalidatePropertiesFlag = true;
+            UIComponentGlobals.layoutManager.invalidateSize(this);
+            invalidateSizeFlag = true;
+        }
+    }
+
+    //----------------------------------
+    //  styleDeclaration
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the styleDeclaration property.
+     */
+    private var _styleDeclaration:CSSStyleDeclaration;
+
+    /**
+     *  Storage for the inline inheriting styles on this object.
+     *  This CSSStyleDeclaration is created the first time that
+     *  the setStyle() method
+     *  is called on this component to set an inheriting style.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get styleDeclaration():CSSStyleDeclaration
+    {
+        return _styleDeclaration;
+    }
+
+    /**
+     *  @private
+     */
+    public function set styleDeclaration(value:CSSStyleDeclaration):void
+    {
+        _styleDeclaration = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UITextField
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function initialize():void
+    {
+        regenerateStyleCache(false)
+    }
+
+    /**
+     *  @private
+     */
+    override public function validateNow():void
+    {
+        if (data && parent)
+        {
+            var newColor:Number;
+
+            if (AdvancedDataGrid(_listData.owner).isItemHighlighted(_listData.uid))
+            {
+                newColor = getStyle("textRollOverColor");
+            }
+            else if (AdvancedDataGrid(_listData.owner).isItemSelected(_listData.uid))
+            {
+                newColor = getStyle("textSelectedColor");
+            }
+            else
+            {
+                newColor = getStyle("color");
+            }
+
+            if (newColor != explicitColor)
+            {
+                styleChangedFlag = true;
+                explicitColor = newColor;
+                invalidateDisplayList();
+            }
+        }
+
+        super.validateNow();
+    }
+
+    /**
+     *  @copy mx.core.UIComponent#getStyle()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function getStyle(styleProp:String):*
+    {
+        return (styleManager.inheritingStyles[styleProp]) ?
+            inheritingStyles[styleProp] : nonInheritingStyles[styleProp];
+    }
+
+    /**
+     *  @copy mx.core.UIComponent#setStyle()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function setStyle(styleProp:String, newValue:*):void
+    {
+        if (styleProp == "styleName")
+        {
+            // Let the setter handle this one, see UIComponent.
+            styleName = newValue;
+
+            // Short circuit, because styleName isn't really a style.
+            return;
+        }
+
+        /*
+        if (styleProp == "themeColor")
+        {
+            // setThemeColor handles the side effects.
+            setThemeColor(newValue);
+
+            // Do not short circuit, because themeColor is a style.
+            // It just has side effects, too.
+        }
+        */
+
+        // If this UIComponent didn't previously have any inline styles,
+        // then regenerate the UIComponent's proto chain (and the proto chains
+        // of this UIComponent's descendants).
+        var isInheritingStyle:Boolean =
+            styleManager.isInheritingStyle(styleProp);
+        var isProtoChainInitialized:Boolean =
+            inheritingStyles != StyleProtoChain.STYLE_UNINITIALIZED;
+        if (isInheritingStyle)
+        {
+            if (getStyle(styleProp) == newValue && isProtoChainInitialized)
+                return;
+
+            if (!styleDeclaration)
+            {
+                styleDeclaration = new CSSStyleDeclaration(null, styleManager);
+                styleDeclaration.setLocalStyle(styleProp, newValue);
+
+                // If inheritingStyles is undefined, then this object is being
+                // initialized and we haven't yet generated the proto chain.  To
+                // avoid redundant work, don't bother to create the proto chain here.
+                if (isProtoChainInitialized)
+                    regenerateStyleCache(true);
+            }
+            else
+            {
+                styleDeclaration.setLocalStyle(styleProp, newValue);
+            }
+        }
+        else
+        {
+            if (getStyle(styleProp) == newValue && isProtoChainInitialized)
+                return;
+
+            if (!styleDeclaration)
+            {
+                styleDeclaration = new CSSStyleDeclaration(null, styleManager);
+                styleDeclaration.setLocalStyle(styleProp, newValue);
+
+                // If nonInheritingStyles is undefined, then this object is being
+                // initialized and we haven't yet generated the proto chain.  To
+                // avoid redundant work, don't bother to create the proto chain here.
+                if (isProtoChainInitialized)
+                    regenerateStyleCache(false);
+            }
+            else
+            {
+                styleDeclaration.setLocalStyle(styleProp, newValue);
+            }
+        }
+
+        if (isProtoChainInitialized)
+        {
+            styleChanged(styleProp);
+            notifyStyleChangeInChildren(styleProp, isInheritingStyle);
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  If Flex calls the LayoutManager.invalidateProperties()
+     *  method on this ILayoutManagerClient,
+     *  this function is called when it's time to commit property values.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function validateProperties():void
+    {
+        invalidatePropertiesFlag = false;
+        if (_listData)
+        {
+            var dg:AdvancedDataGrid = AdvancedDataGrid(_listData.owner);
+
+            var column:AdvancedDataGridColumn =
+                dg.columns[_listData.columnIndex];
+
+            text = _listData.label;
+
+            if (_data is AdvancedDataGridColumn)
+                wordWrap = dg.columnHeaderWordWrap(column);
+            else
+                wordWrap = dg.columnWordWrap(column);
+
+            if (AdvancedDataGrid(_listData.owner).variableRowHeight)
+                multiline = true;
+
+            var dataTips:Boolean = dg.showDataTips;
+            if (column.showDataTips == true)
+                dataTips = true;
+            if (column.showDataTips == false)
+                dataTips = false;
+            if (dataTips)
+            {
+                if (!(_data is AdvancedDataGridColumn) && (textWidth > width
+                    || column.dataTipFunction || column.dataTipField
+                    || dg.dataTipFunction || dg.dataTipField))
+                {
+                    toolTip = column.itemToDataTip(_data);
+                }
+                else
+                {
+                    toolTip = null;
+                }
+            }
+            else
+            {
+                toolTip = null;
+            }
+        }
+        else
+        {
+            text = " ";
+            toolTip = null;
+        }
+    }
+
+    /**
+     *  If Flex calls the LayoutManager.invalidateSize()
+     *  method on this ILayoutManagerClient,
+     *  this function is called when it's time to do measurements.
+     *
+     *  @param recursive If true, call this method
+     *  on the object's children.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function validateSize(recursive:Boolean = false):void
+    {
+        invalidateSizeFlag = false;
+        validateNow();
+    }
+
+    /**
+     *  If Flex calls LayoutManager.invalidateDisplayList()
+     *  method on this ILayoutManagerClient instance,
+     *  this function is called when it's time to update the display list.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function validateDisplayList():void
+    {
+        validateNow();
+    }
+
+    /**
+     *  @copy mx.core.UIComponent#clearStyle()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function clearStyle(styleProp:String):void
+    {
+        setStyle(styleProp, undefined);
+    }
+
+    /**
+     *  @copy mx.core.UIComponent#notifyStyleChangeInChildren()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function notifyStyleChangeInChildren(
+                        styleProp:String, recursive:Boolean):void
+    {
+    }
+
+    /**
+     *  Sets up the inheritingStyles
+     *  and nonInheritingStyles objects
+     *  and their proto chains so that the getStyle() method can work.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function initProtoChain():void
+    {
+        styleChangedFlag = true;
+
+        var classSelectors:Array = [];
+
+        if (styleName)
+        {
+            if (styleName is CSSStyleDeclaration)
+            {
+                // Get the style sheet referenced by the styleName property
+                classSelectors.push(CSSStyleDeclaration(styleName));
+            }
+            else if (styleName is IFlexDisplayObject)
+            {
+                // If the styleName property is a UIComponent, then there's a
+                // special search path for that case.
+                StyleProtoChain.initProtoChainForUIComponentStyleName(this);
+                return;
+            }
+            else if (styleName is String)
+            {
+                // Get the style sheet referenced by the styleName property
+				var styleNames:Array = styleName.split(/\s+/);
+				for (var c:int=0; c < styleNames.length; c++)
+				{
+					if (styleNames[c].length) {
+						classSelectors.push(styleManager.getMergedStyleDeclaration("." +
+							styleNames[c]));
+					}
+				}
+            }
+        }
+
+        // To build the proto chain, we start at the end and work forward.
+        // Referring to the list at the top of this function, we'll start by
+        // getting the tail of the proto chain, which is:
+        //  - for non-inheriting styles, the global style sheet
+        //  - for inheriting styles, my parent's style object
+        var nonInheritChain:Object = styleManager.stylesRoot;
+
+        var p:IStyleClient = parent as IStyleClient;
+        if (p)
+        {
+            var inheritChain:Object = p.inheritingStyles;
+            if (inheritChain == StyleProtoChain.STYLE_UNINITIALIZED)
+                inheritChain = nonInheritChain;
+        }
+        else
+        {
+			inheritChain = styleManager.stylesRoot;
+        }
+
+        // Working backwards up the list, the next element in the
+        // search path is the type selector
+        var typeSelectors:Array = getClassStyleDeclarations();
+        var n:int = typeSelectors.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var typeSelector:CSSStyleDeclaration = typeSelectors[i];
+            inheritChain = typeSelector.addStyleToProtoChain(inheritChain, this);
+            nonInheritChain = typeSelector.addStyleToProtoChain(nonInheritChain, this);
+        }
+
+        // Next are the class selectors
+		for (i = 0; i < classSelectors.length; i++)
+		{
+			var classSelector:CSSStyleDeclaration = classSelectors[i];
+			if (classSelector)
+			{
+				inheritChain = classSelector.addStyleToProtoChain(inheritChain, this);
+				nonInheritChain = classSelector.addStyleToProtoChain(nonInheritChain, this);
+			}
+		}
+
+        // Finally, we'll add the in-line styles
+        // to the head of the proto chain.
+        inheritingStyles = styleDeclaration ?
+                           styleDeclaration.addStyleToProtoChain(inheritChain, this) :
+                           inheritChain;
+
+        nonInheritingStyles = styleDeclaration ?
+                              styleDeclaration.addStyleToProtoChain(nonInheritChain, this) :
+                              nonInheritChain;
+    }
+
+    /**
+     *  @copy mx.core.UIComponent#regenerateStyleCache()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function regenerateStyleCache(recursive:Boolean):void
+    {
+        initProtoChain();
+    }
+
+    /**
+     *  @copy mx.core.UIComponent#registerEffects()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function registerEffects(effects:Array /* of String */):void
+    {
+    }
+
+    /**
+     *  @copy mx.core.UIComponent#getClassStyleDeclarations()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function getClassStyleDeclarations():Array
+    {
+        var className:String = getQualifiedClassName(this)
+        className = className.replace("::", ".");
+
+        var decls:Array = [];
+
+        while (className != null &&
+               className != "mx.core.UIComponent" &&
+               className != "mx.core.UITextField")
+        {
+            var s:CSSStyleDeclaration =
+                styleManager.getMergedStyleDeclaration(className);
+
+            if (s)
+            {
+                decls.unshift(s);
+            }
+
+            try
+            {
+                className = getQualifiedSuperclassName(getDefinitionByName(className));
+                className = className.replace("::", ".");
+            }
+            catch(e:ReferenceError)
+            {
+                className = null;
+            }
+        }
+
+        return decls;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The event handler to position the tooltip.
+     *
+     *  @param event The event object.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected function toolTipShowHandler(event:ToolTipEvent):void
+    {
+		var toolTip:IToolTip = event.toolTip;
+
+		// Calculate global position of label.
+		var sm:ISystemManager = systemManager.topLevelSystemManager;
+		var sbRoot:DisplayObject = sm.getSandboxRoot();
+		var screen:Rectangle = sm.getVisibleApplicationRect();
+		var pt:Point = new Point(0, 0);
+		pt = localToGlobal(pt);
+		pt = sbRoot.globalToLocal(pt);
+
+		toolTip.move(pt.x, pt.y + (height - toolTip.height) / 2);
+
+		var screenRight:Number = screen.x + screen.width;
+		pt.x = toolTip.x;
+		pt.y = toolTip.y;
+		pt = sbRoot.localToGlobal(pt);
+		if (pt.x + toolTip.width > screenRight)
+			toolTip.move(toolTip.x - (pt.x + toolTip.width - screenRight), toolTip.y);
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17032
Author:   sameer@adobe.com
Date:     2010-07-23T05:59:21.293639Z

Log Message:
-----------
Adding the strong typing back in the Spark AdvancedDataGrid classes
QE notes: Test MX and FTE Item Renderer with spark_dmv.swc
Doc notes:
Bugs: FLEXDMV-2294 - create spark_dmv.swc for spark dmv classes
Reviewer: Sreeni
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark_dmv/src/mx/controls/advancedDataGridClasses/FTEAdvancedDataGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark_dmv/src/mx/controls/advancedDataGridClasses/MXAdvancedDataGridItemRenderer.as</path>

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

--- frameworks/projects/spark_dmv/src/mx/controls/advancedDataGridClasses/MXAdvancedDataGridItemRenderer.as
+++ frameworks/projects/spark_dmv/src/mx/controls/advancedDataGridClasses/MXAdvancedDataGridItemRenderer.as
@@ -13,6 +13,8 @@
 {
 import flash.events.MouseEvent;

+import mx.controls.AdvancedDataGrid;
+import mx.controls.listClasses.AdvancedListBase;
 import mx.controls.listClasses.BaseListData;
 import mx.controls.listClasses.IDropInListItemRenderer;
 import mx.controls.listClasses.IListItemRenderer;
@@ -197,7 +199,29 @@
             }
         }
     }
-
+
+	//----------------------------------
+	//  advancedDataGridListData
+	//----------------------------------
+
+	[Bindable("dataChange")]
+
+	/**
+	 *  The implementation of the listData property
+	 *  as defined by the IDropInListItemRenderer interface.
+	 *
+	 *  @see mx.controls.listClasses.IDropInListItemRenderer
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
+	 */
+	public function get advancedDataGridListData():AdvancedDataGridListData
+	{
+		return listData as AdvancedDataGridListData;
+	}
+
     //--------------------------------------------------------------------------
     //
     //  Methods
@@ -212,9 +236,8 @@
     {
         event.stopPropagation();

-		var adg:Object = listData.owner;
-		var advancedDataGridListData:Object = listData;
-
+		var adg:AdvancedDataGrid = listData.owner as AdvancedDataGrid;
+
         if (adg.isOpening || !adg.enabled)
             return;

@@ -257,7 +280,7 @@
             // see if we need to change state.  This is the only invalidation method guaranteed to be
             // called.  We set up the renderers properties here so no matter what validation method gets
             // called first, the properties are set up accordingly.
-            var listBase:Object = listData.owner;
+            var listBase:AdvancedListBase = listData.owner as AdvancedListBase;
             if (listBase)
             {
                 showsCaret = listBase.isItemShowingCaret(data);
@@ -281,7 +304,7 @@
             // and you should still be hovered, so we double check and override here.
             // then we get all the other state-related variables updated so the state
             // calculation will do the right thing.
-            var listBase:Object = listData.owner;
+            var listBase:AdvancedListBase = listData.owner as AdvancedListBase;
             if (listBase)
             {
                 selected = listBase.isItemSelected(data);


Transferred from the Adobe Open Source Subversion Repository

Revision: 21207
Author:   chiedozi@adobe.com
Date:     2011-05-04T20:53:17.638606Z

Log Message:
-----------
Fixing a couple of ASDoc errors

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

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
@@ -269,11 +269,9 @@
      *  When the application is relaunched, this data is automatically read from
      *  the persistence store and applied to the application's navigator.
      *
-     *
When enabled, the application version and the time the persistence data was
-     *  generated are also be added to the persistence object.
+     *
When enabled, the application version will be added to the persistence object.
      *  You can access this information by using the persistence manager's
-     *  getProperty() method and specifying either
-     *  the applicationVersion or timestamp key.

+     *  getProperty() method and ask for the versionNumber key.
      *
      *
When the persistence object is being created, the application dispatches
      *  a cancelable FlexEvent.NAVIGATOR_STATE_SAVING event when the process
@@ -460,9 +458,8 @@
      *  Responsible for persisting the application state to the persistence manager.
      *  This method is called automatically when persistNavigatorState
      *  is set to true.
-     *  By default, this method saves the application version
-     *  and the time the persistence object was created to the timestamp and
-     *  applicationVersion keys of the PersistenceManager object.
+     *  By default, this method saves the application version in the
+     *  versionNumber key of the PersistenceManager object.
      *
      *
This method is only called if the FlexEvent.NAVIGATOR_STATE_SAVING
      *  event is not canceled.


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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarAutomationImpl.as
@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.automation.delegates.components
+{
+	import flash.display.DisplayObject;
+
+	import mx.automation.Automation;
+	import mx.core.mx_internal;
+
+	import spark.automation.delegates.components.supportClasses.SparkButtonBarBaseAutomationImpl;
+	import spark.components.ButtonBar;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  ButtonBar control.
+	 *
+	 *  @see spark.components.ButtonBar
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 4
+	 */
+	public class SparkButtonBarAutomationImpl extends SparkButtonBarBaseAutomationImpl
+	{
+		include "../../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(spark.components.ButtonBar, SparkButtonBarAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 * @param obj ButtonBar object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function SparkButtonBarAutomationImpl(obj:spark.components.ButtonBar)
+		{
+			super(obj);
+		}
+
+		/**
+		 *  @private
+		 *  storage for the owner component
+		 */
+		protected function get sparkButtonBar():spark.components.ButtonBar
+		{
+			return uiComponent as spark.components.ButtonBar;
+		}
+	}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 4365
Author:   cframpto@adobe.com
Date:     2008-12-19T19:28:31.780789Z

Log Message:
-----------
Implement enabled/selectable/editable text.

In FxTextArea, FxTextInput and TextGraphic, text is stripped of leading and trailing whitespace by the compiler by including [CollapseWhiteSpace] before the getters.  In contrast, content is only trimmed if the the whiteSpaceCollapse style is set to "collapse".  The default is "preserve".

QE Notes:
Doc Notes: None
Bugs: SDK-18424, SDK-15883, SDK-15884, SDK-18210, SDK-16330, SDK-17683
Reviewer: Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>

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

--- frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as
@@ -843,7 +843,7 @@

         var isInputTextField:Boolean =
             (target is TextField && target.type == TextFieldType.INPUT) ||
-                (textViewClass && target is textViewClass && target["selectable"]);
+                (textViewClass && target is textViewClass && (target["editable"] || target["selectable"]));

         // Do target test.
         if (!overTextField && isInputTextField)


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ListSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ListSkin.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.skins.mobile
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 7910
Author:   egeorgie@adobe.com
Date:     2009-06-17T01:41:55.138890Z

Log Message:
-----------
P-ARB changes:

* IGraphicElement sharedIndex -> DisplayObjectSharingMode
* ScrollUnit -> NavigationUnit
* LayoutBase.getDestinationIndex -> LayoutBase.getNavigationDestinationIndex, param order reversed!!!!
* mouseOpaque -> mouseEnabledWhereTransparent
* various other small renames and changes to non-public APIs

Doc Notes: None
Bugs: N/A
Reviewer: Deepa
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/InvalidatingSprite.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/ScrollUnit.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/NavigationUnit.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/DisplayObjectSharingMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -82,7 +82,7 @@
 import spark.components.TextSelectionVisibility;
 import spark.core.CSSTextLayoutFormat;
 import spark.core.IViewport;
-import spark.core.ScrollUnit;
+import spark.core.NavigationUnit;
 import spark.events.TextOperationEvent;
 import spark.primitives.supportClasses.RichEditableTextContainerManager;
 import spark.utils.TextUtil;
@@ -1873,7 +1873,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function getHorizontalScrollPositionDelta(scrollUnit:uint):Number
+    public function getHorizontalScrollPositionDelta(navigationUnit:uint):Number
     {
         var scrollR:Rectangle = scrollRect;
         if (!scrollR)
@@ -1888,24 +1888,24 @@
         var em:Number = getStyle("fontSize");

         // ToDo: what if blockDirection!=TB and direction!=LTR?
-        switch (scrollUnit)
-        {
-            case ScrollUnit.LEFT:
+        switch (navigationUnit)
+        {
+            case NavigationUnit.LEFT:
                 return (scrollR.left <= 0) ? 0 : Math.max(minDelta, -em);

-            case ScrollUnit.RIGHT:
+            case NavigationUnit.RIGHT:
                 return (scrollR.right >= contentWidth) ? 0 : Math.min(maxDelta, em);

-            case ScrollUnit.PAGE_LEFT:
+            case NavigationUnit.PAGE_LEFT:
                 return Math.max(minDelta, -scrollR.width);

-            case ScrollUnit.PAGE_RIGHT:
+            case NavigationUnit.PAGE_RIGHT:
                 return Math.min(maxDelta, scrollR.width);

-            case ScrollUnit.HOME:
+            case NavigationUnit.HOME:
                 return minDelta;

-            case ScrollUnit.END:
+            case NavigationUnit.END:
                 return maxDelta;

             default:
@@ -1925,7 +1925,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function getVerticalScrollPositionDelta(scrollUnit:uint):Number
+    public function getVerticalScrollPositionDelta(navigationUnit:uint):Number
     {
         var scrollR:Rectangle = scrollRect;
         if (!scrollR)
@@ -1937,24 +1937,24 @@
         var minDelta:Number = -scrollR.top;

         // ToDo: what if blockDirection!=TB and direction!=LTR?
-        switch (scrollUnit)
-        {
-            case ScrollUnit.UP:
+        switch (navigationUnit)
+        {
+            case NavigationUnit.UP:
                 return _textContainerManager.getScrollDelta(-1);

-            case ScrollUnit.DOWN:
+            case NavigationUnit.DOWN:
                 return _textContainerManager.getScrollDelta(1);

-            case ScrollUnit.PAGE_UP:
+            case NavigationUnit.PAGE_UP:
                 return Math.max(minDelta, -scrollR.height);

-            case ScrollUnit.PAGE_DOWN:
+            case NavigationUnit.PAGE_DOWN:
                 return Math.min(maxDelta, scrollR.height);

-            case ScrollUnit.HOME:
+            case NavigationUnit.HOME:
                 return minDelta;

-            case ScrollUnit.END:
+            case NavigationUnit.END:
                 return maxDelta;

             default:


Transferred from the Adobe Open Source Subversion Repository

Revision: 6950
Author:   cframpto@adobe.com
Date:     2009-05-15T13:51:40.394480Z

Log Message:
-----------
- Add scrollToPosition(anchorPosition, activePosition) which scrolls so the text position is visible in the container. (SDK-18752)
- Selection change now dispatched only when the selection (ie selectionActivePosition or selectionAnchorPosition) have changed. (SDK-18513)
- If insertion point is the end of the text and the Delete key is entered it no longer produces a change event (SDK-16010)
- hooked up TextBase enable with RichEditableText enable
- clean up selectionManager/editManager usage
- in calculateWidthInChars() explicitly cast getStyle("paddingLeft") and getStyle("paddingRight") to Numbers so the calculation produces the expected result (not sure why this is needed but the result is now correct)

QA Notes: Gumbo_TextArea_setAttributes_method_marginTop_20_2 fails because there is only one selection event now rather than the expected two (the selection didn't change so only one event)
Doc Notes:
Bugs: SDK-18752, SDK-18513, SDK-16010
Reviewers: Gordon

Modified Paths:
--------------
<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/RichEditableText.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -457,18 +457,6 @@

     /**
      *  @private
-     *  To preserve the selection anchor position across selection managers.
-     */
-    private var priorSelectionAnchorPosition:int = -1;
-
-    /**
-     *  @private
-     *  To preserve the selection active position across selection managers.
-     */
-    private var priorSelectionActivePosition:int = -1;
-
-    /**
-     *  @private
      *  Holds the last recorded value of the module factory used to create the font.
      */
     mx_internal var embeddedFontContext:IFlexModuleFactory;
@@ -497,6 +485,15 @@
      */
     private var textFlowChanged:Boolean = false;

+
+    /**
+     *  @private
+     *  Hold the previous editingMode while using a specific instance manager
+     *  so that the editingMode can be restored when the instance manager is
+     *  released.
+     */
+    private var priorEditingMode:String;
+
     //--------------------------------------------------------------------------
     //
     //  Overridden properties: UIComponent
@@ -991,6 +988,11 @@
     {
     	if (mx_internal::debug)
      		trace("editingMode = ", value);
+
+        // ToDo: TextContainerManager should do this check.
+        if (_inputManager.editingMode == value)
+            return;
+
      	_inputManager.editingMode = value;
     }

@@ -1968,10 +1970,17 @@

     /**
      *  @private
-     *  When done call releaseSelectionManager();
+     *  The editingMode is set to READ_SELECT if not already READ_SELECT or
+     *  READ_WRITE.
+     *  When done call releaseSelectionManager().
      */
     private function getSelectionManager():ISelectionManager
     {
+        priorEditingMode = editingMode;
+
+        if (editingMode == EditingMode.READ_ONLY)
+            editingMode = EditingMode.READ_SELECT;
+
     	return SelectionManager(_inputManager.beginInteraction());
     }

@@ -1981,16 +1990,24 @@
     private function releaseSelectionManager():void
     {
         _inputManager.endInteraction();
-    }
-
-    /**
-     *  @private
-     *  When done call releaseEditManager();
+
+        editingMode = priorEditingMode;
+    }
+
+    /**
+     *  @private
+     *  The editingMode is set to READ_WRITE.
+     *  When done call releaseEditManager().
      */
     private function getEditManager():IEditManager
     {
         // This triggers a damage event if the interactionManager is
         // changed.
+
+        priorEditingMode = editingMode;
+
+        if (editingMode != EditingMode.READ_WRITE)
+            editingMode = EditingMode.READ_WRITE;

         return EditManager(_inputManager.beginInteraction());
     }
@@ -2001,6 +2018,8 @@
     private function releaseEditManager():void
     {
         _inputManager.endInteraction();
+
+        editingMode = priorEditingMode;
     }

     /**
@@ -2151,9 +2170,11 @@
     {
     	var em:Number = getStyle("fontSize");

-    	return getStyle("paddingLeft") +
-    		  widthInChars * em +
-    		  getStyle("paddingRight");
+    	// Without the explicit casts, if padding values are non-zero, the
+    	// returned width is a very large number.
+    	return Number(getStyle("paddingLeft")) +
+    		   widthInChars * em +
+    		   Number(getStyle("paddingRight"));
     }

     /**
@@ -2163,7 +2184,8 @@
      */
     private function calculateHeightInLines():Number
     {
-        var height:Number = getStyle("paddingTop") + getStyle("paddingBottom");
+        var height:Number = Number(getStyle("paddingTop")) +
+                            Number(getStyle("paddingBottom"));

         if (heightInLines == 0)
             return height;
@@ -2413,7 +2435,7 @@

         // Remove terminator on the last paragraph, ie remove the last char.
         // t true implies length > 0.
-        if (t && t.charAt(t.length-1) == "\n")
+        if (t != null && t.length > 0 && t.charAt(t.length-1) == "\n")
             t = t.slice(0, -1);

         return t;
@@ -2432,12 +2454,6 @@
     public function setSelection(anchorPosition:int = 0,
                                  activePosition:int = int.MAX_VALUE):void
     {
-        if (editingMode == EditingMode.READ_ONLY)
-        {
-            editingMode = EditingMode.READ_SELECT;
-            _selectable = true;
-        }
-
 		var selectionManager:ISelectionManager = getSelectionManager();

         selectionManager.setSelection(anchorPosition, activePosition);
@@ -2446,8 +2462,30 @@
         selectionManager.refreshSelection();

         releaseSelectionManager();
-      }
-
+    }
+
+    /**
+     *  Scrolls so that the text position is visible in the container.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function scrollToPosition(anchorPosition:int = 0,
+                                     activePosition:int = int.MAX_VALUE):void
+    {
+       var selectionManager:ISelectionManager = getSelectionManager();
+
+       var controller:ContainerController =
+                            textFlow.flowComposer.getControllerAt(0);
+
+        // ToDo: TextContainerManager should expose this interface
+        controller.scrollToPosition(anchorPosition, activePosition);
+
+        releaseSelectionManager();
+    }
+
     /**
      *  Inserts the specified text as if you had typed it.
      *  If a range was selected, the new text replaces the selected text;
@@ -2467,8 +2505,6 @@

         // Always use the EditManager regardless of the values of
         // selectable, editable and enabled.
-        var priorEditingMode:String = editingMode;
-        editingMode = EditingMode.READ_WRITE;
         var editManager:IEditManager = getEditManager();

         // If no selection, then it's an append.
@@ -2482,9 +2518,6 @@

         // All done with edit manager.
         releaseEditManager();
-
-        // Restore the prior editing mode.
-        editingMode = priorEditingMode;
     }

     /**
@@ -2506,8 +2539,6 @@

         // Always use the EditManager regardless of the values of
         // selectable, editable and enabled.
-        var priorEditingMode:String = editingMode;
-        editingMode = EditingMode.READ_WRITE;
         var editManager:IEditManager = getEditManager();

         // An append is an insert with the selection set to the end.
@@ -2520,9 +2551,6 @@

         // All done with edit manager.
         releaseEditManager();
-
-        // Restore the prior editing mode.
-        editingMode = priorEditingMode;
     }

     /**
@@ -2566,9 +2594,6 @@
     {
         var format:Object = {};

-        // Switch to the EditManager.
-        var priorEditingMode:String = editingMode;
-        editingMode = EditingMode.READ_WRITE;
         var selectionManager:ISelectionManager = getSelectionManager();

         // This internal TLF object maps the names of format properties
@@ -2642,10 +2667,7 @@

         // All done with the selection manager.
         releaseSelectionManager();
-
-        // Restore the prior editing mode.
-        editingMode = priorEditingMode;
-
+
         return format;
     }

@@ -2667,9 +2689,6 @@
      */
     public function setSelectionFormat(attributes:Object):void
     {
-        // Switch to the EditManager.
-        var priorEditingMode:String = editingMode;
-        editingMode = EditingMode.READ_WRITE;
         var editManager:IEditManager = getEditManager();

         // Assign each specified attribute to one of three format objects,
@@ -2715,9 +2734,6 @@

         // All done with the edit manager.
         releaseEditManager();
-
-        // Restore the prior editing mode.
-        editingMode = priorEditingMode;
     }

 	/**
@@ -3018,6 +3034,9 @@
     private function inputManager_selectionChangeHandler(
                         event:SelectionEvent):void
     {
+        var oldAnchor:int = _selectionAnchorPosition;
+        var oldActive:int = _selectionActivePosition;
+
         var selectionManager:ISelectionManager = getSelectionManager();

         _selectionAnchorPosition = selectionManager.anchorPosition;
@@ -3025,9 +3044,14 @@

         releaseSelectionManager();

-        //trace("selectionChangeHandler", _selectionAnchorPosition, _selectionActivePosition);
-
-        dispatchEvent(new FlexEvent(FlexEvent.SELECTION_CHANGE));
+        // Only dispatch the event if the selection has really changed.
+        var changed:Boolean = oldAnchor != _selectionAnchorPosition ||
+                              oldActive != _selectionActivePosition;
+
+        //trace("selectionChangeHandler", _selectionAnchorPosition, _selectionActivePosition, "selection_change", changed);
+
+        if (changed)
+            dispatchEvent(new FlexEvent(FlexEvent.SELECTION_CHANGE));
     }

     /**
@@ -3038,10 +3062,13 @@
     private function inputManager_flowOperationBeginHandler(
                         event:FlowOperationEvent):void
     {
-        //trace("flowOperationBegin");
+        //trace("flowOperationBegin", "generation", textFlow.generation);

         var op:FlowOperation = event.operation;
-
+
+        // The text flow's generation will be incremented if the text flow
+        // is modified in any way by this operation.
+
         if (op is InsertTextOperation)
         {
             var insertTextOperation:InsertTextOperation =
@@ -3091,11 +3118,13 @@
         {
             var flowTextOperation:FlowTextOperation =
                 FlowTextOperation(op);
-
-            // Eat 0-length selection.  This can happen when insertion point is
-            // at start of container and a backspace generates a
-            // DeleteTextOperation.
-            if (flowTextOperation.absoluteStart == 0 && flowTextOperation.absoluteEnd == 0)
+
+            // Eat 0-length deletion.  This can happen when insertion point is
+            // at start of container when a backspace is entered
+            // or when the insertion point is at the end of the
+            // container and a delete key is entered.
+            if (flowTextOperation.absoluteStart ==
+                flowTextOperation.absoluteEnd)
             {
                 event.preventDefault();
                 return;
@@ -3133,7 +3162,7 @@
     private function inputManager_flowOperationEndHandler(
                         event:FlowOperationEvent):void
     {
-        //trace("flowOperationEnd");
+        //trace("flowOperationEnd", "generation", textFlow.generation);

         // Paste is a special case.  Any mods have to be made to the text
         // which includes what was pasted.


Transferred from the Adobe Open Source Subversion Repository

Revision: 3264
Author:   gosmith@adobe.com
Date:     2008-09-18T23:56:23.276904Z

Log Message:
-----------
Updated to TCAL build 174. (Note: I did NOT update the players.)

The 'whitespaceCollapse' property in ICharacterFormat is now spelled 'whiteSpaceCollapse' to match the FXG 1.0 spec. (However, the corresponding enum class has not yet been renamed from WhitespaceCollapse to WhiteSpaceCollapse.)

The [Style] metadata in Flex has been updated to match this spelling.

Other renamings:

ITCALDisplayController --> IFlowComposer
StandardDisplayController --> StandardFlowComposer
TextFlow.displayController --> TextFlow.flowComposer

Reviewer: N/A
Bugs: -
QA: No
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/tcal_core.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/styles/metadata/AdvancedCharacterFormatTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/tcal_conversion.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/tcal_edit.swc</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -20,8 +20,8 @@
 import flash.text.engine.TextElement;
 import flash.text.engine.TextLine;

-import flashx.tcal.compose.ITCALDisplayController;
-import flashx.tcal.compose.StandardDisplayController;
+import flashx.tcal.compose.IFlowComposer;
+import flashx.tcal.compose.StandardFlowComposer;
 import flashx.tcal.container.DisplayObjectContainerController;
 import flashx.tcal.container.IContainerController;
 import flashx.tcal.conversion.TextFilter;
@@ -604,19 +604,19 @@
         if (textChanged || contentChanged || textAttributeChanged)
         {
             // Eliminate detritus from the previous TextFlow.
-            if (textFlow && textFlow.displayController)
-                textFlow.displayController.containerControllerList = null;
+            if (textFlow && textFlow.flowComposer)
+                textFlow.flowComposer.containerControllerList = null;

             // Create a new TextFlow for the current text.
             _content = textFlow = createTextFlow();

             // Tell it where to create its TextLines.
-            textFlow.displayController = new StandardDisplayController();
+            textFlow.flowComposer = new StandardFlowComposer();
             var containerControllers:Vector.<IContainerController> =
                 new Vector.<IContainerController>();
             containerControllers.push(
                 new DisplayObjectContainerController(this));
-            textFlow.displayController.containerControllerList =
+            textFlow.flowComposer.containerControllerList =
                 containerControllers;

             // Give it an EditManager to make it editable.
@@ -641,7 +641,7 @@
         }

         var containerController:IContainerController =
-            textFlow.displayController.getContainerControllerAt(0);
+            textFlow.flowComposer.getContainerControllerAt(0);

         if (horizontalScrollPositionChanged)
         {
@@ -697,8 +697,7 @@

         // Tell the TextFlow to generate TextLines within the
         // rectangle (0, 0, unscaledWidth, unscaledHeight).
-        var displayController:ITCALDisplayController =
-            textFlow.displayController;
+        var displayController:IFlowComposer = textFlow.flowComposer;
         var containerController:IContainerController =
             displayController.getContainerControllerAt(0);
         containerController.updateComposeSize(unscaledWidth, unscaledHeight);
@@ -1100,7 +1099,7 @@
                                     event:CompositionCompletionEvent):void
     {
         var containerController:IContainerController =
-            textFlow.displayController.getContainerControllerAt(0);
+            textFlow.flowComposer.getContainerControllerAt(0);

         var newContentWidth:Number =
             containerController.maxHorizontalScrollPosition;
@@ -1125,7 +1124,7 @@
     private function textFlow_scrollHandler(event:Event):void
     {
         var containerController:IContainerController =
-            textFlow.displayController.getContainerControllerAt(0);
+            textFlow.flowComposer.getContainerControllerAt(0);

         var newHorizontalScrollPosition:Number =
             containerController.horizontalScrollPosition;


updated comments

updated comments

--- dorkbots/dorkbots_ui/TruncateTextField.as
+++ dorkbots/dorkbots_ui/TruncateTextField.as
@@ -107,8 +107,8 @@
 		 * Truncate html text.
 		 * @param value The original text value
 		 * @param limit The maximum number of characters to show
-		 * @param ellipses  Boolean value to show elipses at the end of truncation.
-		 * @param moreLink  Boolean value to show a "[more]" with a TextEvent (TextEvent.LINK) at the end of truncation.
+		 * @param addEllipsis  Boolean value to show elipses at the end of truncation.
+		 * @param addMoreLink  Boolean value to show a "[more]" with a TextEvent (TextEvent.LINK) at the end of truncation.
 		 * This method is based on Michael Ritchie's work at http://thanksmister.com/2009/07/12/flex-truncating-html-text/
 		 * */
 		public static function truncateHTMLText(value:String, limit:int, addEllipsis:Boolean = true, addMoreLink:Boolean = true):String


asdoc

asdoc

--- src/com/kemsky/Stream.as
+++ src/com/kemsky/Stream.as
@@ -458,11 +458,21 @@
             return slice(offset, offset + count);
         }

+        /**
+         * Flattens a nested Streams, ArrayLists, ArrayCollections, Vectors.
+         * @return
+         */
         public function flatten():Stream
         {
-            return flatMap(null);
-        }
-
+            return flatMap(null);//todo: unlimited depth?
+        }
+
+        /**
+         * Builds a new stream by applying a function to all items of this stream and using
+         * the items of the resulting Streams, ArrayLists, ArrayCollections, Vectors.
+         * @param callback
+         * @return
+         */
         public function flatMap(callback:Function):Stream
         {
             var f:Function = function (item:*):*
@@ -602,7 +612,6 @@

         /*
          * Array part
-         * -------------------------------------------
          */

         /**
@@ -628,6 +637,15 @@
             return new Stream(source.concat().reverse());
         }

+        /**
+         * Concatenates the elements specified in the parameters with the
+         * elements in a stream and creates a new stream. If the parameters
+         * specify an stream, the elements of that array are concatenated.
+         * If you don't pass any parameters, the new stream is a duplicate
+         * (shallow clone) of the original stream.
+         * @param rest A value of any data type (such as numbers, elements, or strings) to be concatenated in a new stream.
+         * @return  A new stream that contains the items from this stream followed by items from the parameters.
+         */
         public function concat(...rest):Stream
         {
             var result:Array = source.concat();
@@ -660,31 +678,75 @@
             return new Stream(result);
         }

+        /**
+         * Removes the first item from a stream and returns that item.
+         * The remaining stream items are moved from their original position, i, to i-1.
+         * @return The first item (of any data type) in an stream.
+         */
         public function shift():*
         {
             return source.shift();
         }

+        /**
+         * Adds one or more items to the beginning of a stream and
+         * returns the new length of the stream. The other items in the
+         * stream are moved from their original position, i, to i+1.
+         * @param rest One or more numbers, elements, or variables to be inserted at the beginning of the stream.
+         * @return An integer representing the new length of the stream.
+         */
+        public function unshift(...rest):uint
+        {
+            return source.unshift.apply(null, rest);
+        }
+
+        /**
+         * Returns a new array that consists of a range of elements from the
+         * original stream, without modifying the original stream. The returned stream
+         * includes the startIndex item and all items up to, but not including, the endIndex item.
+         * @param startIndex A number specifying the index of the starting point for the slice.
+         *                  If startIndex is a negative number, the starting point begins at the end of the stream,
+         *                  where -1 is the last item.
+         * @param endIndex A number specifying the index of the ending point for the slice.
+         *                 If you omit this parameter, the slice includes all items from
+         *                 the starting point to the end of the stream. If endIndex is a negative number,
+         *                 the ending point is specified from the end of the stream, where -1 is the last item.
+         * @return A new stream that consists of a range of items from the original stream.
+         */
         public function slice(startIndex:int = 0, endIndex:int = 16777215):Stream
         {
             return new Stream(source.slice(startIndex, endIndex));
         }

-        public function unshift(...rest):uint
-        {
-            return source.unshift.apply(null, rest);
-        }
-
-        public function splice(...rest):Stream
-        {
-            return new Stream(source.splice.apply(null, rest));
-        }
-
+        /**
+         * Adds items to and removes elements from a stream. This method modifies the stream without making a copy.
+         * @param startIndex An integer that specifies the index of the item in the stream
+         *                   where the insertion or deletion begins. You can use a negative integer
+         *                   to specify a position relative to the end of the stream (for example, -1 is the last item of the stream).
+         * @param deleteCount An integer that specifies the number of items to be deleted.
+         *                    This number includes the item specified in the startIndex parameter.
+         *                    If you do not specify a value for the deleteCount parameter, the method deletes
+         *                    all of the values from the startIndex item to the last item in the stream.
+         *                    If the value is 0, no items are deleted.
+         * @param values An optional list of one or more comma-separated values to insert into the stream
+         *               at the position specified in the startIndex parameter.
+         * @return  A new stream containing the items that were removed from the original stream.
+         */
+        public function splice(startIndex:int, deleteCount:uint, ... values):Stream
+        {
+            return new Stream(source.splice.apply(null, [startIndex, deleteCount].concat(values)));
+        }
+
+        /**
+         * Sorts the elements in a stream. This method sorts according to Unicode values. (ASCII is a subset of Unicode.)
+         * @param rest The arguments specifying a comparison function and one or more values that determine the behavior of the sort.
+         * @return The return value depends on whether you pass any arguments.
+         */
         public function sort(...rest):Stream
         {
             var result:* = source.sort.apply(null, rest);

-            if(result == 0)
+            if(result == 0 && source.length > 1)
             {
                 //this is error, don't want to trade type safety just for this case
                 //see 'unique' method
@@ -698,9 +760,23 @@
             return this;
         }

-        public function sortOn(names:*, options:* = 0, ...rest):*
-        {
-            var result:* = source.sortOn.apply(null, [names, options].concat(rest));
+        /**
+         * Sorts the items in a stream according to one or more fields in the stream.
+         * @param names A string that identifies a field to be used as the sort value,
+         *              or an array in which the first item represents the primary sort field,
+         *              the second represents the secondary sort field, and so on.
+         * @param options One or more numbers or names of defined constants, separated
+         *                by the bitwise OR (|) operator, that change the sorting behavior.
+         * @return The return value depends on whether you pass any parameters.
+         * @see com.kemsky.Stream#CASEINSENSITIVE
+         * @see com.kemsky.Stream#NUMERIC
+         * @see com.kemsky.Stream#DESCENDING
+         * @see com.kemsky.Stream#RETURNINDEXEDARRAY
+         * @see com.kemsky.Stream#UNIQUESORT
+         */
+        public function sortOn(names:Object, options:Object = null):*
+        {
+            var result:* = source.sortOn.apply(null, [names, options]);

             if(result == 0)
             {
@@ -714,16 +790,40 @@
             return this;
         }

+        /**
+         * Searches for an item in an stream by using strict equality (===) and returns the index position of the item.
+         * @param item The item to find in the stream.
+         * @param fromIndex The location in the stream from which to start searching for the item.
+         * @return A zero-based index position of the item in the stream. If the searchElement argument is not found, the return value is -1.
+         */
         public function indexOf(item:*, fromIndex:* = 0):int
         {
             return source.indexOf(item, fromIndex);
         }

+        /**
+         * Searches for an item in an stream, working backward from the last item, and returns
+         * the index position of the matching item using strict equality (===).
+         * @param item The item to find in the stream.
+         * @param fromIndex  The location in the stream from which to start searching for the item.
+         *                   The default is the maximum value allowed for an index.
+         *                   If you do not specify fromIndex, the search starts at the last item in the stream.
+         * @return A zero-based index position of the item in the stream. If the searchElement argument is not found, the return value is -1.
+         */
         public function lastIndexOf(item:*, fromIndex:* = 2147483647):int
         {
             return source.lastIndexOf(item, fromIndex);
         }

+        /**
+         * Executes a test function on each item in the stream until an item is reached
+         * that returns false for the specified function. You use this method to
+         * determine whether all items in a stream meet a criterion, such as
+         * having values less than a particular number.
+         * @param callback The function to run on each item in the stream.
+         *
function(item:*):Boolean

+         * @return A Boolean value of true if all items in the stream return true for the specified function; otherwise, false.
+         */
         public function every(callback:Function):Boolean
         {
             return source.every(function (item:*, index:int, array:Array):Boolean
@@ -732,6 +832,14 @@
             });
         }

+        /**
+         * Executes a test function on each item in the array and constructs a new stream
+         * for all items that return true for the specified function. If an item returns
+         * false, it is not included in the new stream.
+         * @param callback The function to run on each item in the stream.
+         *
function(item:*):Boolean

+         * @return A new stream that contains all items from the original stream that returned true.
+         */
         public function filter(callback:Function):Stream
         {
             return new Stream(source.filter(function (item:*, index:int, array:Array):Boolean
@@ -740,6 +848,12 @@
             }));
         }

+        /**
+         * Executes a function on each item in the stream.
+         * @param callback The function to run on each item in the stream.
+         *
function(item:*):void

+         * @return Current stream
+         */
         public function forEach(callback:Function):Stream
         {
             source.forEach(function (item:*, index:int, array:Array):void


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 3416
Author:   jimurphy@adobe.com
Date:     2008-09-30T14:42:40.205001Z

Log Message:
-----------
Merged 3.0.x revisions 3400,3406,3409 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/ZipCodeValidator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>

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

--- frameworks/projects/framework/src/mx/validators/ZipCodeValidator.as
+++ frameworks/projects/framework/src/mx/validators/ZipCodeValidator.as
@@ -185,8 +185,20 @@
             }
         }

+        // Find out if the ZIP code contains any letters.
+        var containsLetters:Boolean = false;
+        for (i = 0; i < len; i++)
+        {
+            if (ROMAN_LETTERS.indexOf(zip.charAt(i)) != -1)
+            {
+                containsLetters = true;
+                break;
+            }
+        }
+
         // do an initial check on the length
-        if ((len < 5 || len > 10) || (len == 8))
+        if ((len < 5 || len > 10) || (len == 8) ||
+            (!containsLetters && (len == 6 || len == 7)))
         {
             // it's the wrong length for either a US or Canadian zip
             results.push(new ValidationResult(
@@ -200,7 +212,7 @@
         {
             case DOMAIN_US:
             {
-                if (validator.validateUSCode(zip) == false)
+                if (validator.validateUSCode(zip, containsLetters) == false)
                 {
                     results.push(new ValidationResult(
                             true, baseField, "wrongUSFormat",
@@ -212,7 +224,7 @@

             case DOMAIN_CANADA:
             {
-                if (validator.validateCACode(zip) == false)
+                if (validator.validateCACode(zip, containsLetters) == false)
                 {
                     results.push(new ValidationResult(
                         true, baseField, "wrongCAFormat",
@@ -225,31 +237,33 @@
             case DOMAIN_US_OR_CANADA:
             {

-                var usValid:Boolean = true;
-                var caValid:Boolean = true;
-
+                var valid:Boolean = true;
                 var validationResult:ValidationResult;

-                if (validator.validateUSCode(zip) == false)
+                if (len == 5 || len == 9 || len == 10) // US
                 {
-                     validationResult = new ValidationResult(
+                    if (validator.validateUSCode(zip, containsLetters) == false)
+                    {
+                        validationResult = new ValidationResult(
                             true, baseField, "wrongUSFormat",
                             validator.wrongUSFormatError);

-                    usValid = false;
+                        valid = false;
+                    }
+                }
+                else // CA
+                {
+                    if (validator.validateCACode(zip, containsLetters) == false)
+                    {
+                        validationResult = new ValidationResult(
+                            true, baseField, "wrongCAFormat",
+                            validator.wrongCAFormatError);
+
+                        valid = false;
+                    }
                 }

-                if (validator.validateCACode(zip) == false)
-                {
-                    validationResult = new ValidationResult(
-                        true, baseField, "wrongCAFormat",
-                        validator.wrongCAFormatError);
-
-                    caValid = false;
-                }
-
-                // if these are both false, then we definitely have the wrong format
-                if (usValid == false && caValid == false)
+                if (!valid)
                 {
                     results.push(validationResult);
                     return results;
@@ -264,22 +278,11 @@
     /**
      *  @private
      */
-    private function validateUSCode (zip:String):Boolean
+    private function validateUSCode (zip:String, containsLetters:Boolean):Boolean
     {
         var len:int = zip.length;
-
-        // Find out if the ZIP code contains any letters.
-        var containsLetters:Boolean = false;
-        for (i = 0; i < len; i++)
-        {
-            if (ROMAN_LETTERS.indexOf(zip.charAt(i)) != -1)
-            {
-                containsLetters = true;
-                break;
-            }
-        }
-
-        if (!(len == 5 || len == 9 || len == 10) || containsLetters) // checking the length
+
+        if (containsLetters)
         {
             return false;
         }
@@ -323,23 +326,12 @@
     /**
      *  @private
      */
-    private function validateCACode (zip:String):Boolean
+    private function validateCACode (zip:String, containsLetters:Boolean):Boolean
     {
         var len:int = zip.length;

-        // Find out if the ZIP code contains any letters.
-        var containsLetters:Boolean = false;
-        for (i = 0; i < len; i++)
-        {
-            if (ROMAN_LETTERS.indexOf(zip.charAt(i)) != -1)
-            {
-                containsLetters = true;
-                break;
-            }
-        }
-
         // check the basics
-        if (!(containsLetters && (len == 6 || len == 7)))
+        if (!containsLetters)
         {
             return false;
         }
@@ -752,3 +744,4 @@
 }

 }
+


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package spark.effects.animation
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17703
Author:   dthakkar@adobe.com
Date:     2010-09-14T21:06:11.351066Z

Log Message:
-----------
Added errorText property for spark formatters and included some bug fixes.

QE notes: This changelist has some behavior changes for spark formatters and will cause some failures to existing spark formatter mustell test cases. Globalization QE team knows about this and will update test cases after this submission.
Doc notes:
Bugs: SDK-27420,SDK-27449,SDK-26939,SDK-27240,SDK-27340,SDK-27341,SDK-26937,SDK-27038,SDK-26969,SDK-26970,SDK-26971,SDK-27036,SDK-27491,SDK-27037,SDK-26968,SDK-27450
Reviewer: Gordon, Craig, Dipti
Tests run: Checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/NumberFormatterTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/CurrencyFormatterTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/Formatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/NumberFormatterTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/DateTimeFormatterTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/CurrencyFormatterTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/DateTimeFormatterTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/GlobalizationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/IFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/LastOperationStatus.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as</path>

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

--- frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as
+++ frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as
@@ -253,8 +253,9 @@

     public function set currencyISOCode(value:String):void
     {
-        if(currencyISOCodeOverride != null && currencyISOCodeOverride == value)
+        if (currencyISOCodeOverride && (currencyISOCodeOverride == value))
             return;
+
         currencyISOCodeOverride = value;

         if (g11nWorkingInstance)
@@ -322,8 +323,9 @@

     public function set currencySymbol(value:String):void
     {
-        if(currencySymbolOverride != null && currencySymbolOverride == value)
+        if (currencySymbolOverride && (currencySymbolOverride == value))
             return;
+
         currencySymbolOverride = value;

         if (g11nWorkingInstance)
@@ -363,7 +365,7 @@
      *  defined in the table below.
      *

      *
-     *
 The table below summarizes the possible formatting patterns
+     *
The table below summarizes the possible formatting patterns
      *  for negative currency amounts. When a currency amount is formatted
      *  with the format() method:

      *
@@ -495,7 +497,7 @@
      *  defined in the table below.
      *

      *
-     *
 The table below summarizes the possible formatting patterns
+     *
The table below summarizes the possible formatting patterns
      *  for positive currency amounts.
      *  When a currency amount is formatted with the format()
      *  method:

@@ -604,8 +606,9 @@

     public function set useCurrencySymbol(value:Boolean):void
     {
-        if(_useCurrencySymbol == value)
+        if (_useCurrencySymbol == value)
             return;
+
         _useCurrencySymbol = value;

         update();
@@ -784,20 +787,47 @@

         const number:Number = Number(value);

+        if (isNaN(number))
+        {
+            if (g11nWorkingInstance)
+            {
+                // Have g11nFormatter.lastOperationStatus property hold
+                // ILLEGAL_ARGUMENT_ERROR value.
+                (g11nWorkingInstance as
+                    flash.globalization.CurrencyFormatter).fractionalDigits
+                                                                        = -1;
+            }
+            else
+            {
+                fallbackLastOperationStatus
+                                = LastOperationStatus.ILLEGAL_ARGUMENT_ERROR;
+            }
+            return errorText;
+        }
+
         if (g11nWorkingInstance)
-            return g11nWorkingInstance.format(number, useCurrencySymbol);
+        {
+            const g11nFormatter:flash.globalization.CurrencyFormatter =
+                (g11nWorkingInstance as flash.globalization.CurrencyFormatter);
+
+            const retVal:String = g11nFormatter.format(
+                                                    number, useCurrencySymbol);
+
+            return errorText && LastOperationStatus.isFatalError(
+                        g11nFormatter.lastOperationStatus) ? errorText : retVal;
+        }

         if ((localeStyle === undefined) || (localeStyle === null))
         {
             fallbackLastOperationStatus
                                 = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
-            return undefined;
+            return errorText;
         }

         fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;

         return (useCurrencySymbol ? currencySymbol : currencyISOCode)
-                                                            + number.toString();
+                                + number.toFixed(properties.fractionalDigits);
     }

     [Bindable("change")]
@@ -856,7 +886,7 @@
     public function formattingWithCurrencySymbolIsSafe(
                                                 requestedISOCode:String):Boolean
     {
-        if(g11nWorkingInstance)
+        if (g11nWorkingInstance)
         {
             return g11nWorkingInstance.formattingWithCurrencySymbolIsSafe(
                                                             requestedISOCode);
@@ -946,7 +976,7 @@
         fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;

         // TODO Implement some kind of simple parsing.
-        return new CurrencyParseResult();
+        return fallbackParseCurrency(inputString);
     }

     /**
@@ -970,6 +1000,12 @@
     //  Private Methods
     //
     //--------------------------------------------------------------------------
+
+    private function fallbackParseCurrency(parseString:String)
+                                                            :CurrencyParseResult
+    {
+        return parseToCurrencyParseResult(parseString);
+    }

     private function fallbackInstantiate():void
     {