Transferred from the Adobe Open Source Subversion Repository

Revision: 7756
Author:   rfrishbe@adobe.com
Date:     2009-06-11T21:28:48.623739Z

Log Message:
-----------
Some PARB changes for SkinnableComponent and DataGroup:

SkinnableComponent.invalidateSkinState() changed from protected to public

DataGroup:
initializeDataProvider(): protected -> private
addItemRendererToDisplayList(): protected -> private
dataProvider_collectionChangeHandler(): protected -> mx_internal
adjustAfterAdd(): protected -> private
adjustAfterRemove(): protected -> private
adjustAfterMove(): protected -> private
adjustAfterReplace(): protected -> private

QE Notes: -
Doc Notes: -
Bugs: -
Reviewer: F10
tests: checkintest (seem to fail due to local changes to ScrollBar, which I'm not checking in here)

Modified Paths:
--------------
<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/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -535,6 +535,7 @@
     }

     /**
+     *  @private
      *  Adds the elements of the data provider to the DataGroup.
      *
      *  @langversion 3.0
@@ -542,7 +543,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    protected function initializeDataProvider():void
+    private function initializeDataProvider():void
     {
         var index:int;
         var vLayout:Boolean = layout && layout.useVirtualLayout;
@@ -995,6 +996,8 @@
     }

     /**
+     *  @private
+     *
      *  Returns the ItemRenderer being used for the data provider item at the specified index.
      *  Note that if the layout is virtual, ItemRenderers that are scrolled
      *  out of view may be reused.
@@ -1022,6 +1025,7 @@

     /**
      *  @private
+     *
      *  Currently, item renderers ("IRs") can only be recycled if they're all
      *  of the same type, they implement IDataRenderer, and they're all
      *  produced - by the itemRenderer factory - with the same initial
@@ -1102,6 +1106,8 @@
      }

     /**
+     *  @private
+     *
      *  Returns the index of the data provider item
      *  that the specified item renderer
      *  is being used for, or -1 if there is no such item.
@@ -1239,6 +1245,7 @@
     }

     /**
+     *  @private
      *  Removes an item from another DataGroup or display list
      *  before adding it to this display list.
      *
@@ -1256,7 +1263,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    protected function addItemRendererToDisplayList(child:DisplayObject, index:int = -1):DisplayObject
+    private function addItemRendererToDisplayList(child:DisplayObject, index:int = -1):DisplayObject
     {
         // If this child is already an element of the display list, ensure
         // that it's at the specified index
@@ -1300,7 +1307,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    protected function dataProvider_collectionChangeHandler(event:CollectionEvent):void
+    mx_internal function dataProvider_collectionChangeHandler(event:CollectionEvent):void
     {
         switch (event.kind)
         {
@@ -1380,7 +1387,7 @@
     /**
      *  @private
      */
