Transferred from the Adobe Open Source Subversion Repository

Revision: 22564
Author:   tkraikit@adobe.com
Date:     2011-09-14T19:50:07.656843Z

Log Message:
-----------
Update ASDoc "@productversion Flex 4.5.2" => "@productversion Flex 4.6"

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/OnDemandDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ContentBackgroundAppearance.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/FlexVersion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ArrowDirection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/FormatPattern.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentNavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/core/ISoftKeyboardHintClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/CalloutArrow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/YearProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/calendarClasses/DateSelectorDisplayMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListScrollerSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/ScrollSnappingMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImageSource.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/NumericDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateSpinnerItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/CalendarDate.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as</path>

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

--- frameworks/projects/spark/src/spark/components/ScrollSnappingMode.as
+++ frameworks/projects/spark/src/spark/components/ScrollSnappingMode.as
@@ -21,7 +21,7 @@
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
+     *  @productversion Flex 4.6
      */
     public final class ScrollSnappingMode
     {
@@ -30,7 +30,7 @@
          *
          *  @langversion 3.0
          *  @playerversion AIR 3
-         *  @productversion Flex 4.5.2
+         *  @productversion Flex 4.6
          */
         public static const NONE:String = "none";

@@ -40,7 +40,7 @@
          *
          *  @langversion 3.0
          *  @playerversion AIR 3
-         *  @productversion Flex 4.5.2
+         *  @productversion Flex 4.6
          */
         public static const LEADING_EDGE:String = "leadingEdge";

@@ -49,7 +49,7 @@
          *
          *  @langversion 3.0
          *  @playerversion AIR 3
-         *  @productversion Flex 4.5.2
+         *  @productversion Flex 4.6
          */
         public static const CENTER:String = "center";

@@ -59,7 +59,7 @@
          *
          *  @langversion 3.0
          *  @playerversion AIR 3
-         *  @productversion Flex 4.5.2
+         *  @productversion Flex 4.6
          */
         public static const TRAILING_EDGE:String = "trailingEdge";


Transferred from the Adobe Open Source Subversion Repository

Revision: 9029
Author:   aharui@adobe.com
Date:     2009-08-03T23:03:01.197795Z

Log Message:
-----------
Adjust the way RET gets its windowActivate/deactivate events.  Also adjust the way SkinnableContainer handles the temporary contentGroup when the main contentGroup gets created.

QE Notes: None
Doc Notes: None
Bugs: SDK-22418, SDK-22179
Reviewer: Corey
API Change: No
Is noteworthy for integration: No
tests: checkintests mustella/Managers/FocusManager mustella/gumbo/components/TextInput,TextArea

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableContainer.as
@@ -866,10 +866,11 @@
             {
                 var sourceContent:Array = _placeHolderGroup.getMXMLContent();

-                contentGroup.mxmlContent = sourceContent ? sourceContent.slice() : null;
-
                 // FIXME (rfrishbe): investigate why we need this, especially if these elements shouldn't
                 // be added to the place holder Group's display list
+                // (aharui) They are added via calls to addElement if no other mxmlContent has been
+                // set.  This is a typical pattern when creating views from AS.  Create the child,
+                // create the parent, addElement the child to the parent.

                 // FIXME (rfrishbe): Also look at why we need a defensive copy for mxmlContent in Group,
                 // especially if we make it mx_internal.
@@ -880,6 +881,8 @@
                     _placeHolderGroup.removeElementAt(0);
                 }

+                contentGroup.mxmlContent = sourceContent ? sourceContent.slice() : null;
+
             }
             else if (_mxmlContent != null)
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4885
Author:   jszeto@adobe.com
Date:     2009-02-07T00:12:32.609062Z

Log Message:
-----------
Flex SDK Framework - Update mx.filters API and class hierarchy

- Removed BaseFilter.as, BaseDimensionFilter.as, and GradientFilter.as
- Renamed IBitmapFilter.as to IFlexBitmapFilter.as
- Changed IBitmapFilter.clone to createBitmapFilter
- Moved properties and functions from base classes up to filter subclasses
- Changed ColorMatrixFilter constructor parameter from Array to Object
- Added Change metadata to all filter classes
- Changed notifyFilterChanged from public to private
- Added ASDoc comments
- Added copyright info
- Added a number of formatting and style fixes

QE Notes: Need to update tests based on API changes. Missing tests for DisplacementMapFilter.as.
Doc Notes: Need extensive ASDoc review. Consider using @copy for properties that match the flash.filters properties
Bugs: n/a
Reviewer: Gordon

