Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/core/IDeferredInstantiationUIComponent.as
+++ frameworks/projects/framework/src/mx/core/IDeferredInstantiationUIComponent.as
@@ -0,0 +1,117 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.core
+{
+
+/**
+ *  The IDeferredInstantiationUIComponent interface defines the interface for a component
+ *  or object that defers instantiation.
+ */
+public interface IDeferredInstantiationUIComponent extends IUIComponent
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  cacheHeuristic
+	//----------------------------------
+
+	/**
+	 *  @copy mx.core.UIComponent#cacheHeuristic
+	 */
+    function set cacheHeuristic(value:Boolean):void;
+
+	//----------------------------------
+	//  cachePolicy
+	//----------------------------------
+
+	/**
+	 *  @copy mx.core.UIComponent#cachePolicy
+	 */
+    function get cachePolicy():String
+
+	//----------------------------------
+	//  descriptor
+	//----------------------------------
+
+	/**
+	 *  @copy mx.core.UIComponent#descriptor
+	 */
+    function get descriptor():UIComponentDescriptor;
+
+	/**
+	 *  @private
+	 */
+    function set descriptor(value:UIComponentDescriptor):void;
+
+	//----------------------------------
+	//  id
+	//----------------------------------
+
+	/**
+	 *  @copy mx.core.UIComponent#id
+	 */
+    function get id():String;
+
+	/**
+	 *  @private
+	 */
+	function set id(value:String):void;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+     *  Creates an id reference to this IUIComponent object
+	 *  on its parent document object.
+     *  This function can create multidimensional references
+     *  such as b[2][4] for objects inside one or more repeaters.
+     *  If the indices are null, it creates a simple non-Array reference.
+     *
+     *  @param parentDocument The parent of this IUIComponent object.
+	 */
+	function createReferenceOnParentDocument(
+						parentDocument:IFlexDisplayObject):void;
+
+	/**
+     *  Deletes the id reference to this IUIComponent object
+	 *  on its parent document object.
+     *  This function can delete from multidimensional references
+     *  such as b[2][4] for objects inside one or more Repeaters.
+     *  If the indices are null, it deletes the simple non-Array reference.
+     *
+     *  @param parentDocument The parent of this IUIComponent object.
+	 */
+	function deleteReferenceOnParentDocument(
+						parentDocument:IFlexDisplayObject):void;
+
+	/**
+	 *  @copy mx.core.UIComponent#executeBindings()
+	 */
+	function executeBindings(recurse:Boolean = false):void;
+
+	/**
+	 *  For each effect event, register the EffectManager
+	 *  as one of the event listeners.
+	 *
+	 *  @param effects An Array of strings of effect names.
+	 */
+	function registerEffects(effects:Array):void;
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 16965
Author:   dsubrama@adobe.com
Date:     2010-07-16T22:30:13.445288Z

Log Message:
-----------
Quick fixup for SDK-26754. Reference to wrong method in the ASDoc entry for the autoThumbVisibility style. QA ok'ed check-in during i2 lockdown period.

QE notes: Please regress.
Doc notes: No
Bugs: SDK-26754
Reviewer: Evtim
Tests run: Checkintests
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as
@@ -75,9 +75,10 @@
  *  If true (the default), the thumb's visibility will be reset
  *  whenever its size is updated.
  *
- *  Overrides of sizeThumb() in HScrollBar and
- *  VScrollBar make the thumb visible if it's smaller than
- *  the track, unless this style is false.
+ *  Overrides of updateSkinDisplayList() in
+ *  HScrollBar and VScrollBar
+ *  make the thumb visible if it's smaller than the track,
+ *  unless this style is false.
  *
  *  Set this style to false to control thumb visibility directly.
  *


Now using Vector.sort(0) when no compare function is given.

--- WeaveCore/src/weave/utils/AsyncSort.as
+++ WeaveCore/src/weave/utils/AsyncSort.as
@@ -24,7 +24,6 @@
 	import mx.utils.ObjectUtil;

 	import weave.api.core.ILinkableObject;
-	import weave.api.getCallbackCollection;

 	/**
 	 * Asynchronous merge sort.
@@ -173,32 +172,25 @@

 		private function iterate(stopTime:int):Number
 		{
-			if (original is Array)
-			{
-				if (compare === ObjectUtil.numericCompare)
-				{
+			if (compare === ObjectUtil.numericCompare)
+			{
+				original.sort(Array.NUMERIC);
+				return 1;
+			}
+
+			if (compare === compareCaseInsensitive)
+			{
+				original.sort(Array.CASEINSENSITIVE);
+				return 1;
+			}
+
+			if (compare === null)
+			{
+				if (original[0] is Number || original[0] is Date)
 					original.sort(Array.NUMERIC);
-					return 1;
-				}
-
-				if (compare === compareCaseInsensitive)
-				{
-					original.sort(Array.CASEINSENSITIVE);
-					return 1;
-				}
-
-				if (compare === null)
-				{
-					if (original[0] is Number || original[0] is Date)
-						original.sort(Array.NUMERIC);
-					else
-						original.sort();
-					return 1;
-				}
-			}
-			else if (compare === null)
-			{
-				compare = primitiveCompare;
+				else
+					original.sort(0); // Vector.sort() requires one parameter
+				return 1;
 			}

 			var time:int = getTimer();
@@ -273,7 +265,7 @@
 				debugTrace(this,result.length,'in',elapsed/1000,'seconds');

 			if (!_immediately)
-				getCallbackCollection(this).triggerCallbacks();
+				WeaveAPI.SessionManager.getCallbackCollection(this).triggerCallbacks();
 		}

 		/*************
@@ -344,7 +336,7 @@
 				var start:int = getTimer();
 				_debugCompareCount = 0;
 				if (compare === null)
-					array1.sort();
+					array1.sort(0);
 				else
 					array1.sort(_debugCompareCounter);
 				trace('Array.sort', array1.length, 'numbers;', (getTimer() - start) / 1000, 'seconds;', _debugCompareCount ? (_debugCompareCount+' comparisons') : '');


Added error message.

Added error message.

--- WeaveUISpark/src/weave/visualization/layers/PlotManager.as
+++ WeaveUISpark/src/weave/visualization/layers/PlotManager.as
@@ -30,20 +30,23 @@
 	import flash.geom.Rectangle;
 	import flash.utils.Dictionary;

+	import mx.utils.StringUtil;
+
 	import weave.Weave;
 	import weave.api.WeaveAPI;
+	import weave.api.core.ILinkableObject;
+	import weave.api.data.IKeySet;
+	import weave.api.data.IQualifiedKey;
+	import weave.api.data.ISimpleGeometry;
 	import weave.api.getCallbackCollection;
 	import weave.api.linkableObjectIsBusy;
 	import weave.api.newDisposableChild;
 	import weave.api.newLinkableChild;
+	import weave.api.primitives.IBounds2D;
 	import weave.api.registerDisposableChild;
 	import weave.api.registerLinkableChild;
+	import weave.api.reportError;
 	import weave.api.setSessionState;
-	import weave.api.core.ILinkableObject;
-	import weave.api.data.IKeySet;
-	import weave.api.data.IQualifiedKey;
-	import weave.api.data.ISimpleGeometry;
-	import weave.api.primitives.IBounds2D;
 	import weave.api.ui.IPlotter;
 	import weave.api.ui.IPlotterWithGeometries;
 	import weave.api.ui.ITextPlotter;
@@ -60,7 +63,7 @@
 	import weave.utils.NumberUtils;
 	import weave.utils.PlotterUtils;
 	import weave.utils.SpatialIndex;
-	import weave.utils.ZoomUtils;
+	import weave.utils.ZoomUtils;

 	/**
 	 * This is a container for a list of PlotLayers
@@ -447,7 +450,11 @@

 			// get plotter from sourceLayer
 			var plotterFromSourceLayer:IPlotterWithGeometries = plotters.getObject(sourceLayer) as IPlotterWithGeometries;
-
+			if (!plotterFromSourceLayer)
+			{
+				reportError(StringUtil.substitute('Plotter named "{0}" does not exist.', sourceLayer));
+				return null;
+			}

 			// use the source keys to get a list of overlapping geometries on the destination layer.
 			// Iterate over all the keys


FLEX-23781 Fixed RTE when image source set to nul

--- frameworks/projects/framework/src/mx/controls/SWFLoader.as
+++ frameworks/projects/framework/src/mx/controls/SWFLoader.as
@@ -1691,8 +1691,10 @@
             // we're on the free list
             try
             {
-                if (contentHolder.parent == this)
-                    removeChild(contentHolder);
+                if (contentHolder.parent == this) {
+					contentHolder.removeEventListener(Event.ADDED, contentHolder_addedHandler);
+					removeChild(contentHolder);
+				}
             }
             catch(error:Error)
             {
@@ -2509,7 +2511,8 @@
                 contentHolder_getFlexModuleFactoryRequestHandler);
         }

-        contentHolder.removeEventListener(Event.ADDED, contentHolder_addedHandler);
+		if (contentHolder)
+            contentHolder.removeEventListener(Event.ADDED, contentHolder_addedHandler);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 5770
Author:   gruehle@adobe.com
Date:     2009-03-30T20:58:54.529722Z

Log Message:
-----------
Add [Alternative] metadata to the Halo components that have a Gumbo replacement.

Bugs: SDK-20190
QA notes: none
Doc notes: Additional ASDoc comments added for many of the classes. These should all be reviewed.
Reviewer: Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TileList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Zoom.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToggleButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/HBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Cubic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/RemoveChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/TweenEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeRight.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/VBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Glow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quartic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Box.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeLeft.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quintic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Tile.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quadratic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/AddChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeDown.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/SetPropertyAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Canvas.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Blur.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HorizontalList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeUp.as</path>

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

--- frameworks/projects/mx/src/mx/effects/SetPropertyAction.as
+++ frameworks/projects/mx/src/mx/effects/SetPropertyAction.as
@@ -19,6 +19,8 @@
 //--------------------------------------

 [Exclude(name="duration", kind="property")]
+
+[Alternative(replacement="spark.effects.SetAction", since="4.0")]

 /**
  *  The SetPropertyAction class defines an action effect that corresponds


Transferred from the Adobe Open Source Subversion Repository

Revision: 13082
Author:   jszeto@adobe.com
Date:     2009-12-18T00:02:56.908450Z

Log Message:
-----------
BaselinePosition bug fixes

SDK-23462 - When using embedded fonts with some components (DropDownList, HSlider, Border, DataGroup), the baselinePosition is a bad value

Added override of baselinePosition to Combobox. Removed override from DropDownListBase. Updated a few overrides to use getBaselinePositionForPart.

QE notes: none
Doc notes: none
Bugs: SDK-23462
Reviewer: Evtim
Tests run: checkintests, DropDownList, ComboBox
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/VolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/ComboBox.as
+++ frameworks/projects/spark/src/spark/components/ComboBox.as
@@ -437,6 +437,14 @@
     //--------------------------------------------------------------------------

     /**
+     *  @private
+     */
+    override public function get baselinePosition():Number
+    {
+        return getBaselinePositionForPart(textInput);
+    }
+
+    /**
      *  @private
      */
     override public function set selectedIndex(value:int):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 17247
Author:   cframpto@adobe.com
Date:     2010-08-10T00:41:37.491061Z

Log Message:
-----------
Worked on keyDownHandler for selection - a caret is required, fixed page-up/down, and dispatch unhandled keys to the scroller.  Fix column collection change event for REPLACE, and update the caret and hover index for all colum collection change events.

QE notes: This submit does not include the code to initialize the caret to 0,0.  That change will follow.
Doc notes:
Bugs: SDK-27322, SDK-27239, SDK-27238, SDK-27237
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/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>

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

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

 package spark.components
 {
+import flash.display.DisplayObject;
 import flash.events.Event;
 import flash.events.KeyboardEvent;
 import flash.geom.Point;
@@ -841,14 +842,31 @@

     /**
      *  @private
-     *  Build in basic keyboard navigation support in Grid.
+     *  Build in basic keyboard navigation support in Grid. The focus is on
+     *  the DataGrid which means the Scroller doesn't see the Keyboard events
+     *  unless the event is dispatched to it.
      */
     override protected function keyDownHandler(event:KeyboardEvent):void
     {
-        super.keyDownHandler(event);
-
         if (!grid || event.isDefaultPrevented())
             return;
+
+        // Row selection requires valid row caret, cell selection
+        // requires both a valid row and a valid column caret.
+
+        if (selectionMode == GridSelectionMode.NONE ||
+            grid.caretRowIndex < 0 ||
+            grid.caretRowIndex >= getDataProviderLength() ||
+            (isCellSelectionMode() &&
+            (grid.caretColumnIndex < 0 ||
+            grid.caretColumnIndex >= getColumnsLength())))
+        {
+            if (scroller)
+                scroller.dispatchEvent(event);
+            return;
+        }
+
+        var op:String;

         // Was the space bar hit?
         if (event.keyCode == Keyboard.SPACE)
@@ -876,10 +894,13 @@
                 {
                     if (isRowSelectionMode())
                     {
+                        op = selectionMode == GridSelectionMode.SINGLE_ROW ?
+                            GridSelectionEventKind.SET_ROW :
+                            GridSelectionEventKind.ADD_ROW;
+
                         // Add the row and leave the caret position unchanged.
                         if (!commitInteractiveSelection(
-                            GridSelectionEventKind.ADD_ROW,
-                            grid.caretRowIndex, grid.caretColumnIndex))
+                            op, grid.caretRowIndex, grid.caretColumnIndex))
                         {
                             return;
                         }
@@ -887,10 +908,13 @@
                     }
                     else if (isCellSelectionMode() && grid.caretColumnIndex != -1)
                     {
+                            op = selectionMode == GridSelectionMode.SINGLE_CELL ?
+                            GridSelectionEventKind.SET_CELL :
+                            GridSelectionEventKind.ADD_CELL;
+
                         // Add the cell and leave the caret position unchanged.
                         if (!commitInteractiveSelection(
-                            GridSelectionEventKind.ADD_CELL,
-                            grid.caretRowIndex, grid.caretColumnIndex))
+                            op, grid.caretRowIndex, grid.caretColumnIndex))
                         {
                             return;
                         }
@@ -2121,7 +2145,7 @@
      *  @private
      *  Returns the new caret position based on the current caret position and
      *  the navigationUnit as a Point, where x is the columnIndex and y is the
-     *  rowIndex.  Assues there is a valid caretPosition to start.
+     *  rowIndex.  Assures there is a valid caretPosition.
      */
     private function setCaretToNavigationDestination(navigationUnit:uint):CellPosition
     {
@@ -2133,6 +2157,7 @@
         const rowCount:int = getDataProviderLength();
         const columnCount:int = getColumnsLength();
         var visibleRows:Vector.<int>;
+        var caretRowBounds:Rectangle;

         switch (navigationUnit)
         {
@@ -2140,7 +2165,7 @@
             {
                 if (isCellSelectionMode())
                 {
-                    if (!inRows && grid.caretColumnIndex > 0)
+                    if (grid.caretColumnIndex > 0)
                         caretColumnIndex--;
                 }
                 break;
@@ -2150,7 +2175,7 @@
             {
                 if (isCellSelectionMode())
                 {
-                    if (!inRows && grid.caretColumnIndex + 1 < columnCount)
+                    if (grid.caretColumnIndex + 1 < columnCount)
                         caretColumnIndex++;
                 }
                 break;
@@ -2195,11 +2220,15 @@
                 {
                     caretRowIndex = firstVisibleRowIndex;
                 }
-                else if (firstVisibleRowIndex > 0)
-                {
-                    // Scroll, making sure this row is still visible.
-                    grid.verticalScrollPosition =
-                        firstVisibleRowBounds.bottom - grid.scrollRect.height;
+                else
+                {
+                    // If the caret is above the visible rows or the
+                    // first visible row, scroll so that caret row is the last
+                    // visible row.
+                    caretRowBounds = grid.getRowBounds(caretRowIndex);
+                    const delta:Number =
+                        grid.scrollRect.bottom - caretRowBounds.bottom;
+                    grid.verticalScrollPosition -= delta;
                     validateNow();

                     // Visible rows have been updated so figure out which one
@@ -2248,8 +2277,10 @@
                 }
                 else
                 {
-                    // Scroll, making sure this row is still visible.
-                    grid.verticalScrollPosition = lastVisibleRowBounds.y;
+                    // Caret is last visible row or it is after the visible rows.
+                    // Scroll, so the caret row is the first visible row.
+                    caretRowBounds = grid.getRowBounds(caretRowIndex);
+                    grid.verticalScrollPosition = caretRowBounds.y;
                     validateNow();

                     // Visible rows have been updated so figure out which one
@@ -2341,12 +2372,14 @@
         // Cancel so another component doesn't handle this event.
         event.preventDefault();

+        var selectionChanged:Boolean = false;
+
         if (event.shiftKey)
         {
             // The shift key-nav key combination extends the selection and
             // updates the caret.
-            if (!extendSelection(newPosition.rowIndex, newPosition.columnIndex))
-                return false;
+            selectionChanged =
+                extendSelection(newPosition.rowIndex, newPosition.columnIndex);
         }
         else if (event.ctrlKey)
         {
@@ -2359,7 +2392,7 @@
             // Select the current row/cell.
             setSelectionAnchorCaret(newPosition.rowIndex, newPosition.columnIndex);
         }
-
+
         // Ensure this position is visible.
         ensureCellIsVisible(newPosition.rowIndex, newPosition.columnIndex);


Transferred from the Adobe Open Source Subversion Repository

Revision: 19740
Author:   smgilson@adobe.com
Date:     2011-01-13T14:05:40.371382Z

Log Message:
-----------
Fix invalid <p> tags in ASDoc comments

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

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

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -467,14 +467,14 @@
  *  Dispatched before the sort has been applied to the data provder's collection.
  *  Typically this is when the user releases the mouse button on a column header
  *  to request the control to sort the grid contents based on the contents of the column.
- *  Only dispatched if the column is sortable and the data provider supports sorting.

+ *  Only dispatched if the column is sortable and the data provider supports sorting.
  *
  *
The DataGrid control has a default handler for this event that implements
  *  a single-column sort and updates the visibleSortIndices in the grid's
  *  columnHeaderGroup with the columnIndices.
  *  Multiple-column sort can be implemented by calling the preventDefault() method
  *  to prevent the single column sort and setting the columnIndices and
- *  newSortFields parameters of the event to change the default behavior.
+ *  newSortFields parameters of the event to change the default behavior.

  *
  *
This event is dispatched when the user interacts with the control.
  *  When you sort the data provider's collection programmatically,


Transferred from the Adobe Open Source Subversion Repository

Revision: 12306
Author:   hmuller@adobe.com
Date:     2009-12-01T00:16:47.642254Z

Log Message:
-----------
H,VScrollBar now install mouse wheel event listeners on themselves and their viewport so that mouse wheel handling works when there's no Scroller.

Removed some old dead (commented out long ago) code from Scroller.

QE notes: I reversed the direction for horizontal mouse wheel scrolling (applies when only a HSB is visible)
Doc notes:
Bugs: sdk-21930
Reviewer: Ryan, Jason
Tests run: DataGroup, List (before horizontal mouse wheel scroll direction change)
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -957,35 +957,12 @@
         }
     }

-    // To avoid unconditionally linking the RichEditableText class we lazily
-    // get a reference if it's been linked already.  See below.
-    //private static var textDisplayClassLoaded:Boolean = false;
-    //private static var textDisplayClass:Class = null;
-
     private function skin_mouseWheelHandler(event:MouseEvent):void
     {
-        var vp:IViewport = viewport;
-        if (!vp || event.isDefaultPrevented())
+        const vp:IViewport = viewport;
+        if (event.isDefaultPrevented() || !vp || !vp.visible)
             return;

-        // If a TextField has the focus, then check to see if it's already
-        // handling mouse wheel events.  For now, we'll make the same
-        // assumption about RichEditableText.
-
-        /*var focusOwner:InteractiveObject = getFocus();
-        if ((focusOwner is TextField) && TextField(focusOwner).mouseWheelEnabled)
-            return;
-
-        if (!textDisplayClassLoaded)
-        {
-            textDisplayClassLoaded = true;
-            const s:String = "spark.components.RichEditableText";
-            if (ApplicationDomain.currentDomain.hasDefinition(s))
-                textDisplayClass = Class(ApplicationDomain.currentDomain.getDefinition(s));
-        }
-        if (textDisplayClass && (focusOwner is textDisplayClass))
-            return;*/
-
         var nSteps:uint = Math.abs(event.delta);
         var navigationUnit:uint;

@@ -1005,7 +982,7 @@
         }
         else if (horizontalScrollBar && horizontalScrollBar.visible)
         {
-            navigationUnit = (event.delta < 0) ? NavigationUnit.LEFT : NavigationUnit.RIGHT;
+            navigationUnit = (event.delta < 0) ? NavigationUnit.RIGHT : NavigationUnit.LEFT;
             for (var hStep:int = 0; hStep < nSteps; hStep++)
             {
                 var hspDelta:Number = vp.getHorizontalScrollPositionDelta(navigationUnit);


185 Simplified Statistics.mean, and corrected weight calc

--- raw/src/org/yellcorp/math/Statistics.as
+++ raw/src/org/yellcorp/math/Statistics.as
@@ -37,71 +37,47 @@

     public static function mean(values:Array, weights:Array = null):Number
     {
-        var inVals:Array = values.slice();
-        var outVals:Array;
-        var inWeights:Array = weights ? weights.slice() : [ ];
-        var outWeights:Array;
+        var valueSum:Number = 0;
+        var weightSum:Number = 0;

-        var weight1:Number;
-        var weight2:Number;
+        if (!values || values.length == 0)
+        {
+            return Number.NaN;
+        }
+        else if (!weights)
+        {
+            for each (var n:Number in values)
+            {
+                valueSum += n;
+            }
+            return valueSum / values.length;
+        }
+        else
+        {
+            if (values.length != weights.length)
+            {
+                throw new ArgumentError("If weights argument is specified, it must have the same length as values");
+            }

-        var i:uint;
-        var j:uint;
-        var lastOdd:uint;
-        var oddBalance:Boolean = false;
-
-        if (inVals.length == 1)
-        {
-            return inVals[0];
+            for (var i:int = values.length; i >= 0; i--)
+            {
+                valueSum += values[i] * weights[i];
+                weightSum += weights[i];
+            }
+            return valueSum / weightSum;
         }
-
-        while (inVals.length > 1)
-        {
-            outVals = new Array();
-            outWeights = new Array();
-            j = 0;
-            lastOdd = inVals.length - 1;
-            for (i = 0;i < inVals.length; i += 2)
-            {
-                weight1 = i < inWeights.length ? inWeights[i] : 1;
-                if (i == lastOdd)
-                {
-                    if (oddBalance)
-                    {
-                        outVals.push(inVals[i]);
-                        outWeights.push(weight1);
-                    }
-                    else
-                    {
-                        outVals.unshift(inVals[i]);
-                        outWeights.unshift(weight1);
-                    }
-                    oddBalance = !oddBalance;
-                }
-                else
-                {
-                    weight2 = (i + 1) < inWeights.length ? inWeights[i + 1] : 1;
-                    outVals.push(inVals[i] + inVals[i + 1]);
-                    outWeights.push(weight1 + weight2);
-                }
-            }
-            inVals = outVals;
-            inWeights = outWeights;
-        }
-
-        return inVals[0] / inWeights[0];
     }

     public static function variance(values:Array, weights:Array = null):Number
     {
         var valueMean:Number = mean(values, weights);
+        var meanDiff:Number;
         var diffSquared:Array = new Array(values.length);
-        var i:int;

-        for (i = 0;i < values.length; i++)
+        for (var i:int = 0;i < values.length; i++)
         {
-            diffSquared[i] = values[i] - valueMean;
-            diffSquared[i] *= diffSquared[i];
+            meanDiff = values[i] - valueMean;
+            diffSquared[i] = meanDiff * meanDiff;
         }

         return mean(diffSquared, weights);


tests

tests

--- src/com/kemsky/impl/Stream.as
+++ src/com/kemsky/impl/Stream.as
@@ -81,6 +81,15 @@
         }

         /**
+         * Set last item
+         * @param item
+         */
+        public function set last(item:*):void
+        {
+            source[source.length - 1] = item;
+        }
+
+        /**
          * Returns first item in Stream
          * Equivalent to expression: stream[0]
          */
@@ -89,6 +98,15 @@
             return source.length > 0 ? source[0] : null;
         }

+        /**
+         * Set first item
+         * @param item
+         */
+        public function set first(item:*):void
+        {
+            source[0] = item;
+        }
+
         public function fold(...rest):*
         {
             if (rest.length == 0)
@@ -111,8 +129,6 @@
             }

             throw new Error();
-
-            return null;
         }

         public function foldLeft(callback:Function, initial:*):*


386 Added logic to infer a default adapter class. The adapter parameter can be used without a value to use the target property's class as a constructor.

--- raw/src/org/yellcorp/lib/display/inject/DisplayInjector.as
+++ raw/src/org/yellcorp/lib/display/inject/DisplayInjector.as
@@ -26,12 +26,16 @@
  * called the 'target'.
  *
  * For each qualifying instance variable of the target, the default
- * behaviour of DisplayInjector.inject is to search the
- * container for a child with the same name, and tries to cast it to the
- * variable's class.
- *
- * A qualifying instance variable is one that is public and has the
- * metadata tag [Display].
+ * behaviour of DisplayInjector.inject is:
+ *

+ *
Search the container for a child with the same name as the target
+ *       variable.

+ *
Cast it to the target variable class.

+ *
Assign it to the target variable.

+ *

+ *
+ * A qualifying instance variable is one that is publically accessible and
+ * has the metadata tag [Display].
  *
  * As an example, if a target instance has the following variable:
  *
@@ -63,29 +67,37 @@
  *     </listing>
  *     will first search the container for a child called 'navBar', and
  *     then search 'navBar' for a child called 'nextButton'. If any of the
- *     intermediate children are not themselves DisplayObjectContainers,
+ *     intermediate children are not found, or not DisplayObjectContainers,
  *     an error is thrown.
  *

  *
- *
wrapper

- *
Instead of casting the child DisplayObject to the property's
- *     class, use the specified class as a constructor, with the child
- *     DisplayObject as an argument. For example:
- *     <listing version="3.0">
- *       [Display(wrapper="org.yellcorp.ui.GlowButton")]
+ *
adapter

+ *
Instead of trying to cast the child DisplayObject to the property's
+ *     class, use the class as a constructor, with the child DisplayObject
+ *     as an argument. For example:
+ *     <listing version="3.0">
+ *       [Display(adapter)]
  *       public var nextButton:GlowButton;
  *     </listing>
+ *     will essentially perform the following:
+ *     <listing version="3.0">
+ *       target.nextButton = new GlowButton(container.getChildByName("nextButton")));
+ *     </listing>
+ *     If the property's class is an interface or a base class, the concrete
+ *     class can be specified in the value for adapter.
+ *     <listing version="3.0">
+ *       [Display(adapter="org.yellcorp.ui.GlowButton")]
+ *       public var nextButton:IButton;
+ *     </listing>
  *     will perform the following:
  *     <listing version="3.0">
  *       target.nextButton = new GlowButton(container.getChildByName("nextButton")));
  *     </listing>
+ *     In all cases, the constructor is assumed to take a single argument.
  *

  *

  *
- * TODO: The wrapper parameter should support a default value,
- * which would be the class of the target property. Filling out the full
- * class name would only then be necessary if a subclass or an implemetor of
- * an interface was desired.
+ * TODO: adapter could also specify a static function
  */
 public class DisplayInjector
 {
@@ -126,16 +138,21 @@
     private static function injectProperty(property:XML, metadata:XML,
             source:DisplayObjectContainer, target:*):void
     {
-        var args:Object = { name: null, wrapper: null };
+        var args:Object = { name: null, adapter: null };

         try {
             collectArgs(metadata, args);
             var displayPath:String = args.name || property.@name;
             var child:* = getChildByPath(source, displayPath);

-            if (args.wrapper)
-            {
-                child = construct(args.wrapper, child);
+            if (args.adapter === "")
+            {
+                args.adapter = property.@type;
+            }
+
+            if (args.adapter !== null)
+            {
+                child = construct(args.adapter, child);
             }

             target[property.@name] = child;
@@ -206,6 +223,22 @@
         {
             var key:String = arg.@key;
             var value:String = arg.@value;
+
+            // [Metadata(paramName="string")]
+            // becomes <arg key="paramName" value="string" />
+
+            // but...
+
+            // [Metadata(bareword)]
+            // becomes <arg key="" value="bareword" />
+
+            // so swap them
+            if (key == "")
+            {
+                key = value;
+                value = "";
+            }
+
             if (argDict.hasOwnProperty(key))
             {
                 argDict[key] = value;
@@ -219,9 +252,9 @@
     }

-    private static function construct(wrapper:String, displayObject:*):*
-    {
-        var clazz:Object = getDefinitionByName(wrapper);
+    private static function construct(adapter:String, displayObject:*):*
+    {
+        var clazz:Object = getDefinitionByName(adapter);
         return new clazz(displayObject);
     }
 }


Fixed: close button not working

Fixed: close button not working

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/DataImportPresenter.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/DataImportPresenter.as
@@ -98,8 +98,10 @@

 		protected function cancelButtonClickHandler(event:MouseEvent):void {
 			if ( _view.currentState == DataImportView.STATE_UPLOADING ) {
+				//cancel uploading
 				_fileReference.cancel();
 			} else {
+				//cancel import
 				var responder:AsyncResponder = new AsyncResponder(cancelImportResultHandler, faultHandler);
 				_dataImportClient.cancel(responder);
 			}
@@ -107,7 +109,7 @@
 		}

 		protected function closeButtonClickHandler(event:MouseEvent):void {
-			var popUp:DataImportPopUp = _view.parentDocument as DataImportPopUp;
+			var popUp:DataImportPopUp = _view.owner as DataImportPopUp;
 			PopUpManager.removePopUp(popUp);
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 16267
Author:   klin@adobe.com
Date:     2010-05-20T22:24:53.614033Z

Log Message:
-----------
Added better baseline support for ConstraintLayout. ConstraintRow's now have a baseline property. It can either be a number or of the form "maxAscent:x". In the first case, it will position elements at that y-pixel value in the row based on their baseline position.  Otherwise, it first aligns elements to the maximum baseline position of the elements in the row, and then, positions elements based on the pixel value provided. This support allows elements with different baselinePositions to be aligned more easily.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/ConstraintRow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/bundles/en_US/layout.properties</path>

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

--- frameworks/projects/framework/src/mx/containers/utilityClasses/ConstraintRow.as
+++ frameworks/projects/framework/src/mx/containers/utilityClasses/ConstraintRow.as
@@ -77,6 +77,53 @@
 	//
 	//--------------------------------------------------------------------------

+    //----------------------------------
+    //  baseline
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the baseline property.
+     */
+    private var _baseline:Object = "maxAscent:0";
+    [Bindable("baselineChanged")]
+    [Inspectable(category="General")]
+
+    /**
+     *  Number that specifies the baseline of the ConstraintRow instance, in pixels,
+     *  either relative to the top edge of the row or to the max ascent of the
+     *  elements contained in this row.
+     *
+     *  @default "maxAscent:0"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get baseline():Object
+    {
+        return _baseline;
+    }
+
+    /**
+     *  @private
+     */
+    public function set baseline(value:Object):void
+    {
+        if (_baseline != value)
+        {
+            _baseline = value;
+
+            if (container)
+            {
+                container.invalidateSize();
+                container.invalidateDisplayList();
+            }
+            dispatchEvent(new Event("baselineChanged"));
+        }
+    }
+
 	//----------------------------------
     //  container
     //----------------------------------


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * ADOBE CONFIDENTIAL
+ * __________________
+ *
+ *  [2002] - [2007] Adobe Systems Incorporated
+ *  All Rights Reserved.
+ *
+ * NOTICE:  All information contained herein is, and remains
+ * the property of Adobe Systems Incorporated and its suppliers,
+ * if any.  The intellectual and technical concepts contained
+ * herein are proprietary to Adobe Systems Incorporated
+ * and its suppliers and may be covered by U.S. and Foreign Patents,
+ * patents in process, and are protected by trade secret or copyright law.
+ * Dissemination of this information or reproduction of this material
+ * is strictly forbidden unless prior written permission is obtained
+ * from Adobe Systems Incorporated.
+ */
+package mx.messaging.channels
+{
+
+/**
+ *  The SecureStreamingHTTPChannel class is identical to the StreamingHTTPChannel
+ *  class except that it uses a secure protocol, HTTPS, to send messages to an
+ *  HTTP endpoint.
+ */
+public class SecureStreamingHTTPChannel extends StreamingHTTPChannel
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Creates an new SecureStreamingHTTPChannel instance.
+     *
+	 *  @param id The id of this Channel.
+	 *
+	 *  @param uri The uri for this Channel.
+     */
+    public function SecureStreamingHTTPChannel(id:String = null, uri:String = null)
+    {
+        super(id, uri);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Returns the protocol for this channel (https).
+     */
+    override public function get protocol():String
+    {
+        return "https";
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6173
Author:   dsubrama@adobe.com
Date:     2009-04-20T22:09:26.709924Z

Log Message:
-----------
SDK-20210

As per ARB's request, the loosely typed property 'fxComponent' has been removed from Skin. To now get a reference back to a component from its skin, you can use the hostComponent property which is set if the skin has the [HostComponent] metadata declared. With this metadata, the hostComponent property ends up being a strongly typed reference back to the owning component.

More information can be found on the ARB page: http://opensource.adobe.com/wiki/display/flexsdk/Removing+fxComponent+from+Skin

As part of this change, I've added a new skin for the skinnable Window component.

Reviewer: Glenn
Checkintests: Pass
Doc: Yes - removed a property
QA: Yes - if any tests rely on fxComponent, they will have to be changed.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Skin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/default/WindowedApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/default/MacTitleBarSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/default/WindowSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
@@ -44,7 +44,8 @@
     private function getScroller():Scroller
     {
         var g:Skin = target as Skin;
-        return (g) ? g.fxComponent as Scroller : null;
+
+        return (g && ("hostComponent" in g)) ? Object(g).hostComponent as Scroller : null;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 12339
Author:   clucier@adobe.com
Date:     2009-12-01T22:28:31.107685Z

Log Message:
-----------
Reducing some of the event dispatching noise in the SDK.  Seeing pretty good results in our runtime performance tests and startup times... 5%-15% improvement over all.  This is about all we'll be able to commit to for Flex 4.0.  Added hasEventListener test before dispatching more of our lifecycle events.  Modified compiler binding code-gen to do the same.  Documented all public facing events where applicable to denote that they are no longer capturable by default.

QE notes: No
Doc notes: No
Bugs: SDK-24249
Reviewer: Alex
Tests run: Mustella, Checkin
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/BorderContainerSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientEntry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/State.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableSecondPassEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableProperty.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -3282,8 +3282,9 @@
     mx_internal function dispatchPropertyChangeEvent(prop:String, oldValue:*,
                                                    value:*):void
     {
-        dispatchEvent(PropertyChangeEvent.createUpdateEvent(
-                           this, prop, oldValue, value));
+        if (hasEventListener("propertyChange"))
+            dispatchEvent(PropertyChangeEvent.createUpdateEvent(
+                this, prop, oldValue, value));

     }

@@ -3932,7 +3933,8 @@
      */
     private function dispatchUpdateComplete():void
     {
-        dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
+        if (hasEventListener(FlexEvent.UPDATE_COMPLETE))
+            dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 5098
Author:   gauravj@adobe.com
Date:     2009-02-27T02:21:27.489350Z

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

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

Modified Paths:
--------------
151 paths were modified

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -69,6 +69,11 @@
  *
The TBounds are the boundaries of an
  *  object in the object's parent coordinate space. The UBounds are the boundaries
  *  of an object in its own coordinate space.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class GraphicElement extends OnDemandEventDispatcher
     implements IGraphicElement, IInvalidating, ILayoutElement, IVisualElement, IID
@@ -85,6 +90,11 @@
      *  The default value for the maxWidth property.
      *
      *  @default 10000
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static const DEFAULT_MAX_WIDTH:Number = 10000;

@@ -92,6 +102,11 @@
      *  The default value for the maxHeight property.
      *
      *  @default 10000
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static const DEFAULT_MAX_HEIGHT:Number = 10000;

@@ -99,6 +114,11 @@
      *  The default value for the minWidth property.
      *
      *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static const DEFAULT_MIN_WIDTH:Number = 0;

@@ -106,6 +126,11 @@
      *  The default value for the minHeight property.
      *
      *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static const DEFAULT_MIN_HEIGHT:Number = 0;

@@ -171,6 +196,11 @@
      *  Contain all of the implementation details of how the GraphicElement implements
      *  transform and layering support. In most cases, you should not have to modify this
      *  property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected var layoutFeatures:AdvancedLayoutFeatures;

@@ -205,6 +235,11 @@

     /**
      *  The identity of the component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get id():String
     {
@@ -231,6 +266,11 @@
      *  for a component that will be rotated 90 degrees, you set the component's rotation property.
      *  If you want the layout to not adjust for the component being rotated, you set its offsets.rotationZ
      *  property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function set offsets(value:TransformOffsets):void
     {
@@ -309,6 +349,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get alpha():Number
     {
@@ -346,6 +391,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get baseline():Object
     {
@@ -373,6 +423,11 @@
     /**
      *  The y-coordinate of the baseline
      *  of the first line of text of the component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get baselinePosition():Number
     {
@@ -401,6 +456,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get blendMode():String
     {
@@ -441,6 +501,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get bottom():Object
     {
@@ -470,6 +535,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get owner():DisplayObjectContainer
     {
@@ -493,6 +563,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get parent():DisplayObjectContainer
     {
@@ -501,6 +576,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function parentChanged(value:Group):void
     {
@@ -521,6 +601,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get explicitHeight():Number
     {
@@ -551,6 +636,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get explicitMaxHeight():Number { return maxHeight; }
     public function set explicitMaxHeight(value:Number):void { maxHeight = value; }
@@ -561,6 +651,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get explicitMaxWidth():Number { return maxWidth; }
     public function set explicitMaxWidth(value:Number):void { maxWidth = value; }
@@ -571,6 +666,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get explicitMinHeight():Number { return minHeight; }
     public function set explicitMinHeight(value:Number):void { minHeight = value; }
@@ -581,6 +681,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get explicitMinWidth():Number { return minWidth; }
     public function set explicitMinWidth(value:Number):void { minWidth = value; }
@@ -599,6 +704,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get explicitWidth():Number
     {
@@ -648,6 +758,11 @@
     /**
      *  An indexed array that contains each filter object currently associated with the graphic element.
      *  The mx.filters.* package contains several classes that define specific filters you can use.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get filters():Array
     {
@@ -719,6 +834,11 @@
      *  The height of the graphic element.
      *
      *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get height():Number
     {
@@ -761,6 +881,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get horizontalCenter():Object
     {
@@ -793,6 +918,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get left():Object
     {
@@ -830,6 +960,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get mask():DisplayObject
     {
@@ -901,6 +1036,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get maskType():String
     {
@@ -935,6 +1075,11 @@

     /**
      *  @copy mx.core.UIComponent#maxHeight
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get maxHeight():Number
     {
@@ -970,6 +1115,11 @@

     /**
      *  @copy mx.core.UIComponent#maxWidth
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get maxWidth():Number
     {
@@ -1003,6 +1153,11 @@

     /**
      *  @copy mx.core.UIComponent#measuredHeight
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get measuredHeight():Number
     {
@@ -1029,6 +1184,11 @@

     /**
      *  @copy mx.core.UIComponent#measuredWidth
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get measuredWidth():Number
     {
@@ -1055,6 +1215,11 @@

     /**
      *  The default measured bounds top-left corner relative to the origin of the element.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get measuredX():Number
     {
@@ -1081,6 +1246,11 @@

     /**
      *  The default measured bounds top-left corner relative to the origin of the element.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get measuredY():Number
     {
@@ -1109,6 +1279,11 @@

     /**
      *  @copy mx.core.UIComponent#minHeight
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get minHeight():Number
     {
@@ -1144,6 +1319,11 @@

     /**
      *  @copy mx.core.UIComponent#minWidth
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get minWidth():Number
     {
@@ -1179,6 +1359,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get percentHeight():Number
     {
@@ -1215,6 +1400,11 @@

     /**
      *  @copy mx.core.UIComponent#percentWidth
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get percentWidth():Number
     {
@@ -1251,6 +1441,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get right():Object
     {
@@ -1282,6 +1477,11 @@
 	 * 360 to obtain a value within the range.
 	 *
 	 * This property is ignored during calculation by any of Flex's 2D layouts.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
     public function get rotationX():Number
     {
@@ -1311,6 +1511,11 @@
 	 * 360 to obtain a value within the range.
 	 *
 	 * This property is ignored during calculation by any of Flex's 2D layouts.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
     public function get rotationY():Number
     {
@@ -1335,6 +1540,11 @@
     /**
      *  Indicates the rotation of the element, in degrees,
      *  from the transform point.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get rotationZ():Number
     {
@@ -1361,6 +1571,11 @@
     /**
      *  Indicates the rotation of the element, in degrees,
      *  from the transform point.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get rotation():Number
     {
@@ -1384,6 +1599,11 @@
     /**
      *  The horizontal scale (percentage) of the element
      *  as applied from the transform point.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get scaleX():Number
     {
@@ -1413,6 +1633,11 @@
     /**
      *  The vertical scale (percentage) of the element
      *  as applied from the transform point.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get scaleY():Number
     {
@@ -1442,6 +1667,11 @@
     /**
      *  The z scale (percentage) of the element
      *  as applied from the transform point.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get scaleZ():Number
     {
@@ -1476,6 +1706,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get top():Object
     {
@@ -1506,6 +1741,11 @@

     /**
      *  @copy mx.core.UIComponent#transform
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get transform():flash.geom.Transform
     {
@@ -1572,6 +1812,11 @@
 	 * @param rx,ry,rz the new values for the rotation of the transform
 	 * @param sx,sy,sz the new values for the scale of the transform
 	 * @param tx,ty,tz the point, in the component's own coordinates, to keep fixed relative to its parent.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
     public function transformAround(rx:Number,ry:Number,rz:Number,sx:Number,sy:Number,sz:Number,tx:Number,ty:Number,tz:Number):void
     {
@@ -1589,6 +1834,11 @@

     /**
      *  The x position transform point of the element.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get transformX():Number
     {
@@ -1616,6 +1866,11 @@

     /**
      *  The y position transform point of the element.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get transformY():Number
     {
@@ -1643,6 +1898,11 @@

     /**
      *  The z position transform point of the element.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get transformZ():Number
     {
@@ -1677,6 +1937,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get verticalCenter():Object
     {
@@ -1713,6 +1978,11 @@
      *  The width of the graphic element.
      *
      *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get width():Number
     {
@@ -1750,6 +2020,11 @@
 	 * defaults to 0
 	 *
 	 * @default 0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
 	 */
     public function get layer():Number
     {
@@ -1779,6 +2054,11 @@

     /**
      *  The x position of the graphic element.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get x():Number
     {
@@ -1812,6 +2092,11 @@

     /**
      *  The y position of the graphic element.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get y():Number
     {
@@ -1844,6 +2129,11 @@

     /**
      *  The z position of the graphic element.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get z():Number
     {
@@ -1883,6 +2173,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get visible():Boolean
     {
@@ -1923,6 +2218,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get displayObject():DisplayObject
     {
@@ -1967,6 +2267,11 @@

     /**
      *  The x position where the element should be drawn.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function get drawX():Number
     {
@@ -1989,6 +2294,11 @@

     /**
      *  The y position where the element should be drawn.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function get drawY():Number
     {
@@ -2021,6 +2331,11 @@
      *  Specifies whether this element is included in the layout of the group.
      *
      *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get includeInLayout():Boolean
     {
@@ -2048,6 +2363,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function createDisplayObject():DisplayObject
     {
@@ -2075,6 +2395,11 @@

     /**
      *  Documentation is not currently available.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function get needsDisplayObject():Boolean
     {
@@ -2099,6 +2424,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function canDrawToShared(sharedDisplayObject:DisplayObject):Boolean
     {
@@ -2107,6 +2437,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function closeSequence():Boolean
     {
@@ -2117,6 +2452,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function set shareIndex(value:int):void
     {
@@ -2155,6 +2495,11 @@
      *
      *  @return A bitmap snapshot of the GraphicElement.
      *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getBitmapData(transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF, useLocalSpace:Boolean = true):BitmapData
     {
@@ -2270,6 +2615,11 @@

     /**
      *  Enables clipping or alpha, depending on the type of mask being applied.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function applyMaskType():void
     {
@@ -2300,6 +2650,11 @@
      *  @param oldValue The previous value of the property.
      *
      *  @param value The new value of the property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function dispatchPropertyChangeEvent(prop:String, oldValue:*,
                                                    value:*):void
@@ -2312,6 +2667,11 @@
     /**
      *  Utility method that notifies the host that this element has changed and needs
      *  its layer to be updated.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function notifyElementLayerChanged():void
     {
@@ -2326,6 +2686,11 @@
      *
      *
Subclasses should do their work in
      *  commitProperties().

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function invalidateProperties():void
     {
@@ -2347,6 +2712,11 @@
      *  By default when explicitWidth and explicitHeight
      *  are set, measure() will not be called. To override this
      *  default behavior subclasses should override skipMeasure().

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function invalidateSize():void
     {
@@ -2361,6 +2731,11 @@
     /**
      *  Helper method to invalidate parent size and display list if
      *  this object affects its layout (includeInLayout is true).
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function invalidateParentSizeAndDisplayList():void
     {
@@ -2382,6 +2757,11 @@
      *
      *
Subclasses should override and do their work in
      *  updateDisplayList().

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function invalidateDisplayList():void
     {
@@ -2400,6 +2780,11 @@
      *  by immediately calling validateProperties(),
      *  validateSize(), and validateDisplayList(),
      *  if necessary.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function validateNow():void
     {
@@ -2415,6 +2800,11 @@
      *  by calling the commitProperties() method.
      *  In general, subclasses should
      *  override the commitProperties() method and not this method.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function validateProperties():void
     {
@@ -2445,6 +2835,11 @@
      *  interact with each other.
      *  It is often best at startup time to process all of these
      *  properties at one time to avoid duplicating work.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function commitProperties():void
     {
@@ -2561,6 +2956,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function validateSize(recursive:Boolean = false):void
     {
@@ -2589,6 +2989,11 @@
      *  the measure() method. For example this is usually true when both explicitWidth and
      *  explicitHeight are set. For paths, this is true when the bounds of the path
      *  have not changed.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function skipMeasure():Boolean
     {
@@ -2675,6 +3080,11 @@
      *  sets the values of the measuredWidth, measuredHeight,
      *  measuredX, and measuredY properties
      *  to 0.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function measure():void
     {
@@ -2686,6 +3096,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function validateDisplayList():void
     {
@@ -2739,6 +3154,11 @@
      *  @param unscaledHeight Specifies the height of the component, in pixels,
      *  in the component's coordinates, regardless of the value of the
      *  scaleY property of the component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function updateDisplayList(unscaledWidth:Number,
                                          unscaledHeight:Number):void
@@ -2762,6 +3182,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getMaxBoundsWidth(postTransform:Boolean = true):Number
     {
@@ -2770,6 +3195,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getMaxBoundsHeight(postTransform:Boolean = true):Number
     {
@@ -2778,6 +3208,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getMinBoundsWidth(postTransform:Boolean = true):Number
     {
@@ -2786,6 +3221,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getMinBoundsHeight(postTransform:Boolean = true):Number
     {
@@ -2794,6 +3234,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getPreferredBoundsWidth(postTransform:Boolean = true):Number
     {
@@ -2804,6 +3249,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getPreferredBoundsHeight(postTransform:Boolean = true):Number
     {
@@ -2814,6 +3264,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getLayoutBoundsX(postTransform:Boolean = true):Number
     {
@@ -2833,6 +3288,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getLayoutBoundsY(postTransform:Boolean = true):Number
     {
@@ -2852,6 +3312,11 @@

     /**
      *  @inheirtDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getLayoutBoundsWidth(postTransform:Boolean = true):Number
     {
@@ -2860,6 +3325,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getLayoutBoundsHeight(postTransform:Boolean = true):Number
     {
@@ -2868,6 +3338,11 @@

     /**
      *  A reference to the object in the layout tree represented by this interface.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get target():Object
     {
@@ -2879,6 +3354,11 @@
      *
      *  @return Returns the transformation matrix for this element, or null
      *  if it is delta identity.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function computeMatrix():Matrix
     {
@@ -2898,6 +3378,11 @@
      *
      *  @return Returns the transformed width. Transformation is this element's
      *  layout transformation matrix.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function transformWidthForLayout(width:Number,
                                                height:Number,
@@ -2928,6 +3413,11 @@
      *
      *  @return Returns the transformed height. Transformation is this element's
      *  layout transformation matrix.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function transformHeightForLayout(width:Number,
                                                 height:Number,
@@ -2967,6 +3457,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function setLayoutBoundsPosition(newBoundsX:Number, newBoundsY:Number, postTransform:Boolean = true):void
     {
@@ -3002,6 +3497,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function setLayoutBoundsSize(width:Number = NaN,
                                   height:Number = NaN,
@@ -3063,6 +3563,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getLayoutMatrix():Matrix
     {
@@ -3079,6 +3584,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function setLayoutMatrix(value:Matrix, triggerLayout:Boolean):void
     {
@@ -3090,6 +3600,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getLayoutMatrix3D():Matrix3D
     {
@@ -3106,6 +3621,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function setLayoutMatrix3D(value:Matrix3D, triggerLayout:Boolean):void
     {
@@ -3117,6 +3637,11 @@

     /**
      *  Applies the transform to the DisplayObject.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function applyComputedTransform():void
     {
@@ -3252,6 +3777,11 @@
      *  Called when a bitmap filter associated with the element is modified.
      *
      *  @param event The event that is dispatched when the filter was changed.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function filterChangedHandler(event:Event):void
     {
@@ -3262,6 +3792,11 @@
      *  Called when one of the properties of the transform changes.
      *
      *  @param event The event that is dispatched when the property changed.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected function transformPropertyChangeHandler(
                                     event:PropertyChangeEvent):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 3216
Author:   gruehle@adobe.com
Date:     2008-09-16T01:13:11.313892Z

Log Message:
-----------
Fix for MXMLG-228, a visibility problem with graphic elements. This is a quick fix that may force extra display objects when toggling visibility. We should investigate alternate solutions if performance is a problem.

Bugs: MXMLG-228
Reviewer: Deepa
QA: Please check for performance problems when toggling visibility of a large number of graphic elements.

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -1625,6 +1625,10 @@
         visibleChanged = true;

         invalidateProperties();
+
+        // TODO: This is a quick fix for MXMLG-228. We should
+        // investigate a better solution.
+        notifyElementLayerChanged();
     }

     //--------------------------------------------------------------------------
@@ -1898,7 +1902,9 @@

     public function get nextSiblingNeedsDisplayObject():Boolean
     {
-    	return needsDisplayObject;
+    	// TODO: The displayObject && visible test is a quick fix for MXMLG-228.
+    	// Should investigate a better solution.
+    	return needsDisplayObject || (displayObject && visible == false);
     }

     private var _sharedDisplayObject:DisplayObject;