Transferred from the Adobe Open Source Subversion Repository

Revision: 19337
Author:   mhorn@adobe.com
Date:     2010-12-13T22:01:27.841985Z

Log Message:
-----------
ASDoc updates

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as
@@ -19,13 +19,29 @@
 import spark.skins.mobile.supportClasses.MobileSkin;

-public class HScrollBarSkin extends MobileSkin
+/**
+ *  ActionScript-based skin for HScrollBar components in mobile applications.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+ public class HScrollBarSkin extends MobileSkin
 {
     //--------------------------------------------------------------------------
     //
     //  Variables
     //
     //--------------------------------------------------------------------------
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
     public function HScrollBarSkin()
     {
         super();


Transferred from the Adobe Open Source Subversion Repository

Revision: 18884
Author:   jasonsj@adobe.com
Date:     2010-12-01T01:01:18.896589Z

Log Message:
-----------
Use authorDensity in Mobile theme

QE notes: By default, 240 devices should still report as 240. Mustella known goods should not be affected.
Doc notes:
Bugs:
Reviewer: egeorgie
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as
@@ -12,6 +12,8 @@
 package spark.skins.mobile
 {

+import mx.core.DeviceDensity;
+
 import spark.components.Button;
 import spark.components.VScrollBar;
 import spark.skins.mobile.supportClasses.MobileSkin;
@@ -25,9 +27,9 @@

         useChromeColor = true;

-        switch (targetDensity)
+        switch (authorDensity)
         {
-            case MobileSkin.PPI240:
+            case DeviceDensity.PPI_240:
             {
                 layoutMeasuredWidth = 8;
                 layoutMeasuredHeight = 40;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/containers/dividedBoxClasses/BoxDivider.as
+++ frameworks/projects/mx/src/mx/containers/dividedBoxClasses/BoxDivider.as
@@ -0,0 +1,360 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.containers.dividedBoxClasses
+{
+
+import flash.display.DisplayObject;
+import flash.events.MouseEvent;
+import flash.geom.Point;
+import mx.containers.DividedBox;
+import mx.containers.DividerState;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+include "../../styles/metadata/GapStyles.as"
+
+/**
+ *  @copy mx.containers.DividedBox#style:dividerAffordance
+ */
+[Style(name="dividerAffordance", type="Number", format="Length", inherit="no")]
+
+/**
+ *  @copy mx.containers.DividedBox#style:dividerAlpha
+ */
+[Style(name="dividerAlpha", type="Number", inherit="no")]
+
+/**
+ *  @copy mx.containers.DividedBox#style:dividerColor
+ */
+[Style(name="dividerColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  @copy mx.containers.DividedBox#style:dividerThickness
+ */
+[Style(name="dividerThickness", type="Number", format="Length", inherit="no")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+/**
+ *  The BoxDivider class represents the divider between children of a DividedBox container.
+ *
+ *  @see mx.containers.DividedBox
+ */
+public class BoxDivider extends UIComponent
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function BoxDivider()
+    {
+        super();
+
+        // Register for player events.
+        addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
+        addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
+        addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var knob:DisplayObject;
+
+    /**
+     *  @private
+     */
+    private var isMouseOver:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set x(value:Number):void
+    {
+        var oldValue:Number = x;
+        super.x = value;
+
+        if (!DividedBox(owner).isVertical())
+        {
+            DividedBox(owner).moveDivider(
+                DividedBox(owner).getDividerIndex(this), value - oldValue);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override public function set y(value:Number):void
+    {
+        var oldValue:Number = y;
+        super.y = value;
+
+        if (DividedBox(owner).isVertical())
+        {
+            DividedBox(owner).moveDivider(
+                DividedBox(owner).getDividerIndex(this), value - oldValue);
+        }
+    }
+
+    //----------------------------------
+    //  state
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the state property.
+     */
+    private var _state:String = DividerState.UP;
+
+    /**
+     *  @private
+     */
+    mx_internal function get state():String
+    {
+        return _state;
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function set state(value:String):void
+    {
+        _state = value;
+
+        invalidateDisplayList();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        // The mouse-over thickness of the divider is normally determined
+        // by the dividerAffordance style, and the visible thickness is
+        // normally determined by the dividerThickness style, assuming that
+        // the relationship thickness <= affordance <= gap applies. But if
+        // one of the other five orderings applies, here is a table of what
+        // happens:
+        //
+        //  divider    divider    horizontalGap/  dividerWidth/  visible width/
+        // Thickness  Affordance  verticalGap     dividerHeight  visible height
+        //
+        //    4           6             8               6              4
+        //    4           8             6               6              4
+        //    6           4             8               6              6
+        //    6           8             4               4              4
+        //    8           4             6               6              6
+        //    8           6             4               4              4
+
+        if (isNaN(width) || isNaN(height))
+            return;
+
+        if (!parent)
+            return;
+
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        graphics.clear();
+
+        graphics.beginFill(0x000000, 0);
+        graphics.drawRect(0, 0, width, height);
+        graphics.endFill();
+
+        var color:Number;
+        var alpha:Number = 1.0;
+
+        var thickness:Number = getStyle("dividerThickness");
+
+        var gap:Number = DividedBox(owner).isVertical() ?
+                         DividedBox(owner).getStyle("verticalGap") :
+                         DividedBox(owner).getStyle("horizontalGap");
+
+        if (state != DividerState.DOWN)
+        {
+            // Draw knob, if there is enough room
+            if (gap >= 6)
+            {
+                if (!knob)
+                {
+                    var knobClass:Class = Class(getStyle("dividerSkin"));
+                    if (knobClass)
+                        knob = new knobClass();
+                    if (knob)
+                        addChild(knob);
+                }
+
+                if (knob)
+                {
+                    if (DividedBox(owner).isVertical())
+                    {
+                        knob.scaleX = 1.0;
+                        knob.rotation = 0;
+                    }
+                    else
+                    {
+                        // Rotate the knob
+                        knob.scaleX = -1.0;
+                        knob.rotation = -90;
+                    }
+
+                    knob.x = Math.round((width - knob.width) / 2);
+                    knob.y = Math.round((height - knob.height) / 2);
+                }
+            }
+            return;
+        }
+
+        color = getStyle("dividerColor");
+        alpha = getStyle("dividerAlpha");
+        graphics.beginFill(color, alpha);
+
+        if (DividedBox(owner).isVertical())
+        {
+            var visibleHeight:Number = thickness;
+
+            if (visibleHeight > gap)
+                visibleHeight = gap;
+
+            var y:Number = (height - visibleHeight) / 2;
+            graphics.drawRect(0, y, width, visibleHeight);
+        }
+        else
+        {
+            var visibleWidth:Number = thickness;
+
+            if (visibleWidth > gap)
+                visibleWidth = gap;
+
+            var x:Number = (width - visibleWidth) / 2;
+            graphics.drawRect(x, 0, visibleWidth, height);
+        }
+
+        graphics.endFill();
+    }
+
+    /**
+     *  @private
+     */
+    override public function styleChanged(styleProp:String):void
+    {
+        super.styleChanged(styleProp);
+
+        if (!styleProp ||
+            styleProp == "dividerSkin" ||
+            styleProp == "styleName")
+        {
+            if (knob)
+            {
+                removeChild(knob);
+                knob = null;
+            }
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function mouseOverHandler(event:MouseEvent):void
+    {
+        isMouseOver = true;
+        if (!DividedBox(owner).activeDivider)
+        {
+            state = DividerState.OVER;
+            DividedBox(owner).changeCursor(this);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function mouseOutHandler(event:MouseEvent):void
+    {
+        isMouseOver = false;
+        if (!DividedBox(owner).activeDivider)
+        {
+            state = DividerState.UP;
+            if (parent)
+                DividedBox(owner).restoreCursor();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function mouseDownHandler(event:MouseEvent):void
+    {
+        // Don't set down state here. If we're doing a live drag we don't
+        // want to show the proxy. If we're not doing a live drag, our
+        // parent will create a drag proxy and set the state to DividerState.DOWN.
+        // state = DividerState.DOWN;
+        DividedBox(owner).changeCursor(this);
+        DividedBox(owner).startDividerDrag(this, event);
+        systemManager.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true);
+    }
+
+    /**
+     *  @private
+     */
+    private function mouseUpHandler(event:MouseEvent):void
+    {
+        // If a mouseOut was the last mouse event that occurred
+        // make sure to restore the system cursor.
+        if (!isMouseOver)
+            DividedBox(owner).restoreCursor();
+
+        state = DividerState.OVER;
+        DividedBox(owner).stopDividerDrag(this, event);
+        systemManager.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true);
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18199
Author:   klin@adobe.com
Date:     2010-10-19T06:15:05.005815Z

Log Message:
-----------
Add support for column sorting in DataGrid. Added basic support for interactively sorting the dataProvider by clicking on the column headers. Note that sorting currently only works if the dataProvider is an ICollectionView. We also provide the visibleSortIndicatorIndices property on the ColumnHeaderBar for developers to manually display the sort arrows. I've also changed the ColumnHeaderBarLayout to call prepare and discard on the allocated and created header renderers.

Notable added API include:

-In DataGrid, the sortableColumns property which toggles interactive sorting and sortByColumns() method which sorts the dataProvider by the provided column indices.
-In ColumnHeaderBar, the visibleSortIndicatorIndices allow the header renderers to determine whether to display their sort arrows.
-In GridColumn, the sortDescending property, the sortCompareFunction which has an additional parameter of the current GridColumn, and a read-only sortField property which constructs a SortField based on the current GridColumn.

QE notes: Can start testing column sorting
Doc notes: No
Bugs: No
Reviewer: Hans
Tests run: cyclone server
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridHeaderRenderer.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ColumnHeaderBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DataGridSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ColumnHeaderBarLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
@@ -14,14 +14,14 @@
 import flash.events.Event;
 import flash.events.EventDispatcher;

+import mx.collections.SortField;
 import mx.core.ClassFactory;
 import mx.core.IFactory;
-import mx.core.IIMESupport;
-import mx.core.Singleton;
 import mx.core.mx_internal;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
 import mx.events.PropertyChangeEvent;
+import mx.utils.ObjectUtil;

 import spark.components.DataGrid;
 import spark.components.Grid;
@@ -34,6 +34,11 @@
  *  Each dataProvider item corresponds to one Grid row and this object specifies the item property
  *  whose value is to be displayed in one column, the item renderer to display that value, the editor
  *  that's used to change the value, and so on.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
  */
 public class GridColumn extends EventDispatcher
 {
@@ -60,6 +65,20 @@
         return _defaultItemEditorFactory;
     }

+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
     public function GridColumn()
     {
         super();
@@ -409,7 +428,7 @@
         if (grid)
             grid.invalidateDisplayList();

-        dispatchEvent(new Event("headerTextChanged"));
+        dispatchChangeEvent("headerTextChanged");
     }

     //----------------------------------
@@ -889,11 +908,18 @@

     private var _sortable:Boolean = true;

-    [Bindable("sortableChanged")]
-
-    /**
-     *  TBD
-     *
+    [Bindable("sortableChanged")]
+    [Inspectable(category="General")]
+
+    /**
+     *  If true, and if the grid's dataProvider is a ICollectionView,
+     *  and if the DataGrid's sortableColumns property is true,
+     *  then this column supports interactive sorting. Typically the column's
+     *  header handles mouse clicks by setting the dataProvider's sort property
+     *  to a Sort object whose SortField is this column's dataField.
+     *
+     *
If the dataProvider is not an ICollectionView, then this property has no effect.

+     *
      *  @default true
      */
     public function get sortable():Boolean
@@ -910,7 +936,153 @@
             return;

         _sortable = value;
+
+        // TODO (klin): Should we remove the sort?
+
         dispatchChangeEvent("sortableChanged");
+    }
+
+    //----------------------------------
+    //  sortCompareFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the sortCompareFunction property.
+     */
+    private var _sortCompareFunction:Function;
+
+    [Bindable("sortCompareFunctionChanged")]
+    [Inspectable(category="Advanced")]
+
+    /**
+     *  The function that compares two elements during a sort of on the
+     *  data elements of this column.
+     *
+     *  If you specify a value of the labelFunction property,
+     *  you typically also provide a sortCompareFunction.
+     *
+     *
The sortCompareFunction's signature must match the following:

+     *
+     *
sortCompareFunction(obj1:Object, obj2:Object, column:GridColumn):int

+     *
+     *
The function should return a value based on the comparison
+     *  of the objects:

+     *

+     *
-1 if obj1 should appear before obj2 in ascending order.

+     *
0 if obj1 = obj2.

+     *
1 if obj1 should appear after obj2 in ascending order.

+     *

+     *
+     *
The function may use the column parameter to write generic
+     *  compare functions.

+     *
+     *
Note: The obj1 and
+     *  obj2 parameters are entire data provider elements and not
+     *  just the data for the item.

+     *
+     *
If the dataProvider is not an ICollectionView, then this property has no effect.

+     *
+     *  @default null
+     */
+    public function get sortCompareFunction():Function
+    {
+        return _sortCompareFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set sortCompareFunction(value:Function):void
+    {
+        if (_sortCompareFunction == value)
+            return;
+
+        _sortCompareFunction = value;
+
+        dispatchChangeEvent("sortCompareFunctionChanged");
+    }
+
+    //----------------------------------
+    //  sortDescending
+    //----------------------------------
+
+    private var _sortDescending:Boolean = false;
+
+    [Bindable("sortDescendingChanged")]
+
+    /**
+     *  If true, this column is sorted in descending order. For example, if the column's dataField
+     *  selects a numeric value, then the first row would be the one with the largest value
+     *  for this column.
+     *
+     *
Setting this property does not start a sort; it only sets the sort direction.
+     *  Once dataProvider.refresh() is called, the sort will be performed.

+     *
+     *
If the dataProvider is not an ICollectionView, then this property has no effect.

+     *
+     *  @default false;
+     */
+    public function get sortDescending():Boolean
+    {
+        return _sortDescending;
+    }
+
+    /**
+     *  @private
+     */
+    public function set sortDescending(value:Boolean):void
+    {
+        if (_sortDescending == value)
+            return;
+
+        _sortDescending = value;
+
+        dispatchChangeEvent("sortDescendingChanged");
+    }
+
+    //----------------------------------
+    //  sortField
+    //----------------------------------
+
+    /**
+     *  Read-only property that creates and returns a SortField that can
+     *  be used to sort a collection by this column's dataField.
+     *
+     *
If the sortCompareFunction is defined, it assigns the SortField's
+     *  compare function to a closure around the sortCompareFunction
+     *  that uses the right signature for the SortField and captures
+     *  this column.

+     *
+     *
If the sortCompareFunction and dataField are not defined but the
+     *  labelFunction is defined, then it assigns the compareFunction to a
+     *  closure that does a basic string compare on the labelFunction applied
+     *  to the data objects.

+     */
+    public function get sortField():SortField
+    {
+        const column:GridColumn = this;
+        const sortField:SortField = new SortField(column.dataField);
+
+        if (_sortCompareFunction != null)
+        {
+            sortField.compareFunction =
+                function (a:Object, b:Object):int
+                {
+                    return _sortCompareFunction(a, b, column);
+                };
+        }
+        else if (column.dataField == null && _labelFunction != null)
+        {
+            sortField.compareFunction =
+                function (a:Object, b:Object):int
+                {
+                    return ObjectUtil.stringCompare(_labelFunction(a, column), _labelFunction(b, column));
+                };
+        }
+
+        sortField.descending = column.sortDescending;
+        return sortField;
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 18468
Author:   hmuller@adobe.com
Date:     2010-11-05T16:37:07.571913Z

Log Message:
-----------
Removed GridLayout "hacks" that invalidated columnHeaderGroup during GridLayout/updateDisplayList().  Grid/partAdded() now resets (all IDataGridElements) columnHeaderGroup's nestLevel to force it to layout after the grid.

QE notes: Failing tests have been excluded
Doc notes:
Bugs: SDK-27862
Reviewer: Carol, Kevin
Tests run: checkin, mustella cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IDataGridElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.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/DefaultGridHeaderRenderer.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -11,6 +11,7 @@

 package spark.components.gridClasses
 {
+import flash.events.Event;
 import flash.geom.Rectangle;
 import flash.utils.Dictionary;
 import flash.utils.getTimer;
@@ -413,16 +414,11 @@
         }

         // Find the index of the last GridColumn.visible==true column
+
         const columns:IList = grid.columns;
         const lastVisibleColumnIndex:int = (columns) ? grid.getPreviousVisibleColumnIndex(grid.columns.length) : -1;
         if (!columns || lastVisibleColumnIndex < 0)
-        {
-            // HACK: Make sure columnHeaderGroup fixes itself
-            var dg:DataGrid = grid.dataGrid;
-            if (dg && dg.columnHeaderGroup)
-                dg.columnHeaderGroup.invalidateDisplayList();
             return;
-        }

         // Layout the item renderers and compute new values for visibleRowIndices et al

@@ -485,11 +481,6 @@
         visibleColumnSeparators = layoutLinearElements(grid.columnSeparator, overlayLayer,
             visibleColumnSeparators, oldVisibleColumnIndices, visibleColumnIndices, layoutColumnSeparator, lastVisibleColumnIndex);

-        // HACK
-        dg = grid.dataGrid;
-        if (dg && dg.columnHeaderGroup)
-            dg.columnHeaderGroup.invalidateDisplayList();
-
         // Layout the hoverIndicator, caretIndicator, and selectionIndicators

         layoutHoverIndicator(backgroundLayer);
@@ -502,11 +493,13 @@
         backgroundLayer.validateNow();
         selectionLayer.validateNow();
         overlayLayer.validateNow();
-
+
         // The old visible row,column indices are no longer needed

         oldVisibleRowIndices.length = 0;
         oldVisibleColumnIndices.length = 0;
+
+        grid.dataGrid.dispatchEvent(new Event("invalidateSize"));

         if (enablePerformanceStatistics)
         {
@@ -702,6 +695,7 @@
             // GridColumn.visible==false columns have a typical size of (0,0)
             // to distinguish them from the GridColumn.visible==true columns
             // that aren't in view yet.
+
             if (!column.visible)
             {
                 gridDimensions.setTypicalCellWidth(columnIndex, 0);
@@ -879,11 +873,11 @@
         const colGap:int = gridDimensions.columnGap;

         // Compute the row,column index and bounds of the upper left "start" cell
-
+
         const startColIndex:int = gridDimensions.getColumnIndexAt(scrollX, scrollY);
         const startRowIndex:int = gridDimensions.getRowIndexAt(scrollX, scrollY);
         const startCellX:Number = gridDimensions.getCellX(startRowIndex, startColIndex);
-        const startCellY:Number = gridDimensions.getCellY(startRowIndex, startColIndex);
+        const startCellY:Number = gridDimensions.getCellY(startRowIndex, startColIndex);

         // Compute newVisibleColumns

@@ -930,8 +924,10 @@
                 if (renderer.parent != rendererLayer)
                     rendererLayer.addElement(renderer);
                 newVisibleItemRenderers.push(renderer);
+
                 initializeItemRenderer(renderer, rowIndex, colIndex);

+                // TBD(hmuller): if takeVisibleItemRenderer returned true, should we skip prepare?()
                 renderer.prepare(!createdGridElement);

                 var colWidth:Number = gridDimensions.getColumnWidth(colIndex);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
@@ -1,16 +1,4 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-// TODO (chiedozi): TabbedViewNavigator should override setActive and activate
-// the correct ViewNavigator.
+
 package spark.components
 {
 import flash.display.Stage;


Transferred from the Adobe Open Source Subversion Repository

Revision: 4514
Author:   hmuller@adobe.com
Date:     2009-01-13T22:24:44.571725Z

Log Message:
-----------
Added recycling support for virtualized layouts.

Removed itemRendererRegistry from DataGroup.

QE Notes: Existing layout, viewport, and scroller mustella tests pass, virtualization tests are still TBD
Doc Notes: None
Bugs: sdk-18630, sdk-18632, sdk-18660
Reviewer: ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as
@@ -320,7 +320,7 @@
      */
     public function start(index:uint):Number
     {
-        if (index == 0)
+        if ((_length == 0) || (index == 0))
             return 0;

         if (index >= _length)


Bug 716548: fix the comment formatting for the license header when generating the avmfeatures.cpp/h files

CL@1143469

--- core/avmfeatures.as
+++ core/avmfeatures.as
@@ -966,11 +966,9 @@
              "  If you feel you need to make changes below, instead edit the configuration",
              "  file and rerun it to get a new version of this file.",
              "",
-             "/*",
-             "*  This Source Code Form is subject to the terms of the Mozilla Public",
-             "*  License, v. 2.0. If a copy of the MPL was not distributed with this",
-             "*  file, You can obtain one at http://mozilla.org/MPL/2.0/.",
-             "*/"
+             "  This Source Code Form is subject to the terms of the Mozilla Public",
+             "  License, v. 2.0. If a copy of the MPL was not distributed with this",
+             "  file, You can obtain one at http://mozilla.org/MPL/2.0/."
     ].map(function(x) { return prefix + x }).join("\n");
     return s;
 }


Possible fix for the not working "Mute" Button on audioplayer flash fallback: - Set "_isMuted" before the event is fired, because the javascript event handler, checks "media.muted" to toggle slider position and muted css class.

--- src/flash/htmlelements/AudioElement.as
+++ src/flash/htmlelements/AudioElement.as
@@ -1,312 +1,314 @@
-
-package htmlelements
-{
-	import flash.events.Event;
-	import flash.events.IOErrorEvent;
-	import flash.events.ProgressEvent;
-	import flash.events.TimerEvent;
-	import flash.media.ID3Info;
-	import flash.media.Sound;
-	import flash.media.SoundChannel;
-	import flash.media.SoundLoaderContext;
-	import flash.media.SoundTransform;
-	import flash.net.URLRequest;
-	import flash.utils.Timer;
-
-
-
-	/**
-	* ...
-	* @author DefaultUser (Tools -> Custom Arguments...)
-	*/
-	public class AudioElement implements IMediaElement
-	{
-
-		private var _sound:Sound;
-		private var _soundTransform:SoundTransform;
-		private var _soundChannel:SoundChannel;
-		private var _soundLoaderContext:SoundLoaderContext;
-
-		private var _volume:Number = 1;
-		private var _preMuteVolume:Number = 0;
-		private var _isMuted:Boolean = false;
-		private var _isPaused:Boolean = true;
-		private var _isEnded:Boolean = false;
-		private var _isLoaded:Boolean = false;
-		private var _currentTime:Number = 0;
-		private var _duration:Number = 0;
-		private var _bytesLoaded:Number = 0;
-		private var _bytesTotal:Number = 0;
-		private var _bufferedTime:Number = 0;
-
-		private var _currentUrl:String = "";
-		private var _autoplay:Boolean = true;
-		private var _preload:String = "";
-
-		private var _element:FlashMediaElement;
-		private var _timer:Timer;
-		private var _firedCanPlay:Boolean = false;
-
-		public function duration():Number {
-			return _duration;
-		}
-
-		public function currentTime():Number {
-			return _currentTime;
-		}
-
-		public function currentProgress():Number {
-				return Math.round(_bytesLoaded/_bytesTotal*100);
-		}
-
-		public function AudioElement(element:FlashMediaElement, autoplay:Boolean, preload:String, timerRate:Number, startVolume:Number)
-		{
-			_element = element;
-			_autoplay = autoplay;
-			_volume = startVolume;
-			_preload = preload;
-
-			_timer = new Timer(timerRate);
-			_timer.addEventListener(TimerEvent.TIMER, timerEventHandler);
-
-			_soundTransform = new SoundTransform(_volume);
-			_soundLoaderContext = new SoundLoaderContext();
-		}
-
-		// events
-		function progressHandler(e:ProgressEvent):void {
-
-			_bytesLoaded = e.bytesLoaded;
-			_bytesTotal = e.bytesTotal;
-
-			sendEvent(HtmlMediaEvent.PROGRESS);
-		}
-
-		function id3Handler(e:Event):void {
-			sendEvent(HtmlMediaEvent.LOADEDMETADATA);
-
-			try {
-				var id3:ID3Info = _sound.id3;
-				var obj = {
-					type:'id3',
-					album:id3.album,
-					artist:id3.artist,
-					comment:id3.comment,
-					genre:id3.genre,
-					songName:id3.songName,
-					track:id3.track,
-					year:id3.year
-				}
-			} catch (err:Error) {}
-
-
-		}
-
-		function timerEventHandler(e:TimerEvent) {
-			_currentTime = _soundChannel.position/1000;
-
-			// calculate duration
-			var duration = Math.round(_sound.length * _sound.bytesTotal/_sound.bytesLoaded/100) / 10;
-
-			// check to see if the estimated duration changed
-			if (_duration != duration && !isNaN(duration)) {
-
-				_duration = duration;
-				sendEvent(HtmlMediaEvent.LOADEDMETADATA);
-			}
-
-			// send timeupdate
-			sendEvent(HtmlMediaEvent.TIMEUPDATE);
-
-			// sometimes the ended event doesn't fire, here's a fake one
-			if (_duration > 0 && _currentTime >= _duration-0.2) {
-				handleEnded();
-			}
-		}
-
-		function soundCompleteHandler(e:Event) {
-			handleEnded();
-		}
-
-		function handleEnded():void {
-			_timer.stop();
-			_currentTime = 0;
-			_isEnded = true;
-
-			sendEvent(HtmlMediaEvent.ENDED);
-		}
-
-		//events
-
-
-		// METHODS
-		public function setSrc(url:String):void {
-			_currentUrl = url;
-			_isLoaded = false;
-		}
-
-
-		public function load():void {
-
-			if (_currentUrl == "")
-				return;
-
-			_sound = new Sound();
-			//sound.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);
-			_sound.addEventListener(ProgressEvent.PROGRESS,progressHandler);
-			_sound.addEventListener(Event.ID3,id3Handler);
-			_sound.load(new URLRequest(_currentUrl));
-			_currentTime = 0;
-
-			sendEvent(HtmlMediaEvent.LOADSTART);
-
-			_isLoaded = true;
-
-			sendEvent(HtmlMediaEvent.LOADEDDATA);
-			sendEvent(HtmlMediaEvent.CANPLAY);
-			_firedCanPlay = true;
-
-			if (_playAfterLoading) {
-				_playAfterLoading = false;
-				play();
-			}
-		}
-
-		private var _playAfterLoading:Boolean= false;
-
-		public function play():void {
-
-			if (!_isLoaded) {
-				_playAfterLoading = true;
-				load();
-				return;
-			}
-
-			_timer.stop();
-
-			_soundChannel = _sound.play(_currentTime*1000, 0, _soundTransform);
-			_soundChannel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
-			_soundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
-
-			_timer.start();
-
-			didStartPlaying();
-		}
-
-		public function pause():void {
-
-			_timer.stop();
-			if (_soundChannel != null) {
-				_currentTime = _soundChannel.position/1000;
-				_soundChannel.stop();
-			}
-
-			_isPaused = true;
-			sendEvent(HtmlMediaEvent.PAUSE);
-		}
-
-
-		public function stop():void {
-			if (_timer != null) {
-				_timer.stop();
-			}
-			if (_soundChannel != null) {
-				_soundChannel.stop();
-				_sound.close();
-			}
-			unload();
-			sendEvent(HtmlMediaEvent.STOP);
-		}
-
-		public function setCurrentTime(pos:Number):void {
-			sendEvent(HtmlMediaEvent.SEEKING);
-			_timer.stop();
-			_currentTime = pos;
-			_soundChannel.stop();
-			_sound.length
-			_soundChannel = _sound.play(_currentTime * 1000, 0, _soundTransform);
-			sendEvent(HtmlMediaEvent.SEEKED);
-
-			_timer.start();
-
-			didStartPlaying();
-		}
-
-		private function didStartPlaying():void {
-			_isPaused = false;
-			sendEvent(HtmlMediaEvent.PLAY);
-			sendEvent(HtmlMediaEvent.PLAYING);
-			if (!_firedCanPlay) {
-				sendEvent(HtmlMediaEvent.LOADEDDATA);
-				sendEvent(HtmlMediaEvent.CANPLAY);
-				_firedCanPlay = true;
-			}
-		}
-
-
-		public function setVolume(volume:Number):void {
-
-			_volume = volume;
-			_soundTransform.volume = volume;
-
-			if (_soundChannel != null) {
-				_soundChannel.soundTransform = _soundTransform;
-			}
-
-			sendEvent(HtmlMediaEvent.VOLUMECHANGE);
-		}
-
-		public function getVolume():Number {
-			if(_isMuted) {
-				return 0;
-			} else {
-				return _volume;
-			}
-		}
-
-
-		public function setMuted(muted:Boolean):void {
-
-			// ignore if already set
-			if ( (muted && _isMuted) || (!muted && !_isMuted))
-				return;
-
-			if (muted) {
-				_preMuteVolume = _soundTransform.volume;
-				setVolume(0);
-			} else {
-				setVolume(_preMuteVolume);
-			}
-
-			_isMuted = muted;
-		}
-
-		public function unload():void {
-			_sound = null;
-			_isLoaded = false;
-		}
-
-		private function sendEvent(eventName:String) {
-
-			// calculate this to mimic HTML5
-			_bufferedTime = _bytesLoaded / _bytesTotal * _duration;
-
-			// build JSON
-			var values:String = "duration:" + _duration +
-							",currentTime:" + _currentTime +
-							",muted:" + _isMuted +
-							",paused:" + _isPaused +
-							",ended:" + _isEnded +
-							",volume:" + _volume +
-							",src:\"" + _currentUrl + "\"" +
-							",bytesTotal:" + _bytesTotal +
-							",bufferedBytes:" + _bytesLoaded +
-							",bufferedTime:" + _bufferedTime +
-							"";
-
-			_element.sendEvent(eventName, values);
-		}
-
-	}
-
-}
+
+package htmlelements
+{
+	import flash.events.Event;
+	import flash.events.IOErrorEvent;
+	import flash.events.ProgressEvent;
+	import flash.events.TimerEvent;
+	import flash.media.ID3Info;
+	import flash.media.Sound;
+	import flash.media.SoundChannel;
+	import flash.media.SoundLoaderContext;
+	import flash.media.SoundTransform;
+	import flash.net.URLRequest;
+	import flash.utils.Timer;
+
+
+
+	/**
+	* ...
+	* @author DefaultUser (Tools -> Custom Arguments...)
+	*/
+	public class AudioElement implements IMediaElement
+	{
+
+		private var _sound:Sound;
+		private var _soundTransform:SoundTransform;
+		private var _soundChannel:SoundChannel;
+		private var _soundLoaderContext:SoundLoaderContext;
+
+		private var _volume:Number = 1;
+		private var _preMuteVolume:Number = 0;
+		private var _isMuted:Boolean = false;
+		private var _isPaused:Boolean = true;
+		private var _isEnded:Boolean = false;
+		private var _isLoaded:Boolean = false;
+		private var _currentTime:Number = 0;
+		private var _duration:Number = 0;
+		private var _bytesLoaded:Number = 0;
+		private var _bytesTotal:Number = 0;
+		private var _bufferedTime:Number = 0;
+
+		private var _currentUrl:String = "";
+		private var _autoplay:Boolean = true;
+		private var _preload:String = "";
+
+		private var _element:FlashMediaElement;
+		private var _timer:Timer;
+		private var _firedCanPlay:Boolean = false;
+
+		public function duration():Number {
+			return _duration;
+		}
+
+		public function currentTime():Number {
+			return _currentTime;
+		}
+
+		public function currentProgress():Number {
+				return Math.round(_bytesLoaded/_bytesTotal*100);
+		}
+
+		public function AudioElement(element:FlashMediaElement, autoplay:Boolean, preload:String, timerRate:Number, startVolume:Number)
+		{
+			_element = element;
+			_autoplay = autoplay;
+			_volume = startVolume;
+			_preload = preload;
+
+			_timer = new Timer(timerRate);
+			_timer.addEventListener(TimerEvent.TIMER, timerEventHandler);
+
+			_soundTransform = new SoundTransform(_volume);
+			_soundLoaderContext = new SoundLoaderContext();
+		}
+
+		// events
+		function progressHandler(e:ProgressEvent):void {
+
+			_bytesLoaded = e.bytesLoaded;
+			_bytesTotal = e.bytesTotal;
+
+			sendEvent(HtmlMediaEvent.PROGRESS);
+		}
+
+		function id3Handler(e:Event):void {
+			sendEvent(HtmlMediaEvent.LOADEDMETADATA);
+
+			try {
+				var id3:ID3Info = _sound.id3;
+				var obj = {
+					type:'id3',
+					album:id3.album,
+					artist:id3.artist,
+					comment:id3.comment,
+					genre:id3.genre,
+					songName:id3.songName,
+					track:id3.track,
+					year:id3.year
+				}
+			} catch (err:Error) {}
+
+
+		}
+
+		function timerEventHandler(e:TimerEvent) {
+			_currentTime = _soundChannel.position/1000;
+
+			// calculate duration
+			var duration = Math.round(_sound.length * _sound.bytesTotal/_sound.bytesLoaded/100) / 10;
+
+			// check to see if the estimated duration changed
+			if (_duration != duration && !isNaN(duration)) {
+
+				_duration = duration;
+				sendEvent(HtmlMediaEvent.LOADEDMETADATA);
+			}
+
+			// send timeupdate
+			sendEvent(HtmlMediaEvent.TIMEUPDATE);
+
+			// sometimes the ended event doesn't fire, here's a fake one
+			if (_duration > 0 && _currentTime >= _duration-0.2) {
+				handleEnded();
+			}
+		}
+
+		function soundCompleteHandler(e:Event) {
+			handleEnded();
+		}
+
+		function handleEnded():void {
+			_timer.stop();
+			_currentTime = 0;
+			_isEnded = true;
+
+			sendEvent(HtmlMediaEvent.ENDED);
+		}
+
+		//events
+
+
+		// METHODS
+		public function setSrc(url:String):void {
+			_currentUrl = url;
+			_isLoaded = false;
+		}
+
+
+		public function load():void {
+
+			if (_currentUrl == "")
+				return;
+
+			_sound = new Sound();
+			//sound.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);
+			_sound.addEventListener(ProgressEvent.PROGRESS,progressHandler);
+			_sound.addEventListener(Event.ID3,id3Handler);
+			_sound.load(new URLRequest(_currentUrl));
+			_currentTime = 0;
+
+			sendEvent(HtmlMediaEvent.LOADSTART);
+
+			_isLoaded = true;
+
+			sendEvent(HtmlMediaEvent.LOADEDDATA);
+			sendEvent(HtmlMediaEvent.CANPLAY);
+			_firedCanPlay = true;
+
+			if (_playAfterLoading) {
+				_playAfterLoading = false;
+				play();
+			}
+		}
+
+		private var _playAfterLoading:Boolean= false;
+
+		public function play():void {
+
+			if (!_isLoaded) {
+				_playAfterLoading = true;
+				load();
+				return;
+			}
+
+			_timer.stop();
+
+			_soundChannel = _sound.play(_currentTime*1000, 0, _soundTransform);
+			_soundChannel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
+			_soundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
+
+			_timer.start();
+
+			didStartPlaying();
+		}
+
+		public function pause():void {
+
+			_timer.stop();
+			if (_soundChannel != null) {
+				_currentTime = _soundChannel.position/1000;
+				_soundChannel.stop();
+			}
+
+			_isPaused = true;
+			sendEvent(HtmlMediaEvent.PAUSE);
+		}
+
+
+		public function stop():void {
+			if (_timer != null) {
+				_timer.stop();
+			}
+			if (_soundChannel != null) {
+				_soundChannel.stop();
+				_sound.close();
+			}
+			unload();
+			sendEvent(HtmlMediaEvent.STOP);
+		}
+
+		public function setCurrentTime(pos:Number):void {
+			sendEvent(HtmlMediaEvent.SEEKING);
+			_timer.stop();
+			_currentTime = pos;
+			_soundChannel.stop();
+			_sound.length
+			_soundChannel = _sound.play(_currentTime * 1000, 0, _soundTransform);
+			sendEvent(HtmlMediaEvent.SEEKED);
+
+			_timer.start();
+
+			didStartPlaying();
+		}
+
+		private function didStartPlaying():void {
+			_isPaused = false;
+			sendEvent(HtmlMediaEvent.PLAY);
+			sendEvent(HtmlMediaEvent.PLAYING);
+			if (!_firedCanPlay) {
+				sendEvent(HtmlMediaEvent.LOADEDDATA);
+				sendEvent(HtmlMediaEvent.CANPLAY);
+				_firedCanPlay = true;
+			}
+		}
+
+
+		public function setVolume(volume:Number):void {
+
+			_volume = volume;
+			_soundTransform.volume = volume;
+
+			if (_soundChannel != null) {
+				_soundChannel.soundTransform = _soundTransform;
+			}
+
+			_isMuted = (_volume == 0);
+
+			sendEvent(HtmlMediaEvent.VOLUMECHANGE);
+		}
+
+		public function getVolume():Number {
+			if(_isMuted) {
+				return 0;
+			} else {
+				return _volume;
+			}
+		}
+
+
+		public function setMuted(muted:Boolean):void {
+
+			// ignore if already set
+			if ( (muted && _isMuted) || (!muted && !_isMuted))
+				return;
+
+			if (muted) {
+				_preMuteVolume = _soundTransform.volume;
+				setVolume(0);
+			} else {
+				setVolume(_preMuteVolume);
+			}
+
+			_isMuted = muted;
+		}
+
+		public function unload():void {
+			_sound = null;
+			_isLoaded = false;
+		}
+
+		private function sendEvent(eventName:String) {
+
+			// calculate this to mimic HTML5
+			_bufferedTime = _bytesLoaded / _bytesTotal * _duration;
+
+			// build JSON
+			var values:String = "duration:" + _duration +
+							",currentTime:" + _currentTime +
+							",muted:" + _isMuted +
+							",paused:" + _isPaused +
+							",ended:" + _isEnded +
+							",volume:" + _volume +
+							",src:\"" + _currentUrl + "\"" +
+							",bytesTotal:" + _bytesTotal +
+							",bufferedBytes:" + _bytesLoaded +
+							",bufferedTime:" + _bufferedTime +
+							"";
+
+			_element.sendEvent(eventName, values);
+		}
+
+	}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 11247
Author:   klin@adobe.com
Date:     2009-10-28T21:59:11.963883Z

Log Message:
-----------
Fix for https://bugs.adobe.com/jira/browse/SDK-23184.

Updated a bunch of Style metadata ASDocs to describe different defaults between the Halo and Spark themes. Also, fixed a few typos along the way.

defaults.css - rearranged a few styles to be in alphabetical order
Button.as - removed extra emphasizedSkin style metadata
Panel.as - added spark theme to borderAlpha metadata

QE notes: None
Doc notes: None
Bugs: SDK-23184
Reviewer: Glenn
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/fl/video/NCManagerNative.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/TextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PopUpMenuIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/PaddingStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/GapStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/fl/video/NCManagerDynamicStream.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/FocusStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/StrokedElement.as</path>

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

--- frameworks/projects/mx/src/mx/controls/List.as
+++ frameworks/projects/mx/src/mx/controls/List.as
@@ -158,10 +158,10 @@
  *  The data effect to play when a change occur to the control's data provider.
  *
  *  <p>By default, the List control does not use a data effect.
- *  For the List control, use an instancs of the the DefaultListEffect class
+ *  For the List control, use an instance of the the DefaultListEffect class
  *  to configure the data effect. </p>
  *
- * @default undefined
+ *  @default undefined
  *
  *  @langversion 3.0
  *  @playerversion Flash 9


- Changed the code to no longer filter out events without audience and track

--- core/src/main/flex/org/dukecon/services/EventService.as
+++ core/src/main/flex/org/dukecon/services/EventService.as
@@ -80,9 +80,12 @@
     }

     private static function filterPartlyInitialized(event:Event):Boolean {
-        return (event.audience != null) && (event.type != null) && (event.language != null) &&
-                (event.location != null) && (event.speakers != null) && (event.track != null);
+        var fullyInitialized:Boolean = (event.type != null) && (event.language != null) &&
+                (event.location != null) && (event.speakers != null);
+        if(!fullyInitialized) {
+            trace("Partially Initialized: " + event.id);
+        }
+        return fullyInitialized;
     }
-
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18641
Author:   chiedozi@adobe.com
Date:     2010-11-17T01:26:13.734827Z

Log Message:
-----------
Updated MobileApplication api names.

MobileApplicationBase
backKeyHandler renamed to backKeyUpHandler
menuKeyHandler renamed to menuKeyUpHandler
sessionCachingEnabled renamed to persistNavigatorState
persistApplicationState() renamed to saveNavigatorState
restoreApplicationSate() renamed to loadNavigatorState
registerPersistenceClassAliases removed
nativeApplication_invokeHandler() renamed to invokeHandler()
nativeApplication_deactivateHandler() renamed to deactivateHandler()

PersistenceManager
flush() renamed to save() and return success boolean
initialize() renamed to load() and return success boolean
The applicationVersion shared object property was renamed to versionNumber.

View
deserializePersistedData() renamed to deserializeData()

ViewNavigatorBase
restoreViewData() renamed loadViewData()

Events
APPLICATION_PERSIST and APPLICATION_RESTORE removed from the framework
APPLICATION_PERSISTING renamed to NAVIGATOR_STATE_SAVING
APPLICATION_RESTORING renamed to NAVIGATOR_STATE_LOADING

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/IPersistenceManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedMobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/PersistenceManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.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/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
@@ -489,10 +489,10 @@
     /**
      *  @private
      */
-    override mx_internal function backKeyHandler():void
+    override mx_internal function backKeyUpHandler():void
     {
         if (activeNavigator)
-            activeNavigator.backKeyHandler();
+            activeNavigator.backKeyUpHandler();
     }

     /**
@@ -907,7 +907,7 @@
     /**
      *  @private
      */
-    override public function restoreViewData(value:Object):void
+    override public function loadViewData(value:Object):void
     {
         var savedStacks:Vector.<Object>;
         var savedSelectedIndex:Number = value.selectedIndex as Number;
@@ -924,7 +924,7 @@
         {
             var len:Number = Math.min(savedStacks.length, length);
             for (var i:int = 0; i < len; ++i)
-                navigators[i].restoreViewData(savedStacks[i]);
+                navigators[i].loadViewData(savedStacks[i]);
         }
     }


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

--- frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.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: 19728
Author:   egeorgie@adobe.com
Date:     2011-01-12T03:05:19.969824Z

Log Message:
-----------
Fix http://bugs.adobe.com/jira/browse/SDK-28928 Zoom transition plays off center when application is scaled

In this change:
- change transition to calculate effect center post-transform

QE notes:
Doc notes:
Bugs: SDK-28928
Reviewer: Corey
Tests run: manual zoom test
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as
@@ -289,8 +289,8 @@
         zoomTarget = (mode == ZoomViewTransitionMode.OUT) ? transitionGroup : targetNavigator.skin;

         // Initialize our target's transform center.
-        zoomTarget.transformX = cachedNavigator.width / 2;
-        zoomTarget.transformY = cachedNavigator.height / 2;
+        zoomTarget.transformX = cachedNavigator.getLayoutBoundsWidth(true) / 2;
+        zoomTarget.transformY = cachedNavigator.getLayoutBoundsHeight(true) / 2;

         // Ensure our alpha is initialized to 0 prior to the start
         // of our transition so that the view isn't displayed briefly


Remove unnecessary semicolons.

Remove unnecessary semicolons.

--- lib/src/com/amanitadesign/steam/ISteamWorks.as
+++ lib/src/com/amanitadesign/steam/ISteamWorks.as
@@ -21,84 +21,84 @@
 		function addOverlayWorkaround(container:DisplayObjectContainer,
 			alwaysVisible:Boolean = false, color:uint = 0x000000):void;

-		function runCallbacks():Boolean;
-		function getUserID():String;
-		function getAppID():uint;
-		function getPersonaName():String;
-		function useCrashHandler(appID:uint, version:String, date:String, time:String):Boolean;
+		function runCallbacks():Boolean
+		function getUserID():String
+		function getAppID():uint
+		function getPersonaName():String
+		function useCrashHandler(appID:uint, version:String, date:String, time:String):Boolean
 		/* stats/achievements */
-		function requestStats():Boolean;
-		function setAchievement(name:String):Boolean;
-		function clearAchievement(name:String):Boolean;
-		function isAchievement(name:String):Boolean;
-		function getStatInt(name:String):int;
-		function getStatFloat(name:String):Number;
-		function setStatInt(name:String, value:int):Boolean;
-		function setStatFloat(name:String, value:Number):Boolean;
-		function storeStats():Boolean;
-		function resetAllStats(achievementsToo:Boolean):Boolean;
+		function requestStats():Boolean
+		function setAchievement(name:String):Boolean
+		function clearAchievement(name:String):Boolean
+		function isAchievement(name:String):Boolean
+		function getStatInt(name:String):int
+		function getStatFloat(name:String):Number
+		function setStatInt(name:String, value:int):Boolean
+		function setStatFloat(name:String, value:Number):Boolean
+		function storeStats():Boolean
+		function resetAllStats(achievementsToo:Boolean):Boolean
 		/* cloud */
-		function getFileCount():int;
-		function getFileSize(name:String):int;
-		function fileExists(name:String):Boolean;
-		function fileWrite(name:String, data:ByteArray):Boolean;
-		function fileRead(name:String, data:ByteArray):Boolean;
-		function fileDelete(name:String):Boolean;
-		function fileShare(name:String):Boolean;
-		function fileShareResult():String;
-		function isCloudEnabledForApp():Boolean;
-		function setCloudEnabledForApp(enabled:Boolean):Boolean;
-		function getQuota():Array;
+		function getFileCount():int
+		function getFileSize(name:String):int
+		function fileExists(name:String):Boolean
+		function fileWrite(name:String, data:ByteArray):Boolean
+		function fileRead(name:String, data:ByteArray):Boolean
+		function fileDelete(name:String):Boolean
+		function fileShare(name:String):Boolean
+		function fileShareResult():String
+		function isCloudEnabledForApp():Boolean
+		function setCloudEnabledForApp(enabled:Boolean):Boolean
+		function getQuota():Array
 		/* ugc/workshop */
-		function UGCDownload(handle:String, priority:int):Boolean;
-		function UGCRead(handle:String, size:int, offset:uint, data:ByteArray):Boolean;
-		function getUGCDownloadProgress(handle:String):Array;
-		function getUGCDownloadResult(handle:String):DownloadUGCResult;
-		function publishWorkshopFile(name:String, preview:String, appId:uint, title:String, description:String, visibility:uint, tags:Array, fileType:uint):Boolean;
-		function publishWorkshopFileResult():String;
-		function deletePublishedFile(file:String):Boolean;
-		function getPublishedFileDetails(file:String, maxAge:int):Boolean;
-		function getPublishedFileDetailsResult(file:String):FileDetailsResult;
-		function enumerateUserPublishedFiles(startIndex:uint):Boolean;
-		function enumerateUserPublishedFilesResult():UserFilesResult;
-		function enumeratePublishedWorkshopFiles(type:uint, start:uint, count:uint, days:uint, tags:Array, userTags:Array):Boolean;
-		function enumeratePublishedWorkshopFilesResult():WorkshopFilesResult;
-		function enumerateUserSubscribedFiles(startIndex:uint):Boolean;
-		function enumerateUserSubscribedFilesResult():SubscribedFilesResult;
-		function enumerateUserSharedWorkshopFiles(steamID:String, start:uint, required:Array, excluded:Array):Boolean;
-		function enumerateUserSharedWorkshopFilesResult():UserFilesResult;
-		function enumeratePublishedFilesByUserAction(action:uint, startIndex:uint):Boolean;
-		function enumeratePublishedFilesByUserActionResult():FilesByUserActionResult;
-		function subscribePublishedFile(file:String):Boolean;
-		function unsubscribePublishedFile(file:String):Boolean;
-		function createPublishedFileUpdateRequest(file:String):String;
-		function updatePublishedFileFile(handle:String, file:String):Boolean;
-		function updatePublishedFilePreviewFile(handle:String, preview:String):Boolean;
-		function updatePublishedFileTitle(handle:String, title:String):Boolean;
-		function updatePublishedFileDescription(handle:String, description:String):Boolean;
-		function updatePublishedFileSetChangeDescription(handle:String, changeDesc:String):Boolean;
-		function updatePublishedFileVisibility(handle:String, visibility:uint):Boolean;
-		function updatePublishedFileTags(handle:String, tags:Array):Boolean;
-		function commitPublishedFileUpdate(handle:String):Boolean;
-		function getPublishedItemVoteDetails(file:String):Boolean;
-		function getPublishedItemVoteDetailsResult():ItemVoteDetailsResult;
-		function getUserPublishedItemVoteDetails(file:String):Boolean;
-		function getUserPublishedItemVoteDetailsResult():UserVoteDetails;
-		function updateUserPublishedItemVote(file:String, upvote:Boolean):Boolean;
-		function setUserPublishedFileAction(file:String, action:uint):Boolean;
+		function UGCDownload(handle:String, priority:int):Boolean
+		function UGCRead(handle:String, size:int, offset:uint, data:ByteArray):Boolean
+		function getUGCDownloadProgress(handle:String):Array
+		function getUGCDownloadResult(handle:String):DownloadUGCResult
+		function publishWorkshopFile(name:String, preview:String, appId:uint, title:String, description:String, visibility:uint, tags:Array, fileType:uint):Boolean
+		function publishWorkshopFileResult():String
+		function deletePublishedFile(file:String):Boolean
+		function getPublishedFileDetails(file:String, maxAge:int = 0):Boolean
+		function getPublishedFileDetailsResult(file:String):FileDetailsResult
+		function enumerateUserPublishedFiles(startIndex:uint):Boolean
+		function enumerateUserPublishedFilesResult():UserFilesResult
+		function enumeratePublishedWorkshopFiles(type:uint, start:uint, count:uint, days:uint, tags:Array, userTags:Array):Boolean
+		function enumeratePublishedWorkshopFilesResult():WorkshopFilesResult
+		function enumerateUserSubscribedFiles(startIndex:uint):Boolean
+		function enumerateUserSubscribedFilesResult():SubscribedFilesResult
+		function enumerateUserSharedWorkshopFiles(steamID:String, start:uint, required:Array, excluded:Array):Boolean
+		function enumerateUserSharedWorkshopFilesResult():UserFilesResult
+		function enumeratePublishedFilesByUserAction(action:uint, startIndex:uint):Boolean
+		function enumeratePublishedFilesByUserActionResult():FilesByUserActionResult
+		function subscribePublishedFile(file:String):Boolean
+		function unsubscribePublishedFile(file:String):Boolean
+		function createPublishedFileUpdateRequest(file:String):String
+		function updatePublishedFileFile(handle:String, file:String):Boolean
+		function updatePublishedFilePreviewFile(handle:String, preview:String):Boolean
+		function updatePublishedFileTitle(handle:String, title:String):Boolean
+		function updatePublishedFileDescription(handle:String, description:String):Boolean
+		function updatePublishedFileSetChangeDescription(handle:String, changeDesc:String):Boolean
+		function updatePublishedFileVisibility(handle:String, visibility:uint):Boolean
+		function updatePublishedFileTags(handle:String, tags:Array):Boolean
+		function commitPublishedFileUpdate(handle:String):Boolean
+		function getPublishedItemVoteDetails(file:String):Boolean
+		function getPublishedItemVoteDetailsResult():ItemVoteDetailsResult
+		function getUserPublishedItemVoteDetails(file:String):Boolean
+		function getUserPublishedItemVoteDetailsResult():UserVoteDetails
+		function updateUserPublishedItemVote(file:String, upvote:Boolean):Boolean
+		function setUserPublishedFileAction(file:String, action:uint):Boolean
 		/* overlay */
-		function activateGameOverlay(dialog:String):Boolean;
-		function activateGameOverlayToUser(dialog:String, steamId:String):Boolean;
-		function activateGameOverlayToWebPage(url:String):Boolean;
-		function activateGameOverlayToStore(appId:uint, flag:uint):Boolean;
-		function activateGameOverlayInviteDialog(steamIdLobby:String):Boolean;
-		function isOverlayEnabled():Boolean;
+		function activateGameOverlay(dialog:String):Boolean
+		function activateGameOverlayToUser(dialog:String, steamId:String):Boolean
+		function activateGameOverlayToWebPage(url:String):Boolean
+		function activateGameOverlayToStore(appId:uint, flag:uint):Boolean
+		function activateGameOverlayInviteDialog(steamIdLobby:String):Boolean
+		function isOverlayEnabled():Boolean
 		/* DLC / subscriptions */
-		function isSubscribedApp(appId:uint):Boolean;
-		function isDLCInstalled(appId:uint):Boolean;
-		function getDLCCount():int;
-		function installDLC(appId:uint):Boolean;
-		function uninstallDLC(appId:uint):Boolean;
-		function DLCInstalledResult():uint;
+		function isSubscribedApp(appId:uint):Boolean
+		function isDLCInstalled(appId:uint):Boolean
+		function getDLCCount():int
+		function installDLC(appId:uint):Boolean
+		function uninstallDLC(appId:uint):Boolean
+		function DLCInstalledResult():uint
 	}
 }


Code clean

Code clean

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/ui/Images.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/ui/Images.as
@@ -3,11 +3,10 @@
 	/**
 	 *
 	 * @author Mino Togna
+	 * @author Stefano Ricci
+	 *
 	 * */
 	public class Images {
-
-		public function Images() {
-		}

 		[Embed("/assets/images/delete.png")]
 		public static const DELETE:Class;
@@ -78,7 +77,5 @@
 		[Embed("/assets/images/expand.png")]
 		public static const EXPAND:Class;

-
-
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/core/DeferredInstanceFromFunction.as
+++ frameworks/projects/framework/src/mx/core/DeferredInstanceFromFunction.as
@@ -0,0 +1,87 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 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.core
+{
+
+/**
+ *  A deferred instance factory that uses a generator function
+ *  to create an instance of the required object.
+ *  An application uses the getInstance() method to
+ *  create an instance of an object when it is first needed and get
+ *  a reference to the object thereafter.
+ *
+ *  @see DeferredInstanceFromClass
+ */
+public class DeferredInstanceFromFunction implements IDeferredInstance
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+	 *
+	 *  @param generator A function that creates and returns an instance
+	 *  of the required object.
+     */
+    public function DeferredInstanceFromFunction(generator:Function)
+    {
+		super();
+
+    	this.generator = generator;
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+	 * 	@private
+     *	The generator function.
+     */
+    private var generator:Function;
+
+	/**
+	 * 	@private
+	 * 	The generated value.
+	 */
+	private var instance:Object = null;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *	Returns a reference to an instance of the desired object.
+	 *  If no instance of the required object exists, calls the function
+	 *  specified in this class' generator constructor parameter.
+	 *
+	 *  @return An instance of the object.
+	 */
+	public function getInstance():Object
+	{
+		if (!instance)
+			instance = generator();
+
+		return instance;
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17841
Author:   hmuller@adobe.com
Date:     2010-09-24T15:36:59.172298Z

Log Message:
-----------
The ColumnHeaderBar classes have been substantially revised simplified and some of the horizontal scrolling flashing has been eliminated.  I've temporarily removed the column header bar event handling code since we weren't using it.   It will be restored when the column resizing feature is added.

The new versions of ColumnHeaderBar and ColumnHeaderBarLayout only depend on Grid (not GridDimensions or GridLayout).

QE notes: Failing mustella tests (bitmap and geometry changes) have been excluded
Doc notes:
Bugs: SDK-27967
Reviewer: Kevin
Tests run: checkin, mustella cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/IGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridHeaderRendererSkin.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridHeaderRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridRowNode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ColumnHeaderBarLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/IGridRowBackground.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ColumnHeaderBar.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DefaultColumnHeaderRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DataGridSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridRowList.as</path>

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8020
Author:   dsubrama@adobe.com
Date:     2009-06-19T23:02:54.776054Z

Log Message:
-----------
Fallout from PARB changes - addressing 3 issues:

1.) http://bugs.adobe.com/jira/browse/SDK-21873 - Fixed
2.) missed PARB requested change, adjustSelectedIndex()/adjustSelectedIndices() are collapsed into a single method, adjustSelection()
3.) Excellent catch from Evtim - selectedIndices is now a Vector of ints instead of a Vector of Numbers (the PARB rename list had the right change!). Selection indices are always non-fractional, so we can get a slight savings by making this a Vector of ints.

QA: Yes - you'll need to update tests for point #3, and if you worked off the PARB rename list, then you shouldn't have to update for #2, otherwise you do.
Doc: Yes
Checkintests: Pass, as well as List/DDL mustella tests (except for 11 List tests that need selectedIndices to be changed from Vector.<Number> to Vector.<int>)
Reviewer: Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -1007,7 +1007,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    protected function adjustSelectedIndex(newIndex:int):void
+    protected function adjustSelection(newIndex:int, add:Boolean=false):void
     {
         if (_proposedSelectedIndex != NO_PROPOSED_SELECTION)
             _proposedSelectedIndex = newIndex;
@@ -1036,7 +1036,7 @@
         // If an item is added before the selected item, bump up our
         // selected index backing variable.
         if (index <= selectedIndex)
-            adjustSelectedIndex(selectedIndex + 1);
+            adjustSelection(selectedIndex + 1);
     }

     /**
@@ -1074,13 +1074,13 @@
                     selectedIndex = 0;
             }
             else
-                adjustSelectedIndex(-1);
+                adjustSelection(-1);
         }
         else if (index < selectedIndex)
         {
             // An item below the selected index has been removed, bump
             // the selected index backing variable.
-            adjustSelectedIndex(selectedIndex - 1);
+            adjustSelection(selectedIndex - 1);
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 11675
Author:   hmuller@adobe.com
Date:     2009-11-12T00:25:39.300334Z

Log Message:
-----------
Added minValue,maxValue,etc Style/Inspectable metadata tags for tools.

QE notes:
Doc notes:
Bugs: sdk-24100
Reviewer: Glenn
Tests run:
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/EaseInOutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/styles/metadata/BasicInheritingTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/styles/metadata/BasicNonInheritingTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientEntry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Keyframe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/styles/metadata/AdvancedInheritingTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -51,7 +51,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="backgroundAlpha", type="Number", inherit="no")]
+[Style(name="backgroundAlpha", type="Number", inherit="no", minValue="0.0", maxValue="1.0")]

 /**
  *  The color of the background of the entire
@@ -351,6 +351,8 @@
      *  @private
      */
 	private var _maxDisplayedLines:int = 0;
+
+    [Inspectable(minValue="-1")]

     /**
      *  An integer which determines whether, and where,


- removed dead code

- removed dead code

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@129 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/ui/UIObject.as
+++ src/reprise/ui/UIObject.as
@@ -684,9 +684,6 @@
 				return name;
 			}
 			return m_parentElement.toString() + '.' + name;
-			//TODO: check if serializing the full path is needed for inspection
-			refreshSelectorPath();
-			return m_selectorPath.split('@').join('');
 		}