Transferred from the Adobe Open Source Subversion Repository

Revision: 17821
Author:   klin@adobe.com
Date:     2010-09-23T19:01:28.405845Z

Log Message:
-----------
Fix variableRowHeight support in GridDimensions and other various bugs. These changes also fix Grid to follow the correct measure rules such as rowHeight having a real effect on the typical row height.

Grid.as - The rowHeight is now backed by GridDimensions.defaultRowHeight now. Moved some clearing code down to commitProperties.

GridDimensions.as - Removed fixedRowHeight. Instead, we use a variableRowHeight Boolean that reflects the Grid’s value. The defaultRowHeight returns Grid’s rowHeight if rowHeight is explicitly set. If rowHeight isn’t set, defaultRowHeight returns the maximum typical cell height. defaultRowHeight also defaults to NaN now instead of 26.

GridLayout.as - Fixed an RTE from getItemRendererAt() in the case that bounds is null. Removed some excess code.

GridColumn.as - Fixed an edge case which was causing an RTE where someone sets the dataField to null.

QE notes: No
Doc notes: No
Bugs: No
Reviewer: Hans
Tests run: checkintests, 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/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridDimensions.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/supportClasses/GridLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
@@ -133,7 +133,8 @@

     private const typicalCellWidths:Vector.<Number> = new Vector.<Number>();
     private const typicalCellHeights:Vector.<Number> = new Vector.<Number>();
-    private var isFirstTypicalCellHeight:Boolean = true;
+    private var maxTypicalCellHeight:Number = NaN;
+    private var useMaxTypicalCellHeight:Boolean = true;

     //--------------------------------------------------------------------------
     //
@@ -280,18 +281,22 @@
     //  defaultRowHeight
     //----------------------------------

-    /**
-     *  If this changes, update the ASDoc for GridLayout/getItemRendererAt().
-     */
-    private var _defaultRowHeight:Number = 26;
-
-    /**
-     *  The default height of a row. The defaultRowHeight is always
-     *  bounded by the minRowHeight and maxRowHeight.
+    private var _defaultRowHeight:Number = NaN;
+
+    /**
+     *  The default height of a row.
+     *
+     *
If this property is not set explicitly, it will use the maximum
+     *  of the typical cell heights.

+     *
+     *
When variableRowHeight is false, all rows have a height of
+     *  defaultRowHeight.

+     *
+     *  @default NaN
      */
     public function get defaultRowHeight():Number
     {
-        return _defaultRowHeight;
+        return useMaxTypicalCellHeight ? maxTypicalCellHeight : _defaultRowHeight;
     }

     /**
@@ -303,6 +308,7 @@
             return;

         _defaultRowHeight = bound(value, _minRowHeight, _maxRowHeight);
+        useMaxTypicalCellHeight = isNaN(_defaultRowHeight);

         // reset recent node.
         recentNode = null;
@@ -320,35 +326,14 @@
     public var defaultColumnWidth:Number = 150;

     //----------------------------------
-    //  fixedRowHeight
-    //----------------------------------
-
-    private var _fixedRowHeight:Number = NaN;
-
-    /**
-     *  If fixedRowHeight is set, calling getRowHeight will return
-     *  its value for every row. Individual cell heights are not
-     *  affected, but calling getCellBounds will return bounds
-     *  respecting fixedRowHeight. The fixedRowHeight is always
-     *  bounded by the minRowHeight and maxRowHeight.
-     *
-     *  @default NaN
-     */
-    public function get fixedRowHeight():Number
-    {
-        return _fixedRowHeight;
-    }
-
-    /**
-     *  @private
-     */
-    public function set fixedRowHeight(value:Number):void
-    {
-        if (value == _fixedRowHeight)
-            return;
-
-        _fixedRowHeight = bound(value, _minRowHeight, _maxRowHeight);
-    }
+    //  variableRowHeight
+    //----------------------------------
+
+    /**
+     *  If variableRowHeight is false, calling getRowHeight
+     *  will return the value of defaultRowHeight.
+     */
+    public var variableRowHeight:Boolean = true;

     //----------------------------------
     //  minRowHeight
@@ -376,7 +361,6 @@

         _minRowHeight = value;
         _defaultRowHeight = Math.max(_defaultRowHeight, _minRowHeight);
-        _fixedRowHeight = Math.max(_fixedRowHeight, _minRowHeight);
     }

     //----------------------------------
@@ -405,7 +389,6 @@

         _maxRowHeight = value;
         _defaultRowHeight = Math.min(_defaultRowHeight, _maxRowHeight);
-        _fixedRowHeight = Math.min(_fixedRowHeight, _maxRowHeight);
     }

     //--------------------------------------------------------------------------
@@ -428,11 +411,7 @@
         // Unless setRowHeight is called, return the max cell height for this row
         var height:Number = defaultRowHeight;

-        if (!isNaN(fixedRowHeight))
-        {
-            height = fixedRowHeight;
-        }
-        else
+        if (variableRowHeight)
         {
             var node:GridRowNode = rowList.find(row);
             if (node)
@@ -444,7 +423,7 @@
             }
         }