Modified Paths:
--------------
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/BevelFilter.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientFilter.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IBitmapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/DisplacementMapFilter.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/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Parser.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IBitmapFilter.as" copyfrom-rev="4821" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IFlexBitmapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateFilterInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as
+++ frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as
@@ -1,22 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
 package mx.filters
 {

-
+import flash.display.BitmapData;
+import flash.events.Event;
+import flash.events.EventDispatcher;
 import flash.filters.BitmapFilter;
 import flash.filters.DisplacementMapFilterMode;
-import flash.display.BitmapData;
 import flash.geom.Point;
-import mx.filters.BaseFilter;
-import mx.filters.IBitmapFilter;
-
-public class DisplacementMapFilter extends BaseFilter implements IBitmapFilter
+
+import mx.filters.IFlexBitmapFilter;
+
+/**
+ *  @review
+ *  Dispatched when a property value has changed.
+ */
+[Event(name="change", type="flash.events.Event")]
+
+/**
+ *  @review
+ *
+ * 	The mx.filters.DisplacementMapFilter class is based on
+ *  flash.filters.DisplacementMapFilter but adds support for dynamically updating
+ *  property values.
+ *  When a property changes, it dispatches an event that tells the filter owner to
+ *  reapply the filter. Use this class instead of flash.filters.DisplacementMapFilter
+ *  if you plan to dynamically change the filter property values.
+ *
+ *  @see flash.filters.DisplacementMapFilter
+ */
+public class DisplacementMapFilter extends EventDispatcher implements IFlexBitmapFilter
 {
+	include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 * @copy flash.filters.DisplacementMapFilter
+	 */
 	public function DisplacementMapFilter(mapBitmap:BitmapData = null,
 										  mapPoint:Point = null, componentX:uint = 0,
 										  componentY:uint = 0, scaleX:Number = 0.0,
 										  scaleY:Number = 0.0, mode:String = "wrap",
 										  color:uint = 0, alpha:Number = 0.0)
 	{
+		super();
+
 		this.mapBitmap = mapBitmap;
 		this.mapPoint = mapPoint;
 		this.componentX = componentX;
@@ -27,6 +70,12 @@
 		this.color = color;
 		this.alpha = alpha;
 	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------

 	//----------------------------------
     //  alpha
@@ -268,10 +317,40 @@
 			notifyFilterChanged();
 		}
 	}
-
-	public function clone():BitmapFilter
-	{
-		return null;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+   	/**
+     * @private
+     * Notify of a change to our filter, so that filter stack is ultimately
+     * re-applied by the framework.
+     */
+	private function notifyFilterChanged():void
+	{
+		dispatchEvent(new Event(Event.CHANGE));
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  IFlexBitmapFilter
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Creates a flash.filters.DisplacementMapFilter instance using the current
+	 *  property values.
+	 *
+	 *  @return flash.filters.DisplacementMapFilter instance
+	 */
+	public function createBitmapFilter():BitmapFilter
+	{
+		return new flash.filters.DisplacementMapFilter(mapBitmap, mapPoint, componentX,
+													   componentY, scaleX, scaleY, mode,
+													   color, alpha);
 	}

 }


Улучшения

Улучшения

--- src/main/org/shypl/common/util/progress/InterestFreeProgress.as
+++ src/main/org/shypl/common/util/progress/InterestFreeProgress.as
@@ -3,5 +3,9 @@
 		override protected function calculatePercent():Number {
 			return 0;
 		}
+
+		public final function makeComplete():void {
+			complete();
+		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls.treeClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17042
Author:   cframpto@adobe.com
Date:     2010-07-23T16:04:29.868893Z

Log Message:
-----------
PARB changes for DataGrid selection

removed from DG and/or Grid:
allSelectedCells()
allSelectedIndices()
selectionContainsOnlyCell()
selectionContainsOnlyCellRegion()
selectionContainsOnlyIndex()
selectionContainsOnlyIndices()

these read-only properties have been added to Grid:
selectedCell
selectedCells
selectedIndex
selectedIndices
selectedItem
selectedItems
selectionLength

new CellRegion and CellPosition classes.  Return Vector.<CellPosition> rather than Vector.<Object> for cell selection.

Signature of getCellsAt changed to return Vector.<CellPosition>
Signature of GridSelectionEvent changed to have one arg, selectionChange:CellRegion.

QE notes: API changes so expect some test breakage
Doc notes:
Bugs:
Reviewer: Hans
Tests run: none
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/GridSelection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/GridSelectionEvent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/CellRegion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/CellPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Tree.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/GridContainerBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
@@ -235,6 +235,90 @@
     }

     //----------------------------------
+    //  selectionLength
+    //----------------------------------
+
+    /**
+     *  If the selectionMode is either GridSelectionMode.SINGLE_ROW or
+     *  GridSelectionMode.MULTIPLE_ROWS, returns the number of
+     *  selected rows and if the selectionMode is either
+     *  GridSelectionMode.SINGLE_CELL or
+     *  GridSelectionMode.MULTIPLE_CELLS, returns the number of
+     *  selected cells.  If selectionMode is GridSelectionMode.NONE
+     *  returns 0.
+     *
+     *  @return Number of selected rows or cells depending on selectionMode.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    public function get selectionLength():int
+    {
+        if (isRowSelectionMode())
+        {
+            if (!selectAllFlag)
+                return selectedRows.length;
+
+            const rowCount:int = getGridDataProviderLength();
+
+            // selectAll and nothing on the delete list
+            if (selectedRows.length == 0)
+                return rowCount;
+
+            // all rows minus the ones that were removed from the selection
+            return rowCount - selectedRows.length;
+        }
+        else if (isCellSelectionMode())
+        {
+            var left:int;
+            var right:int;
+            var top:int;
+            var bottom:int;
+
+            if (selectAllFlag)
+            {
+                // Iterate over all rows and columns.
+                left = 0;
+                top = 0;
+                right = getGridColumnsLength();
+                bottom = getGridDataProviderLength();
+
+                // selectAll and nothing on the delete list.
+                if (cellRegions.length == 0)
+                    return right * bottom;
+            }
+            else
+            {
+                // Iterate over the selected cells region.
+                const bounds:Rectangle = getCellRegionsBounds();
+                left = bounds.left;
+                right = bounds.right;
+                top = bounds.top;
+                bottom = bounds.bottom;
+            }
+
+            var selectedCount:int = 0;
+
+            for (var rowIndex:int = top; rowIndex < bottom; rowIndex++)
+            {
+                for (var columnIndex:int = left; columnIndex < right; columnIndex++)
+                {
+                    if (containsCell(rowIndex, columnIndex))
+                        selectedCount++;
+                }
+            }
+
+            return selectedCount;
+        }
+
+        return 0;
+    }
+
+    //----------------------------------
     //  selectionMode
     //----------------------------------

@@ -253,7 +337,7 @@
      *
      *  @default GridSelectionMode.SINGLE_ROW
      *
-     *  @see spark.components.supportClasses.SelectionMode
+     *  @see spark.components.supportClasses.GridSelectionMode
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -285,7 +369,7 @@
                 break;
         }
     }
-
+
     /**
      *  If the selectionMode is either GridSelectionMode.SINGLE_CELL or
      *  GridSelectionMode.MULTIPLE_CELLS, returns a list of all the
@@ -304,13 +388,15 @@
      *  @playerversion AIR 2.0
      *  @productversion Flex 4.5
      */
-    public function allCells():Vector.<Object>
-    {
-        var cells:Vector.<Object> = new Vector.<Object>;
+    public function allCells():Vector.<CellPosition>
+    {
+        var cells:Vector.<CellPosition> = new Vector.<CellPosition>;

         if (!isCellSelectionMode())
             return cells;

+        // Note: if this is changed, change the similiar code in selectionLength.
+
         var left:int;
         var right:int;
         var top:int;
@@ -339,11 +425,7 @@
             for (var columnIndex:int = left; columnIndex < right; columnIndex++)
             {
                 if (containsCell(rowIndex, columnIndex))
-                {
-                    const cell:Object = { "rowIndex": rowIndex,
-                                          "columnIndex": columnIndex };
-                    cells.push(cell);
-                }
+                    cells.push(new CellPosition(rowIndex, columnIndex));
             }
         }

@@ -368,6 +450,8 @@
         if (!isRowSelectionMode())
             return new Vector.<int>(0, true);

+        // Note: if this is changed, change the similiar code in selectionLength.
+
         var rows:Vector.<int>;

         if (selectAllFlag)
@@ -470,48 +554,19 @@
     }

     /**
-     *  If the selectionMode is either GridSelectionMode.SINGLE_ROW
-     *  or GridSelectionMode.MULTIPLE_ROWS, determines if the row
-     *  is the only item in the current selection.
-     *
+     *  If the selectionMode is GridSelectionMode.MULTIPLE_ROWS,
+     *  determines if the rows are in the current selection.
+     *
      *  @param rowIndex The 0-based row index relative to the Grid's
      *  dataProvider.
      *
-     *  @return true if the row is the only item in the selection
+     *  @return true if the rows are in the selection
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.0
      *  @productversion Flex 4.5
      */
-    public function containsOnlyRow(rowIndex:int):Boolean
-    {
-        if (!validateIndex(rowIndex))
-            return false;
-
-        if (containsRow(rowIndex))
-        {
-            const rows:Vector.<int> = allRows();
-            return rows.length == 1;
-        }
-
-        return false;
-    }
-
-    /**
-     *  If the selectionMode is GridSelectionMode.MULTIPLE_ROWS,
-     *  determines if the rows are in the current selection.
-     *
-     *  @param rowIndex The 0-based row index relative to the Grid's
-     *  dataProvider.
-     *
-     *  @return true if the rows are in the selection
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
     public function containsRows(rowsIndices:Vector.<int>):Boolean
     {
         if (!validateIndices(rowsIndices))
@@ -530,40 +585,6 @@
         }

         return false;
-    }
-
-    /**
-     *  If the selectionMode is either GridSelectionMode.SINGLE_ROW
-     *  or GridSelectionMode.MULTIPLE_ROWS, determines if the rows
-     *  are the only items in the current selection.
-     *
-     *  @param rowIndex The 0-based row index relative to the Grid's
-     *  dataProvider.
-     *
-     *  @return true if the rows are the only items in the selection.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    public function containsOnlyRows(rowsIndices:Vector.<int>):Boolean
-    {
-        if (!validateIndices(rowsIndices))
-            return false;
-
-        const selectedRows:Vector.<int> = allRows();
-
-        for each (var rowIndex:int in rowsIndices)
-        {
-            const offset:int = selectedRows.indexOf(rowIndex);
-            if (offset == -1)
-                return false;
-            else
-                selectedRows.splice(offset, 1);
-        }
-
-        return selectedRows.length == 0;
     }

     /**
@@ -659,7 +680,7 @@
         if (!validateIndex(rowIndex) )
             return false;

-        if (requireSelection && containsOnlyRow(rowIndex))
+        if (requireSelection && containsRow(rowIndex) && selectionLength == 1)
             return false;

         if (selectAllFlag)
@@ -740,10 +761,9 @@
     }

     /**
-     *  If the selectionMode is either
-     *  GridSelectionMode.SINGLE_CELLS or
-     *  GridSelectionMode.MULTIPLE_CELLS, determines if the cell
-     *  is in the only item in the current selection.
+     *  If the selectionMode is
+     *  GridSelectionMode.MULTIPLE_CELLS, determines if all the
+     *  cells in the cell region are in the current selection.
      *
      *  @param rowIndex The 0-based row index relative to the Grid's
      *  dataProvider.
@@ -751,25 +771,42 @@
      *  @param columnsIndex The 0-based column index relative to the Grid's
      *  columns.
      *
-     *  @return true if the cell is in the only item in the selection.
+     *  @param rowCount In number of cells, the height of the cell region.
+     *
+     *  @param columnsCount In number of cells, the width of the cell region.
+     *
+     *  @return true if the cells are in the selection.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.0
      *  @productversion Flex 4.5
      */
-    public function containsOnlyCell(rowIndex:int, columnIndex:int):Boolean
-    {
-        if (containsCell(rowIndex, columnIndex))
-            return allCells().length == 1;
-
-        return false;
-    }
-
-    /**
-     *  If the selectionMode is
-     *  GridSelectionMode.MULTIPLE_CELLS, determines if all the
-     *  cells in the cell region are in the current selection.
+    public function containsCellRegion(rowIndex:int, columnIndex:int,
+                                       rowCount:int, columnCount:int):Boolean
+    {
+        if (!validateCellRegion(rowIndex, columnIndex, rowCount, columnCount))
+            return false;
+
+        const bottom:int = rowIndex + rowCount;
+        const right:int = columnIndex + columnCount;
+
+        for (var r:int = rowIndex; r < bottom; r++)
+        {
+            for (var c:int = columnIndex; c < right; c++)
+            {
+                if (!containsCell(r, c))
+                    return false;
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     *  If the selectionMode is either GridSelectionMode.SINGLE_CELLS
+     *  or GridSelectionMode.MULTIPLE_CELLS, replaces the current
+     *  selection with the cell at the given location.
      *
      *  @param rowIndex The 0-based row index relative to the Grid's
      *  dataProvider.
@@ -777,42 +814,30 @@
      *  @param columnsIndex The 0-based column index relative to the Grid's
      *  columns.
      *
-     *  @param rowCount In number of cells, the height of the cell region.
-     *
-     *  @param columnsCount In number of cells, the width of the cell region.
-     *
-     *  @return true if the cells are in the selection.
+     *  @return true no errors or false, if
+     *  rowIndex is not a valid index in dataProvider
+     *  or columnIndex is not a valid index in columns
+     *  or the selectionMode is invalid.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.0
      *  @productversion Flex 4.5
-     */
-    public function containsCellRegion(rowIndex:int, columnIndex:int,
-                                       rowCount:int, columnCount:int):Boolean
-    {
-        if (!validateCellRegion(rowIndex, columnIndex, rowCount, columnCount))
+     */
+    public function setCell(rowIndex:int, columnIndex:int):Boolean
+    {
+        if (!validateCell(rowIndex, columnIndex))
             return false;

-        const bottom:int = rowIndex + rowCount;
-        const right:int = columnIndex + columnCount;
-
-        for (var r:int = rowIndex; r < bottom; r++)
-        {
-            for (var c:int = columnIndex; c < right; c++)
-            {
-                if (!containsCell(r, c))
-                    return false;
-            }
-        }
+        removeSelection();
+        addCellRegion(rowIndex, columnIndex, 1, 1);

         return true;
     }
-
+
     /**
      *  If the selectionMode is GridSelectionMode.MULTIPLE_CELLS,
-     *  determines if all the cells in the cell region are the only items in the
-     *  current selection.
+     *  adds the cell at the given location to the cell selection.
      *
      *  @param rowIndex The 0-based row index relative to the Grid's
      *  dataProvider.
@@ -820,30 +845,33 @@
      *  @param columnsIndex The 0-based column index relative to the Grid's
      *  columns.
      *
-     *  @param rowCount In number of cells, the height of the cell region.
-     *
-     *  @param columnsCount In number of cells, the width of the cell region.
-     *
-     *  @return true if the cells are the only items in the selection.
+     *  @return true no errors or false, if
+     *  rowIndex is not a valid index in dataProvider
+     *  or columnIndex is not a valid index in columns
+     *  or the selectionMode is invalid.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.0
      *  @productversion Flex 4.5
-     */
-    public function containsOnlyCellRegion(rowIndex:int, columnIndex:int,
-                                           rowCount:int, columnCount:int):Boolean
-    {
-        if (containsCellRegion(rowIndex, columnIndex, rowCount, columnCount))
-            return allCells().length == rowCount * columnCount;
-
-        return false;
-    }
-
-    /**
-     *  If the selectionMode is either GridSelectionMode.SINGLE_CELLS
-     *  or GridSelectionMode.MULTIPLE_CELLS, replaces the current
-     *  selection with the cell at the given location.
+     */
+    public function addCell(rowIndex:int, columnIndex:int):Boolean
+    {
+        if (!validateCell(rowIndex, columnIndex))
+            return false;
+
+        if (selectAllFlag)
+            removeCellRegion(rowIndex, columnIndex, 1, 1);
+        else
+            addCellRegion(rowIndex, columnIndex, 1, 1);
+
+        return true;
+    }
+
+    /**
+     *  If the selectionMode is either GridSelectionMode.SINGLE_CELL
+     *  or GridSelectionMode.MULTIPLE_CELLS, removes the cell at the
+     *  given position from the cell selection.
      *
      *  @param rowIndex The 0-based row index relative to the Grid's
      *  dataProvider.
@@ -851,9 +879,9 @@
      *  @param columnsIndex The 0-based column index relative to the Grid's
      *  columns.
      *
-     *  @return true no errors or false, if
-     *  rowIndex is not a valid index in dataProvider
-     *  or columnIndex is not a valid index in columns
+     *  @return true if no errors, or false, if rowIndex
+     *  is not a valid index in dataProvider or
+     *  columnIndex is not a valid index in columns
      *  or the selectionMode is invalid.
      *
      *  @langversion 3.0
@@ -861,77 +889,12 @@
      *  @playerversion AIR 2.0
      *  @productversion Flex 4.5
      */
-    public function setCell(rowIndex:int, columnIndex:int):Boolean
+    public function removeCell(rowIndex:int, columnIndex:int):Boolean
     {
         if (!validateCell(rowIndex, columnIndex))
             return false;
-
-        removeSelection();
-        addCellRegion(rowIndex, columnIndex, 1, 1);
-
-        return true;
-    }
-
-    /**
-     *  If the selectionMode is GridSelectionMode.MULTIPLE_CELLS,
-     *  adds the cell at the given location to the cell selection.
-     *
-     *  @param rowIndex The 0-based row index relative to the Grid's
-     *  dataProvider.
-     *
-     *  @param columnsIndex The 0-based column index relative to the Grid's
-     *  columns.
-     *
-     *  @return true no errors or false, if
-     *  rowIndex is not a valid index in dataProvider
-     *  or columnIndex is not a valid index in columns
-     *  or the selectionMode is invalid.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    public function addCell(rowIndex:int, columnIndex:int):Boolean
-    {
-        if (!validateCell(rowIndex, columnIndex))
-            return false;
-
-        if (selectAllFlag)
-            removeCellRegion(rowIndex, columnIndex, 1, 1);
-        else
-            addCellRegion(rowIndex, columnIndex, 1, 1);
-
-        return true;
-    }
-
-    /**
-     *  If the selectionMode is either GridSelectionMode.SINGLE_CELL
-     *  or GridSelectionMode.MULTIPLE_CELLS, removes the cell at the
-     *  given position from the cell selection.
-     *
-     *  @param rowIndex The 0-based row index relative to the Grid's
-     *  dataProvider.
-     *
-     *  @param columnsIndex The 0-based column index relative to the Grid's
-     *  columns.
-     *
-     *  @return true if no errors, or false, if rowIndex
-     *  is not a valid index in dataProvider or
-     *  columnIndex is not a valid index in columns
-     *  or the selectionMode is invalid.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    public function removeCell(rowIndex:int, columnIndex:int):Boolean
-    {
-        if (!validateCell(rowIndex, columnIndex))
-            return false;
-
-        if (requireSelection && containsOnlyCell(rowIndex, columnIndex))
+
+        if (requireSelection && containsCell(rowIndex, columnIndex) && selectionLength == 1)
             return false;

         if (selectAllFlag)
@@ -1039,7 +1002,7 @@
      */
     private function hasRowSelection():Boolean
     {
-        return allRows().length > 0;
+        return isRowSelectionMode() && selectionLength > 0;
     }

     /**
@@ -1050,7 +1013,7 @@
      */
     private function hasCellSelection():Boolean
     {
-        return allCells().length > 0;
+        return isCellSelectionMode() && selectionLength > 0;
     }

     /**
@@ -1068,7 +1031,10 @@
             return false;

         if (getGridDataProviderLength() == 0 || getGridColumnsLength() == 0)
+        {
+            grid.caretRowIndex = grid.caretColumnIndex = -1;
             return false;
+        }

         // If there isn't a selection, set one, using the grid method rather
         // than the internal one, so that the caretPosition will be updated too.
@@ -1077,7 +1043,7 @@
             if (!hasRowSelection())
                 selectionChanged = grid.setSelectedIndex(0);
         }
-        else if (isCellSelectionMode())
+            else if (isCellSelectionMode())
         {
             if (!hasCellSelection())
                 selectionChanged = grid.setSelectedCell(0, 0);
@@ -1095,8 +1061,7 @@
      */
     private function removeSelection():Boolean
     {
-        const hasSelection:Boolean =
-            selectAllFlag || hasRowSelection() || hasCellSelection();
+        const hasSelection:Boolean = selectionLength > 0;

         selectedRows.length = 0;
         cellRegions.length = 0;
@@ -1485,7 +1450,7 @@
             elementChanged = adjustRowsAfterAdd(insertIndex, insertLength);
         else if (hasCellSelection())
             elementChanged = adjustCellsAfterAdd(insertIndex, insertLength);
-
+
         // If a selection is required and these are the first items to be
         // added make sure there is a selection now.
         ensureRequiredSelection();
@@ -1777,11 +1742,11 @@
                 const rowIndex:int = firstRemoveIndex <= dataProviderLength - 1 ?
                                      firstRemoveIndex : dataProviderLength - 1;
                 if (isRowSelectionMode() && !hasRowSelection())
-                    setRow(rowIndex);
+                        setRow(rowIndex);
                 else if (isCellSelectionMode() && !hasCellSelection())
-                    setCell(rowIndex, 0);
-            }
-        }
+                        setCell(rowIndex, 0);
+                }
+            }

         return elementChanged;
     }
