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@1248561 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: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

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

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

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

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

--- frameworks/projects/framework/src/mx/logging/LogEventLevel.as
+++ frameworks/projects/framework/src/mx/logging/LogEventLevel.as
@@ -15,6 +15,11 @@
 /**
  *  Static class containing constants for use in the level
  *  property.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public final class LogEventLevel
 {
@@ -29,24 +34,44 @@
     /**
      *  Designates events that are very
      *  harmful and will eventually lead to application failure.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static const FATAL:int = 1000;

     /**
      *  Designates error events that might
      *  still allow the application to continue running.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static const ERROR:int = 8;

     /**
      *  Designates events that could be
      *  harmful to the application operation.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static const WARN:int = 6;

     /**
      *  Designates informational messages that
      *  highlight the progress of the application at coarse-grained level.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static const INFO:int = 4;

@@ -54,11 +79,21 @@
      *  Designates informational level
      *  messages that are fine grained and most helpful when debugging an
      *  application.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static const DEBUG:int = 2;

     /**
      *  Tells a target to process all messages.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static const ALL:int = 0;
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8590
Author:   mhorn@adobe.com
Date:     2009-07-15T18:22:10.968729Z

Log Message:
-----------
asdoc bug fixes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -226,8 +226,8 @@

     /**
      *  Whether the bitmap is repeated to fill the area. Set to true to cause
-     *  the fill to tile outward to the edges of the filled region.
-     *  Set to false to end the fill at the edge of the region.
+     *  the fill to tile outward to the edges of the region.
+     *  Set to false to end the fill at the edge of the bitmap.
      *
      *  @default true
      *


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/effects/easing/Bounce.as
+++ frameworks/projects/framework/src/mx/effects/easing/Bounce.as
@@ -0,0 +1,106 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2004-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.effects.easing
+{
+
+/**
+ *  The Bounce class defines three easing functions to implement
+ *  bounce motion with Flex effect classes.
+ *
+ *  For more information, see http://www.robertpenner.com/profmx.
+ */
+public class Bounce
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The easeOut() method starts the bounce motion fast,
+     *  and then decelerates motion as it executes.
+     *
+     *  @param t Specifies time.
+     *
+     *  @param b Specifies the initial position of a component.
+     *
+     *  @param c Specifies the total change in position of the component.
+     *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+    public static function easeOut(t:Number, b:Number,
+                                   c:Number, d:Number):Number
+    {
+        if ((t /= d) < (1 / 2.75))
+            return c * (7.5625 * t * t) + b;
+
+        else if (t < (2 / 2.75))
+            return c * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75) + b;
+
+        else if (t < (2.5 / 2.75))
+            return c * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375) + b;
+
+        else
+            return c * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375) + b;
+    }
+
+    /**
+     *  The easeIn() method starts the bounce motion slowly,
+     *  and then accelerates motion as it executes.
+     *
+     *  @param t Specifies time.
+     *
+     *  @param b Specifies the initial position of a component.
+     *
+     *  @param c Specifies the total change in position of the component.
+     *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+    public static function easeIn(t:Number, b:Number,
+                                  c:Number, d:Number):Number
+    {
+        return c - easeOut(d - t, 0, c, d) + b;
+    }
+
+    /**
+     *  The easeInOut() method combines the motion
+     *  of the easeIn() and easeOut() methods
+     *  to start the bounce motion slowly, accelerate motion, then decelerate.
+     *
+     *  @param t Specifies time.
+     *
+     *  @param b Specifies the initial position of a component.
+     *
+     *  @param c Specifies the total change in position of the component.
+     *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+    public static function easeInOut(t:Number, b:Number,
+                                     c:Number, d:Number):Number
+    {
+        if (t < d/2)
+            return easeIn(t * 2, 0, c, d) * 0.5 + b;
+        else
+            return easeOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 11984
Author:   jimurphy@adobe.com
Date:     2009-11-19T15:30:34.821822Z

Log Message:
-----------
Merged 3.x revisions 11672,11898,11927,11952 -> trunk
........
  r11672 | clucier@adobe.com | 2009-11-11 17:07:26 -0500 (Wed, 11 Nov 2009) | 10 lines

  Bugs: SDK-23661
........
  r11898 | clucier@adobe.com | 2009-11-17 12:38:44 -0500 (Tue, 17 Nov 2009) | 10 lines

  Bugs: SDK-22721
........
  r11927 | clucier@adobe.com | 2009-11-18 08:42:28 -0500 (Wed, 18 Nov 2009) | 10 lines

  Bugs: SDK-16241
........
  r11952 | clucier@adobe.com | 2009-11-18 15:42:08 -0500 (Wed, 18 Nov 2009) | 10 lines

  Bugs: SDK-15988
........

The majority of files in this change list are svn property changes - removing the svn:mergeinfo property

The following paths are the actual changes from 3.x that were merged:
frameworks/projects/rpc/src/mx/rpc/soap/SOAPDecoder.as
frameworks/projects/framework/src/mx/formatters/NumberFormatter.as
frameworks/projects/framework/src/mx/formatters/NumberBase.as
frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as
frameworks/projects/framework/src/mx/controls/ColorPicker.as

Modified Paths:
--------------
127 paths were modified

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

--- frameworks/projects/framework/src/mx/formatters/NumberBase.as
+++ frameworks/projects/framework/src/mx/formatters/NumberBase.as
@@ -333,6 +333,12 @@
 		var isNegative:Boolean = (v < 0);

 		var numStr:String = Math.abs(v).toString();
+
+		numStr.toLowerCase();
+        var e:int = numStr.indexOf("e")
+        if (e != -1)  //deal with exponents
+            numStr = expandExponents(numStr);
+
 		var numArr:Array =
 			numStr.split((numStr.indexOf(decimalSeparatorTo) != -1) ? decimalSeparatorTo : ".");
 		var numLen:int = String(numArr[0]).length;
@@ -542,6 +548,54 @@

 		return isNegative ? "-" + num : num;
 	}
+
+    /**
+     *  Formats a number in exponent notation, into
+     *  a number in decimal notation.
+     *
+     *  @param str String to process in exponent notation.
+     *
+     *  @return Formatted number.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function expandExponents(value:String):String
+    {
+        //Break string into component parts
+        var regExp:RegExp = /^([+-])?(\d+).?(\d*)[eE]([-+]?\d+)$/;
+        var result:Array = regExp.exec(value);
+        var sign:String = result[1];
+        var first:String = result[2];
+        var last:String =  result[3];
+        var exp:int =  int(result[4]);
+
+        //if we didn't get a good exponent to begin with, return what we can figure out
+        if (!exp)
+        {
+            return (sign ? sign : "") + (first ? first : "0") + (last ? "." + last : "");
+        }
+
+        var r:String = first + last;
+
+        var decimal:Boolean = exp < 0;
+
+        if (decimal)
+        {
+            var o:Number = -1 * (first.length + exp) + 1;
+            return (sign ? sign : "") + "0." + new Array(o).join("0") + r;
+        }
+        else
+        {
+            var i:Number = exp + first.length;
+            if (i >= r.length)
+                return (sign ? sign : "") + r + new Array(i - r.length + 1).join("0");
+            else
+                return (sign ? sign : "") + r.substr(0,i) + "." + r.substr(i);
+        }
+    }
 }

 }


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

--- frameworks/projects/spark/src/spark/effects/easing/Elastic.as
+++ frameworks/projects/spark/src/spark/effects/easing/Elastic.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.easing
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12469
Author:   jimurphy@adobe.com
Date:     2009-12-03T22:04:16.560316Z

Log Message:
-----------
fix offsets for FB.  Convert line ending from lf to crlf in svn for the proects directory only.  When checking project files in, be sure to save you files this way.  Another update to make sure happens is set the svn properties svn:eol-style = native and svn:mime-type = text/plain (these have been updated on theses files as well)

QE notes: make sure the proper class is selected
Doc notes: no
Bugs: http://bugs.adobe.com/jira/browse/SDK-24498
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
133 paths were modified

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

--- frameworks/projects/airframework/src/mx/events/WindowExistenceEvent.as
+++ frameworks/projects/airframework/src/mx/events/WindowExistenceEvent.as
@@ -185,4 +185,4 @@
     }

 }
-}+}


FLEX-33782 Removed value change check to before super call

--- frameworks/projects/experimental/src/spark/components/DataAccordion.as
+++ frameworks/projects/experimental/src/spark/components/DataAccordion.as
@@ -454,9 +454,9 @@
 		 */
 		override public function set labelField( value:String ):void
 		{
+			if( labelField == value ) return;
+
 			super.labelField = value;
-
-			if( labelField == value ) return

 			if( buttonBar )
 			{
@@ -487,9 +487,10 @@
 		 */
 		override public function set labelFunction( value:Function ):void
 		{
+			if( labelFunction == value ) return;
+
 			super.labelFunction = value;

-			if( labelFunction == value ) return;

 			if( buttonBar )
 			{


FLEX-34101 spark list doesn't refresh with filterFunction + fix RTE that occurs when adding more than one item to a filtered list.

--- frameworks/projects/framework/src/mx/collections/ListCollectionView.as
+++ frameworks/projects/framework/src/mx/collections/ListCollectionView.as
@@ -652,10 +652,8 @@
      *  @productversion Flex 3
      */
     public function addAllAt(addList:IList, index:int):void
-    {
-		var maxLength:int = this.length
-
-        if (index < 0 || index > maxLength)
+    {
+        if (index < 0 || index > this.length)
         {
             var message:String = resourceManager.getString(
                 "collections", "outOfBounds", [ index ]);
@@ -663,15 +661,15 @@
         }

         var length:int = addList.length;
+
+        for (var i:int=0; i < length; i++)
+        {
+            var insertIndex:int = i + index;

-		// incremental index may be out of bounds because of filtering,
-		// so add this item to the end.
-		if (index > maxLength)
-			index = maxLength;
-
-        for (var i:int=0; i < length; i++)
-        {
-            var insertIndex:int = i + index;
+			// incremental index may be out of bounds because of filtering,
+			// so add this item to the end.
+			if (insertIndex > this.length)
+				insertIndex = this.length;

             this.addItemAt(addList.getItemAt(i), insertIndex);
         }
@@ -1210,7 +1208,7 @@
 			throw new CollectionViewError(message);
 		}

-        if (localIndex && addedItems.length > 1)
+        if (localIndex && addedItems.length > 0)
         {
             addLocation = -1;
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 6200
Author:   smgilson@adobe.com
Date:     2009-04-22T20:20:58.294727Z

Log Message:
-----------
Starting ASDoc work on spark effects

QE Notes: None
Doc Notes: None
Bugs: -
checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateShaderTransition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CrossFade.as</path>

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

--- frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
+++ frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
@@ -10,7 +10,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package spark.effects
 {
-import flash.display.BitmapData;
+import flash.display.BitmapData;
 import flash.display.IBitmapDrawable;
 import flash.display.Sprite;
 import flash.geom.Matrix;
@@ -31,13 +31,18 @@
 [ResourceBundle("sparkEffects")]

 /**
- * This effect animates a transition between two bitmaps,
+ * The AnimateShaderTransition effect animates a transition between two bitmaps,
  * one representing the start state (bitmapFrom), and
  * the other representing the end state (bitmapTo).
  *
- *
The animation is performed by running a Pixel Bender shader,
- * supplied by the shader property,
- * using the two bitmaps as input. If either bitmap is
+ *
The animation is performed by running a pixel-shader program,
+ * specified by the shader property,
+ * using the two bitmaps as input.
+ * The bitmaps are represented by an instance of the flash.display.BitmapData class.
+ * You can create your own pixel-shader program
+ * by using Adobe Pixel Bender Toolkit.

+ *
+ *
If either bitmap is
  * not supplied, that value will be determined dynamically from
  * either the appropriate state of the target in a transition or,
  * if the effect is not running in a transition, from the
@@ -53,7 +58,7 @@
  * exists in these classes.

  *
  *
Because the effect is bitmap-based, and the underlying
- * Pixel Bender shader expects both bitmaps to be the same size,
+ * pixel-shader program expects both bitmaps to be the same size,
  * the effect will only work correctly when both bitmaps are
  * of the same size. This means that if the target object changes
  * size or changes orientation leading to a different size bounding
@@ -70,9 +75,28 @@
  * the results may not be as expected. To ensure correct playing of
  * these bitmap-based effects, they should be played alone on
  * their target objects.

- *
- * @see spark.primitives.GraphicElement
- * @see flash.display.DisplayObject
+ *
+ *  @mxml
+ *
+ *
The <mx:AnimateShaderTransition> tag
+ *  inherits all of the tag attributes of its superclass,
+ *  and adds the following tag attributes:

+ *
+ *

+ *  <mx:AnimateShaderTransition
+ *    Properties
+ *    id="ID"
+ *    bitmapFrom="no default"
+ *    bitmapTo="no default"
+ *    shaderCode="no default"
+ *    sahderProperties="no default"
+ *  />
+ *

+ *
+ *  @see flash.display.BitmapData
+ *  @see spark.effects.supportClasses.AnimateShaderTransitionInstance
+ *  @see spark.primitives.GraphicElement
+ *  @see flash.display.DisplayObject
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -82,7 +106,17 @@
 public class AnimateShaderTransition extends Animate
 {

-    public function AnimateShaderTransition(target:Object=null)
+    /**
+     *  Constructor.
+     *
+     *  @param target The Object to animate with this effect.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+     public function AnimateShaderTransition(target:Object=null)
     {
         super(target);

@@ -122,10 +156,10 @@

     /**
      * The bitmap data representing the start state of this effect.
-     * If this property is not set, it will be calculated automatically
-     * when the effect is played by grabbing a snapshot of the target
+     * If this property is not set, it is calculated automatically
+     * when the effect is played by taking a snapshot of the target
      * object, or by using a transparent bitmap if the object does not
-     * exist in the start state of a transition.
+     * exist in the start view state of a transition.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -136,10 +170,10 @@

     /**
      * The bitmap data representing the end state of this effect.
-     * If this property is not set, it will be calculated automatically
-     * when the effect is played by grabbing a snapshot of the target
+     * If this property is not set, it is calculated automatically
+     * when the effect is played by taking a snapshot of the target
      * object, or by using a transparent bitmap if the object does not
-     * exist in the end state of a transition.
+     * exist in the end view state of a transition.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -149,53 +183,38 @@
     public var bitmapTo:BitmapData;

     /**
-     * The bytecode that a Shader object will use
-     * for running the transition between the two bitmaps. This
+     * The bytecode for the pixel-shader program that the effect uses
+     * to animate between the two bitmaps. This
      * property can be represented as either a ByteArray or as a
      * Class representing a ByteArray (which is what results
      * when you embed a resource).
      *
-     *
The shader can have arbitrary functionality and inputs, but
+     *
The pixel-shader program can have arbitrary functionality and inputs, but
      * must, at a minimum, have three image4 inputs.
      * The first input, which can be named anything, should go
-     * unused by your shader code - it exists only to satisfy the
+     * unused by your pixel-shader program  code - it exists only to satisfy the
      * Flash requirement of assigning a filtered object to the
      * first input. Note that inputs that go completely unused in a
-     * shader kernel may be optimized out, so your kernel code should
-     * at least reference this input to keep it around.

-     *
-     *
There must be at least two other inputs
-     * named from and to and one
-     * float parameter named progress, where
-     * from/to are the before/after bitmaps, respectively,
-     * and progress is the elapsed fraction of
-     * the effect.

-     *
-     *
Also, there are two optional parameters, width
-     * and height, which if they exist in the shader
-     * will be automatically set to the width and height for the
-     * effect instance target.

+     * pixel-shader program might be optimized out, so your code should
+     * at least reference this input once.

+     *
+     *
There must be at least two other input bitmaps
+     * named from and to
+     * which represent the before and after bitmap images.
+     * Finally, you must define one
+     * float parameter named progress
+     * that contains the elapsed fraction of the effect.

+     *
+     *
You can specify two optional parameters, width
+     * and height. If they exist, they
+     * are automatically set to the width and height of the
+     * effect target.

      *
      *
See the Pixel Bender Toolkit documentation for more
-     * information on writing shaders for Flash.

-     *
-     * @example To play an effect that uses a fictional Pixel Bender pbj
-     * file MyShader.pbj, which takes a single direction
-     * parameter, the calling code could do this:
-     * @example <listing version="3.0">
-     *   [Embed(source="MyShader.pbj", mimeType="application/octet-stream")]
-     *   private var ShaderCodeClass:Class;
-     *   var shaderEffect = new AnimateShaderTransition();
-     *   shaderEffect.shaderCode = ShaderCodeClass;
-     *   shaderEffect.shaderProperties = {direction : 1};</listing>
-     * or in MXML code, this:<listing version="3.0">
-     *   <AnimateShaderTransition
-     *       shaderCode="&64;Embed(source='MyShader.pbj', mimeType='application/octet-stream')"
-     *       shaderProperties="{{direction : 1}}}"/>
-     * </listing>
-     *
-     * @see flash.display.Shader
-     *
+     * information on writing pixel-shader programs for Flash.
+     * You can also look at the source code for the CrossFade.pbk file in the
+     * frameworks\projects\flex4\src\spark\effects directory of the Flex source code.

+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
@@ -204,17 +223,19 @@
     public var shaderCode:Object;

     /**
-     * A map of parameter name/value pairs that the shader
-     * will set its data values to prior to playing. For example,
+     * A map of parameter name/value pairs passed to the pixel-shader program
+     * prior to playing. For example,
      * to set a parameter named direction in a
      * shader with a Pixel Bender pbj file in Wipe.pbj, the calling
-     * code could do this:
+     * code could do the following:
+     *
      * @example <listing version="3.0">
      *   [Embed(source="Wipe.pbj", mimeType="application/octet-stream")]
      *   private var WipeCodeClass:Class;
      *   var shaderEffect = new AnimateShaderTransition();
      *   shaderEffect.shaderCode = WipeCodeClass;
-     *   shaderEffect.shaderProperties = {direction : 1};</listing>
+     *   shaderEffect.shaderProperties = {direction : 1};
+     * </listing>
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -234,6 +255,9 @@
         return ["bitmap", "visible", "parent"];
     }

+    /**
+     *  @private
+     */
     override protected function getValueFromTarget(target:Object, property:String):*
     {
         if (property != "bitmap")
@@ -246,6 +270,16 @@
         return getSnapshot(target);
     }

+    /**
+     *  Creates the bitmap image for either the before or after stateof the target, if necessary.
+     *
+     *  @param target The Object to animate with this effect.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public static function getSnapshot(target:Object):BitmapData
     {
         if (target is GraphicElement)


Transferred from the Adobe Open Source Subversion Repository

Revision: 19797
Author:   klin@adobe.com
Date:     2011-01-19T00:06:54.932970Z

Log Message:
-----------
Initial checkin of override default density mapping feature. Application and other classes delegate calculating runtimeDPI to a RuntimeDPIProvider class. Developers that wish to override how the runtimeDPI is calculated should subclass RuntimeDPIProvider and set it to the runtimeDPIProvider property on Application. Application actually calls DensityUtil.getRuntimeDPI() which creates the instance of the runtimeDPIProvider class and caches the runtimeDPI. I've also modified the compiler so that runtimeDPIProvider is recognized as a special attribute on Application. This checkin includes the PARB updates for changing DPI related properties and variables from ints to Numbers.

QE notes: Update tests
Doc notes: N/A
Bugs: SDK-28731
Reviewer: Evtim
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/modules/compiler/src/java/flex2/compiler/mxml/builder/DocumentBuilder.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/DensityUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DPIClassification.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/MediaQueryParser.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as
+++ frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as
@@ -1742,11 +1742,11 @@
             if (source is MultiDPIBitmapSource)
             {
                 var app:Object = FlexGlobals.topLevelApplication;
-                var dpi:int;
+                var dpi:Number;
                 if ("runtimeDPI" in app)
                     dpi = app["runtimeDPI"];
                 else
-                    dpi = DensityUtil.classifyDPI(Capabilities.screenDPI);
+                    dpi = DensityUtil.getRuntimeDPI();

                 var multiSource:Object = MultiDPIBitmapSource(source).getSource(dpi);
                 isExternalSource = (multiSource is String || multiSource is URLRequest);


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

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

 package spark.skins.spark
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3970
Author:   smgilson@adobe.com
Date:     2008-10-30T18:29:45.702912Z

Log Message:
-----------
Mark classes as @private that are also [ExcludeClass]

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/PlaceholderData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/RemotePopUp.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/StageEventProxy.as</path>

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

--- frameworks/projects/framework/src/mx/managers/systemClasses/PlaceholderData.as
+++ frameworks/projects/framework/src/mx/managers/systemClasses/PlaceholderData.as
@@ -16,20 +16,21 @@
 [ExcludeClass]

 /**
+ * @private
  * Simple class to track placeholders for RemotePopups.
  */
 public class PlaceholderData extends Object
 {
-	public function PlaceholderData(id:String, bridge:IEventDispatcher, data:Object)
-	{
-		this.id = id;
-		this.bridge = bridge;
-		this.data = data;
-	}
-
-	public var id:String;				// id of string at this node in the display list
-	public var bridge:IEventDispatcher; // bridge to next child application
-	public var data:Object;				// either a popup or a bridge to the next application
+    public function PlaceholderData(id:String, bridge:IEventDispatcher, data:Object)
+    {
+        this.id = id;
+        this.bridge = bridge;
+        this.data = data;
+    }
+
+    public var id:String;               // id of string at this node in the display list
+    public var bridge:IEventDispatcher; // bridge to next child application
+    public var data:Object;             // either a popup or a bridge to the next application
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20352
Author:   smgilson@adobe.com
Date:     2011-02-17T19:26:00.432539Z

Log Message:
-----------
Minor ASDoc cleanup

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as
+++ frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as
@@ -47,7 +47,6 @@
  *  @eventType mx.events.FlexEvent.DATA_CHANGE
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -68,7 +67,6 @@
  *  @default undefined
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -80,7 +78,6 @@
  *  @default 0xCCCCCC
  *
  *  @langversion 3.0
- *  @playerversion Flash 10
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
@@ -98,7 +95,6 @@
  *  Mobile theme is 0xB2B2B2.

  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -110,7 +106,6 @@
  *  @default 0x70B2EE
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -123,7 +118,6 @@
  *  @default 5
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -136,7 +130,6 @@
  *  @default 5
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -148,7 +141,6 @@
  *  @default 0xCEDBEF
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -160,7 +152,6 @@
  *  @default 0xB2B2B2
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -174,7 +165,6 @@
  *  @default 0x000000
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -189,7 +179,6 @@
  *  @default "center"
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -272,7 +261,6 @@
  *  @includeExample examples/LabelItemRendererExample.mxml -noswf
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -290,7 +278,6 @@
      *  Constructor.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -298,26 +285,26 @@
     {
         super();

-		switch (applicationDPI)
-		{
-			case DPIClassification.DPI_320:
-			{
-				minHeight = 88;
-				break;
-			}
-			case DPIClassification.DPI_240:
-			{
-				minHeight = 66;
-				break;
-			}
-			default:
-			{
-				// default PPI160
-				minHeight = 44;
-				break;
-			}
-		}
-
+        switch (applicationDPI)
+        {
+            case DPIClassification.DPI_320:
+            {
+                minHeight = 88;
+                break;
+            }
+            case DPIClassification.DPI_240:
+            {
+                minHeight = 66;
+                break;
+            }
+            default:
+            {
+                // default PPI160
+                minHeight = 44;
+                break;
+            }
+        }
+
         interactionStateDetector = new InteractionStateDetector(this);
         interactionStateDetector.addEventListener(Event.CHANGE, interactionStateDetector_changeHandler);
     }
@@ -334,12 +321,12 @@
      */
     private var interactionStateDetector:InteractionStateDetector;

-	/**
-	 *  @private
-	 *  Whether or not we're the last element in the list
-	 */
-	mx_internal var isLastItem:Boolean = false;
-
+    /**
+     *  @private
+     *  Whether or not we're the last element in the list
+     */
+    mx_internal var isLastItem:Boolean = false;
+
     //--------------------------------------------------------------------------
     //
     //  Overridden properties: UIComponent
@@ -360,7 +347,7 @@
             return NaN;

         return labelDisplay.baselinePosition;
-	}
+    }

     //--------------------------------------------------------------------------
     //
@@ -388,7 +375,6 @@
      *  @see mx.core.IDataRenderer
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -486,7 +472,6 @@
      *  @default 0
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -500,16 +485,16 @@
      */
     public function set itemIndex(value:int):void
     {
-		var wasLastItem:Boolean = isLastItem;
-		var dataGroup:DataGroup = parent as DataGroup;
-		isLastItem = (dataGroup && (value == dataGroup.numElements - 1));
-
-		// if whether or not we are the last item in the last has changed then
-		// invalidate our display. note:  even if our new index has not changed,
-		// whether or not we're the last item may have so we perform this check
-		// before the value == _itemIndex check below
-		if (wasLastItem != isLastItem)
-			invalidateDisplayList();
+        var wasLastItem:Boolean = isLastItem;
+        var dataGroup:DataGroup = parent as DataGroup;
+        isLastItem = (dataGroup && (value == dataGroup.numElements - 1));
+
+        // if whether or not we are the last item in the last has changed then
+        // invalidate our display. note:  even if our new index has not changed,
+        // whether or not we're the last item may have so we perform this check
+        // before the value == _itemIndex check below
+        if (wasLastItem != isLastItem)
+            invalidateDisplayList();

         if (value == _itemIndex)
             return;
@@ -520,8 +505,8 @@
         // is only if alternatingItemColors are defined (and technically also
         // only if we are not selected or down, etc..., but we'll ignore those
         // as this will shortcut 95% of the time anyways)
-		if (getStyle("alternatingItemColors") !== undefined)
-			invalidateDisplayList();
+        if (getStyle("alternatingItemColors") !== undefined)
+            invalidateDisplayList();
     }

     //----------------------------------
@@ -539,7 +524,6 @@
      *  display the label data of the item renderer.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -551,7 +535,6 @@
      *  @default ""
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -595,7 +578,6 @@
      *  @default false
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -632,7 +614,6 @@
      *  @default false
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -667,7 +648,6 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -684,23 +664,22 @@
         _dragging = value;
     }

-
-	//----------------------------------
-	//  authorDensity
-	//----------------------------------
-	/**
-	 *  Returns the DPI of the application.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 2.5
-	 *  @productversion Flex 4.5
-	 */
-	public function get applicationDPI():Number
-	{
-		return FlexGlobals.topLevelApplication.applicationDPI;
-	}
-
+
+    //----------------------------------
+    //  authorDensity
+    //----------------------------------
+    /**
+     *  Returns the DPI of the application.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get applicationDPI():Number
+    {
+        return FlexGlobals.topLevelApplication.applicationDPI;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Overridden methods: UIComponent
@@ -725,9 +704,8 @@
      *  Creates the labelDisplay component
      *
      *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.5
-	 *  @productversion Flex 4.5
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function createLabelDisplay():void
     {
@@ -746,9 +724,8 @@
      *  Destroys the labelDisplay component
      *
      *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.5
-	 *  @productversion Flex 4.5
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function destroyLabelDisplay():void
     {
@@ -773,11 +750,11 @@
             var verticalPadding:Number = getStyle("paddingTop") + getStyle("paddingBottom");

             // Text respects padding right, left, top, and bottom
-			labelDisplay.commitStyles();
+            labelDisplay.commitStyles();
             measuredWidth = getElementPreferredWidth(labelDisplay) + horizontalPadding;
-			// We only care about the "real" ascent
+            // We only care about the "real" ascent
             measuredHeight = getElementPreferredHeight(labelDisplay) + verticalPadding;
-		}
+        }

         measuredMinWidth = 0;
     }
@@ -827,7 +804,6 @@
      *  scaleY property of the component.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -837,13 +813,13 @@
         // figure out backgroundColor
         var backgroundColor:*;
         var downColor:* = getStyle("downColor");
-		var drawBackground:Boolean = true;
+        var drawBackground:Boolean = true;

         if (down && downColor !== undefined)
         {
             backgroundColor = downColor;
         }
-		else if (selected)
+        else if (selected)
         {
             backgroundColor = getStyle("selectionColor");
         }
@@ -851,18 +827,18 @@
         {
             backgroundColor = getStyle("rollOverColor");
         }
-		else if (showsCaret)
-		{
-			backgroundColor = getStyle("selectionColor");
-		}
-		else
-		{
-			var alternatingColors:Array;
+        else if (showsCaret)
+        {
+            backgroundColor = getStyle("selectionColor");
+        }
+        else
+        {
+            var alternatingColors:Array;
             var alternatingColorsStyle:Object = getStyle("alternatingItemColors");

-			if (alternatingColorsStyle)
-				alternatingColors = (alternatingColorsStyle is Array) ? (alternatingColorsStyle as Array) : [alternatingColorsStyle];
-
+            if (alternatingColorsStyle)
+                alternatingColors = (alternatingColorsStyle is Array) ? (alternatingColorsStyle as Array) : [alternatingColorsStyle];
+
             if (alternatingColors && alternatingColors.length > 0)
             {
                 // translate these colors into uints
@@ -870,12 +846,12 @@

                 backgroundColor = alternatingColors[itemIndex % alternatingColors.length];
             }
-			else
-			{
-				// don't draw background if it is the contentBackgroundColor. The
-				// list skin handles the background drawing for us.
-				drawBackground = false;
-			}
+            else
+            {
+                // don't draw background if it is the contentBackgroundColor. The
+                // list skin handles the background drawing for us.
+                drawBackground = false;
+            }

         }

@@ -883,73 +859,73 @@
         // the reason why we draw it in the case of drawBackground == 0 is for
         // mouse hit testing purposes
         graphics.beginFill(backgroundColor, drawBackground ? 1 : 0);
-		graphics.lineStyle();
-		graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
-		graphics.endFill();
-
-		var topSeparatorColor:uint;
-		var topSeparatorAlpha:Number;
-		var bottomSeparatorColor:uint;
-		var bottomSeparatorAlpha:Number;
-
-		// Selected and down states have a gradient overlay as well
-		// as different separators colors/alphas
-		if (selected || down)
-		{
-			var colors:Array = [0x000000, 0x000000 ];
-			var alphas:Array = [.2, .1];
-			var ratios:Array = [0, 255];
-			var matrix:Matrix = new Matrix();
-
-			// gradient overlay
-			matrix.createGradientBox(unscaledWidth, unscaledHeight, Math.PI / 2, 0, 0 );
-			graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matrix);
-			graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
-			graphics.endFill();
-		}
-
-		// separators are a highlight on the top and shadow on the bottom
-		topSeparatorColor = 0xFFFFFF;
-		topSeparatorAlpha = .3;
-		bottomSeparatorColor = 0x000000;
-		bottomSeparatorAlpha = .3;
-
-
-		// draw separators
-		// don't draw top separator for down and selected states
-		if (!(selected || down))
-		{
-			graphics.beginFill(topSeparatorColor, topSeparatorAlpha);
-			graphics.drawRect(0, 0, unscaledWidth, 1);
-			graphics.endFill();
-		}
-
-		graphics.beginFill(bottomSeparatorColor, bottomSeparatorAlpha);
-		graphics.drawRect(0, unscaledHeight - (isLastItem ? 0 : 1), unscaledWidth, 1);
-		graphics.endFill();
-
-
-		// add extra separators to the first and last items so that
-		// the list looks correct during the scrolling bounce/pull effect
-		// top
-		if (itemIndex == 0)
-		{
-			graphics.beginFill(bottomSeparatorColor, bottomSeparatorAlpha);
-			graphics.drawRect(0, -1, unscaledWidth, 1);
-			graphics.endFill();
-		}
-
-		// bottom
-		if (isLastItem)
-		{
-			// we want to offset the bottom by 1 so that we don't get
-			// a double line at the bottom of the list if there's a
-			// border
-			graphics.beginFill(topSeparatorColor, topSeparatorAlpha);
-			graphics.drawRect(0, unscaledHeight + 1, unscaledWidth, 1);
-			graphics.endFill();
-		}
-
+        graphics.lineStyle();
+        graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
+        graphics.endFill();
+
+        var topSeparatorColor:uint;
+        var topSeparatorAlpha:Number;
+        var bottomSeparatorColor:uint;
+        var bottomSeparatorAlpha:Number;
+
+        // Selected and down states have a gradient overlay as well
+        // as different separators colors/alphas
+        if (selected || down)
+        {
+            var colors:Array = [0x000000, 0x000000 ];
+            var alphas:Array = [.2, .1];
+            var ratios:Array = [0, 255];
+            var matrix:Matrix = new Matrix();
+
+            // gradient overlay
+            matrix.createGradientBox(unscaledWidth, unscaledHeight, Math.PI / 2, 0, 0 );
+            graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matrix);
+            graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
+            graphics.endFill();
+        }
+
+        // separators are a highlight on the top and shadow on the bottom
+        topSeparatorColor = 0xFFFFFF;
+        topSeparatorAlpha = .3;
+        bottomSeparatorColor = 0x000000;
+        bottomSeparatorAlpha = .3;
+
+
+        // draw separators
+        // don't draw top separator for down and selected states
+        if (!(selected || down))
+        {
+            graphics.beginFill(topSeparatorColor, topSeparatorAlpha);
+            graphics.drawRect(0, 0, unscaledWidth, 1);
+            graphics.endFill();
+        }
+
+        graphics.beginFill(bottomSeparatorColor, bottomSeparatorAlpha);
+        graphics.drawRect(0, unscaledHeight - (isLastItem ? 0 : 1), unscaledWidth, 1);
+        graphics.endFill();
+
+
+        // add extra separators to the first and last items so that
+        // the list looks correct during the scrolling bounce/pull effect
+        // top
+        if (itemIndex == 0)
+        {
+            graphics.beginFill(bottomSeparatorColor, bottomSeparatorAlpha);
+            graphics.drawRect(0, -1, unscaledWidth, 1);
+            graphics.endFill();
+        }
+
+        // bottom
+        if (isLastItem)
+        {
+            // we want to offset the bottom by 1 so that we don't get
+            // a double line at the bottom of the list if there's a
+            // border
+            graphics.beginFill(topSeparatorColor, topSeparatorAlpha);
+            graphics.drawRect(0, unscaledHeight + 1, unscaledWidth, 1);
+            graphics.endFill();
+        }
+

     }

@@ -971,7 +947,6 @@
      *  scaleY property of the component.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -990,18 +965,18 @@
         var viewWidth:Number  = unscaledWidth  - paddingLeft - paddingRight;
         var viewHeight:Number = unscaledHeight - paddingTop  - paddingBottom;

-		var vAlign:Number;
-		if (verticalAlign == "top")
-			vAlign = 0;
-		else if (verticalAlign == "bottom")
-			vAlign = 1;
-		else // if (verticalAlign == "middle")
-			vAlign = 0.5;
-
+        var vAlign:Number;
+        if (verticalAlign == "top")
+            vAlign = 0;
+        else if (verticalAlign == "bottom")
+            vAlign = 1;
+        else // if (verticalAlign == "middle")
+            vAlign = 0.5;
+
         // measure the label component
-		// text should take up the rest of the space width-wise, but only let it take up
-		// its measured textHeight so we can position it later based on verticalAlign
-		var labelWidth:Number = Math.max(viewWidth, 0);
+        // text should take up the rest of the space width-wise, but only let it take up
+        // its measured textHeight so we can position it later based on verticalAlign
+        var labelWidth:Number = Math.max(viewWidth, 0);
         var labelHeight:Number = 0;

         if (label != "")
@@ -1011,15 +986,15 @@
             // reset text if it was truncated before.
             if (labelDisplay.isTruncated)
                 labelDisplay.text = label;
-
-			labelHeight = getElementPreferredHeight(labelDisplay);
-        }
-
-		setElementSize(labelDisplay, labelWidth, labelHeight);
-
-		// We want to center using the "real" ascent
-		var labelY:Number = Math.round(vAlign * (viewHeight - labelHeight))  + paddingTop;
-		setElementPosition(labelDisplay, paddingLeft, labelY);
+
+            labelHeight = getElementPreferredHeight(labelDisplay);
+        }
+
+        setElementSize(labelDisplay, labelWidth, labelHeight);
+
+        // We want to center using the "real" ascent
+        var labelY:Number = Math.round(vAlign * (viewHeight - labelHeight))  + paddingTop;
+        setElementPosition(labelDisplay, paddingLeft, labelY);

         // attempt to truncate the text now that we have its official width
         labelDisplay.truncateToFit();
@@ -1038,13 +1013,12 @@
      *  @see #setElementSize
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     protected function setElementPosition(element:Object, x:Number, y:Number):void
     {
-		if (element is ILayoutElement)
+        if (element is ILayoutElement)
         {
             ILayoutElement(element).setLayoutBoundsPosition(x, y, false);
         }
@@ -1052,7 +1026,7 @@
         {
             IFlexDisplayObject(element).move(x, y);
         }
-		else
+        else
         {
             element.x = x;
             element.y = y;
@@ -1065,13 +1039,12 @@
      *  @see #setElementPosition
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     protected function setElementSize(element:Object, width:Number, height:Number):void
     {
-		if (element is ILayoutElement)
+        if (element is ILayoutElement)
         {
             ILayoutElement(element).setLayoutBoundsSize(width, height, false);
         }
@@ -1094,13 +1067,12 @@
      *  @see #getElementPreferredHeight
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     protected function getElementPreferredWidth(element:Object):Number
     {
-		if (element is ILayoutElement)
+        if (element is ILayoutElement)
         {
             return ILayoutElement(element).getPreferredBoundsWidth();
         }
@@ -1108,7 +1080,7 @@
         {
             return IFlexDisplayObject(element).measuredWidth;
         }
-		else
+        else
         {
             return element.width;
         }
@@ -1122,13 +1094,12 @@
      *  @see #getElementPreferredWidth
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     protected function getElementPreferredHeight(element:Object):Number
     {
-		if (element is ILayoutElement)
+        if (element is ILayoutElement)
         {
             return ILayoutElement(element).getPreferredBoundsHeight();
         }
@@ -1136,7 +1107,7 @@
         {
             return IFlexDisplayObject(element).measuredHeight;
         }
-		else
+        else
         {
             return element.height;
         }


FLEX-33524: Added convenience feature to enable/disable buttons in a ButtonBar/TabBar.

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
@@ -513,7 +513,203 @@
     //  Methods
     //
     //--------------------------------------------------------------------------
-
+
+    /**
+    *  Disable a ButtonBar's Button referencing it by the ButtonBarbutton's label.
+    *
+    *
The function takes a single argument which is the ButtonBarButtons label.

+    *
myButtonBar.disableButton("My Button Label")

+    *
+    *  @param labelValue Is the ButtonBarButton label
+    *  @param fieldName Field used for comparing the label
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 11.1
+    *  @playerversion AIR 3.4
+    *  @productversion Flex 4.10
+    */
+    public function disableButton(labelValue:String, fieldName:String = ""):void
+    {
+        var btnCurrent:ButtonBarButton = null;
+        var buttonIndex:int = -1;
+
+
+        if (!dataGroup || labelValue == "" || labelValue == null)
+        {
+            return;
+        }
+
+        if (fieldName == "" || fieldName == null)
+        {
+            buttonIndex = findRowIndex(labelField, labelValue);
+        }
+        else
+        {
+            buttonIndex = findRowIndex(fieldName, labelValue);
+        }
+
+        if (buttonIndex == -1)
+        {
+            return;
+        }
+
+
+        btnCurrent = dataGroup.getElementAt(buttonIndex) as ButtonBarButton;
+        btnCurrent.enabled = false;
+    }
+
+
+    /**
+    *  Disables several of a ButtonBar's Buttons, referencing them by the ButtonBarbutton's label.
+    *
+    *
The function takes a single argument which is the ButtonBarButtons label.

+    *
myButtonBar.disableButtons(["My Button Label1", "My Label2"])

+    *
+    *  @param labelValues Is an array of ButtonBarButton labels.
+    *  @param fieldName Field used for comparing the label
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 11.1
+    *  @playerversion AIR 3.4
+    *  @productversion Flex 4.10
+    */
+    public function disableButtons(labelValues:Array, fieldName:String = ""):void
+    {
+        var btnCurrent:ButtonBarButton = null;
+        var buttonIndices:Array;
+        var indicesTotal:uint = 0;
+        var loopingIndex:uint = 0;
+
+
+        if (!dataGroup || labelValues.length < 1 || labelValues == null)
+        {
+            return;
+        }
+
+        if (fieldName == "" || fieldName == null)
+        {
+            buttonIndices = findRowIndices(labelField, labelValues);
+        }
+        else
+        {
+            buttonIndices = findRowIndices(fieldName, labelValues);
+        }
+
+
+        indicesTotal = buttonIndices.length
+
+        if (indicesTotal == 0)
+        {
+            return;
+        }
+
+
+        for (loopingIndex; loopingIndex < indicesTotal; loopingIndex++)
+        {
+            btnCurrent = dataGroup.getElementAt(buttonIndices[loopingIndex]) as ButtonBarButton;
+            btnCurrent.enabled = false;
+        }
+    }
+
+
+    /**
+    *  Enable a ButtonBar's Button referencing it by the ButtonBarbutton's label.
+    *
+    *
The function takes a single argument which is the ButtonBarButtons label.

+    *
myButtonBar.enableButton("My Button Label")

+    *
+    *  @param labelValue Is the ButtonBarButton label
+    *  @param fieldName Field used for comparing the label
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 11.1
+    *  @playerversion AIR 3.4
+    *  @productversion Flex 4.10
+    */
+    public function enableButton(labelValue:String, fieldName:String = ""):void
+    {
+        var btnCurrent:ButtonBarButton = null;
+        var buttonIndex:int = -1;
+
+
+        if (!dataGroup || labelValue == "" || labelValue == null)
+        {
+            return;
+        }
+
+        if (fieldName == "" || fieldName == null)
+        {
+            buttonIndex = findRowIndex(labelField, labelValue);
+        }
+        else
+        {
+            buttonIndex = findRowIndex(fieldName, labelValue);
+        }
+
+        if (buttonIndex == -1)
+        {
+            return;
+        }
+
+
+        btnCurrent = dataGroup.getElementAt(buttonIndex) as ButtonBarButton;
+        btnCurrent.enabled = true;
+    }
+
+
+    /**
+    *  Disables several of a ButtonBar's Buttons, referencing them by the ButtonBarbutton's label.
+    *
+    *
The function takes a single argument which is the ButtonBarButtons label.

+    *
myButtonBar.enableButtons(["My Button Label1", "My Label2"])

+    *
+    *  @param labelValues Is an array of ButtonBarButton labels.
+    *  @param fieldName Field used for comparing the label
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 11.1
+    *  @playerversion AIR 3.4
+    *  @productversion Flex 4.10
+    */
+    public function enableButtons(labelValues:Array, fieldName:String = ""):void
+    {
+        var btnCurrent:ButtonBarButton = null;
+        var buttonIndices:Array;
+        var indicesTotal:uint = 0;
+        var loopingIndex:uint = 0;
+
+
+        if (!dataGroup || labelValues.length < 1 || labelValues == null)
+        {
+            return;
+        }
+
+        if (fieldName == "" || fieldName == null)
+        {
+            buttonIndices = findRowIndices(labelField, labelValues);
+        }
+        else
+        {
+            buttonIndices = findRowIndices(fieldName, labelValues);
+        }
+
+
+        indicesTotal = buttonIndices.length
+
+        if (indicesTotal == 0)
+        {
+            return;
+        }
+
+
+        for (loopingIndex; loopingIndex < indicesTotal; loopingIndex++)
+        {
+            btnCurrent = dataGroup.getElementAt(buttonIndices[loopingIndex]) as ButtonBarButton;
+            btnCurrent.enabled = true;
+        }
+    }
+
+
     /**
      *  @private
      */


Transferred from the Adobe Open Source Subversion Repository

Revision: 3341
Author:   rfrishbe@adobe.com
Date:     2008-09-24T23:10:20.245436Z

Log Message:
-----------
Changing the definition of some methods in SkinnableComponent.  So instead of:

protected function partAdded(partName:String, instance:*):void

We now have:

protected function partAdded(partName:String, instance:Object):void

Technically this just means we can't support the value of "undefined" anymore.  This change was made to partAdded(), partRemoved(), createPartInstance(), removePartInstance(), and getDyanamicPartAt().

As I was making these changes in all the files that override these methods, I noticed Slider should have a partRemoved() method, so I added it.

I also made a minor change in Selector where there was a bug in the dataProvider collectionChange eventHandler.  Basically we were doing remove code on replace rather than remove.

QE: Yes - This will break (as in, it won't compile) some tests in SkinnableComponent.  Joann will change them soon after I checkin.
Doc: Yes
Bugs: SDK-16640, SDK-16709
Reviewer: Hans

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/DataComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Selector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Scroller.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as
@@ -193,7 +193,7 @@
     /**
      *  @private
      */
-    override protected function partAdded(partName:String, instance:*):void
+    override protected function partAdded(partName:String, instance:Object):void
     {
         super.partAdded(partName, instance);

@@ -221,7 +221,7 @@
     /**
      *  @private
      */
-    override protected function partRemoved(partName:String, instance:*):void
+    override protected function partRemoved(partName:String, instance:Object):void
     {
         super.partRemoved(partName, instance);