-    protected function adjustAfterAdd(items:Array, location:int):void
+    private function adjustAfterAdd(items:Array, location:int):void
     {
         var length:int = items.length;
         for (var i:int = 0; i < length; i++)
@@ -1392,7 +1399,7 @@
     /**
      *  @private
      */
-    protected function adjustAfterRemove(items:Array, location:int):void
+    private function adjustAfterRemove(items:Array, location:int):void
     {
         var length:int = items.length;
         for (var i:int = length-1; i >= 0; i--)
@@ -1404,7 +1411,7 @@
     /**
      *  @private
      */
-    protected function adjustAfterMove(item:Object, location:int, oldLocation:int):void
+    private function adjustAfterMove(item:Object, location:int, oldLocation:int):void
     {
         itemRemoved(item, oldLocation);

@@ -1419,7 +1426,7 @@
     /**
      *  @private
      */
-    protected function adjustAfterReplace(items:Array, location:int):void
+    private function adjustAfterReplace(items:Array, location:int):void
     {
         var length:int = items.length;
         for (var i:int = length-1; i >= 0; i--)


Transferred from the Adobe Open Source Subversion Repository

Revision: 10577
Author:   stshongr@adobe.com
Date:     2009-09-24T21:43:50.273959Z

Log Message:
-----------
Adding the TileGroup component

QE notes: mustella tests will be added
Doc notes: None
Bugs: None
Reviewer: Hans
Tests run: checkintests, mustella
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TileGroup.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TileGroup.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>

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

--- frameworks/projects/spark/src/spark/components/TileGroup.as
+++ frameworks/projects/spark/src/spark/components/TileGroup.as
@@ -0,0 +1,516 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.components
+{
+import flash.events.Event;
+import spark.layouts.TileLayout;
+import spark.layouts.supportClasses.LayoutBase;
+
+[IconFile("TileGroup.png")]
+
+/**
+ *  The TileGroup container is an instance of the Group container
+ *  that uses the TileLayout class.
+ *  Do not modify the layout property.
+ *  Instead, use the properties of the TileGroup class to modify the
+ *  characteristics of the TileLayout class.
+ *
+ *  @mxml
+ *
+ *
The <s:TileGroup> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <s:TileGroup
+ *    Properties
+ *    columnAlign="left"
+ *    columnCount="-1"
+ *    columnWidth="0"
+ *    horizontalAlign="justify"
+ *    horizontalGap="6"
+ *    orientation="rows"
+ *    requestedColumnCount"-1"
+ *    requestedRowCount="-1"
+ *    rowAlign="top"
+ *    rowCount="-1"
+ *    rowHeight="0"
+ *    verticalAlign="justify"
+ *    verticalGap="6"
+ *  />
+ *

+ *
+ *  @see spark.layouts.TileLayout
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class TileGroup extends Group
+{
+    include "../core/Version.as";
+
+    /**
+     *  Constructor.
+     *  Initializes the layout property to an instance of
+     *  the TileLayout class.
+     *
+     *  @see spark.layouts.TileLayout
+     *  @see spark.components.HGroup
+     *  @see spark.components.VGroup
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function TileGroup():void
+    {
+        super();
+        super.layout = new TileLayout();
+    }
+
+    private function get tileLayout():TileLayout
+    {
+        return TileLayout(layout);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  columnAlign
+    //----------------------------------
+
+    [Inspectable(category="General", enumeration="left,justifyUsingGap,justifyUsingWidth", defaultValue="left")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#columnAlign
+     *
+     *  @default "left"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get columnAlign():String
+    {
+        return tileLayout.columnAlign;
+    }
+
+    /**
+     *  @private
+     */
+    public function set columnAlign(value:String):void
+    {
+        tileLayout.columnAlign = value;
+    }
+
+    //----------------------------------
+    //  columnCount
+    //----------------------------------
+
+    [Bindable("propertyChange")]
+    [Inspectable(category="General")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#columnCount
+     *
+     *  @default -1
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get columnCount():int
+    {
+        return tileLayout.columnCount;
+    }
+
+    //----------------------------------
+    //  columnWidth
+    //----------------------------------
+
+    [Bindable("propertyChange")]
+    [Inspectable(category="General")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#columnWidth
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get columnWidth():int
+    {
+        return tileLayout.columnWidth;
+    }
+
+    /**
+     *  @private
+     */
+    public function set columnWidth(value:int):void
+    {
+        tileLayout.columnWidth = value;
+    }
+
+    //----------------------------------
+    //  horizontalAlign
+    //----------------------------------
+
+    [Inspectable(category="General", enumeration="left,center,right,justify,contentJustify", defaultValue="left")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#horizontalAlign
+     *
+     *  @default "justify"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get horizontalAlign():String
+    {
+        return tileLayout.horizontalAlign;
+    }
+
+    /**
+     *  @private
+     */
+    public function set horizontalAlign(value:String):void
+    {
+        tileLayout.horizontalAlign = value;
+    }
+
+    //----------------------------------
+    //  horizontalGap
+    //----------------------------------
+
+    [Bindable("propertyChange")]
+    [Inspectable(category="General")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#horizontalGap
+     *
+     *  @default 6
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get horizontalGap():int
+    {
+        return tileLayout.horizontalGap;
+    }
+
+    /**
+     *  @private
+     */
+    public function set horizontalGap(value:int):void
+    {
+        tileLayout.horizontalGap = value;
+    }
+
+    //----------------------------------
+    //  orientation
+    //----------------------------------
+
+    [Inspectable(category="General", enumeration="rows,columns", defaultValue="rows")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#orientation
+     *
+     *  @default "rows"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get orientation():String
+    {
+        return tileLayout.orientation;
+    }
+
+    /**
+     *  @private
+     */
+    public function set orientation(value:String):void
+    {
+        tileLayout.orientation = value;
+    }
+
+    //----------------------------------
+    //  requestedColumnCount
+    //----------------------------------
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#requestedColumnCount
+     *
+     *  @default -1
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get requestedColumnCount():int
+    {
+        return tileLayout.requestedColumnCount;
+    }
+
+    /**
+     *  @private
+     */
+    public function set requestedColumnCount(value:int):void
+    {
+        tileLayout.requestedColumnCount = value;
+    }
+
+    //----------------------------------
+    //  requestedRowCount
+    //----------------------------------
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#requestedRowCount
+     *
+     *  @default -1
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get requestedRowCount():int
+    {
+        return tileLayout.requestedRowCount;
+    }
+
+    /**
+     *  @private
+     */
+    public function set requestedRowCount(value:int):void
+    {
+        tileLayout.requestedRowCount = value;
+    }
+
+    //----------------------------------
+    //  rowAlign
+    //----------------------------------
+
+    [Inspectable(category="General", enumeration="top,justifyUsingGap,justifyUsingHeight", defaultValue="top")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#rowAlign
+     *
+     *  @default "top"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get rowAlign():String
+    {
+        return tileLayout.rowAlign;
+    }
+
+    /**
+     *  @private
+     */
+    public function set rowAlign(value:String):void
+    {
+        tileLayout.rowAlign = value;
+    }
+
+    //----------------------------------
+    //  rowCount
+    //----------------------------------
+
+    [Bindable("propertyChange")]
+    [Inspectable(category="General")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#rowCount
+     *
+     *  @default -1
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get rowCount():int
+    {
+        return tileLayout.rowCount;
+    }
+
+    //----------------------------------
+    //  rowHeight
+    //----------------------------------
+
+    [Bindable("propertyChange")]
+    [Inspectable(category="General")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#rowHeight
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get rowHeight():int
+    {
+        return tileLayout.rowHeight;
+    }
+
+    /**
+     *  @private
+     */
+    public function set rowHeight(value:int):void
+    {
+        tileLayout.rowHeight = value;
+    }
+
+    //----------------------------------
+    //  verticalAlign
+    //----------------------------------
+
+    [Inspectable(category="General", enumeration="top,bottom,middle,justify", defaultValue="justify")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#verticalAlign
+     *
+     *  @default "justify"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get verticalAlign():String
+    {
+        return tileLayout.verticalAlign;
+    }
+
+    /**
+     *  @private
+     */
+    public function set verticalAlign(value:String):void
+    {
+        tileLayout.verticalAlign = value;
+    }
+
+    //----------------------------------
+    //  verticalGap
+    //----------------------------------
+
+    [Bindable("propertyChange")]
+    [Inspectable(category="General")]
+
+    /**
+     *  @copy spark.layouts.TileLayout#verticalGap
+     *
+     *  @default 6
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get verticalGap():int
+    {
+        return tileLayout.verticalGap;
+    }
+
+    /**
+     *  @private
+     */
+    public function set verticalGap(value:int):void
+    {
+        tileLayout.verticalGap = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  layout
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set layout(value:LayoutBase):void
+    {
+        throw(new Error(resourceManager.getString("components", "layoutReadOnly")));
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event Handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     */
+    override public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
+    {
+        if (type == "propertyChange")
+        {
+            if (!hasEventListener(type))
+                tileLayout.addEventListener(type, redispatchHandler);
+        }
+        super.addEventListener(type, listener, useCapture, priority, useWeakReference)
+    }
+
+    /**
+     * @private
+     */
+    override public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
+    {
+        super.removeEventListener(type, listener, useCapture);
+        if (type == "propertyChange")
+        {
+            if (!hasEventListener(type))
+                tileLayout.removeEventListener(type, redispatchHandler);
+        }
+    }
+
+    private function redispatchHandler(event:Event):void
+    {
+        dispatchEvent(event);
+    }
+
+}
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.effects.effectClasses
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.automation.events
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17957
Author:   clucier@adobe.com
Date:     2010-09-30T18:19:26.473648Z

Log Message:
-----------
Moved to using a simple custom layout to manage all of the permutations if icon/label/iconPlacement in the Spark button skins. Label should not properly truncated when overflowed.

Addressed issue with ToggleButtonSkin where if toggled and disabled, the button would not appear disabled.

Added iconPlacement style to ButtonBarBase and addressed several iconField and iconFunction related bugs.

QE notes: None
Doc notes: None
Bugs: SDK-27900, SDK-27896, SDK-27902, SDK-27901, SDK-27894, SDK-27897, SDK-27899
Reviewer: Evtim (Layout logic), Darrell (ButtonBar)
Tests run: Checkin.
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/ToggleButtonSkin.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/LabelAndIconLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/SparkButtonSkin.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
@@ -11,710 +11,765 @@

 package spark.components.supportClasses
 {
-    import flash.events.Event;
-    import flash.events.EventPhase;
-    import flash.events.FocusEvent;
-    import flash.events.KeyboardEvent;
-    import flash.events.MouseEvent;
-    import flash.ui.Keyboard;
-
-    import mx.collections.IList;
-    import mx.core.EventPriority;
-    import mx.core.IFactory;
-    import mx.core.ISelectableList;
-    import mx.core.IVisualElement;
-    import mx.core.mx_internal;
-    import mx.events.FlexEvent;
-    import mx.events.IndexChangedEvent;
-    import mx.managers.IFocusManagerComponent;
-
-    import spark.components.ButtonBarButton;
-    import spark.components.IItemRenderer;
-    import spark.components.supportClasses.ButtonBase;
-    import spark.events.IndexChangeEvent;
-    import spark.events.RendererExistenceEvent;
-
-    use namespace mx_internal;  // use of ListBase/setCurrentCaretIndex(index);
-
-    [AccessibilityClass(implementation="spark.accessibility.ButtonBarBaseAccImpl")]
-    /**
-     *  The ButtonBarBase class defines the common behavior for the ButtonBar, TabBar and similar subclasses.
-     *  This class does not add any new API however it refines selection, keyboard focus and keyboard navigation
-     *  behavior for the control's ItemRenderer elements.
-     *  This base class is not intended to be instantiated directly.
+import flash.events.Event;
+import flash.events.EventPhase;
+import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+import flash.ui.Keyboard;
+
+import mx.collections.IList;
+import mx.core.EventPriority;
+import mx.core.IFactory;
+import mx.core.ISelectableList;
+import mx.core.IVisualElement;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+import mx.events.IndexChangedEvent;
+import mx.managers.IFocusManagerComponent;
+
+import spark.components.ButtonBarButton;
+import spark.components.IItemRenderer;
+import spark.components.supportClasses.ButtonBase;
+import spark.events.IndexChangeEvent;
+import spark.events.RendererExistenceEvent;
+
+use namespace mx_internal;  // use of ListBase/setCurrentCaretIndex(index);
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  Orientation of the icon in relation to the label.
+ *  Valid MXML values are right, left,
+ *  bottom, and top.
+ *
+ *
In ActionScript, you can use the following constants
+ *  to set this property:
+ *  IconPlacement.RIGHT,
+ *  IconPlacement.LEFT,
+ *  IconPlacement.BOTTOM, and
+ *  IconPlacement.TOP.

+ *
+ *  @default IconPlacement.LEFT
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="iconPlacement", type="String", enumeration="top,bottom,right,left", inherit="no")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[AccessibilityClass(implementation="spark.accessibility.ButtonBarBaseAccImpl")]
+
+/**
+ *  The ButtonBarBase class defines the common behavior for the ButtonBar, TabBar and similar subclasses.
+ *  This class does not add any new API however it refines selection, keyboard focus and keyboard navigation
+ *  behavior for the control's ItemRenderer elements.
+ *  This base class is not intended to be instantiated directly.
+ *
+ *
Clicking on an ItemRenderer selects it by setting the selectedIndex and the
+ *  caretIndex properties.  If requireSelection is false, then clicking
+ *  again deselects it.  If the data provider is an ISelectableList object, then its
+ *  selectedIndex is set as well.

+ *
+ *
Arrow key events are handled by adjusting the caretIndex.
+ *  If arrowKeysWrapFocus is true, then the caretIndex wraps.
+ *  Pressing the Space key selects the ItemRenderer at the caretIndex.

+ *
+ *
The showsCaret property of the ItemRenderer at caretIndex
+ *  is set to true when the ButtonBarBase object has focus and
+ *  the caretIndex was reached as a consequence
+ *  of a keyboard gesture.
+ *  If the caretIndex was set as a side effect of responding to a
+ *  mouse click, then showsCaret is not set.

+ *
+ *
The allowDeselection property of ButtonBarButton
+ *  ItemRenderers is set to !requireSelection.

+ *
+ *  @mxml
+ *
+ *
The <s:ButtonBarBase> tag inherits all of the tag
+ *  attributes of its superclass and adds no new tag attributes:

+ *
+ *

+ *  <s:ButtonBarBase/>
+ *

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class ButtonBarBase extends ListBase
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class mixins
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Placeholder for mixin by ButtonBarBaseAccImpl.
+     */
+    mx_internal static var createAccessibilityImplementation:Function;
+
+    /**
+     *  Constructor.
      *
-     *
Clicking on an ItemRenderer selects it by setting the selectedIndex and the
-     *  caretIndex properties.  If requireSelection is false, then clicking
-     *  again deselects it.  If the data provider is an ISelectableList object, then its
-     *  selectedIndex is set as well.

-     *
-     *
Arrow key events are handled by adjusting the caretIndex.
-     *  If arrowKeysWrapFocus is true, then the caretIndex wraps.
-     *  Pressing the Space key selects the ItemRenderer at the caretIndex.

-     *
-     *
The showsCaret property of the ItemRenderer at caretIndex
-     *  is set to true when the ButtonBarBase object has focus and
-     *  the caretIndex was reached as a consequence
-     *  of a keyboard gesture.
-     *  If the caretIndex was set as a side effect of responding to a
-     *  mouse click, then showsCaret is not set.

-     *
-     *
The allowDeselection property of ButtonBarButton
-     *  ItemRenderers is set to !requireSelection.

-     *
-     *  @mxml
-     *
-     *
The <s:ButtonBarBase> tag inherits all of the tag
-     *  attributes of its superclass and adds no new tag attributes:

-     *
-     *

-     *  <s:ButtonBarBase/>
-     *

-     *
+     *
Initializes tab processing: tabbing to this component will give it the focus, but not
+     *  clicking on it with the mouse.  Tabbing to the children is disabled.

+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
+     */
+    public function ButtonBarBase()
+    {
+        super();
+
+        tabChildren = false;
+        tabEnabled = true;
+        tabFocusEnabled = true;
+        setCurrentCaretIndex(0);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  If false, don't show the focusRing for the tab at caretIndex, see
+     *  itemShowingCaret() below.
+     *
+     *  If the caret index changes because of something other than a arrow
+     *  or space keypress then we don't show the focus ring, i.e. we do not
+     *  set showsCaret=true for the item renderer at caretIndex.
+     *
+     *  This flag is valid at commitProperties() time.  It's set to false
+     *  if at least one selectedIndex change (see item_clickHandler()) occurred
+     *  because of a mouse click.
+     */
+    private var enableFocusHighlight:Boolean = true;
+
+    /**
+     *  @private
+     */
+    private var inCollectionChangeHandler:Boolean = false;
+
+    /**
+     *  @private
+     *  Used to distinguish item_clickHandler() calls initiated by the mouse, from calls
+     *  initiated by pressing the space bar.
+     */
+    private var inKeyUpHandler:Boolean = false;
+
+    /**
+     *  @private
+     *  Index of item that is currently pressed by the
+     *  spacebar.
+     */
+    private var pressedIndex:Number;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  dataProvider
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set dataProvider(value:IList):void
+    {
+        if (dataProvider is ISelectableList)
+        {
+            dataProvider.removeEventListener(FlexEvent.VALUE_COMMIT, dataProvider_changeHandler);
+            dataProvider.removeEventListener(IndexChangedEvent.CHANGE, dataProvider_changeHandler);
+        }
+
+        if (value is ISelectableList)
+        {
+            value.addEventListener(FlexEvent.VALUE_COMMIT, dataProvider_changeHandler, false, 0, true);
+            value.addEventListener(IndexChangedEvent.CHANGE, dataProvider_changeHandler, false, 0, true);
+        }
+
+        super.dataProvider = value;
+
+        if (value is ISelectableList)
+            selectedIndex = ISelectableList(dataProvider).selectedIndex;
+    }
+
+    //----------------------------------
+    //  iconField
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _iconField:String = "icon";
+
+    /**
+     *  @private
+     */
+    private var iconFieldOrFunctionChanged:Boolean;
+
+    /**
+     *  The name of the field in the data provider items which serves
+     *  as the icon to display.
+     *
+     *  The iconFunction property overrides this property.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function get iconField():String
+    {
+        return _iconField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set iconField(value:String):void
+    {
+        if (value == _iconField)
+            return;
+
+        _iconField = value;
+        iconFieldOrFunctionChanged = true;
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  iconFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _iconFunction:Function;
+
+    /**
+     *  A user-supplied function to run on each item to determine its icon.
+     *  The iconFunction property overrides
+     *  the iconField property.
+     *
+     *
You can supply an iconFunction that finds the
+     *  appropriate fields and returns a displayable icon.

+     *
+     *
The icon function takes a single argument which is the item in
+     *  the data provider and returns a valid BitmapImage source.

+     *

+     *  myIconFunction(item:Object):Object

+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4.5
+     */
+    public function get iconFunction():Function
+    {
+        return _iconFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set iconFunction(value:Function):void
+    {
+        if (value == _iconFunction)
+            return;
+
+        _iconFunction = value;
+        iconFieldOrFunctionChanged = true;
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  requireSelection
+    //----------------------------------
+
+    private var requireSelectionChanged:Boolean;
+
+    /**
+     *  @private
+     *  See commitProperties().
+     */
+    override public function set requireSelection(value:Boolean):void
+    {
+        if (value == requireSelection)
+            return;
+
+        super.requireSelection = value;
+        requireSelectionChanged = true;
+        invalidateProperties();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Called by the initialize() method of UIComponent
+     *  to hook in the accessibility code.
+     */
+    override protected function initializeAccessibility():void
+    {
+        if (ButtonBarBase.createAccessibilityImplementation != null)
+            ButtonBarBase.createAccessibilityImplementation(this);
+    }
+
+    /**
+     *  @private
+     *  if the collection is changing and the collection is a viewstack
+     *  the viewstack will also adjust the selection and notify us
+     *  via dataProvider_changeHandler so we want to
+     *  ignore calls to adjustSelection that the base class
+     *  calls so we don't increment or decrement
+     *  selectedIndex twice
+     */
+    override protected function dataProvider_collectionChangeHandler(event:Event):void
+    {
+        inCollectionChangeHandler = true;
+
+        super.dataProvider_collectionChangeHandler(event);
+
+        inCollectionChangeHandler = false;
+
+    }
+
+    /**
+     *  @private
+     */
+    override protected function adjustSelection(newIndex:int, add:Boolean=false):void
+    {
+        // see comment in dataProvider_collectionChangeHandler
+        if (inCollectionChangeHandler && dataProvider is ISelectableList)
+            return;
+
+        super.adjustSelection(newIndex, add);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (requireSelectionChanged && dataGroup)
+        {
+            requireSelectionChanged = false;
+            const n:int = dataGroup.numElements;
+            for (var i:int = 0; i < n; i++)
+            {
+                var renderer:ButtonBarButton = dataGroup.getElementAt(i) as ButtonBarButton;
+                if (renderer)
+                    renderer.allowDeselection = !requireSelection;
+            }
+        }
+
+        if (iconFieldOrFunctionChanged)
+        {
+            updateRendererIcons();
+            iconFieldOrFunctionChanged = false;
+        }
+
+        enableFocusHighlight = true;
+    }
+
+    /**
+     *  @private
+     *  Return the item renderer at the specified index, or null.
+     */
+    private function getItemRenderer(index:int):IVisualElement
+    {
+        if (!dataGroup || (index < 0) || (index >= dataGroup.numElements))
+            return null;
+
+        return dataGroup.getElementAt(index);
+    }
+
+    /**
+     *  @private
+     *  Called when setCurrentCaretIndex() moves the caret, or when it's moved as a consequence
+     *  of items being moved/removed.   See ListBase/caretIndexAdjusted.
+     */
+    override protected function itemShowingCaret(index:int, showsCaret:Boolean):void
+    {
+        super.itemShowingCaret(index, showsCaret);
+
+        const renderer:IVisualElement = getItemRenderer(index);
+        if (renderer)
+        {
+            const hasFocus:Boolean = focusManager && (focusManager.getFocus() == this);
+            renderer.depth = (showsCaret) ? 1 : 0;
+            if (renderer is IItemRenderer)
+                IItemRenderer(renderer).showsCaret = showsCaret && enableFocusHighlight && hasFocus;
+        }
+    }
+
+    /**
+     *  @private
+     *  Called when the focus is gained/lost by tabbing in or out.
+     */
+    override public function drawFocus(isFocused:Boolean):void
+    {
+        const renderer:IVisualElement = getItemRenderer(caretIndex);
+        if (renderer)
+        {
+            renderer.depth = (isFocused) ? 1 : 0;
+            if (renderer is IItemRenderer)
+                IItemRenderer(renderer).showsCaret = isFocused;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function itemSelected(index:int, selected:Boolean):void
+    {
+        super.itemSelected(index, selected);
+
+        const renderer:IItemRenderer = getItemRenderer(index) as IItemRenderer;
+        if (renderer)
+        {
+            if (selected)
+                setCurrentCaretIndex(index);  // causes itemShowingCaret() call
+            renderer.selected = selected;
+        }
+
+        if ((dataProvider is ISelectableList) && selected)
+            ISelectableList(dataProvider).selectedIndex = index;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function partAdded(partName:String, instance:Object):void
+    {
+        super.partAdded(partName, instance);
+
+        if (instance == dataGroup)
+        {
+            dataGroup.addEventListener(RendererExistenceEvent.RENDERER_ADD, dataGroup_rendererAddHandler);
+            dataGroup.addEventListener(RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function partRemoved(partName:String, instance:Object):void
+    {
+        if (instance == dataGroup)
+        {
+            dataGroup.removeEventListener(RendererExistenceEvent.RENDERER_ADD, dataGroup_rendererAddHandler);
+            dataGroup.removeEventListener(RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler);
+        }
+
+        super.partRemoved(partName, instance);
+    }
+
+    /**
+     *  @private
+     *  Detected changes to iconPlacement and update as necessary.
      */
-    public class ButtonBarBase extends ListBase
-    {
-        include "../../core/Version.as";
-
-        //--------------------------------------------------------------------------
-        //
-        //  Class mixins
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         *  Placeholder for mixin by ButtonBarBaseAccImpl.
-         */
-        mx_internal static var createAccessibilityImplementation:Function;
-
-        /**
-         *  Constructor.
-         *
-         *
Initializes tab processing: tabbing to this component will give it the focus, but not
-         *  clicking on it with the mouse.  Tabbing to the children is disabled.

-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public function ButtonBarBase()
-        {
-            super();
-
-            tabChildren = false;
-            tabEnabled = true;
-            tabFocusEnabled = true;
-            setCurrentCaretIndex(0);
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Variables
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         *  If false, don't show the focusRing for the tab at caretIndex, see
-         *  itemShowingCaret() below.
-         *
-         *  If the caret index changes because of something other than a arrow
-         *  or space keypress then we don't show the focus ring, i.e. we do not
-         *  set showsCaret=true for the item renderer at caretIndex.
-         *
-         *  This flag is valid at commitProperties() time.  It's set to false
-         *  if at least one selectedIndex change (see item_clickHandler()) occurred
-         *  because of a mouse click.
-         */
-        private var enableFocusHighlight:Boolean = true;
-
-        /**
-         *  @private
-         */
-        private var inCollectionChangeHandler:Boolean = false;
-
-        /**
-         *  @private
-         *  Used to distinguish item_clickHandler() calls initiated by the mouse, from calls
-         *  initiated by pressing the space bar.
-         */
-        private var inKeyUpHandler:Boolean = false;
-
-        /**
-         *  @private
-         *  Index of item that is currently pressed by the
-         *  spacebar.
-         */
-        private var pressedIndex:Number;
-
-        //--------------------------------------------------------------------------
-        //
-        //  Overridden Properties
-        //
-        //--------------------------------------------------------------------------
-
-        //----------------------------------
-        //  dataProvider
-        //----------------------------------
-
-        /**
-         *  @private
-         */
-        override public function set dataProvider(value:IList):void
-        {
-            if (dataProvider is ISelectableList)
+    override public function styleChanged(styleProp:String):void
+    {
+        if (!styleProp ||
+            styleProp == "styleName" || styleProp == "iconPlacement")
+        {
+            // Cause icon association to reoccur, taking into consideration
+            // the new placement.
+            iconFieldOrFunctionChanged = true;
+            invalidateProperties();
+        }
+
+        super.styleChanged(styleProp);
+    }
+
+    /**
+     *  @private
+     */
+    override public function updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void
+    {
+        itemToIcon(renderer, data);
+        super.updateRenderer(renderer, itemIndex, data);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function itemToIcon(renderer:IVisualElement, item:Object):void
+    {
+        if (!(renderer is ButtonBase))
+            return;
+
+        // Assign iconPlacement if appropriate.
+        var iconPlacement:String = getStyle("iconPlacement");
+        if (iconPlacement)
+            ButtonBase(renderer).setStyle("iconPlacement", iconPlacement);
+
+        // iconFunction takes precedence.
+        if (_iconFunction != null)
+        {
+            ButtonBase(renderer).icon = _iconFunction(item);
+            return;
+        }
+
+        // iconField
+        if (_iconField && _iconField.length > 0)
+        {
+            if (item is Object)
             {
-                dataProvider.removeEventListener(FlexEvent.VALUE_COMMIT, dataProvider_changeHandler);
-                dataProvider.removeEventListener(IndexChangedEvent.CHANGE, dataProvider_changeHandler);
-            }
-
-            if (value is ISelectableList)
-            {
-                value.addEventListener(FlexEvent.VALUE_COMMIT, dataProvider_changeHandler, false, 0, true);
-                value.addEventListener(IndexChangedEvent.CHANGE, dataProvider_changeHandler, false, 0, true);
-            }
-
-            super.dataProvider = value;
-
-            if (value is ISelectableList)
-                selectedIndex = ISelectableList(dataProvider).selectedIndex;
-        }
-
-        //----------------------------------
-        //  iconField
-        //----------------------------------
-
-        /**
-         *  @private
-         */
-        private var _iconField:String;
-
-        /**
-         *  @private
-         */
-        private var iconFieldOrFunctionChanged:Boolean;
-
-        /**
-         *  The name of the field in the data provider items which serves
-         *  as the icon to display.
-         *
-         *  The iconFunction property overrides this property.
-         *
-         *  @default null
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4.5
-         */
-        public function get iconField():String
-        {
-            return _iconField;
-        }
-
-        /**
-         *  @private
-         */
-        public function set iconField(value:String):void
-        {
-            if (value == _iconField)
-                return
-
-                _iconField = value;
-            iconFieldOrFunctionChanged = true;
-            invalidateProperties();
-        }
-
-        //----------------------------------
-        //  iconFunction
-        //----------------------------------
-
-        /**
-         *  @private
-         */
-        private var _iconFunction:Function;
-
-        /**
-         *  A user-supplied function to run on each item to determine its icon.
-         *  The iconFunction property overrides
-         *  the iconField property.
-         *
-         *
You can supply an iconFunction that finds the
-         *  appropriate fields and returns a displayable icon.

-         *
-         *
The icon function takes a single argument which is the item in
-         *  the data provider and returns a valid BitmapImage source.

-         *

-         *  myIconFunction(item:Object):Object

-         *
-         *  @default null
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4.5
-         */
-        public function get iconFunction():Function
-        {
-            return _iconFunction;
-        }
-
-        /**
-         *  @private
-         */
-        public function set iconFunction(value:Function):void
-        {
-            if (value == _iconFunction)
-                return
-
-                _iconFunction = value;
-            iconFieldOrFunctionChanged = true;
-            invalidateProperties();
-        }
-
-        //----------------------------------
-        //  requireSelection
-        //----------------------------------
-
-        private var requireSelectionChanged:Boolean;
-
-        /**
-         *  @private
-         *  See commitProperties().
-         */
-        override public function set requireSelection(value:Boolean):void
-        {
-            if (value == requireSelection)
-                return;
-
-            super.requireSelection = value;
-            requireSelectionChanged = true;
-            invalidateProperties();
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Overridden Methods
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         *  Called by the initialize() method of UIComponent
-         *  to hook in the accessibility code.
-         */
-        override protected function initializeAccessibility():void
-        {
-            if (ButtonBarBase.createAccessibilityImplementation != null)
-                ButtonBarBase.createAccessibilityImplementation(this);
-        }
-
-        /**
-         *  @private
-         *  if the collection is changing and the collection is a viewstack
-         *  the viewstack will also adjust the selection and notify us
-         *  via dataProvider_changeHandler so we want to
-         *  ignore calls to adjustSelection that the base class
-         *  calls so we don't increment or decrement
-         *  selectedIndex twice
-         */
-        override protected function dataProvider_collectionChangeHandler(event:Event):void
-        {
-            inCollectionChangeHandler = true;
-
-            super.dataProvider_collectionChangeHandler(event);
-
-            inCollectionChangeHandler = false;
-
-        }
-
-        /**
-         *  @private
-         */
-        override protected function adjustSelection(newIndex:int, add:Boolean=false):void
-        {
-            // see comment in dataProvider_collectionChangeHandler
-            if (inCollectionChangeHandler && dataProvider is ISelectableList)
-                return;
-
-            super.adjustSelection(newIndex, add);
-        }
-
-        /**
-         *  @private
-         */
-        override protected function commitProperties():void
-        {
-            super.commitProperties();
-
-            if (requireSelectionChanged && dataGroup)
-            {
-                requireSelectionChanged = false;
-                const n:int = dataGroup.numElements;
-                for (var i:int = 0; i < n; i++)
+                try
                 {
-                    var renderer:ButtonBarButton = dataGroup.getElementAt(i) as ButtonBarButton;
-                    if (renderer)
-                        renderer.allowDeselection = !requireSelection;
+                    if (item[_iconField] != null)
+                    {
+                        ButtonBase(renderer).icon = item[_iconField];
+                        return;
+                    }
+                }
+                catch(e:Error)
+                {
                 }
             }
-
-            if (iconFieldOrFunctionChanged)
+        }
+
+        ButtonBase(renderer).icon = null;
+    }
+
+    /**
+     *  @private
+     */
+    private function updateRendererIcons():void
+    {
+        if (!dataGroup)
+            return;
+
+        const count:int = dataGroup.numElements;
+        for (var i:int = 0; i < count; i++)
+        {
+            var renderer:IItemRenderer = dataGroup.getElementAt(i) as IItemRenderer;
+            if (renderer && renderer.data)
+                itemToIcon(renderer, renderer.data);
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event Handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function dataProvider_changeHandler(event:Event):void
+    {
+        selectedIndex = ISelectableList(dataProvider).selectedIndex;
+    }
+
+    /**
+     *  @private
+     */
+    private function dataGroup_rendererAddHandler(event:RendererExistenceEvent):void
+    {
+        const renderer:IVisualElement = event.renderer;
+        if (renderer)
+        {
+            renderer.addEventListener(MouseEvent.CLICK, item_clickHandler);
+            if (renderer is IFocusManagerComponent)
+                IFocusManagerComponent(renderer).focusEnabled = false;
+            if (renderer is ButtonBarButton)
+                ButtonBarButton(renderer).allowDeselection = !requireSelection;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function dataGroup_rendererRemoveHandler(event:RendererExistenceEvent):void
+    {
+        const renderer:IVisualElement = event.renderer;
+        if (renderer)
+            renderer.removeEventListener(MouseEvent.CLICK, item_clickHandler);
+    }
+
+    /**
+     *  @private
+     *  Called synchronously when the space bar is pressed or the mouse is clicked.
+     */
+    private function item_clickHandler(event:MouseEvent):void
+    {
+        var newIndex:int;
+        if (event.currentTarget is IItemRenderer)
+            newIndex = IItemRenderer(event.currentTarget).itemIndex;
+        else
+            newIndex = dataGroup.getElementIndex(event.currentTarget as IVisualElement);
+
+        var oldSelectedIndex:int = selectedIndex;
+        if (newIndex == selectedIndex)
+        {
+            if (!requireSelection)
+                setSelectedIndex(NO_SELECTION, true);
+        }
+        else
+            setSelectedIndex(newIndex, true);
+
+        // Changing the selectedIndex typically causes a call to itemSelected() at
+        // commitProperties() time.   We'll update the caretIndex then.  If this
+        // method was -not- called as a consequence of a keypress, we will not show
+        // the focus highlight at caretIndex.  See itemShowingCaret().
+
+        if (enableFocusHighlight && (selectedIndex != oldSelectedIndex))
+            enableFocusHighlight = inKeyUpHandler;
+    }
+
+    /**
+     *  @private
+     *  Increment or decrement the caretIndex.  Wrap if arrowKeysWrapFocus=true.
+     */
+    private function adjustCaretIndex(delta:int):void
+    {
+        if (!dataGroup || (caretIndex < 0))
+            return;
+
+        const oldCaretIndex:int = caretIndex;
+        const length:int = dataGroup.numElements;
+
+        if (arrowKeysWrapFocus)
+            setCurrentCaretIndex((caretIndex + delta + length) % length);
+        else
+            setCurrentCaretIndex(Math.min(length - 1, Math.max(0, caretIndex + delta)));
+
+        if (oldCaretIndex != caretIndex)
+            dispatchEvent(new IndexChangeEvent(IndexChangeEvent.CARET_CHANGE, false, false, oldCaretIndex, caretIndex));
+    }
+
+    /**
+     *  @private
+     */
+    override protected function keyDownHandler(event:KeyboardEvent):void
+    {
+        if (event.eventPhase == EventPhase.BUBBLING_PHASE)
+            return;
+
+        if (!enabled || !dataGroup || event.isDefaultPrevented())
+            return;
+
+        // Block input if space bar is being held down.
+        if (!isNaN(pressedIndex))
+        {
+            event.preventDefault();
+            return;
+        }
+
+        super.keyDownHandler(event);
+
+        // If rtl layout, need to swap LEFT/UP and RIGHT/DOWN so correct action
+        // is done.
+        var keyCode:uint = mapKeycodeForLayoutDirection(event, true);
+
+        switch (keyCode)
+        {
+            case Keyboard.UP:
+            case Keyboard.LEFT:
             {
-                updateRendererIcons();
-                iconFieldOrFunctionChanged = false;
+                adjustCaretIndex(-1);
+                event.preventDefault();
+                break;
             }
-
-            enableFocusHighlight = true;
-        }
-
-        /**
-         *  @private
-         *  Return the item renderer at the specified index, or null.
-         */
-        private function getItemRenderer(index:int):IVisualElement
-        {
-            if (!dataGroup || (index < 0) || (index >= dataGroup.numElements))
-                return null;
-
-            return dataGroup.getElementAt(index);
-        }
-
-        /**
-         *  @private
-         *  Called when setCurrentCaretIndex() moves the caret, or when it's moved as a consequence
-         *  of items being moved/removed.   See ListBase/caretIndexAdjusted.
-         */
-        override protected function itemShowingCaret(index:int, showsCaret:Boolean):void
-        {
-            super.itemShowingCaret(index, showsCaret);
-
-            const renderer:IVisualElement = getItemRenderer(index);
-            if (renderer)
+            case Keyboard.DOWN:
+            case Keyboard.RIGHT:
             {
-                const hasFocus:Boolean = focusManager && (focusManager.getFocus() == this);
-                renderer.depth = (showsCaret) ? 1 : 0;
-                if (renderer is IItemRenderer)
-                    IItemRenderer(renderer).showsCaret = showsCaret && enableFocusHighlight && hasFocus;
-            }
-        }
-
-        /**
-         *  @private
-         *  Called when the focus is gained/lost by tabbing in or out.
-         */
-        override public function drawFocus(isFocused:Boolean):void
-        {
-            const renderer:IVisualElement = getItemRenderer(caretIndex);
-            if (renderer)
+                adjustCaretIndex(+1);
+                event.preventDefault();
+                break;
+            }
+            case Keyboard.SPACE:
             {
-                renderer.depth = (isFocused) ? 1 : 0;
-                if (renderer is IItemRenderer)
-                    IItemRenderer(renderer).showsCaret = isFocused;
-            }
-        }
-
-        /**
-         *  @private
-         */
-        override protected function itemSelected(index:int, selected:Boolean):void
-        {
-            super.itemSelected(index, selected);
-
-            const renderer:IItemRenderer = getItemRenderer(index) as IItemRenderer;
-            if (renderer)
+                const renderer:IItemRenderer = getItemRenderer(caretIndex) as IItemRenderer;
+                if (renderer && ((!renderer.selected && requireSelection) || !requireSelection))
+                {
+                    renderer.dispatchEvent(event);
+                    pressedIndex = caretIndex;
+                }
+                break;
+            }
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function keyUpHandler(event:KeyboardEvent):void
+    {
+        if (event.eventPhase == EventPhase.BUBBLING_PHASE)
+            return;
+
+        if (!enabled)
+            return;
+
+        super.keyUpHandler(event);
+
+        switch (event.keyCode)
+        {
+            case Keyboard.SPACE:
             {
-                if (selected)
-                    setCurrentCaretIndex(index);  // causes itemShowingCaret() call
-                renderer.selected = selected;
-            }
-
-            if ((dataProvider is ISelectableList) && selected)
-                ISelectableList(dataProvider).selectedIndex = index;
-        }
-
-        /**
-         *  @private
-         */
-        override protected function partAdded(partName:String, instance:Object):void
-        {
-            super.partAdded(partName, instance);
-
-            if (instance == dataGroup)
-            {
-                dataGroup.addEventListener(RendererExistenceEvent.RENDERER_ADD, dataGroup_rendererAddHandler);
-                dataGroup.addEventListener(RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler);
-            }
-        }
-
-        /**
-         *  @private
-         */
-        override protected function partRemoved(partName:String, instance:Object):void
-        {
-            if (instance == dataGroup)
-            {
-                dataGroup.removeEventListener(RendererExistenceEvent.RENDERER_ADD, dataGroup_rendererAddHandler);
-                dataGroup.removeEventListener(RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler);
-            }
-
-            super.partRemoved(partName, instance);
-        }
-
-        /**
-         *  @private
-         */
-        override public function updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void
-        {
-            itemToIcon(renderer, data);
-            super.updateRenderer(renderer, itemIndex, data);
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Methods
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         */
-        private function itemToIcon(renderer:IVisualElement, item:Object):void
-        {
-            if (!(renderer is ButtonBase))
-                return;
-
-            // iconFunction takes precedence.
-            if (_iconFunction != null)
-            {
-                ButtonBase(renderer).icon = _iconFunction(item);
-                return;
-            }
-
-            // iconField
-            if (_iconField && _iconField.length > 0)
-            {
-                if (item is Object)
+                inKeyUpHandler = true;
+
+                // Need to check pressedIndex for NaN for the case when key up
+                // happens on an already selected renderer and under the condition
+                // that requireSelection=true.
+                if (!isNaN(pressedIndex))
                 {
-                    try
-                    {
-                        if (item[_iconField] != null)
-                        {
-                            ButtonBase(renderer).icon = item[_iconField];
-                            return;
-                        }
-                    }
-                    catch(e:Error)
-                    {
-                    }
-                }
-            }
-        }
-
-        /**
-         *  @private
-         */
-        private function updateRendererIcons():void
-        {
-            if (!dataGroup)
-                return;
-
-            const count:int = dataGroup.numElements;
-            for (var i:int = 0; i < count; i++)
-            {
-                var renderer:IItemRenderer = dataGroup.getElementAt(i) as IItemRenderer;
-                if (renderer && renderer.data)
-                    itemToIcon(renderer, renderer.data);
-            }
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Event Handlers
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         */
-        private function dataProvider_changeHandler(event:Event):void
-        {
-            selectedIndex = ISelectableList(dataProvider).selectedIndex;
-        }
-
-        /**
-         *  @private
-         */
-        private function dataGroup_rendererAddHandler(event:RendererExistenceEvent):void
-        {
-            const renderer:IVisualElement = event.renderer;
-            if (renderer)
-            {
-                renderer.addEventListener(MouseEvent.CLICK, item_clickHandler);
-                if (renderer is IFocusManagerComponent)
-                    IFocusManagerComponent(renderer).focusEnabled = false;
-                if (renderer is ButtonBarButton)
-                    ButtonBarButton(renderer).allowDeselection = !requireSelection;
-            }
-        }
-
-        /**
-         *  @private
-         */
-        private function dataGroup_rendererRemoveHandler(event:RendererExistenceEvent):void
-        {
-            const renderer:IVisualElement = event.renderer;
-            if (renderer)
-                renderer.removeEventListener(MouseEvent.CLICK, item_clickHandler);
-        }
-
-        /**
-         *  @private
-         *  Called synchronously when the space bar is pressed or the mouse is clicked.
-         */
-        private function item_clickHandler(event:MouseEvent):void
-        {
-            var newIndex:int;
-            if (event.currentTarget is IItemRenderer)
-                newIndex = IItemRenderer(event.currentTarget).itemIndex;
-            else
-                newIndex = dataGroup.getElementIndex(event.currentTarget as IVisualElement);
-
-            var oldSelectedIndex:int = selectedIndex;
-            if (newIndex == selectedIndex)
-            {
-                if (!requireSelection)
-                    setSelectedIndex(NO_SELECTION, true);
-            }
-            else
-                setSelectedIndex(newIndex, true);
-
-            // Changing the selectedIndex typically causes a call to itemSelected() at
-            // commitProperties() time.   We'll update the caretIndex then.  If this
-            // method was -not- called as a consequence of a keypress, we will not show
-            // the focus highlight at caretIndex.  See itemShowingCaret().
-
-            if (enableFocusHighlight && (selectedIndex != oldSelectedIndex))
-                enableFocusHighlight = inKeyUpHandler;
-        }
-
-        /**
-         *  @private
-         *  Increment or decrement the caretIndex.  Wrap if arrowKeysWrapFocus=true.
-         */
-        private function adjustCaretIndex(delta:int):void
-        {
-            if (!dataGroup || (caretIndex < 0))
-                return;
-
-            const oldCaretIndex:int = caretIndex;
-            const length:int = dataGroup.numElements;
-
-            if (arrowKeysWrapFocus)
-                setCurrentCaretIndex((caretIndex + delta + length) % length);
-            else
-                setCurrentCaretIndex(Math.min(length - 1, Math.max(0, caretIndex + delta)));
-
-            if (oldCaretIndex != caretIndex)
-                dispatchEvent(new IndexChangeEvent(IndexChangeEvent.CARET_CHANGE, false, false, oldCaretIndex, caretIndex));
-        }
-
-        /**
-         *  @private
-         */
-        override protected function keyDownHandler(event:KeyboardEvent):void
-        {
-            if (event.eventPhase == EventPhase.BUBBLING_PHASE)
-                return;
-
-            if (!enabled || !dataGroup || event.isDefaultPrevented())
-                return;
-
-            // Block input if space bar is being held down.
-            if (!isNaN(pressedIndex))
-            {
-                event.preventDefault();
-                return;
-            }
-
-            super.keyDownHandler(event);
-
-            // If rtl layout, need to swap LEFT/UP and RIGHT/DOWN so correct action
-            // is done.
-            var keyCode:uint = mapKeycodeForLayoutDirection(event, true);
-
-            switch (keyCode)
-            {
-                case Keyboard.UP:
-                case Keyboard.LEFT:
-                {
-                    adjustCaretIndex(-1);
-                    event.preventDefault();
-                    break;
-                }
-                case Keyboard.DOWN:
-                case Keyboard.RIGHT:
-                {
-                    adjustCaretIndex(+1);
-                    event.preventDefault();
-                    break;
-                }
-                case Keyboard.SPACE:
-                {
-                    const renderer:IItemRenderer = getItemRenderer(caretIndex) as IItemRenderer;
+                    // Dispatch key up to the previously pressed item in case focus was lost
+                    // through other interaction (e.g. mouse clicks, etc...)
+                    const renderer:IItemRenderer = getItemRenderer(pressedIndex) as IItemRenderer;
                     if (renderer && ((!renderer.selected && requireSelection) || !requireSelection))
                     {
                         renderer.dispatchEvent(event);
-                        pressedIndex = caretIndex;
+                        pressedIndex = NaN;
                     }
-                    break;
-                }
-            }
-        }
-
-        /**
-         *  @private
-         */
-        override protected function keyUpHandler(event:KeyboardEvent):void
-        {
-            if (event.eventPhase == EventPhase.BUBBLING_PHASE)
-                return;
-
-            if (!enabled)
-                return;
-
-            super.keyUpHandler(event);
-
-            switch (event.keyCode)
-            {
-                case Keyboard.SPACE:
-                {
-                    inKeyUpHandler = true;
-
-                    // Need to check pressedIndex for NaN for the case when key up
-                    // happens on an already selected renderer and under the condition
-                    // that requireSelection=true.
-                    if (!isNaN(pressedIndex))
-                    {
-                        // Dispatch key up to the previously pressed item in case focus was lost
-                        // through other interaction (e.g. mouse clicks, etc...)
-                        const renderer:IItemRenderer = getItemRenderer(pressedIndex) as IItemRenderer;
-                        if (renderer && ((!renderer.selected && requireSelection) || !requireSelection))
-                        {
-                            renderer.dispatchEvent(event);
-                            pressedIndex = NaN;
-                        }
-                    }
-                    inKeyUpHandler = false;
-                    break;
-                }
-            }
-        }
-    }
+                }
+                inKeyUpHandler = false;
+                break;
+            }
+        }
+    }
+}
 }


Use Matrix concat

Use Matrix concat

--- frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformCompoundModel.as
+++ frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformCompoundModel.as
@@ -32,7 +32,7 @@
 				for (var i:int = 1; i < length; i++)
 				{
 					var current:Matrix = (value[i] as ITransformModel).matrix;
-					concat(product, current);
+					product.concat(current);
 				}
 				matrix = product;
 			} else
@@ -40,31 +40,5 @@
 				matrix = null;
 			}
 		}
-
-		private function concat(product:Matrix, factor:Matrix):void
-		{
-			var result_a:Number = product.a * factor.a;
-			var result_b:Number = 0.0;
-			var result_c:Number = 0.0;
-			var result_d:Number = product.d * factor.d;
-			var result_tx:Number = product.tx * factor.a + factor.tx;
-			var result_ty:Number = product.ty * factor.d + factor.ty;
-			if (product.b != 0.0 || product.c != 0.0 || factor.b != 0.0 || factor.c != 0.0)
-			{
-				result_a = result_a + product.b * factor.c;
-				result_d = result_d + product.c * factor.b;
-				result_b = result_b + (product.a * factor.b + product.b * factor.d);
-				result_c = result_c + (product.c * factor.a + product.d * factor.c);
-				result_tx = result_tx + product.ty * factor.c;
-				result_ty = result_ty + product.tx * factor.b;
-			}
-			product.a = result_a;
-			product.b = result_b;
-			product.c = result_c;
-			product.d = result_d;
-			product.tx = result_tx;
-			product.ty = result_ty;
-		}
-
 	}
-}+}


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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridSelectionMode.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridSelectionMode.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: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

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

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

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

--- frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as
+++ frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2011 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.globalization.supportClasses
 {


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

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

 	/**
 	 *  The name of the property being changed.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var name:String;

@@ -63,11 +78,21 @@

 	/**
 	 *  Storage for the value property.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	private var _value:*;

 	/**
 	 *  The new value for the property.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get value():*
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 20013
Author:   harishs@adobe.com
Date:     2011-01-31T15:32:09.255609Z

Log Message:
-----------
QE notes: Globalization changes. Full cyclone run has been done. Default locale changes and sort bug fixes since Dec 14 2010
Doc notes: ASDOC comments for all classes have been updated.
Bugs: SDK-29132 SDK-29127 SDK-28163  SDK-29075 SDK-28600 SDK-28492 SDK-28856

Reviewer: Gordon Smith, Xie Fang, Zhigang Qi
Tests run: cyclone and checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/SortField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/NumberValidatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ISort.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationValidatorBase.as</path>
<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/framework/src/mx/collections/ISortField.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/collections/Sort.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/NumberValidator.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/projects/spark/src/spark/validators/CurrencyValidator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/collections/SortField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</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/spark/src/spark/validators/supportClasses/GlobalizationUtils.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/SortingCollator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/StringTools.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/framework/src/mx/collections/Sort.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberFormatterBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/MatchingCollator.as</path>

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

--- frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as
+++ frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as
@@ -103,23 +103,23 @@
      *

      *
Inheriting the style from a UIComponent by calling
      *          the UIComponent's addStyleClient method with
-     *          an instance of this object as the parameter.

+	 * 			an instance of this object as the parameter.

      *
By using the class in an MXML declaration and inheriting the
      *          locale style from the document that contains the
      *          declaration.
-     *  <listing version="3.0">
+     *

      *  <fx:Declarations>
      *         <s:SortingCollator id="collator" />
      *  </fx:Declarations>
-     *  </listing>
+     *

      *

      *
By using an MXML declaration and specifying the
      *          locale value in the list of assignments.
-     *  <listing version="3.0">
+     *

      *  <fx:Declarations>
      *      <s:SortingCollator id="collator_german" locale="de-DE" />
      *  </fx:Declarations>
-     *  </listing>
+     *

      *

      *
Calling the setStyle method, e.g.
      *              collator.setStyle("locale", "de-DE")

@@ -131,8 +131,9 @@
      *  lastOperationStatus property to
      *  spark.globalization.LastOperationStatus.LOCALE_UNDEFINED_ERROR.

      *
-     *  @param initialMode Sets the initial collation options for two use cases: sorting and matching.
-     *
+     *  @param initialMode Sets the initial collation options for two use
+     *  cases: sorting and matching.
+     *
      *  @see flash.globalization.Collator
      *  @see spark.globalization.LastOperationStatus
      *  @langversion 3.0
@@ -154,16 +155,32 @@
     //--------------------------------------------------------------------------

     // Actual instance of the working flash.globalization.Collator instance.
-    private var g11nWorkingInstance:flash.globalization.Collator;
+    private var _g11nWorkingInstance:flash.globalization.Collator;

     /**
      *  @private
-     *  Basic properies of the actual underlying working instance.
-     *
-     *  This object can be a flash.globalization.Collator instance OR
-     *  an object that contains the fallback's propery set.
-     */
-    mx_internal var properties:Object = null;
+     *  If the g11nWorkingInstance has not been defined. Call
+     *  ensureStyleSource to ensure that there is a styleParent. If there is
+     *  not a style parent, then this instance will be added as a style client
+     *  to the topLevelApplication. As a side effect of this, the styleChanged
+     *  method will be called and if there is a locale style defined for the
+     *  topLevelApplication, the createWorkingInstance method will be
+     *  executed creating a g11nWorkingInstance.
+     */
+    private function get g11nWorkingInstance ():
+        flash.globalization.Collator
+    {
+        if (!_g11nWorkingInstance)
+            ensureStyleSource();
+
+        return _g11nWorkingInstance;
+    }
+
+    private function set g11nWorkingInstance
+        (flashCollator:flash.globalization.Collator): void
+    {
+        _g11nWorkingInstance = flashCollator;
+    }

     // Cache for the given initialMode through the constructor.
     private var initialMode:String = null;


AudioTransmit: Improved error when connected

If AudioTransmit already is connected, and the user tries to
connect again, it now gives the appropriate error message.

--- src/com/axis/ErrorManager.as
+++ src/com/axis/ErrorManager.as
@@ -99,7 +99,7 @@
       '814': "Already connected to microphone.",
       '815': "No audio transmit url provided.",
       '816': "Denied access to microphone.",
-      '817': "Already connected to microphone.",
+      '817': "Audio transmit already connected.",
       '818': "No audio transmit url provided."
     };


Transferred from the Adobe Open Source Subversion Repository

Revision: 17974
Author:   chiedozi@adobe.com
Date:     2010-09-30T22:31:01.157712Z

Log Message:
-----------
Fixed a small memory leak in ViewTransition and SlideViewTransition

QE notes:
Doc notes:
Bugs: SDK-28010
Reviewer: Jason SJ
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/ViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/SlideViewTransition.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
@@ -467,6 +467,10 @@
         if (cachedNavigator)
             cachedNavigator = null;

+        // Clear references
+        parentNavigator = null;
+        targetNavigator = null;
+        actionBar = null;
         effect = null;

         super.transitionComplete(event);


Transferred from the Adobe Open Source Subversion Repository

Revision: 19826
Author:   cframpto@adobe.com
Date:     2011-01-20T17:04:00.862614Z

Log Message:
-----------
Revert 19582.  It isn't really doing anything but it is not the right fix so remove it.

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

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
@@ -494,15 +494,6 @@
         if (DropDownListBase.createAccessibilityImplementation != null)
             DropDownListBase.createAccessibilityImplementation(this);
     }
-
-	/**
-	 *  @private
-	 */
-	override protected function isOurFocus(target:DisplayObject):Boolean
-	{
-		return (openButton && target == openButton) || super.isOurFocus(target);
-	}
-
     /**
      *  @private
      */


messageToString 时忽略下划线开始的变量

messageToString 时忽略下划线开始的变量

--- as3/com/netease/protobuf/messageToString.as
+++ as3/com/netease/protobuf/messageToString.as
@@ -13,12 +13,15 @@
 		var s:String = getQualifiedClassName(message) + "(\n"
 		const descriptor:XML = describeType(message)
 		for each (var getter:String in descriptor.accessor.(@access != "writeonly").@name) {
-			if (getter.search(/^has(.)(.*)$/) != -1) {
+			if (getter.search(/^has[A-Z]/) != -1) {
 				continue
 			}
 			s += fieldToString(message, descriptor, getter)
 		}
 		for each (var field:String in descriptor.variable.@name) {
+			if (field.search(/^_/) != -1) {
+				continue
+			}
 			s += fieldToString(message, descriptor, field)
 		}
 		for (var k:* in message) {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3478
Author:   gruehle@adobe.com
Date:     2008-10-03T20:34:49.967693Z

Log Message:
-----------
Remove prototype Gumbo Panel component. This will be reinstated in a future build.

Remove the "selected" property from SkinnableComponent. "selected" is only on ToggleButton (including CheckBox/RadioButton), and ItemRenderer.

Bugs: SDK-16349 SkinnableComponent shouldn't define "selected"
      SDK-16799 Gumbo Panel needs to be removed from build
QA: Tests using Panel need to be updated
Reviewer: Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/flex4/flex4test.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Panel.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/Flex4Classes.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/MXMLComponent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ComplexPanelSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -73,23 +73,6 @@
     //  Properties
     //
     //--------------------------------------------------------------------------
-
-    private var _selected:Boolean = false;
-
-    public function get selected():Boolean
-    {
-        return _selected;
-    }
-
-    public function set selected(value:Boolean):void
-    {
-        if (_selected == value)
-            return;
-
-        _selected = value;
-
-        // TODO: Send notification
-    }

     // we need all these getters/setters around skinObject so it
     // can be a public read-only Bindable variable and a protected


Transferred from the Adobe Open Source Subversion Repository

Revision: 18635
Author:   aharui@adobe.com
Date:     2010-11-17T00:18:36.469040Z

Log Message:
-----------
Add estimatedSizes to the layout infrastructure to better deal with text reflow.
Add new events to layout infrastructure to deal with caching of size information

QE notes: New APIs and Interfaces
Doc notes: New APIs and interfaces
Bugs: SDK-27226, SDK-26155, SDK-25483, SDK-23621, SDK-27225, SDK-26993, SDK-25535, SDK-25521
Reviewer: Evtim
Tests run: checkintests mustella full run
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/layoutClasses/PriorityQueue.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Application.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/IContainerInvalidating.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/FormTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ILayoutManagerContainerClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/IStyleManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Container.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</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@1287359 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as
+++ frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as
@@ -602,6 +602,68 @@
     //
     //--------------------------------------------------------------------------

+    //----------------------------------
+    //  estimatedHeight
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the estimatedHeight property.
+     */
+    private var _estimatedHeight:Number;
+
+    /**
+     *  The height a component is likely to be given at layout time.  It is
+     *  determined by examining the parent's estimatedHeight, and the
+     *  component's percentHeight, explicitHeight, top and bottom constraints.
+     *  It is NaN if there isn't enough information to compute the height.
+     *  The component can use this information in calculating its
+     *  measuredWidth if the measuredWidth is dependent on the layout
+     *  height.
+     *
+     *  @default NaN
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    public function get estimatedHeight():Number
+    {
+        return _estimatedHeight;
+    }
+
+    //----------------------------------
+    //  estimatedWidth
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the estimatedWidth property.
+     */
+    private var _estimatedWidth:Number;
+
+    /**
+     *  The width a component is likely to be given at layout time.  It is
+     *  determined by examining the parent's estimatedWidth, and the
+     *  component's percentWidth, explicitWidth, left and right constraints.
+     *  It is NaN if there isn't enough information to compute the width.
+     *  The component can use this information in calculating its
+     *  measuredHeight if the measuredHeight is dependent on the layout
+     *  width.
+     *
+     *  @default NaN
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    public function get estimatedWidth():Number
+    {
+        return _estimatedWidth;
+    }
+
     /**
      *  @private
      */
@@ -881,6 +943,22 @@
                                     postLayoutTranslation:Vector3D = null,
                                     invalidateLayout:Boolean = true):void
     {
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+	public function setEstimatedSize(estimatedWidth:Number = NaN,
+                                     estimatedHeight:Number = NaN,
+									 invalidateSize:Boolean = true):void
+    {
+        _estimatedWidth = estimatedWidth;
+        _estimatedHeight = estimatedHeight;
     }

     //--------------------------------------------------------------------------


removed some unncessary checks on file names

--- src/flash/FlashMediaElement.as
+++ src/flash/FlashMediaElement.as
@@ -387,8 +387,8 @@
 		// https://github.com/happyworm/jPlayer/blob/e8ca190f7f972a6a421cb95f09e138720e40ed6d/actionscript/Jplayer.as#L228
 		private function checkFlashVars(p:Object):void {
 			var i:Number = 0;
-			for each (var s:String in p) {
-				if (isIllegalChar(s)) {
+			for (var s:String in p) {
+				if (isIllegalChar(p[s], s === 'file')) {
 					securityIssue = true; // Illegal char found
 				}
 				i++;
@@ -397,9 +397,12 @@
 				directAccess = true;
 			}
 		}
-
-		private function isIllegalChar(s:String):Boolean {
+
+		private function isIllegalChar(s:String, isUrl:Boolean):Boolean {
 			var illegals:String = "' \" ( ) { } * + \\ < >";
+			if(isUrl) {
+				illegals = "\" { } \\ < >";
+			}
 			if(Boolean(s)) { // Otherwise exception if parameter null.
 				for each (var illegal:String in illegals.split(' ')) {
 					if(s.indexOf(illegal) >= 0) {