@@ -2140,14 +2105,11 @@
         if (elementChanged && requireSelection)
         {
             var dataProviderLength:int = getGridDataProviderLength();
-            if (dataProviderLength > 0)
-            {
-                if (!hasCellSelection())
-                {
-                    rowIndex = firstRemoveIndex <= dataProviderLength - 1 ?
-                               firstRemoveIndex : dataProviderLength - 1;
-                    setCell(rowIndex, 0);
-                }
+            if (dataProviderLength > 0 && selectionLength == 0)
+            {
+                rowIndex = firstRemoveIndex <= dataProviderLength - 1 ?
+                           firstRemoveIndex : dataProviderLength - 1;
+                setCell(rowIndex, 0);
             }
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12853
Author:   mhorn@adobe.com
Date:     2009-12-11T16:10:45.982388Z

Log Message:
-----------
asdoc updates for l10n

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/MenuSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/WindowedApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DateChooserNextMonthSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/MenuCheckDisabled.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ContainerBorderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ScrollBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/StepperDecrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ProgressBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/SliderThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/EmphasizedButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/MenuRadioDisabled.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/TitleWindowCloseButtonOverSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ProgressBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DateChooserPrevMonthSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ButtonBarFirstButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ControlBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ScrollBarDownButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/SliderTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ComboBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/BorderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DateChooserPrevYearSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DefaultButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ButtonBarLastButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/windowChrome/RestoreButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ScrollBarUpButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DataGridHeaderBackgroundSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/MenuArrow.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DropDownSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/SliderTrackHighlightSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/TitleWindowCloseButtonUpSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DateChooserSelectionIndicatorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DataGridSortArrow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ProgressIndeterminateSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/TabSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/windowChrome/CloseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DataGridHeaderSeparatorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/AccordionHeaderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ButtonBarMiddleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/windowChrome/StatusBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DateChooserNextYearSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/windowChrome/MinimizeButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DateChooserRollOverIndicatorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/MenuArrowDisabled.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/windowChrome/MaximizeButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/LinkButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ToolTipSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/PanelBorderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/EditableComboBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ProgressMaskSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/MenuBarItemSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/windowChrome/TitleBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ColorPickerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/MenuCheck.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/TitleWindowCloseButtonDownSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/ScrollBarThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/MenuSeparatorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DividerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/MenuBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/StepperIncrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/DateChooserTodayIndicatorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/MenuRadio.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/mx/skins/wireframe/PopUpButtonSkin.mxml</path>

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

--- frameworks/projects/wireframe/src/mx/skins/wireframe/ContainerBorderSkin.as
+++ frameworks/projects/wireframe/src/mx/skins/wireframe/ContainerBorderSkin.as
@@ -12,6 +12,9 @@
 package mx.skins.wireframe {

 /**
+ *  Defines the border and background for the MX Container class's wireframe skin.
+ *
+ *  @see mx.core.Container
  *
  *  @langversion 3.0
  *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.rpc.wsdl
 {


fix RangeError: Error #1125: The index 0 is out of range 0.
at org.mangui.HLS.streaming::FragmentLoader/fragDemux()
at org.mangui.HLS.streaming::FragmentLoader/fragCompleteHandler()

check AudioTracks length

--- src/org/mangui/HLS/streaming/FragmentLoader.as
+++ src/org/mangui/HLS/streaming/FragmentLoader.as
@@ -311,7 +311,7 @@
                 Log.debug("MPEG2-TS found");
                 var audio_pid : Number;
                 var audio_extract : Boolean;
-                if (_audioTrackId == -1) {
+                if (_audioTrackId == -1 || _audioTracks.length > _audioTrackId) {
                     // unknown, will be retrieved from demux
                     audio_pid = -1;
                     audio_extract = true;


Transferred from the Adobe Open Source Subversion Repository

Revision: 10766
Author:   gruehle@adobe.com
Date:     2009-09-30T22:55:55.205927Z

Log Message:
-----------
Re-commit compiler errors for other theme's styles feature. If Style metadata has a "themes" attribute, the style is only valid if that theme is applied.

The Spark theme is applied by default. The halo theme can be specified as a compiler argument or by selecting the "MX Only" component set in Builder.

All other themes need to be applied using theme+= instead of theme=. If you use theme= you will get warnings about styles used in CSS selectors, and errors if you use any theme-specific style as an attribute on an MXML tag.

By default, styles that aren't valid for the current theme are errors. These can be changed to warnings with the report-invalid-styles-as-warnings compiler option.

QE notes: Expect test breakage
Doc notes: The new policy for themes needs to be documented.
Bugs: none yet, but I'm sure there will be some...
Reviewer: Ryan
Tests run: checkintests, cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
<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/ToolTip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/DefaultsConfigurator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ApplicationBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/themes/Spark/spark.css</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/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.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/tests/basicTests/BasicTests.css</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/DeclarationHandler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/Type.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/TypeTable.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/SparkSkinsClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/AttributeHandler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FXGCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SkinnableDataContainerSkin.mxml</path>

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

--- frameworks/projects/framework/src/mx/managers/CursorManager.as
+++ frameworks/projects/framework/src/mx/managers/CursorManager.as
@@ -33,6 +33,17 @@
 [Style(name="busyCursor", type="Class", inherit="no")]

 /**
+ *  The class to use as the skin for the busy cursor background.
+ *  The default value is the "cursorStretch" symbol from the Assets.swf file.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="busyCursorBackground", type="Class", inherit="no")]
+
+/**
  *  The CursorManager class controls a prioritized list of cursors,
  *  where the cursor with the highest priority is currently visible.
  *  If the cursor list contains more than one cursor with the same priority,


Transferred from the Adobe Open Source Subversion Repository

Revision: 18286
Author:   dloverin@adobe.com
Date:     2010-10-22T14:19:42.189298Z

Log Message:
-----------
Final DataGrid editor PARB changes plus bug fixes.

Removed cancel() from GridItemEditor.
ComboBoxGridItemEditor's width is now sized to fit in the cell.

QE notes: None.
Doc notes: None.
Bugs: SDK-28260, SDK-28291, SDK-28258
Reviewer: Hans
Tests run: cyclone
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IGridItemEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/ComboBoxGridItemEditor.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as
@@ -84,7 +84,7 @@
     //--------------------------------------------------------------------------
     /**
      *  @private
-     *  Timer used to cancel edits it a double click occurs.
+     *  Timer used to cancel edits if a double click occurs.
      */
     private var doubleClickTimer:Timer;

@@ -100,21 +100,6 @@
      */
     private var gotFlexEnterEvent:Boolean;

-    /**
-     *  @private
-     *  The state of the grid selection at the last selection snapshot. Used in
-     *  row selection mode.
-     */
-    private var previouslySelectedIndices:Vector.<int>;
-
-    /**
-     *  @private
-     *  The state of the grid selection at the last selection snapshot. Used in
-     *  cell selection mode.
-     *
-     */
-    private var previouslySelectedCells:Vector.<CellPosition>;
-
     /**
      *  @private
      */
@@ -144,6 +129,16 @@

     /**
      *  @private
+     *  Determines if the hasFocusableChildren flags are restored when
+     *  an editor is destroyed. This is set to false when we know we will
+     *  be starting up another editor immeditiately. By not restoring
+     *  the tab children flag we will be saving FocusManager from removing
+     *  and then adding all the focusable children of the data grid.
+     */
+    private var restoreFocusableChildren:Boolean = true;
+
+    /**
+     *  @private
      *  Used to restore the value of DataGrid's hasFocusableChildren.
      */
     private var saveDataGridHasFocusableChildren:Boolean;
@@ -154,14 +149,6 @@
      */
     private var saveScrollerHasFocusableChildren:Boolean;

-    /**
-     *  @private
-     *  true if a new editor is planned to be started
-     *  after the current editor is closed. This hint can keep us from doing
-     *  work when closing the editor that would just need to be redone shortly.
-     */
-    private var willStartNewEditor:Boolean;
-
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -254,18 +241,6 @@
         commitEditedItemPosition(coord);
     }

-    /**
-     *  @private
-     *  true if we want to block editing on mouseUp
-     */
-    private var dontEdit:Boolean = false;
-
-    /**
-     *  @private
-     *  true if we want to block editing on mouseUp
-     */
-    private var losingFocus:Boolean = false;
-
     /**
      *  @private
      *  true if we're in the endEdit call.  Used to handle
@@ -387,11 +362,10 @@

         dataGrid.addEventListener(KeyboardEvent.KEY_DOWN, dataGrid_keyboardDownHandler);

-        // make sure we get first shot at mouse events before selection is changed. We use
+        // Make sure we get first shot at mouse events before selection is changed. We use
         // this is test if you are clicking on a selected row or not.
-        grid.addEventListener(MouseEvent.MOUSE_DOWN, grid_mouseDownHandler, false, 1000);
-        grid.addEventListener(GridEvent.GRID_MOUSE_DOWN, grid_gridMouseDownHandler);
-        grid.addEventListener(GridEvent.GRID_MOUSE_UP, grid_gridMouseUpHandler);
+        grid.addEventListener(GridEvent.GRID_MOUSE_DOWN, grid_gridMouseDownHandler, false, 1000);
+        grid.addEventListener(GridEvent.GRID_MOUSE_UP, grid_gridMouseUpHandler, false, 1000);
         grid.addEventListener(GridEvent.GRID_DOUBLE_CLICK, grid_gridDoubleClickHandler);
     }

@@ -405,7 +379,6 @@
         // remove listeners to disable cell editing

         grid.removeEventListener(KeyboardEvent.KEY_DOWN, dataGrid_keyboardDownHandler);
-        grid.removeEventListener(MouseEvent.MOUSE_DOWN, grid_mouseDownHandler);
         grid.removeEventListener(GridEvent.GRID_MOUSE_DOWN, grid_gridMouseDownHandler);
         grid.removeEventListener(GridEvent.GRID_MOUSE_UP, grid_gridMouseUpHandler);
         grid.removeEventListener(GridEvent.GRID_DOUBLE_CLICK, grid_gridDoubleClickHandler);
@@ -455,7 +428,7 @@
                 grid.focusManager.defaultButtonEnabled = true;

             // setfocus back to us so something on stage has focus
-            deferFocus();
+            dataGrid.setFocus();

             // defer focus can cause focusOutHandler to destroy the editor
             // and make itemEditorInstance null
@@ -464,11 +437,13 @@
             else
                 grid.invalidateDisplayList();   // force the editorIndicator to be redrawn

-            dataGrid.hasFocusableChildren = saveDataGridHasFocusableChildren;
-            //dataGrid.grid.hasFocusableChildren = saveGridHasFocusableChildren;
-
-            if (dataGrid.scroller)
-                dataGrid.scroller.hasFocusableChildren = saveScrollerHasFocusableChildren;
+            if (restoreFocusableChildren)
+            {
+                dataGrid.hasFocusableChildren = saveDataGridHasFocusableChildren;
+
+                if (dataGrid.scroller)
+                    dataGrid.scroller.hasFocusableChildren = saveScrollerHasFocusableChildren;
+            }

             itemEditorInstance = null;
             _editedItemRenderer = null;
@@ -501,7 +476,7 @@
             return;

         var col:GridColumn = grid.columns.getItemAt(columnIndex) as GridColumn;
-        var item:IVisualElement = grid.getItemRendererAt(rowIndex, columnIndex);
+        var item:IGridItemRenderer = grid.getItemRendererAt(rowIndex, columnIndex);
         var cellBounds:Rectangle = grid.getCellBounds(rowIndex,columnIndex);

         // convert the row origin from the grid to the editor layer.
@@ -512,14 +487,18 @@

         // Need to turn on focusable children flag so focus manager will
         // allow focus into the data grid's children.
-        saveDataGridHasFocusableChildren = dataGrid.hasFocusableChildren;
+        if (restoreFocusableChildren)
+            saveDataGridHasFocusableChildren = dataGrid.hasFocusableChildren;
         dataGrid.hasFocusableChildren = true;

         if (dataGrid.scroller)
         {
-            saveScrollerHasFocusableChildren = dataGrid.scroller.hasFocusableChildren;
+            if (restoreFocusableChildren)
+                saveScrollerHasFocusableChildren = dataGrid.scroller.hasFocusableChildren;
             dataGrid.scroller.hasFocusableChildren = true;
         }
+
+        restoreFocusableChildren = true;

         if (!col.rendererIsEditable)
         {
@@ -551,7 +530,7 @@
             itemEditorInstance.hasFocusableChildren = true;
             if (itemEditorInstance is ISimpleStyleClient)
                 ISimpleStyleClient(itemEditorInstance).styleName = item;
-            itemEditorInstance.data = IGridItemRenderer(item).data;
+            itemEditorInstance.data = item.data;

             grid.addElement(itemEditorInstance);

@@ -663,7 +642,7 @@
      *
      *  Start editing a cell for a specified row and column index.
      *
-     *  Dispatches a GridItemEditorEvent.START_GRID_ITEM_EDITOR_SESSION
+     *  Dispatches a GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_STARTING
      *   event.
      *
      *  @param rowIndex The zero-based row index of the cell to edit.
@@ -673,19 +652,39 @@
     public function startItemEditorSession(rowIndex:int, columnIndex:int):Boolean
     {

+        // validate row and column index
+        if (!isValidCellPosition(rowIndex, columnIndex))
+            return false;
+
         dataGrid.addEventListener(GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_STARTING,
-                                  dataGrid_startItemEditorSessionHandler,
+                                  dataGrid_gridItemEditorSessionStartingHandler,
                                   false, EventPriority.DEFAULT_HANDLER);

-        var dataGridEvent:GridItemEditorEvent =
-            new GridItemEditorEvent(GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_STARTING, false, true);
+        var column:GridColumn = grid.columns.getItemAt(columnIndex) as GridColumn;
+
+        if (!column)
+            return false;

         // The START_GRID_ITEM_EDITOR_SESSION event is cancelable
+        var dataGridEvent:GridItemEditorEvent = new GridItemEditorEvent(
+                                                        GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_STARTING,
+                                                        false, true);
         dataGridEvent.rowIndex = Math.min(rowIndex, grid.dataProvider.length - 1);
         dataGridEvent.columnIndex = Math.min(columnIndex, grid.columns.length - 1);
-        dataGridEvent.column = grid.columns.getItemAt(columnIndex) as GridColumn;
-
-        var editorStarted:Boolean = dataGrid.dispatchEvent(dataGridEvent);
+        dataGridEvent.column = column;
+
+        // Don't send a life cycle event if the cell contains an item renderer.
+        var editorStarted:Boolean = false;
+        if (column.rendererIsEditable == true)
+        {
+            dataGrid_gridItemEditorSessionStartingHandler(dataGridEvent);   // start editor session without the option to cancel
+            editorStarted = true;
+        }
+        else
+        {
+            editorStarted = dataGrid.dispatchEvent(dataGridEvent);
+        }
+
         if (editorStarted)
         {
             lastEditedItemPosition = { columnIndex: columnIndex, rowIndex: rowIndex };
@@ -694,8 +693,9 @@
             dataGrid.grid.caretColumnIndex = columnIndex;
         }

+        restoreFocusableChildren = true;
         dataGrid.removeEventListener(GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_STARTING,
-                                     dataGrid_startItemEditorSessionHandler);
+                                     dataGrid_gridItemEditorSessionStartingHandler);

         return editorStarted;
     }
@@ -787,7 +787,7 @@

         // this happens if the renderer is removed asynchronously ususally with FDS
         if (!itemEditorInstance)
-            return true;
+            return false;

         inEndEdit = true;

@@ -850,11 +850,6 @@
         if (!coord)
             return;

-        if (dontEdit)
-        {
-            return;
-        }
-
         var rowIndex:int = coord.rowIndex;
         var columnIndex:int = coord.columnIndex;

@@ -887,27 +882,21 @@
         lastEditedItemPosition = _editedItemPosition;

         // Notify event that a new editor is starting.
-        var dataGridEvent:GridItemEditorEvent =
-            new GridItemEditorEvent(GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_START);
-
-        dataGridEvent.columnIndex = editedItemPosition.columnIndex;
-        dataGridEvent.column = column;
-        dataGridEvent.rowIndex = editedItemPosition.rowIndex;
-        dataGrid.dispatchEvent(dataGridEvent);
-    }
-
-    /**
-     *  @private
-     *  Sets focus back to the grid so default handler will move it to the
-     *  next component.
-     */
-    private function deferFocus():void
-    {
-        losingFocus = true;
-        dataGrid.setFocus();
-        losingFocus = false;
-    }
-
+        // Don't dispatch life cycle events for item renderers.
+        var dataGridEvent:GridItemEditorEvent = null;
+
+        if (column.rendererIsEditable == false)
+            dataGridEvent = new GridItemEditorEvent(GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_START);
+
+        if (dataGridEvent)
+        {
+            dataGridEvent.columnIndex = editedItemPosition.columnIndex;
+            dataGridEvent.column = column;
+            dataGridEvent.rowIndex = editedItemPosition.rowIndex;
+            dataGrid.dispatchEvent(dataGridEvent);
+        }
+    }
+
     /**
      *  @private
      *  Save the editor session. The developer can still cancel out so the
@@ -954,8 +943,10 @@
      *  @param backward - if true move backward column by column and then row by row.
      *  If false, then move forward column by column, row by row.
      *
-     */
-    private function openEditorInNextEditableCell(rowIndex:int, columnIndex:int, backward:Boolean):void
+     *  @return true if an editor was opened, false otherwise.
+     *
+     */
+    private function openEditorInNextEditableCell(rowIndex:int, columnIndex:int, backward:Boolean):Boolean
     {
         var nextCell:Point = new Point(rowIndex, columnIndex);
         var openedEditor:Boolean = false;
@@ -968,6 +959,7 @@
                 openedEditor = startItemEditorSession(nextCell.x, nextCell.y);
         } while (nextCell && !openedEditor);

+        return openedEditor;
     }

     /**
@@ -1036,21 +1028,31 @@
     private function wasCellPreviouslySelected(rowIndex:int, columnIndex:int):Boolean
     {
         if (dataGrid.isRowSelectionMode())
-            return (dataGrid.isCellSelectionMode() || previouslySelectedIndices.indexOf(rowIndex) >= 0);
-        else
-        {
-            // loop thru the previously selected cells to compare
-            for each (var cp:CellPosition in previouslySelectedCells)
-            {
-                if (cp.rowIndex == rowIndex &&
-                    cp.columnIndex == columnIndex)
-                    return true;
-            }
-        }
+            return dataGrid.selectionContainsIndex(rowIndex);
+        else if (dataGrid.isCellSelectionMode())
+            return dataGrid.selectionContainsCell(rowIndex, columnIndex);

         return false;
     }

+    /**
+     *  @private
+     *
+     *  Determine if a cell position is valid.
+     *
+     *  @return true if valid, false otherwise.
+     */
+    private function isValidCellPosition(rowIndex:int, cellIndex:int):Boolean
+    {
+        if (rowIndex >= 0 && rowIndex < dataGrid.dataProvider.length &&
+            cellIndex >= 0 && cellIndex < dataGrid.columns.length)
+        {
+            return true;
+        }
+
+        return false;
+    }
+
     /**
      *  @private
      *
@@ -1103,7 +1105,7 @@
      */
     private function dataGrid_keyboardDownHandler(event:KeyboardEvent):void
     {
-        if (!dataGrid.editable)
+        if (!dataGrid.editable || dataGrid.selectionMode == GridSelectionMode.NONE)
             return;

         if (event.isDefaultPrevented())
@@ -1138,36 +1140,6 @@
     /**
      *  @private
      *
-     *  Get a selection snapshot on mouse down before the grid's selection is
-     *  changed. This is how we can telll if we have clicked on a selected cell
-     *  or not.
-     */
-    private function grid_mouseDownHandler(event:MouseEvent):void
-    {
-        if (!dataGrid.editable)
-            return;
-
-        lastEvent = event;
-
-        if (dataGrid.isRowSelectionMode())
-        {
-            previouslySelectedIndices = dataGrid.selectedIndices.slice(0, dataGrid.selectedIndices.length);
-            previouslySelectedCells = null;
-        }
-        else
-        {
-            previouslySelectedIndices = null;
-            previouslySelectedCells = dataGrid.selectedCells.slice(0, dataGrid.selectedCells.length);
-//            for each (var cell:CellPosition in dataGrid.selectedCells)
-//            {
-//                trace("cell position = (" + cell.rowIndex + "," + cell.columnIndex + ")");
-//            }
-        }
-    }
-
-    /**
-     *  @private
-     *
      */
     private function grid_gridMouseDownHandler(event:GridEvent):void
     {
@@ -1186,7 +1158,7 @@
         //trace("grid_gridMouseDownHandler: (rowIndex, columnIndex) = (" + rowIndex + "," + columnIndex + ")");

         // item editor handling
-        var r:IGridItemRenderer = event.itemRenderer as IGridItemRenderer;
+        var r:IGridItemRenderer = event.itemRenderer;

         lastItemDown = null;

@@ -1202,7 +1174,12 @@
             return;
         }

-        if (r && wasCellPreviouslySelected(rowIndex, columnIndex))
+        // Don't open and editor if the click was not on a previously selected
+        // cell, unless that cell is an item renderer. We don't want to stop
+        // the item renderer from getting focus so start an edit session.
+        const column:GridColumn = dataGrid.columns.getItemAt(columnIndex) as GridColumn;
+        if (r &&
+            (column.rendererIsEditable || wasCellPreviouslySelected(rowIndex, columnIndex)))
         {
             //trace("cell was previously selected: (" + rowIndex + "," + columnIndex + ")");
             lastItemDown = r;
@@ -1244,7 +1221,7 @@
             if (lastItemDown != r)
                 r = lastItemDown;

-            if (columnIndex >= 0 && dataGrid.editable && !dontEdit)
+            if (columnIndex >= 0 && dataGrid.editable)
             {
                 if (grid.columns.getItemAt(columnIndex).editable)
                 {
@@ -1293,7 +1270,7 @@
         }
         else if (lastItemDown && lastItemDown != editedItemRenderer)
         {
-            if (columnIndex >= 0 && dataGrid.editable && !dontEdit)
+            if (columnIndex >= 0 && dataGrid.editable)
             {
                 if (grid.columns.getItemAt(columnIndex).editable)
                 {
@@ -1384,8 +1361,9 @@
      *  @private
      *
      *  Default handler for the startItemEditorSession event.
-     */
-    private function dataGrid_startItemEditorSessionHandler(event:GridItemEditorEvent):void
+     *
+     */
+    private function dataGrid_gridItemEditorSessionStartingHandler(event:GridItemEditorEvent):void
     {
         // trace("itemEditorItemEditBeginningHandler");
         if (!event.isDefaultPrevented())
@@ -1393,10 +1371,9 @@
         else if (!itemEditorInstance)
         {
             _editedItemPosition = null;
+
             // return focus to the grid w/o selecting an item
-            dataGrid.editable = false;
             dataGrid.setFocus();
-            dataGrid.editable = true;
         }
     }

@@ -1410,7 +1387,7 @@
         if (itemEditorInstance || editedItemRenderer)
         {
             dataGrid.endItemEditorSession();
-            deferFocus();
+            dataGrid.setFocus();
         }
     }

@@ -1468,7 +1445,7 @@
                 return;
             }
         }
-
+
         gotFlexEnterEvent = false;

         // ESC just kills the editor, no new data
@@ -1484,6 +1461,12 @@
         {
             if (!_editedItemPosition)
                 return;
+
+            // If the ctrl or ctrl and shift keys are down then set a flag to
+            // avoid changing the focusable children flag becaue
+            // need to be redone when starting up the editor again.
+            if (event.ctrlKey || (event.ctrlKey && event.shiftKey))
+                restoreFocusableChildren = false;

             // Enter closes the editor.
             // The 229 keyCode is for IME compatability. When entering an IME expression,
@@ -1506,7 +1489,12 @@

                     // If we have a valid next row, then start another editor.
                     if (lastRow >= 0 && lastRow < dataGrid.dataProvider.length)
-                        openEditorInNextEditableCell(lastRow, lastColumn - 1, false);
+                    {
+                        if (!openEditorInNextEditableCell(lastRow, lastColumn - 1, false))
+                        {
+                            restoreFocusableChildren = true;
+                        }
+                    }
                 }
             }
         }
@@ -1536,11 +1524,16 @@
                         (editedItemRenderer && !DisplayObjectContainer(editedItemRenderer).contains(DisplayObject(nextObject))))))
             {
                 event.preventDefault();
+
+                restoreFocusableChildren = false;
                 dataGrid.endItemEditorSession();

-                openEditorInNextEditableCell(lastEditedItemPosition.rowIndex,
-                    lastEditedItemPosition.columnIndex,
-                    event.shiftKey);
+                if (!openEditorInNextEditableCell(lastEditedItemPosition.rowIndex,
+                                                  lastEditedItemPosition.columnIndex,
+                                                  event.shiftKey))
+                {
+                    restoreFocusableChildren = true;
+                }
             }
         }
     }
@@ -1572,9 +1565,10 @@
         }

         dataGrid.endItemEditorSession();
+
         // set focus back to the grid so grid logic will deal if focus doesn't
         // end up somewhere else
-        deferFocus();
+        dataGrid.setFocus();
     }

     private function editorOwnsClick(event:Event):Boolean