-        return bound(height, minRowHeight, maxRowHeight);
+        return (!isNaN(height)) ? bound(height, minRowHeight, maxRowHeight) : height;
     }

     /**
@@ -455,7 +434,7 @@
      */
     public function setRowHeight(row:int, height:Number):void
     {
-        if (!isNaN(fixedRowHeight))
+        if (!variableRowHeight)
             return;

         var node:GridRowNode = rowList.find(row);
@@ -522,7 +501,7 @@
      */
     public function setCellHeight(row:int, col:int, height:Number):void
     {
-        if (!isNaN(fixedRowHeight))
+        if (!variableRowHeight)
             return;

         var node:GridRowNode = rowList.find(row);
@@ -591,10 +570,7 @@
     public function getCellY(row:int, col:int):Number
     {
         // no cache so we use default heights for each row.
-        if (!isNaN(fixedRowHeight))
-            return row * (fixedRowHeight + rowGap);
-
-        if (rowList.length == 0)
+        if (!variableRowHeight || rowList.length == 0)
             return row * (defaultRowHeight + rowGap);

         if (row == 0)
@@ -807,13 +783,7 @@

         var index:int;

-        if (!isNaN(fixedRowHeight))
-        {
-            index = y / (fixedRowHeight + rowGap);
-            return index < _rowCount ? index : -1;
-        }
-
-        if (rowList.length == 0)
+        if (!variableRowHeight || rowList.length == 0)
         {
             index = y / (defaultRowHeight + rowGap);
             return index < _rowCount ? index : -1;
@@ -1066,10 +1036,7 @@
         if (nRows > 1)
             contentHeight += (nRows - 1) * rowGap;

-        if (!isNaN(fixedRowHeight))
-            return contentHeight + nRows * fixedRowHeight;
-
-        if (rowList.length == 0)
+        if (!variableRowHeight || rowList.length == 0)
             return contentHeight + nRows * defaultRowHeight;

         var node:GridRowNode = rowList.first;
@@ -1122,12 +1089,8 @@
         if (nRows > 1)
             contentHeight += (nRows - 1) * rowGap;

-        if (!isNaN(fixedRowHeight))
-            return contentHeight + nRows * fixedRowHeight;
-
-        // if typical cell heights have been specified.
-        if (!isFirstTypicalCellHeight)
-            return contentHeight + nRows * defaultRowHeight
+        if (!variableRowHeight || !isNaN(defaultRowHeight))
+            return contentHeight + nRows * defaultRowHeight;

         return 0;
     }
@@ -1165,24 +1128,14 @@
     {
         typicalCellHeights[columnIndex] = value;

-        // if this is the first cell height, set default to it
-        if (isFirstTypicalCellHeight)
-        {
-            this.defaultRowHeight = value;
-            isFirstTypicalCellHeight = false;
-        }
-        else
-        {
-            // otherwise, find the max of the typical cell heights.
-            var max:Number = 0;
-            const typicalCellHeightsLength:int = typicalCellHeights.length;
-            for (var i:int = 0; i < typicalCellHeightsLength; i++)
-            {
-                if (!isNaN(typicalCellHeights[i]))
-                    max = Math.max(max, typicalCellHeights[i]);
-            }
-            this.defaultRowHeight = max;
-        }
+        var max:Number = 0;
+        const typicalCellHeightsLength:int = typicalCellHeights.length;
+        for (var i:int = 0; i < typicalCellHeightsLength; i++)
+        {
+            if (!isNaN(typicalCellHeights[i]))
+                max = Math.max(max, typicalCellHeights[i]);
+        }
+        this.maxTypicalCellHeight = max;
     }

     /**
@@ -1192,8 +1145,7 @@
     {
         clearVector(typicalCellWidths, NaN);
         clearVector(typicalCellHeights, NaN);
-        defaultRowHeight = 26;
-        isFirstTypicalCellHeight = true;
+        maxTypicalCellHeight = NaN;
     }

     /**


fix FRAGMENT_PLAYING not being fired for first fragment after seek

--- src/org/mangui/hls/stream/StreamBuffer.as
+++ src/org/mangui/hls/stream/StreamBuffer.as
@@ -395,9 +395,10 @@

         /* filter/tweak tags to seek accurately into the stream */
         private function seekFilterTags(tags : Vector.<FLVData>, start_position : Number) : Vector.<FLVData> {
-            var aacIdx : int,avcIdx : int,disIdx : int,keyIdx : int,lastIdx : int;
-            aacIdx = avcIdx = disIdx = keyIdx = lastIdx = -1;
+            var aacIdx : int,avcIdx : int,disIdx : int,metIdx : int,keyIdx : int,lastIdx : int;
+            aacIdx = avcIdx = disIdx = metIdx = keyIdx = lastIdx = -1;
             var filteredTags : Vector.<FLVData>=  new Vector.<FLVData>();
+            var idx2Clone : Vector.<int> = new Vector.<int>();

             // loop through all tags and find index position of header tags located before start position
             for (var i : int = 0; i < tags.length; i++) {
@@ -405,10 +406,13 @@
                 if (data.position_absolute - _playlist_sliding_main <= start_position) {
                     lastIdx = i;
                     // current tag is before requested start position
-                    // grab AVC/AAC/DISCONTINUITY/KEYFRAMES tag located just before
+                    // grab AVC/AAC/DISCONTINUITY/METADATA/KEYFRAMES tag located just before
                     switch(data.tag.type) {
                         case FLVTag.DISCONTINUITY:
                             disIdx = i;
+                            break;
+                        case FLVTag.METADATA:
+                            metIdx = i;
                             break;
                         case FLVTag.AAC_HEADER:
                             aacIdx = i;
@@ -441,29 +445,20 @@
                 first_pts = tags[keyIdx].tag.pts;
                 _seek_position_real = tags[keyIdx].position;
             }
-
-            // inject discontinuity/AVC header/AAC header if available
-            if (disIdx != -1) {
-                data = tags[disIdx];
+            // inject discontinuity/metadata/AVC header/AAC header if available
+            if (disIdx != -1)  idx2Clone.push(disIdx);
+            if (metIdx != -1)  idx2Clone.push(metIdx);
+            if (aacIdx != -1)  idx2Clone.push(aacIdx);
+            if (avcIdx != -1)  idx2Clone.push(avcIdx);
+
+            for each (i in idx2Clone) {
+                data = tags[i];
                 var tagclone : FLVTag = data.tag.clone();
                 tagclone.pts = tagclone.dts = first_pts;
                 var dataclone : FLVData = new FLVData(tagclone, _seek_position_real, 0, data.continuity, data.loaderType);
                 filteredTags.push(dataclone);
             }
-            if (aacIdx != -1) {
-                data = tags[aacIdx];
-                tagclone = data.tag.clone();
-                tagclone.pts = tagclone.dts = first_pts;
-                dataclone = new FLVData(tagclone, _seek_position_real, 0, data.continuity, data.loaderType);
-                filteredTags.push(dataclone);
-            }
-            if (avcIdx != -1) {
-                data = tags[avcIdx];
-                tagclone = tags[avcIdx].tag.clone();
-                tagclone.pts = tagclone.dts = first_pts;
-                dataclone = new FLVData(tagclone, _seek_position_real, 0, data.continuity, data.loaderType);
-                filteredTags.push(dataclone);
-            }
+
             // inject tags from nearest keyframe to start position
             for (i = keyIdx; i < lastIdx; i++) {
                 data = tags[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@1251554 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/automation/src/mx/automation/events/AutomationAirEvent.as
+++ frameworks/projects/automation/src/mx/automation/events/AutomationAirEvent.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 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: 10672
Author:   dloverin@adobe.com
Date:     2009-09-29T11:43:11.672658Z

Log Message:
-----------
Use styleManager instance instead of the StyleManager singleton (airframework, halo, and spark projects)

A couple updates in the framework project as well.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex
Tests run: checkintests
Is noteworthy for integration: no.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/SliderTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/ProgrammaticSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/SetActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/DataGridHeaderBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/TLFDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ProgressTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/TitleBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ButtonBarButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/NumericStepperDownSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/PopUpButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/ApplicationTitleBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/TabSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/CheckBoxIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/NumericStepperUpSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleModule.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ProgressIndeterminateSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/RadioButtonIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/DateChooserMonthArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/SliderThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ComboBoxArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/MenuBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ProgressBarSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ScrollThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SetStyleActionInstance.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
@@ -101,7 +101,7 @@
             var idx:int;

             // translate these colors into uints
-            StyleManager.getColorNames(alternatingColors);
+            styleManager.getColorNames(alternatingColors);

             if (parent is GroupBase)
                 idx = GroupBase(parent).getElementIndex(this);


Transferred from the Adobe Open Source Subversion Repository

Revision: 4009
Author:   jimurphy@adobe.com
Date:     2008-11-04T15:10:34.970681Z

Log Message:
-----------
Merged alpha_gumbo revisions 3929,3936-3937,3945,3956,3971,3986,3994,4002,4006 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon_small.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.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/framework/src/mx/effects/effectClasses/TweenEffectInstance.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.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/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon_small.png</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
@@ -158,6 +158,20 @@
     //
     //--------------------------------------------------------------------------

+    //----------------------------------
+    //  playheadTime
+    //----------------------------------
+
+    /**
+     *  @copy mx.effects.IEffectInstance#playheadTime
+     */
+    override public function get playheadTime():Number
+    {
+        if (animation)
+            return animation.elapsedTime;
+        return 0;
+    }
+
     /**
      *  @private
      */
@@ -210,10 +224,10 @@
      *  @param playheadTime The position, in milliseconds, between 0
      *  and the value of the duration property.
      */
-    public function seek(playheadTime:Number):void
+    override public function seek(playheadTime:Number):void
     {
         if (animation)
-            animation.seek(playheadTime);
+            animation.seek(playheadTime, true);
         else
             _seekTime = playheadTime;
     }


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

--- frameworks/projects/advancedgrids/src/mx/olap/IOLAPSet.as
+++ frameworks/projects/advancedgrids/src/mx/olap/IOLAPSet.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 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: 4752
Author:   rfrishbe@adobe.com
Date:     2009-01-30T01:54:14.279718Z

Log Message:
-----------
SkinStates metadata change.  Now each skin state is enumerated on its own line with its own metadata ([SkinState("normal")] instead of [SkinStates("normal", "disabled")])

Also changed the builds so that we don't keep unnecessary metadata around anymore at runtime (SkinStates, HostComponent, and States fall into this category).

QE Notes: None
Doc Notes: None
Bugs: SDK-18939
Reviewer: Hans, Glenn
tests: checkintests, mustella SkinnableComponent, FxButton, FxToggleButton, Group, DataGroup

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxContainerBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4/.actionScriptProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxSpinner.as</path>

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

--- frameworks/projects/spark/src/spark/components/Spinner.as
+++ frameworks/projects/spark/src/spark/components/Spinner.as
@@ -40,9 +40,14 @@
 [Style(name="symbolColor", type="uint", format="Color", inherit="yes")]

 /**
- *  Skin states for this component.
+ *  Normal State
  */
-[SkinStates("normal", "disabled")]
+[SkinState("normal")]
+
+/**
+ *  Disabled State
+ */
+[SkinState("disabled")]

 [IconFile("FxSpinner.png")]


Transferred from the Adobe Open Source Subversion Repository

Revision: 17243
Author:   klin@adobe.com
Date:     2010-08-09T23:22:58.663499Z

Log Message:
-----------
Fix for 2 bugs in Form.

-FormLayout clears the column widths whenever the target is set to null. This happens when the layout of the Group is changed.
-Changed the disabled alpha in StackedFormItemSkin to include all disabled states.

QE notes: No
Doc notes: No
Bugs: SDK-27260, SDK-27325
Reviewer: Jason
Tests run: checkintests, Form
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/FormLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/StackedFormItemSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/layouts/FormLayout.as
+++ frameworks/projects/spark/src/spark/layouts/FormLayout.as
@@ -42,6 +42,45 @@
     public function FormLayout()
     {
         super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set target(value:GroupBase):void
+    {
+        if (target == value)
+            return;
+
+        // reset FormItemLayout columns when value is null.
+        // target is set to null in GroupBase when swapping layouts.
+        if (value == null)
+        {
+            var layout:LayoutBase;
+            const nElts:int = target.numElements;
+            var elt:ILayoutElement
+
+            for (var i:int = 0; i < nElts; i++)
+            {
+                elt = target.getElementAt(i);
+                if (!elt.includeInLayout)
+                    continue;
+
+                layout = getElementLayout(elt);
+
+                // Reset the column widths of each FormItemLayout
+                if (layout is FormItemLayout)
+                    (layout as FormItemLayout).setLayoutColumnWidths(null);
+            }
+        }
+
+        super.target = value;
     }

     //--------------------------------------------------------------------------
@@ -162,6 +201,7 @@
         }
     }

+
     //--------------------------------------------------------------------------
     //
     //  Methods


fixed display bug (wasn't showing number of columns in data table label

--- WeaveData/src/weave/services/beans/EntityHierarchyInfo.as
+++ WeaveData/src/weave/services/beans/EntityHierarchyInfo.as
@@ -44,7 +44,7 @@
 			var str:String = tableTitle;

 			if (type == EntityType.TABLE)
-				lang("{0} ({1})", str, branchInfo.numChildren);
+				str = lang("{0} ({1})", str, branchInfo.numChildren);

 			if (debug)
 				str = lang("({0}#{1}) {2}", typeStr, branchInfo.id, str);


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/automation_air/src/mx/automation/air/AirFunctionsHelper.as
+++ frameworks/projects/automation_air/src/mx/automation/air/AirFunctionsHelper.as
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.automation.air
+{
+	import flash.display.DisplayObject;
+	import flash.geom.Point;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationManager2;
+	import mx.core.FlexGlobals;
+	[Mixin]
+	public class AirFunctionsHelper
+	{
+		private var _stageStartCoordinates:Point;
+		//private var _stageWidth:int;
+		//private var _stageHeight:int;
+
+		//private var _applicationStartCoordinates:Point;
+		//private var _applicationWidth:int;
+		//private var _applicationHeight:int;
+
+
+		//private var _chromeHeight:int;
+		//private var _chromeWidth:int;
+
+		private var _appTitle:String;
+		private var _appWindow:DisplayObject;
+
+		public function AirFunctionsHelper(windowId:String)
+		{
+			if (!windowId)
+				//_appWindow =   Application.application as DisplayObject;
+				_appWindow =   FlexGlobals.topLevelApplication as DisplayObject;
+			else
+			{
+				var automationManager:IAutomationManager2 = Automation.automationManager2;
+				if(automationManager)
+					_appWindow = automationManager.getAirWindow(windowId);
+			}
+		}
+
+		public static function init(root:DisplayObject):void
+		{
+
+		}
+
+		// native window 's bound will give the totla and stage gives inner (statge width and stage heigjt
+
+		public  function get stageStartCoordinates():Point
+		{
+			// every time when the user asks this, we need to recalcuate and send the same
+
+			var stageStartScreenCoordinates:Point;
+
+			var startPoint:Point = new Point(0,0);
+			if (_appWindow)
+			{
+				var startGloabalPoint:Point = _appWindow.localToGlobal(startPoint);
+				//stageStartScreenCoordinates = Application.application.stage.nativeWindow.globalToScreen(startGloabalPoint);
+				stageStartScreenCoordinates = _appWindow.stage.nativeWindow.globalToScreen(startGloabalPoint);
+			}
+
+			_stageStartCoordinates = stageStartScreenCoordinates;
+			return _stageStartCoordinates;
+
+		}
+
+		public function get activeWindow():DisplayObject
+		{
+			if(_appWindow != null)
+				return _appWindow;
+			else
+				return FlexGlobals.topLevelApplication as DisplayObject;
+		}
+
+		public  function get appTitle():String
+		{
+			_appTitle=   FlexGlobals.topLevelApplication.stage.nativeWindow.title;
+			return _appTitle;
+		}
+	}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 22273
Author:   egeorgie@adobe.com
Date:     2011-08-29T18:55:01.945533Z

Log Message:
-----------
Fix SDK-31342 SplashScreenImage class does not implement IMXMLObject

- Implement IMXMLObject interface

QE notes:
Doc notes:
Bugs: SDK-31342
Reviewer:  Chiedo
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as

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

--- frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as
+++ frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as
@@ -11,6 +11,7 @@

 package spark.preloaders
 {
+import mx.core.IMXMLObject;
 import mx.core.mx_internal;

 use namespace mx_internal;
@@ -96,7 +97,7 @@
  *  @playerversion AIR 3
  *  @productversion Flex 4.5.2
  */
-public class SplashScreenImage
+public class SplashScreenImage implements IMXMLObject
 {
     //--------------------------------------------------------------------------
     //
@@ -157,7 +158,7 @@
     {
         _mxmlContent = value;
     }
-
+
     //--------------------------------------------------------------------------
     //
     //  Methods
@@ -205,5 +206,24 @@

         return bestMatch ? bestMatch.source : null;
     }
+
+    /**
+     *  Called after the implementing object has been created and all
+     *  component properties specified on the MXML tag have been initialized.
+     *
+     *  @param document The MXML document that created this object.
+     *
+     *  @param id The identifier used by document to refer
+     *  to this object.
+     *  If the object is a deep property on document,
+     *  id is null.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public function initialized(document:Object, id:String):void
+    {
+    }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 16507
Author:   chiedozi@adobe.com
Date:     2010-06-09T20:03:51.811780Z

Log Message:
-----------
Fixed a small memory leak related to dataProvider in ButtonBar, ButtonBarBase, ListBase and AsyncListView

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/AsyncListView.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
@@ -195,8 +195,8 @@

         if (value is ISelectableList)
         {
-            value.addEventListener(FlexEvent.VALUE_COMMIT, dataProvider_changeHandler);
-            value.addEventListener(IndexChangedEvent.CHANGE, dataProvider_changeHandler);
+            value.addEventListener(FlexEvent.VALUE_COMMIT, dataProvider_changeHandler, false, 0, true);
+            value.addEventListener(IndexChangedEvent.CHANGE, dataProvider_changeHandler, false, 0, true);
         }

         super.dataProvider = value;


Transferred from the Adobe Open Source Subversion Repository

Revision: 17913
Author:   klin@adobe.com
Date:     2010-09-29T00:22:43.888891Z

Log Message:
-----------
Fix for hover not working in wireframe List. "inputMode" needs to be renamed "interactionMode".

QE notes: No
Doc notes: No
Bugs: SDK-27933
Reviewer: Hans
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/ListSkin.mxml</path>

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

--- frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultItemRenderer.as
+++ frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultItemRenderer.as
@@ -11,603 +11,603 @@

 package spark.skins.wireframe
 {
-
-    import flash.display.DisplayObject;
-    import flash.events.MouseEvent;
-    import flash.geom.Point;
-
-    import mx.controls.listClasses.*;
-    import mx.core.IDataRenderer;
-    import mx.core.UIComponent;
-    import mx.core.mx_internal;
-    import mx.events.FlexEvent;
-
-    import spark.components.IItemRenderer;
-    import spark.components.Label;
-    import spark.components.supportClasses.TextBase;
-
-    use namespace mx_internal;
-
-    //--------------------------------------
-    //  Events
-    //--------------------------------------
-
-    /**
-     *  Dispatched when the data property changes.
-     *
-     *
When you use a component as an item renderer,
-     *  the data property contains the data to display.
-     *  You can listen for this event and update the component
-     *  when the data property changes.

-     *
-     *  @eventType mx.events.FlexEvent.DATA_CHANGE
+
+import flash.display.DisplayObject;
+import flash.events.MouseEvent;
+import flash.geom.Point;
+
+import mx.controls.listClasses.*;
+import mx.core.IDataRenderer;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+
+import spark.components.IItemRenderer;
+import spark.components.Label;
+import spark.components.supportClasses.TextBase;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the data property changes.
+ *
+ *
When you use a component as an item renderer,
+ *  the data property contains the data to display.
+ *  You can listen for this event and update the component
+ *  when the data property changes.

+ *
+ *  @eventType mx.events.FlexEvent.DATA_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Event(name="dataChange", type="mx.events.FlexEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+include "../../../../../spark/src/spark/styles/metadata/BasicInheritingTextStyles.as"
+include "../../../../../spark/src/spark/styles/metadata/AdvancedInheritingTextStyles.as"
+include "../../../../../spark/src/spark/styles/metadata/SelectionFormatTextStyles.as"
+
+/**
+ *  The colors to use for the backgrounds of the items in the list.
+ *  The value is an array of two or more colors.
+ *  The backgrounds of the list items alternate among the colors in the array.
+ *
+ *  @default undefined
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="alternatingItemColors", type="Array", arrayType="uint", format="Color", inherit="yes", theme="spark")]
+
+/**
+ *  Color of focus ring when the component is in focus
+ *
+ *  @default #A9A9A9
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="focusColor", type="uint", format="Color", inherit="yes", theme="spark")]
+
+/**
+ *  Color of the highlights when the mouse is over the component
+ *
+ *  @default #DDDDDD
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="rollOverColor", type="uint", format="Color", inherit="yes", theme="spark")]
+
+/**
+ *  Color of any symbol of a component. Examples include the check mark of a CheckBox or
+ *  the arrow of a scroll button
+ *
+ *  @default #000000
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="focusBlendMode", kind="style")]
+[Exclude(name="focusThickness", kind="style")]
+
+/**
+ *  The DefaultItemRenderer class defines the default item renderer
+ *  for a List control.
+ *  The default item renderer just draws the text associated
+ *  with each item in the list.
+ *
+ *
You can override the default item renderer
+ *  by creating a custom item renderer.

+ *
+ *  @see spark.components.List
+ *  @see mx.core.IDataRenderer
+ *  @see spark.components.IItemRenderer
+ *  @see spark.components.supportClasses.ItemRenderer
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class DefaultItemRenderer extends UIComponent
+    implements IDataRenderer, IItemRenderer
+{
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    [Event(name="dataChange", type="mx.events.FlexEvent")]
-
-    //--------------------------------------
-    //  Styles
-    //--------------------------------------
-
-    include "../../../../../spark/src/spark/styles/metadata/BasicInheritingTextStyles.as"
-    include "../../../../../spark/src/spark/styles/metadata/AdvancedInheritingTextStyles.as"
-    include "../../../../../spark/src/spark/styles/metadata/SelectionFormatTextStyles.as"
-
-    /**
-     *  The colors to use for the backgrounds of the items in the list.
-     *  The value is an array of two or more colors.
-     *  The backgrounds of the list items alternate among the colors in the array.
-     *
-     *  @default undefined
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    [Style(name="alternatingItemColors", type="Array", arrayType="uint", format="Color", inherit="yes", theme="spark")]
-
-    /**
-     *  Color of focus ring when the component is in focus
-     *
-     *  @default #A9A9A9
+    public function DefaultItemRenderer()
+    {
+        super();
+        addHandlers();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    //--------------------------------------------------------------------------
+    //
+    //  Private Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Flag that is set when the mouse is hovered over the item renderer.
+     */
+    private var hovered:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function get baselinePosition():Number
+    {
+        if (!labelDisplay || !validateBaselinePosition())
+            return super.baselinePosition;
+
+        return labelDisplay.y + labelDisplay.baselinePosition;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Public Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  data
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the data property.
+     */
+    private var _data:Object;
+
+    [Bindable("dataChange")]
+
+    /**
+     *  The implementation of the data property
+     *  as defined by the IDataRenderer interface.
+     *  When set, it stores the value and invalidates the component
+     *  to trigger a relayout of the component.
+     *
+     *  @see mx.core.IDataRenderer
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
+     */
+    public function get data():Object
+    {
+        return _data;
+    }
+
+    /**
+     *  @private
+     */
+    public function set data(value:Object):void
+    {
+        _data = value;
+
+        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
+    }
+
+    //----------------------------------
+    //  itemIndex
+    //----------------------------------
+
+    /**
+     *  @private
+     *  storage for the itemIndex property
+     */
+    private var _itemIndex:int;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @default 0
+     */
+    public function get itemIndex():int
+    {
+        return _itemIndex;
+    }
+
+    /**
+     *  @private
+     */
+    public function set itemIndex(value:int):void
+    {
+        if (value == _itemIndex)
+            return;
+
+        _itemIndex = value;
+        invalidateDisplayList();
+    }
+
+    //----------------------------------
+    //  label
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage var for label
      */
-    [Style(name="focusColor", type="uint", format="Color", inherit="yes", theme="spark")]
-
-    /**
-     *  Color of the highlights when the mouse is over the component
-     *
-     *  @default #DDDDDD
+    private var _label:String = "";
+
+    /**
+     *  @inheritDoc
+     *
+     *  @default ""
+     */
+    public function get label():String
+    {
+        return _label;
+    }
+
+    /**
+     *  @private
+     */
+    public function set label(value:String):void
+    {
+        if (value == _label)
+            return;
+
+        _label = value;
+
+        // Push the label down into the labelDisplay,
+        // if it exists
+        if (labelDisplay)
+            labelDisplay.text = _label;
+    }
+
+    //----------------------------------
+    //  labelDisplay
+    //----------------------------------
+
+    /**
+     *  Optional item renderer label component.
+     *  This component is used to determine the value of the
+     *  baselinePosition property in the host component of
+     *  the item renderer.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
-     */
-    [Style(name="rollOverColor", type="uint", format="Color", inherit="yes", theme="spark")]
-
-    /**
-     *  Color of any symbol of a component. Examples include the check mark of a CheckBox or
-     *  the arrow of a scroll button
-     *
-     *  @default #000000
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    [Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark")]
-
-    //--------------------------------------
-    //  Excluded APIs
-    //--------------------------------------
-
-    [Exclude(name="focusBlendMode", kind="style")]
-    [Exclude(name="focusThickness", kind="style")]
-
-    /**
-     *  The DefaultItemRenderer class defines the default item renderer
-     *  for a List control.
-     *  The default item renderer just draws the text associated
-     *  with each item in the list.
+     */
+    public var labelDisplay:TextBase;
+
+    //----------------------------------
+    //  showsCaret
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the showsCaret property
+     */
+    private var _showsCaret:Boolean = false;
+
+    /**
+     *  @inheritDoc
      *
-     *
You can override the default item renderer
-     *  by creating a custom item renderer.

+     *  @default false
+     */
+    public function get showsCaret():Boolean
+    {
+        return _showsCaret;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showsCaret(value:Boolean):void
+    {
+        if (value == _showsCaret)
+            return;
+
+        _showsCaret = value;
+        invalidateDisplayList();
+    }
+
+    //----------------------------------
+    //  selected
+    //----------------------------------
+    /**
+     *  @private
+     *  storage for the selected property
+     */
+    private var _selected:Boolean = false;
+
+    /**
+     *  @inheritDoc
      *
-     *  @see spark.components.List
-     *  @see mx.core.IDataRenderer
-     *  @see spark.components.IItemRenderer
-     *  @see spark.components.supportClasses.ItemRenderer
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public class DefaultItemRenderer extends UIComponent
-        implements IDataRenderer, IItemRenderer
-    {
-
-        //--------------------------------------------------------------------------
-        //
-        //  Constructor
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  Constructor.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public function DefaultItemRenderer()
-        {
-            super();
-            addHandlers();
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Variables
-        //
-        //--------------------------------------------------------------------------
-
-        //--------------------------------------------------------------------------
-        //
-        //  Private Properties
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         *  Flag that is set when the mouse is hovered over the item renderer.
-         */
-        private var hovered:Boolean = false;
-
-        //--------------------------------------------------------------------------
-        //
-        //  Overridden properties: UIComponent
-        //
-        //--------------------------------------------------------------------------
-
-        //----------------------------------
-        //  baselinePosition
-        //----------------------------------
-
-        /**
-         *  @private
-         */
-        override public function get baselinePosition():Number
-        {
-            if (!labelDisplay || !validateBaselinePosition())
-                return super.baselinePosition;
+     *  @default false
+     */
+    public function get selected():Boolean
+    {
+        return _selected;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selected(value:Boolean):void
+    {
+        if (value != _selected)
+        {
+            _selected = value;
+            invalidateDisplayList();
+        }
+    }
+
+    //----------------------------------
+    //  dragging
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dragging property.
+     */
+    private var _dragging:Boolean = false;
+
+    /**
+     *  @inheritDoc
+     */
+    public function get dragging():Boolean
+    {
+        return _dragging;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dragging(value:Boolean):void
+    {
+        if (value == _dragging)
+            return;
+
+        _dragging = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        if (!labelDisplay)
+        {
+            labelDisplay = new Label();
+            addChild(DisplayObject(labelDisplay));
+            if (_label != "")
+                labelDisplay.text = _label;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        // label has padding of 3 on left and right and padding of 7 on top and 8 on bottom.
+        measuredWidth = labelDisplay.getPreferredBoundsWidth() + 6;
+        measuredHeight = labelDisplay.getPreferredBoundsHeight() + 13;
+
+        measuredMinWidth = labelDisplay.getMinBoundsWidth() + 6;
+        measuredMinHeight = labelDisplay.getMinBoundsHeight() + 13;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        graphics.clear();
+
+        var backgroundColor:uint;
+        var drawBackground:Boolean = true;
+        if (selected)
+            backgroundColor = getStyle("selectionColor");
+        else if (hovered)
+            backgroundColor = getStyle("rollOverColor");
+        else
+        {
+            var alternatingColors:Array = getStyle("alternatingItemColors");

-            return labelDisplay.y + labelDisplay.baselinePosition;
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Public Properties
-        //
-        //--------------------------------------------------------------------------
-
-        //----------------------------------
-        //  data
-        //----------------------------------
-
-        /**
-         *  @private
-         *  Storage for the data property.
-         */
-        private var _data:Object;
-
-        [Bindable("dataChange")]
-
-        /**
-         *  The implementation of the data property
-         *  as defined by the IDataRenderer interface.
-         *  When set, it stores the value and invalidates the component
-         *  to trigger a relayout of the component.
-         *
-         *  @see mx.core.IDataRenderer
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public function get data():Object
-        {
-            return _data;
-        }
-
-        /**
-         *  @private
-         */
-        public function set data(value:Object):void
-        {
-            _data = value;
-
-            dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
-        }
-
-        //----------------------------------
-        //  itemIndex
-        //----------------------------------
-
-        /**
-         *  @private
-         *  storage for the itemIndex property
-         */
-        private var _itemIndex:int;
-
-        /**
-         *  @inheritDoc
-         *
-         *  @default 0
-         */
-        public function get itemIndex():int
-        {
-            return _itemIndex;
-        }
-
-        /**
-         *  @private
-         */
-        public function set itemIndex(value:int):void
-        {
-            if (value == _itemIndex)
-                return;
-
-            _itemIndex = value;
-            invalidateDisplayList();
-        }
-
-        //----------------------------------
-        //  label
-        //----------------------------------
-
-        /**
-         *  @private
-         *  Storage var for label
-         */
-        private var _label:String = "";
-
-        /**
-         *  @inheritDoc
-         *
-         *  @default ""
-         */
-        public function get label():String
-        {
-            return _label;
-        }
-
-        /**
-         *  @private
-         */
-        public function set label(value:String):void
-        {
-            if (value == _label)
-                return;
-
-            _label = value;
-
-            // Push the label down into the labelDisplay,
-            // if it exists
-            if (labelDisplay)
-                labelDisplay.text = _label;
-        }
-
-        //----------------------------------
-        //  labelDisplay
-        //----------------------------------
-
-        /**
-         *  Optional item renderer label component.
-         *  This component is used to determine the value of the
-         *  baselinePosition property in the host component of
-         *  the item renderer.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public var labelDisplay:TextBase;
-
-        //----------------------------------
-        //  showsCaret
-        //----------------------------------
-
-        /**
-         *  @private
-         *  Storage for the showsCaret property
-         */
-        private var _showsCaret:Boolean = false;
-
-        /**
-         *  @inheritDoc
-         *
-         *  @default false
-         */
-        public function get showsCaret():Boolean
-        {
-            return _showsCaret;
-        }
-
-        /**
-         *  @private
-         */
-        public function set showsCaret(value:Boolean):void
-        {
-            if (value == _showsCaret)
-                return;
-
-            _showsCaret = value;
-            invalidateDisplayList();
-        }
-
-        //----------------------------------
-        //  selected
-        //----------------------------------
-        /**
-         *  @private
-         *  storage for the selected property
-         */
-        private var _selected:Boolean = false;
-
-        /**
-         *  @inheritDoc
-         *
-         *  @default false
-         */
-        public function get selected():Boolean
-        {
-            return _selected;
-        }
-
-        /**
-         *  @private
-         */
-        public function set selected(value:Boolean):void
-        {
-            if (value != _selected)
+            if (alternatingColors && alternatingColors.length > 0)
             {
-                _selected = value;
-                invalidateDisplayList();
-            }
-        }
-
-        //----------------------------------
-        //  dragging
-        //----------------------------------
-
-        /**
-         *  @private
-         *  Storage for the dragging property.
-         */
-        private var _dragging:Boolean = false;
-
-        /**
-         *  @inheritDoc
-         */
-        public function get dragging():Boolean
-        {
-            return _dragging;
-        }
-
-        /**
-         *  @private
-         */
-        public function set dragging(value:Boolean):void
-        {
-            if (value == _dragging)
-                return;
-
-            _dragging = value;
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Overridden methods: UIComponent
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         */
-        override protected function createChildren():void
-        {
-            super.createChildren();
-
-            if (!labelDisplay)
-            {
-                labelDisplay = new Label();
-                addChild(DisplayObject(labelDisplay));
-                if (_label != "")
-                    labelDisplay.text = _label;
-            }
-        }
-
-        /**
-         *  @private
-         */
-        override protected function measure():void
-        {
-            super.measure();
-
-            // label has padding of 3 on left and right and padding of 7 on top and 8 on bottom.
-            measuredWidth = labelDisplay.getPreferredBoundsWidth() + 6;
-            measuredHeight = labelDisplay.getPreferredBoundsHeight() + 13;
-
-            measuredMinWidth = labelDisplay.getMinBoundsWidth() + 6;
-            measuredMinHeight = labelDisplay.getMinBoundsHeight() + 13;
-        }
-
-        /**
-         *  @private
-         */
-        override protected function updateDisplayList(unscaledWidth:Number,
-                                                      unscaledHeight:Number):void
-        {
-            super.updateDisplayList(unscaledWidth, unscaledHeight);
-
-            graphics.clear();
-
-            var backgroundColor:uint;
-            var drawBackground:Boolean = true;
-            if (selected)
-                backgroundColor = getStyle("selectionColor");
-            else if (hovered)
-                backgroundColor = getStyle("rollOverColor");
-            else
-            {
-                var alternatingColors:Array = getStyle("alternatingItemColors");
+                // translate these colors into uints
+                styleManager.getColorNames(alternatingColors);

-                if (alternatingColors && alternatingColors.length > 0)
-                {
-                    // translate these colors into uints
-                    styleManager.getColorNames(alternatingColors);
-
-                    backgroundColor = alternatingColors[itemIndex % alternatingColors.length];
-                }
-                else
-                {
-                    // don't draw background if it is the contentBackgroundColor. The
-                    // list skin handles the background drawing for us.
-                    drawBackground = false;
-                }
-            }
-
-            graphics.beginFill(backgroundColor, drawBackground ? 1 : 0);
-
-            if (showsCaret)
-            {
-                graphics.lineStyle(1, getStyle("selectionColor"));
-                graphics.drawRect(0.5, 0.5, unscaledWidth-1, unscaledHeight-1);
-            }
-            else
-            {
-                graphics.lineStyle();
-                graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
-            }
-
-            graphics.endFill();
-
-            // make sure our width/height is in the min/max for the label
-            var childWidth:Number = unscaledWidth - 6;
-            childWidth = Math.max(labelDisplay.getMinBoundsWidth(), Math.min(labelDisplay.getMaxBoundsWidth(), childWidth));
-
-            var childHeight:Number = unscaledHeight - 10;
-            childHeight = Math.max(labelDisplay.getMinBoundsHeight(), Math.min(labelDisplay.getMaxBoundsHeight(), childHeight));
-
-            // set the label's position and size
-            labelDisplay.setLayoutBoundsSize(childWidth, childHeight);
-            labelDisplay.setLayoutBoundsPosition(3, 7);
-        }
-
-        /**
-         *  @private
-         */
-        override public function styleChanged(styleName:String):void
-        {
-            var allStyles:Boolean = !styleName || styleName == "styleName";
-
-            super.styleChanged(styleName);
-
-            if (allStyles || styleName == "inputMode")
-            {
-                addHandlers();
-            }
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Event handling
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         *  Keeps track of whether rollover/rollout events were added
-         *
-         *  We need to be careful about calling add/remove event listener because
-         *  of the reference counting going on in
-         *  super.addEventListener/removeEventListener.
-         */
-        private var rolloverEventsAdded:Boolean = false;
-
-        /**
-         *  @private
-         *  Attach the mouse events.
-         */
-        private function addHandlers():void
-        {
-            if (getStyle("inputMode") == "mouse")
-            {
-                if (!rolloverEventsAdded)
-                {
-                    rolloverEventsAdded = true;
-                    addEventListener(MouseEvent.ROLL_OVER, itemRenderer_rollOverHandler);
-                    addEventListener(MouseEvent.ROLL_OUT, itemRenderer_rollOutHandler);
-                }
+                backgroundColor = alternatingColors[itemIndex % alternatingColors.length];
             }
             else
             {
-                if (rolloverEventsAdded)
-                {
-                    rolloverEventsAdded = false;
-                    removeEventListener(MouseEvent.ROLL_OVER, itemRenderer_rollOverHandler);
-                    removeEventListener(MouseEvent.ROLL_OUT, itemRenderer_rollOutHandler);
-                }
+                // don't draw background if it is the contentBackgroundColor. The
+                // list skin handles the background drawing for us.
+                drawBackground = false;
             }
         }

-        /**
-         *  @private
-         */
-        private function anyButtonDown(event:MouseEvent):Boolean
-        {
-            var type:String = event.type;
-            return event.buttonDown || (type == "middleMouseDown") || (type == "rightMouseDown");
-        }
-
-        /**
-         *  @private
-         *  Mouse rollOver event handler.
-         */
-        protected function itemRenderer_rollOverHandler(event:MouseEvent):void
-        {
-            if (!anyButtonDown(event))
+        graphics.beginFill(backgroundColor, drawBackground ? 1 : 0);
+
+        if (showsCaret)
+        {
+            graphics.lineStyle(1, getStyle("selectionColor"));
+            graphics.drawRect(0.5, 0.5, unscaledWidth-1, unscaledHeight-1);
+        }
+        else
+        {
+            graphics.lineStyle();
+            graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
+        }
+
+        graphics.endFill();
+
+        // make sure our width/height is in the min/max for the label
+        var childWidth:Number = unscaledWidth - 6;
+        childWidth = Math.max(labelDisplay.getMinBoundsWidth(), Math.min(labelDisplay.getMaxBoundsWidth(), childWidth));
+
+        var childHeight:Number = unscaledHeight - 10;
+        childHeight = Math.max(labelDisplay.getMinBoundsHeight(), Math.min(labelDisplay.getMaxBoundsHeight(), childHeight));
+
+        // set the label's position and size
+        labelDisplay.setLayoutBoundsSize(childWidth, childHeight);
+        labelDisplay.setLayoutBoundsPosition(3, 7);
+    }
+
+    /**
+     *  @private
+     */
+    override public function styleChanged(styleName:String):void
+    {
+        var allStyles:Boolean = !styleName || styleName == "styleName";
+
+        super.styleChanged(styleName);
+
+        if (allStyles || styleName == "inputMode")
+        {
+            addHandlers();
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handling
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Keeps track of whether rollover/rollout events were added
+     *
+     *  We need to be careful about calling add/remove event listener because
+     *  of the reference counting going on in
+     *  super.addEventListener/removeEventListener.
+     */
+    private var rolloverEventsAdded:Boolean = false;
+
+    /**
+     *  @private
+     *  Attach the mouse events.
+     */
+    private function addHandlers():void
+    {
+        if (getStyle("interactionMode") == "mouse")
+        {
+            if (!rolloverEventsAdded)
             {
-                hovered = true;
-                invalidateDisplayList();
+                rolloverEventsAdded = true;
+                addEventListener(MouseEvent.ROLL_OVER, itemRenderer_rollOverHandler);
+                addEventListener(MouseEvent.ROLL_OUT, itemRenderer_rollOutHandler);
             }
         }
-
-        /**
-         *  @private
-         *  Mouse rollOut event handler.
-         */
-        protected function itemRenderer_rollOutHandler(event:MouseEvent):void
-        {
-            hovered = false;
+        else
+        {
+            if (rolloverEventsAdded)
+            {
+                rolloverEventsAdded = false;
+                removeEventListener(MouseEvent.ROLL_OVER, itemRenderer_rollOverHandler);
+                removeEventListener(MouseEvent.ROLL_OUT, itemRenderer_rollOutHandler);
+            }
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function anyButtonDown(event:MouseEvent):Boolean
+    {
+        var type:String = event.type;
+        return event.buttonDown || (type == "middleMouseDown") || (type == "rightMouseDown");
+    }
+
+    /**
+     *  @private
+     *  Mouse rollOver event handler.
+     */
+    protected function itemRenderer_rollOverHandler(event:MouseEvent):void
+    {
+        if (!anyButtonDown(event))
+        {
+            hovered = true;
             invalidateDisplayList();
         }
-
-    }
-
+    }
+
+    /**
+     *  @private
+     *  Mouse rollOut event handler.
+     */
+    protected function itemRenderer_rollOutHandler(event:MouseEvent):void
+    {
+        hovered = false;
+        invalidateDisplayList();
+    }
+
+}
+
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 11289
Author:   egeorgie@adobe.com
Date:     2009-10-30T01:38:52.015427Z

Log Message:
-----------
GroupBase overlay - rename DisplayPlane to DisplayLayer, add a new method DisplayLayer:getDisplayObjectDepth()

QE notes: None
Doc notes: None
Bugs: None
Reviewer: Glenn
Tests run: checkintests, mustella (ListDragDrop)
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/bundles/en_US/components.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DisplayPlane.as" copyfrom-rev="11280" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DisplayLayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DisplayPlane.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/OverlayDepth.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/DisplayPlaneObjectExistenceEvent.as" copyfrom-rev="11280" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/DisplayLayerObjectExistenceEvent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/DisplayPlaneObjectExistenceEvent.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/DisplayLayer.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/DisplayLayer.as
@@ -11,162 +11,178 @@

 package spark.components.supportClasses
 {
-import flash.display.DisplayObject;
-import flash.events.EventDispatcher;
-
-import mx.resources.ResourceManager;
-
-import spark.events.DisplayPlaneObjectExistenceEvent;
-
-/**
- *  A DisplayPlane class maintains ordered list of DisplayObjects sorted on
- *  depth.
- *  Developers don't instantiate this class, but use the overlay
- *  property of Group and DataGroup.
- *
- *  @see spark.components.Group#overlay
- *  @see spark.components.DataGroup#overlay
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-public class DisplayPlane extends EventDispatcher
-{
-	/**
-	 *  Constructor.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function DisplayPlane()
-	{
-		super();
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Variables
-	//
-	//--------------------------------------------------------------------------
-
-	private var _depth:Vector.<Number>;
-	private var _objects:Vector.<DisplayObject>;
-
-	//--------------------------------------------------------------------------
-	//
-	//  Properties
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  Number of objects in the DisplayPlane.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function get numDisplayObjects():int
-	{
-		return _objects ? _objects.length : 0;
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Methods
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  Returns the requested object with the specified index in the
-	 *  ordered list.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function getDisplayObjectAt(index:int):DisplayObject
-	{
-		if (!_objects || index < 0 || index >= _objects.length)
-			throw new RangeError(ResourceManager.getInstance().getString("components", "indexOutOfRange", [index]));
-
-		return _objects[index];
-	}
-
-	/**
-	 *  Adds a displayObject with the specified depth to the ordered list.
-	 *  The position of the displayObject in the sorted lists is based on
-	 *  its depth, the object will be inserted after all objects with less than or equal
-	 *  depth value.
-	 *
-	 *  @return Returns the index of the object.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function addDisplayObject(displayObject:DisplayObject, depth:Number = OverlayDepth.TOPMOST):int
-	{
-		// Find index to insert
-		var index:int = 0;
-		if (!_depth)
-		{
-			_depth = new Vector.<Number>;
-			_objects = new Vector.<DisplayObject>;
-		}
-		else
-		{
-			// Simple linear search
-			var count:int = _depth.length;
-			for (; index < count; index++)
-				if (depth < _depth[index])
-					break;
-		}
-
-		// Insert at index:
-		_depth.splice(index, 0, depth);
-		_objects.splice(index, 0, displayObject);
-
-		// Notify that the object has been added
-		dispatchEvent(new DisplayPlaneObjectExistenceEvent(DisplayPlaneObjectExistenceEvent.OBJECT_ADD,
-   	                  false /*bubbles*/,
-					  false /*cancelable*/,
-					  displayObject,
-					  index));
-
-		return index;
-	}
-
-	/**
-	 *  Removes the specified displayObject from the sorted list.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function removeDisplayObject(displayObject:DisplayObject):void
-	{
-		// FIXME (egeorgie): add null checks
-
-		var index:int = _objects.indexOf(displayObject);
-		// FIXME (egeorgie): add check for index
-
-		// Notify that the object is to be deleted
-		dispatchEvent(new DisplayPlaneObjectExistenceEvent(DisplayPlaneObjectExistenceEvent.OBJECT_REMOVE,
-													       false /*bubbles*/,
-													       false /*cancelable*/,
-													       displayObject,
-													       index));
-		_depth.splice(index, 1);
-		_objects.splice(index, 1);
-	}
-
-}
+    import flash.display.DisplayObject;
+    import flash.events.EventDispatcher;
+
+    import mx.resources.ResourceManager;
+
+    import spark.events.DisplayLayerObjectExistenceEvent;
+
+    /**
+     *  A DisplayLayer class maintains an ordered list of DisplayObjects sorted on
+     *  depth.
+     *  Developers don't instantiate this class, but use the overlay
+     *  property of Group and DataGroup.
+     *
+     *  @see spark.components.Group#overlay
+     *  @see spark.components.DataGroup#overlay
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public class DisplayLayer extends EventDispatcher
+    {
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function DisplayLayer()
+        {
+            super();
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Variables
+        //
+        //--------------------------------------------------------------------------
+
+        private var _depth:Vector.<Number>;
+        private var _objects:Vector.<DisplayObject>;
+
+        //--------------------------------------------------------------------------
+        //
+        //  Properties
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Number of objects in the DisplayLayer.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function get numDisplayObjects():int
+        {
+            return _objects ? _objects.length : 0;
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Methods
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Returns the DisplayObject with the specified index.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function getDisplayObjectAt(index:int):DisplayObject
+        {
+            if (!_objects || index < 0 || index >= _objects.length)
+                throw new RangeError(ResourceManager.getInstance().getString("components", "indexOutOfRange", [index]));
+
+            return _objects[index];
+        }
+
+        /**
+         *  Returns the depth for the specified DisplayObject.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function getDisplayObjectDepth(displayObject:DisplayObject):Number
+        {
+            var index:int = _objects.indexOf(displayObject);
+            if (index == -1)
+                throw new RangeError(ResourceManager.getInstance().getString("components", "objectNotFoundInDisplayLayer", [displayObject]));
+
+            return _depth[index];
+        }
+
+        /**
+         *  Adds a displayObject with the specified depth to the ordered list.
+         *  The position of the displayObject in the sorted lists is based on
+         *  its depth, the object will be inserted after all objects with less than or equal
+         *  depth value.
+         *
+         *  @return Returns the index of the object.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function addDisplayObject(displayObject:DisplayObject, depth:Number = OverlayDepth.TOP):DisplayObject
+        {
+            // Find index to insert
+            var index:int = 0;
+            if (!_depth)
+            {
+                _depth = new Vector.<Number>;
+                _objects = new Vector.<DisplayObject>;
+            }
+            else
+            {
+                // Simple linear search
+                var count:int = _depth.length;
+                for (; index < count; index++)
+                    if (depth < _depth[index])
+                        break;
+            }
+
+            // Insert at index:
+            _depth.splice(index, 0, depth);
+            _objects.splice(index, 0, displayObject);
+
+            // Notify that the object has been added
+            dispatchEvent(new DisplayLayerObjectExistenceEvent(DisplayLayerObjectExistenceEvent.OBJECT_ADD,
+                false /*bubbles*/,
+                false /*cancelable*/,
+                displayObject,
+                index));
+
+            return displayObject;
+        }
+
+        /**
+         *  Removes the specified displayObject from the sorted list.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function removeDisplayObject(displayObject:DisplayObject):DisplayObject
+        {
+            var index:int = _objects.indexOf(displayObject);
+            if (index == -1)
+                throw new RangeError(ResourceManager.getInstance().getString("components", "objectNotFoundInDisplayLayer", [displayObject]));
+
+            // Notify that the object is to be deleted
+            dispatchEvent(new DisplayLayerObjectExistenceEvent(DisplayLayerObjectExistenceEvent.OBJECT_REMOVE,
+                false /*bubbles*/,
+                false /*cancelable*/,
+                displayObject,
+                index));
+            _depth.splice(index, 1);
+            _objects.splice(index, 1);
+            return displayObject;
+        }
+
+    }
 }


Bug 660013: GCMember-annotated members should not need GC_POINTER, it should be inferred by exactgc.as (p=rulohani, r=treilly, sr=lhansen)

--- utils/exactgc.as
+++ utils/exactgc.as
@@ -689,6 +689,16 @@
         return v;
     }

+    function pushGCmembers(list, cls) {
+        var members = [];
+        var result = list.split(/,|;/);
+        for(var i = 0; i < result.length - 1; i++) {
+            var attr = [cls];
+            attr[1] = result[i].replace(/^\s*|\s*$/g, "");
+            specs.push(new constructors["GC_POINTER"]("GC_POINTER",attr,copyIfStack()));
+        }
+    }
+
     function positionalAttrs(tag, s, paren, cls) {
         var attr = splitAttrs(s, paren);
         for ( var i=0 ; i < attr.length ; i++ ) {
@@ -797,6 +807,13 @@
         return deprecatedFieldTag.exec(line.substring(where));
     }

+    const gcmemberFieldTag = new RegExp("GCMember<.*>\\s*(.*;)");
+    const gcPointerRegex = new RegExp("GC_POINTER\\((.*)");
+
+    function matchGCMemberFields(line, where) {
+        return gcmemberFieldTag.exec(line.substring(where));
+    }
+
     function stackToCppPrefix() {
         var pfx="";
         for ( var i=0; i < cppClassStack.length; i++)
@@ -847,19 +864,22 @@
             var gcIndex = -1;
             var nativeIndex = -1;
             var cppIndex = -1;
+            var gcmemberIndex = -1;
+
             if (!as3file) {
                 gcIndex = line.indexOf("GC_");
-                cppIndex = line.indexOf("#");
+                cppIndex = line.indexOf("#"); // #ifdef ?
+                gcmemberIndex = line.indexOf("GCMember"); // gcmember?
             }
             if (!cppfile)
                 nativeIndex = line.indexOf("[native");
-            if (gcIndex == -1 && cppIndex == -1 && nativeIndex == -1)
+            if (gcIndex == -1 && cppIndex == -1 && nativeIndex == -1 && gcmemberIndex == -1)
                 continue;

             // The start we found above may be inside a comment.  Here we handle
             // line comments; it would be better if we could handle block comments too.
             // Bugzilla 649333 tracks the block comment issue.
-
+
             if (line.match(/^\s*\/\//))
                 continue;

@@ -874,9 +894,9 @@
                 //  - preserve the elif / else structure
                 //
                 // I've gone with the former because it fits the structure of existing code, but
-                // if the resulting condtions end up being messy, or it becomes unreliable for
-                // any reason, then we should reconsider.  In practice most conditions are simple
-                // and #if..elif chains are not long.  The main liability is that we sort field names
+                // if the resulting conditions end up being messy, or it becomes unreliable for
+                // any reason, then we should reconsider. In practice most conditions are simple
+                // and #if..elif chains are not long. The main liability is that we sort field names
                 // lexicographically so clauses may become reorganized on output; this does not lead
                 // to bugs but makes the code confusing to read.

@@ -928,6 +948,29 @@
                 }
             }

+            // Filters for GCMember edge cases
+            if(gcmemberIndex >= 0) {
+                line = line.replace(/GCMember\s*</g, "GCMember<");
+                var singlelineCommentIndex = line.indexOf("//");
+                // GCMember inside a single line comment: " uint64_t* GC_POINTER( m_invocationCounts ); // GCMember<> does not work.... "
+                if(singlelineCommentIndex >=0 && gcmemberIndex > singlelineCommentIndex)
+                    gcmemberIndex = -1;
+
+                var slashStarStartIndex = line.indexOf("/*");
+                var slashStarEndIndex = line.indexOf("*/");
+                // GCMember inside a single line comment: " uint64_t* GC_POINTER( m_invocationCounts ); /* GCMember<> does not work */ "
+                if(gcmemberIndex > slashStarStartIndex && gcmemberIndex < slashStarEndIndex)
+                    gcmemberIndex = -1;
+
+                if(gcmemberIndex != -1) {
+                    gcmemberIndex = line.indexOf("GCMember<");
+                    if(gcmemberIndex == -1) {
+                        print(line);
+                        fail("GCMember incorrectly formatted. Must provide the member name on the same line!!");
+                    }
+                }
+            }
+
             // For line matching of GC_ directives we match only at
             // the start of the line after taking the substring
             // starting at the known-good index.  This yields the same
@@ -962,14 +1005,49 @@
                 }
                 else if ((result = matchCppFieldTag(line, gcIndex)) != null) {
                     reportMatch(line);
-                    var v = positionalAttrs(result[1], result[2], ")", currentClassName());
-                    specs.push(v);
+                    // If its a GCMember, lets just do the work below
+                    if(gcmemberIndex == -1) {
+                        var v = positionalAttrs(result[1], result[2], ")", currentClassName());
+                        specs.push(v);
+                    }
                 }
                 else {
                     if(line.indexOf("_IF") >= 0 && matchDeprecatedFieldTag(line, gcIndex) != null) {
                         print(line);
                         fail("The above annotation has _IF/_IFDEF/_IFNDEF!! _IF etc. are no longer required on member annotations and should be removed.");
                     }
+                }
+            }
+
+            if(gcmemberIndex >= 0) {
+                // Ignore GCMembers in non-exact classes
+                if(cppClassStack.length == 0 || cppDataStack.length == 0) {
+                    continue;
+                }
+
+                if((result = matchGCMemberFields(line, gcmemberIndex)) != null) {
+                    reportMatch(line);
+
+                    // Check if this already has a GC_POINTER annotation (for backward compatibility). This should ideally go away,
+                    // Once there are no DWB etc, we can get rid of all GC_POINTER annotations altogether.
+                    var gcIndexNow = line.indexOf("GC_");
+                     if(gcIndexNow >= 0) {
+                        // Remember we did not handle these above with GC_POINTER condition
+                        // Need to get the member name. This doesn't take care of multiple gcmembers desclarations in a line
+                        // like GCMember<SomeClass> GC_POINTER(x), y, z;
+                        var new_result = gcPointerRegex.exec(result[1]);
+
+                        var v = positionalAttrs("GC_POINTER", new_result[1], ")", currentClassName());
+                        specs.push(v);
+                    }
+                    else {
+                        // Handles multiple GCMember declaration of same class: GCMember<SomeClass> x, y, z;
+                        pushGCmembers(result[1], currentClassName());
+                    }
+                }
+                else {
+                    print(line);
+                    fail("GCMember incorrectly formatted. Must provide the member name on the same line!!");
                 }
             }


Setting FitUtil const values to match their names

--- raw/src/org/yellcorp/lib/geom/FitUtil.as
+++ raw/src/org/yellcorp/lib/geom/FitUtil.as
@@ -17,14 +17,14 @@
      * calculate a result that is always smaller or equal to the target
      * area. One of the axes of the result may not fully span the target.
      */
-    public static const INSIDE:String = "fit";
+    public static const INSIDE:String = "inside";

     /**
      * Constant value that directs the fitRect function to
      * calculate a result that is always larget or equal to the target
      * area. One of the axes of the result may exceed the target area.
      */
-    public static const OUTSIDE:String = "fill";
+    public static const OUTSIDE:String = "outside";

     /**
      * Scales one rectangle to fit or fill another rectangle.


Transferred from the Adobe Open Source Subversion Repository

Revision: 8316
Author:   matamel@adobe.com
Date:     2009-06-26T18:00:00.926671Z

Log Message:
-----------
Bug: BLZ-405 - When client receives message over streaming amf/http channel not logging the message
QA: Yes
Doc: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as

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

--- frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as
@@ -28,6 +28,7 @@

 import mx.core.mx_internal;
 import mx.logging.ILogger;
+import mx.logging.Log;
 import mx.messaging.Channel;
 import mx.messaging.FlexClient;
 import mx.messaging.events.MessageEvent;
@@ -693,6 +694,9 @@
                         // Prepare for the next chunk.
                         if (message != null)
                         {
+                            if (Log.isDebug())
+                                _log.debug("'{0}' channel got message\n{1}\n", channel.id, message.toString());
+
                             if ((message is AcknowledgeMessage) && (AcknowledgeMessage(message).correlationId == OPEN_COMMAND))
                             {
                                 // Store the server-assigned stream id for use during disconnect.