Transferred from the Adobe Open Source Subversion Repository

Revision: 6266
Author:   egeorgie@adobe.com
Date:     2009-04-24T23:09:01.304621Z

Log Message:
-----------
Layout PARB changes

Major (most probably will require updates):
- LayoutBase.getScrollPositionDelta() -> getScrollPositionDeltaToElement()
- HorizontalLayout, VerticalLayout method inView() -> fractionOfElementInView()
- LayoutElementFactory is deleted, interface ILayoutElement is implemented by UIComponent, GraphicElement, VisualSprite, no need for casting in those cases, cast to ILayoutElement in case of type Object.
- TileLayout.elementHorizontalAlign -> horizontalAlign
- TileLayout.elementVerticalAlign -> verticalAlign
- TileJustifyRows -> RowAlign
- TileJustifyColumsn > ColumnAlign
- TileLayout.justifyRows -> rowAlign
- TileLayout.justifyColumns -> columnAling
- TileJustifyRows.NONE, "none" -> TOP, "top"
- TileJustifyRows.GAP_SIZE, "gapSize" -> JUSTIFY_USING_GAP, "justifyUsingGap"
- TileJustifyRows.ROW_SIZE, "rowSize" -> JUSTIFY_USING_HEIGHT, "justifyUsingHeight"
- TileJustifyColumns.NONE, "none" -> LEFT, "left"
- TileJustifyColumns.GAP_SIZE, "gapSize" -> JUSTIFY_USING_GAP, "justifyUsingGap"
- TileJustifyColumns.COLUMN_SIZE, "columnSize" -> JUSTIFY_USING_WIDTH, "justifyUsingWidth"
- TileLayout.set rowCount -> set requestedRowCount
- add TileLayout.get requestedRowCount
- TileLayout.set columnCount -> set requestedColumnCount
- add TileLayout.get requestedColumnCount

Minor (may require updates, but not that probable):
- get baselinePosition() is moved from IVisualElement to ILayoutElement.
- setLayoutBoundsSize() does not have default NaN values for width & height (but still logic is the same).
- name of ILayoutInterface methods' parameter "postTransform" is renamed to "postLayoutTransform".
- name of ILayoutInterface methods' parameter "triggerLayout" is renamed to "invalidateLayout".
- LayoutBase methods invalidateTargetSizeAndDisplayList() and invalidateTargetSize() are removed.
- LayoutBase method getTargetScrollRect() is renamed to getScrollRect().

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Hans, Ryan
tests: checkintests, mustella (gumbo/layout, gumbo/group, gumbo/dataGroup)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/layout/layout_tester.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/RowAlign.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutElementUIComponentUtils.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileJustifyRows.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/Animate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/ColumnAlign.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutElementFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileJustifyColumns.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/TextBaseClass.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/Block.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/HSlider.as
+++ frameworks/projects/spark/src/spark/components/HSlider.as
@@ -18,7 +18,6 @@

 import spark.components.supportClasses.Slider;
 import mx.core.ILayoutElement;
-import spark.layout.supportClasses.LayoutElementFactory;

 [IconFile("HSlider.png")]

@@ -71,7 +70,7 @@
      */
     override protected function get trackSize():Number
     {
-        return track ? LayoutElementFactory.getLayoutElementFor(track).getLayoutBoundsWidth() : 0;
+        return track ? track.getLayoutBoundsWidth() : 0;
     }

     /**
@@ -84,7 +83,7 @@
      */
     override protected function calculateThumbSize():Number
     {
-        return LayoutElementFactory.getLayoutElementFor(thumb).getLayoutBoundsWidth();
+        return thumb.getLayoutBoundsWidth();
     }

     //--------------------------------------------------------------------------
@@ -110,15 +109,9 @@
     {
         if (thumb)
         {
-            var thumbLElement:ILayoutElement =
-                LayoutElementFactory.getLayoutElementFor(thumb);
-
-            var trackLElement:ILayoutElement =
-                LayoutElementFactory.getLayoutElementFor(track);
-            var trackPos:Number = trackLElement.getLayoutBoundsX();
-
-            thumbLElement.setLayoutBoundsPosition(Math.round(trackPos + thumbPos),
-                                                  thumbLElement.getLayoutBoundsY());
+            var trackPos:Number = track.getLayoutBoundsX();
+            thumb.setLayoutBoundsPosition(Math.round(trackPos + thumbPos),
+                                          thumb.getLayoutBoundsY());
         }
     }

@@ -155,9 +148,7 @@
     override protected function pointClickToPosition(localX:Number,
                                                      localY:Number):Number
     {
-        var thumbLElement:ILayoutElement =
-            LayoutElementFactory.getLayoutElementFor(thumb);
-        return pointToPosition(localX, localY) - thumbLElement.getLayoutBoundsWidth() / 2;
+        return pointToPosition(localX, localY) - thumb.getLayoutBoundsWidth() / 2;
     }

     /**


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

--- frameworks/projects/spark/src/spark/filters/GlowFilter.as
+++ frameworks/projects/spark/src/spark/filters/GlowFilter.as
@@ -1,17 +1,60 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events.Event;
+import flash.events.EventDispatcher;
 import flash.filters.BitmapFilter;
+import flash.filters.BitmapFilterQuality;
 import flash.filters.GlowFilter;
-import mx.filters.BaseDimensionFilter;
-import mx.filters.IBitmapFilter;
-
-public class GlowFilter extends BaseDimensionFilter 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.GlowFilter class is based on flash.filters.GlowFilter 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.GlowFilter if you plan
+ *  to dynamically change the filter property values.
+ *
+ *  @see flash.filters.GlowFilter
+ */
+public class GlowFilter extends EventDispatcher implements IFlexBitmapFilter
 {
+	include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 * @copy flash.filters.GlowFilter
+	 */
 	public function GlowFilter(color:uint = 0xFF0000, alpha:Number = 1.0,
 							   blurX:Number = 6.0, blurY:Number = 6.0,
 							   strength:Number = 2, quality:int = 1,
 							   inner:Boolean = false, knockout:Boolean = false)
 	{
+		super();
+
 		this.color = color;
 		this.alpha = alpha;
 		this.blurX = blurX;
@@ -22,6 +65,12 @@
 		this.knockout = knockout;
 	}

+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
 	//----------------------------------
     //  alpha
     //----------------------------------
@@ -47,6 +96,58 @@
 			notifyFilterChanged();
 		}
 	}
+
+	//----------------------------------
+    //  blurX
+    //----------------------------------
+
+	private var _blurX:Number = 4.0;
+
+	/**
+	 *  The amount of horizontal blur. Valid values are 0 to 255. A blur of 1
+	 *  or less means that the original image is copied as is. The default
+	 *  value is 4. Values that are a power of 2 (such as 2, 4, 8, 16, and 32)
+	 *  are optimized to render more quickly than other values.
+	 */
+	public function get blurX():Number
+	{
+		return _blurX;
+	}
+
+	public function set blurX(value:Number):void
+	{
+		if (value != _blurX)
+		{
+			_blurX = value;
+			notifyFilterChanged();
+		}
+	}
+
+	//----------------------------------
+    //  blurY
+    //----------------------------------
+
+	private var _blurY:Number = 4.0;
+
+	/**
+	 *  The amount of vertical blur. Valid values are 0 to 255. A blur of 1
+	 *  or less means that the original image is copied as is. The default
+	 *  value is 4. Values that are a power of 2 (such as 2, 4, 8, 16, and 32)
+	 *  are optimized to render more quickly than other values.
+	 */
+	public function get blurY():Number
+	{
+		return _blurY;
+	}
+
+	public function set blurY(value:Number):void
+	{
+		if (value != _blurY)
+		{
+			_blurY = value;
+			notifyFilterChanged();
+		}
+	}

 	//----------------------------------
     //  color
@@ -96,15 +197,125 @@
 			notifyFilterChanged();
 		}
 	}
-
-	public function clone():BitmapFilter
+
+	//----------------------------------
+    //  knockout
+    //----------------------------------
+
+	private var _knockout:Boolean = false;
+
+	/**
+	 *  Specifies whether the object has a knockout effect. A knockout effect
+	 *  makes the object's fill transparent and reveals the background color
+	 *  of the document. The value true specifies a knockout effect; the
+	 *  default value is false (no knockout effect).
+	 */
+	public function get knockout():Boolean
+	{
+		return _knockout;
+	}
+
+	public function set knockout(value:Boolean):void
+	{
+		if (value != _knockout)
+		{
+			_knockout = value;
+			notifyFilterChanged();
+		}
+	}
+
+	//----------------------------------
+    //  quality
+    //----------------------------------
+
+	private var _quality:int = BitmapFilterQuality.LOW;
+
+	/**
+	 *  The number of times to apply the filter. The default value is
+	 *  BitmapFilterQuality.LOW, which is equivalent to applying the filter
+	 *  once. The value BitmapFilterQuality.MEDIUM  applies the filter twice;
+	 *  the value BitmapFilterQuality.HIGH applies it three times. Filters
+	 *  with lower values are rendered more quickly.
+	 *
+	 *  For most applications, a quality value of low, medium, or high is
+	 *  sufficient. Although you can use additional numeric values up to 15
+	 *  to achieve different effects, higher values are rendered more slowly.
+	 *  Instead of increasing the value of quality, you can often get a similar
+	 *  effect, and with faster rendering, by simply increasing the values of
+	 *  the blurX and blurY properties.
+	 */
+	public function get quality():int
+	{
+		return _quality;
+	}
+
+	public function set quality(value:int):void
+	{
+		if (value != _quality)
+		{
+			_quality = value;
+			notifyFilterChanged();
+		}
+	}
+
+	//----------------------------------
+    //  strength
+    //----------------------------------
+
+	private var _strength:Number = 1;
+
+	/**
+	 *  The strength of the imprint or spread. The higher the value, the more
+	 *  color is imprinted and the stronger the contrast between the glow and
+	 *  the background. Valid values are 0 to 255. A value of 0 means that the
+	 *  filter is not applied. The default value is 1.
+	 */
+	public function get strength():Number
+	{
+		return _strength;
+	}
+
+	public function set strength(value:Number):void
+	{
+		if (value != _strength)
+		{
+			_strength = value;
+			notifyFilterChanged();
+		}
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  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.GlowFilter instance using the current
+	 *  property values.
+	 *
+	 *  @return flash.filters.GlowFilter instance
+	 */
+	public function createBitmapFilter():BitmapFilter
 	{
 		return new flash.filters.GlowFilter(color, alpha, blurX, blurY, strength, quality, inner, knockout);
 	}
-
-
-
-
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 11017
Author:   egeorgie@adobe.com
Date:     2009-10-19T23:55:34.596395Z

Log Message:
-----------
Drag and Drop - add dragging support to TileLayout

QE notes: TileLayout drag and drop is ready for testing now.
Doc notes: None
Bugs: None
Reviewer: Deepa
Tests run: checkintests, mustella (ListDragDrop, List)
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/TileLayout.as
+++ frameworks/projects/spark/src/spark/layouts/TileLayout.as
@@ -19,6 +19,7 @@

 import spark.components.supportClasses.GroupBase;
 import spark.core.NavigationUnit;
+import spark.layouts.supportClasses.DropLocation;
 import spark.layouts.supportClasses.LayoutBase;

 /**
@@ -1816,8 +1817,18 @@
         if (!g || (index < 0) || (index >= g.numElements))
             return null;

-        var col:int = index % _columnCount;
-        var row:int = index / Math.max(1, _columnCount);
+        var col:int;
+        var row:int;
+        if (orientation == TileOrientation.ROWS)
+        {
+            col = index % _columnCount;
+            row = index / _columnCount;
+        }
+        else
+        {
+            col = index / _rowCount;
+            row = index % _rowCount
+        }
         return new Rectangle(leftEdge(col), topEdge(row), _columnWidth, _rowHeight);
     }

@@ -1872,5 +1883,219 @@
         bounds.bottom = bottomEdge(row);
         return bounds;
     }
+
+    /**
+     *  @private
+     */
+    override public function elementAdded(index:int):void
+    {
+        invalidateTargetSizeAndDisplayList();
+    }
+
+    /**
+     *  @private
+     */
+    override public function elementRemoved(index:int):void
+    {
+        invalidateTargetSizeAndDisplayList();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Drop methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Calculates the column and row and returns the corrsponding cell index.
+     *  Index may be out of range if there's no element for the cell.
+     */
+    private function calculateDropCellIndex(x:Number, y:Number):Array
+    {
+        var column:int = Math.floor(x / (_columnWidth + _horizontalGap));
+        var row:int = Math.floor(y / (_rowHeight + _verticalGap));
+
+        // Check whehter x is closer to left column or right column:
+        var midColumnLine:Number;
+        var midRowLine:Number
+
+        var rowOrientation:Boolean = orientation == TileOrientation.ROWS;
+        if (rowOrientation)
+        {
+            // Mid-line is at the middle of the cell
+            midColumnLine = (column + 1) * (_columnWidth + _horizontalGap) - _horizontalGap - _columnWidth / 2;
+
+            // Mid-line is at the middle of the gap between the rows
+            midRowLine = (row + 1) * (_rowHeight + _verticalGap) - _verticalGap / 2;
+        }
+        else
+        {
+            // Mid-line is at the middle of the gap between the columns
+            midColumnLine = (column + 1) * (_columnWidth + _horizontalGap) - _horizontalGap / 2;
+
+            // Mid-line is at the middle of the cell
+            midRowLine = (row + 1) * (_rowHeight + _verticalGap) - _verticalGap - _rowHeight / 2;
+        }
+
+        if (x > midColumnLine)
+            column++;
+        if (y > midRowLine)
+            row++;
+
+        // Limit row and column
+        if (column < 0)
+            column = 0;
+        else if (column > _columnCount)
+            column = _columnCount;
+        if (row < 0)
+            row = 0;
+        else if (row > _rowCount)
+            row = _rowCount;
+
+        var index:int;
+        if (rowOrientation)
+        {
+            if (row >= _rowCount)
+                row = _rowCount - 1;
+        }
+        else
+        {
+            if (column >= _columnCount)
+                column = _columnCount - 1;
+        }
+        return [row, column];
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    override protected function calculateDropIndex(x:Number, y:Number):int
+    {
+        var result:Array = calculateDropCellIndex(x, y);
+        var row:int = result[0];
+        var column:int = result[1];
+        var index:int;
+
+        if (orientation == TileOrientation.ROWS)
+            index = row * _columnCount + column;
+        else
+            index = column * _rowCount + row;
+
+        var count:int = calculateElementCount();
+        _numElementsCached = -1; // Reset the cache
+
+        if (index > count)
+            index = count;
+        return index;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    override protected function calculateDropIndicatorBounds(dropLocation:DropLocation):Rectangle
+    {
+        var result:Array = calculateDropCellIndex(dropLocation.dropPoint.x, dropLocation.dropPoint.y);
+        var row:int = result[0];
+        var column:int = result[1];
+
+        var rowOrientation:Boolean = orientation == TileOrientation.ROWS;
+        var count:int = calculateElementCount();
+        _numElementsCached = -1; // Reset the cache
+
+        if (rowOrientation)
+        {
+            // The last row may be only partially full,
+            // don't drop beyond the last column.
+            if (row * _columnCount + column > count)
+                column = count - (_rowCount - 1) * _columnCount;
+        }
+        else
+        {
+            // The last column may be only partially full,
+            // don't drop beyond the last row.
+            if (column * _rowCount + row > count)
+                row = count - (_columnCount - 1) * _rowCount;
+        }
+
+        var x:Number;
+        var y:Number;
+        var dropIndicatorElement:IVisualElement;
+        var emptySpace:Number; // empty space between the elements
+
+        // Start with the dropIndicator dimensions, in case it's not
+        // an IVisualElement
+        var width:Number = dropIndicator.width;
+        var height:Number = dropIndicator.height;
+
+        if (rowOrientation)
+        {
+            emptySpace = (0 < _horizontalGap ) ? _horizontalGap : 0;
+            var emptySpaceLeft:Number = column * (_columnWidth + _horizontalGap) - emptySpace;
+
+            // Special case - if we have negative gap and we're the last column,
+            // adjust the emptySpaceLeft
+            if (_horizontalGap < 0 && (column == _columnCount || count == dropLocation.dropIndex))
+                emptySpaceLeft -= _horizontalGap;
+
+            if (dropIndicator is IVisualElement)
+            {
+                dropIndicatorElement = IVisualElement(dropIndicator);
+                width = Math.max(Math.min(emptySpace,
+                                          dropIndicatorElement.getMaxBoundsWidth(false)),
+                                          dropIndicatorElement.getMinBoundsWidth(false));
+                height = _rowHeight;
+
+                // Special case - if we have negative gap and we're not the last
+                // row, adjust the height
+                if (_verticalGap < 0 && row < _rowCount - 1)
+                    height += _verticalGap + 1;
+            }
+
+            x = emptySpaceLeft + Math.round((emptySpace - width) / 2);
+            x = Math.max(-Math.ceil(width / 2), Math.min(target.contentWidth - Math.ceil(width / 2), x));
+            y = row * (_rowHeight + _verticalGap);
+        }
+        else
+        {
+            emptySpace = (0 < _verticalGap ) ? _verticalGap : 0;
+            var emptySpaceTop:Number = row * (_rowHeight + _verticalGap) - emptySpace;
+
+            // Special case - if we have negative gap and we're the last column,
+            // adjust the emptySpaceLeft
+            if (_verticalGap < 0 && (row == _rowCount || count == dropLocation.dropIndex))
+                emptySpaceTop -= _verticalGap;
+
+            if (dropIndicator is IVisualElement)
+            {
+                dropIndicatorElement = IVisualElement(dropIndicator);
+                width = _columnWidth;
+                height = Math.max(Math.min(emptySpace,
+                                           dropIndicatorElement.getMaxBoundsWidth(false)),
+                                           dropIndicatorElement.getMinBoundsWidth(false));
+
+                // Special case - if we have negative gap and we're not the last
+                // column, adjust the width
+                if (_horizontalGap < 0 && column < _columnCount - 1)
+                    width += _horizontalGap + 1;
+            }
+
+            x = column * (_columnWidth + _horizontalGap);
+            y = emptySpaceTop + Math.round((emptySpace - height) / 2);
+            y = Math.max(-Math.ceil(height / 2), Math.min(target.contentHeight - Math.ceil(height / 2), y));
+        }
+
+        return new Rectangle(x, y, width, height);
+    }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4803
Author:   egeorgie@adobe.com
Date:     2009-02-03T00:06:34.444252Z

Log Message:
-----------
Fix bug SDK-18434 Bounds for rotated rounded rect is incorrect

Fix: Calculate the bounds of the transformed corner ellipses in the case of matrix transformation. Refactor the Ellipse's helper method and move it to MatrixUtil.as so that it's shared between classes.

QE Notes: None
Doc Notes: None
Bugs: SDK-18434
Reviewer: Ryan
tests: checkintests, mustella gumbo/layout/graphicelement

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/Ellipse.as
+++ frameworks/projects/spark/src/spark/primitives/Ellipse.as
@@ -17,6 +17,8 @@
 import flash.geom.Rectangle;
 import flash.geom.Point;
 import flash.geom.Matrix;
+
+import mx.utils.MatrixUtil;

 /**
  *  The Ellipse class is a filled graphic element that draws an ellipse.
@@ -65,69 +67,6 @@
         g.drawEllipse(drawX, drawY, width, height);
     }

-    // Find the minimum and maximum x & y for the specified ellipse transformed by the matrix m
-    /**
-     *  @private
-     */
-    static private function getBBox(rx:Number, ry:Number, m:Matrix):Rectangle
-    {
-        var a:Number = m.a;
-        var b:Number = m.b;
-        var c:Number = m.c;
-        var d:Number = m.d;
-
-        var cx:Number = rx;
-        var cy:Number = ry;
-
-        // Ellipse can be represented by the following parametric equations:
-        //
-        // (1) x = cx + rx * cos(t)
-        // (2) y = cy + ry * sin(t)
-        //
-        // After applying transformation with matrix m(a, c, b, d) we get:
-        //
-        // (3) x = a * cx + a * cos(t) * rx + c * cy + c * sin(t) * ry + m.tx
-        // (4) y = b * cx + b * cos(t) * rx + d * cy + d * sin(t) * ry + m.ty
-        //
-        // In (3) and (4) x and y are functions of a parameter t. To find the extremums we need
-        // to find where dx/dt and dy/dt reach zero:
-        //
-        // (5) dx/dt = - a * sin(t) * rx + c * cos(t) * ry
-        // (6) dy/dt = - b * sin(t) * rx + d * cos(t) * ry
-        // (7) dx/dt = 0 <=> sin(t) / cos(t) = (c * ry) / (a * rx);
-        // (8) dy/dt = 0 <=> sin(t) / cos(t) = (d * ry) / (b * rx);
-
-        if(rx == 0 && ry == 0)
-            return new Rectangle(cx, cy, 0, 0);
-
-        var t:Number;
-        var t1:Number;
-
-        if (a * rx == 0)
-            t = Math.PI / 2;
-        else
-            t = Math.atan((c * ry) / (a * rx));
-
-        if (b * rx == 0)
-            t1 = Math.PI / 2;
-        else
-            t1 = Math.atan((d * ry) / (b * rx));
-
-        // TODO EGeorgie: optimize
-        var x1:Number = a * Math.cos(t) * rx + c * Math.sin(t) * ry;
-        var x2:Number = -x1;
-        x1 += a * cx + c * cy + m.tx;
-        x2 += a * cx + c * cy + m.tx;
-
-        var y1:Number = b * Math.cos(t1) * rx + d * Math.sin(t1) * ry;
-        var y2:Number = -y1;
-        y1 += b * cx + d * cy + m.ty;
-        y2 += b * cx + d * cy + m.ty;
-
-        return new Rectangle(Math.min(x1, x2), Math.min(y1, y2), Math.abs(x1 - x2), Math.abs(y1 - y2));
-    }
-
-
     /**
      *  @private
      */
@@ -139,7 +78,7 @@
         {
             var m:Matrix = computeMatrix();
             if (m)
-                width = getBBox(width / 2, height / 2, m).width;
+                width = MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2, m).width;
         }

         // Take stroke into account
@@ -157,7 +96,7 @@
         {
             var m:Matrix = computeMatrix();
             if (m)
-                height = getBBox(width / 2, height / 2, m).height;
+                height = MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2, m).height;
         }

         // Take stroke into account
@@ -170,10 +109,15 @@
     override public function getLayoutBoundsX(postTransform:Boolean = true):Number
     {
         var stroke:Number = -getStrokeExtents(postTransform).x * 0.5;
-        var m:Matrix = postTransform ? computeMatrix() : null;
-        if (!m)
-            return stroke + this.x;
-        return stroke + getBBox(width / 2, height / 2, m).x;
+
+        if (postTransform)
+        {
+            var m:Matrix = computeMatrix();
+            if (m)
+                return stroke + MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2, m).x;
+        }
+
+        return stroke + this.x;
     }

     /**
@@ -182,10 +126,15 @@
     override public function getLayoutBoundsY(postTransform:Boolean = true):Number
     {
         var stroke:Number = - getStrokeExtents(postTransform).y * 0.5;
-        var m:Matrix = postTransform ? computeMatrix() : null;
-        if (!m)
-            return stroke + this.y;
-        return stroke + getBBox(width / 2, height / 2, m).y;
+
+        if (postTransform)
+        {
+            var m:Matrix = computeMatrix();
+            if (m)
+                return stroke + MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2, m).y;
+        }
+
+        return stroke + this.y;
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 7992
Author:   gosmith@adobe.com
Date:     2009-06-19T06:27:01.450659Z

Log Message:
-----------
Fixed importFromString() and importFromXML() in TextFlowUtil so that non-inheriting formats like paddingLeft are set to "inherit" in the TextFlow so that they get their value from the hostFormat.

QE Notes: None
Doc Notes: None
Bugs: SDK-21907
Reviewer: Carol to review

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/TextFlowUtil.as

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

--- frameworks/projects/spark/src/spark/utils/TextFlowUtil.as
+++ frameworks/projects/spark/src/spark/utils/TextFlowUtil.as
@@ -106,19 +106,25 @@

         // Create an importer for TEXT_LAYOUT_FORMAT
         // that collapses whitespace.
-        format = new TextLayoutFormat();
-        format.whiteSpaceCollapse = "collapse";
+        // Note: We have to make a copy of the textFlowInitialFormat,
+        // which has various formats set to "inherit",
+        // and then modify it and set it back.
         config = new Configuration();
-        config.textFlowInitialFormat = format;
+        format = new TextLayoutFormat(config.textFlowInitialFormat);
+		format.whiteSpaceCollapse = "collapse";
+		config.textFlowInitialFormat = format;
         collapsingTextLayoutImporter = TextFilter.getImporter(
             TextFilter.TEXT_LAYOUT_FORMAT, config);
         collapsingTextLayoutImporter.throwOnError = true;
-
+
         // Create an importer for TEXT_LAYOUT_FORMAT
         // that preserves whitespace.
-        format = new TextLayoutFormat();
+		// Note: We have to make a copy of the textFlowInitialFormat,
+		// which has various formats set to "inherit",
+		// and then modify it and set it back.
+		config = new Configuration();
+		format = new TextLayoutFormat(config.textFlowInitialFormat);
         format.whiteSpaceCollapse = "preserve";
-        config = new Configuration();
         config.textFlowInitialFormat = format;
         preservingTextLayoutImporter = TextFilter.getImporter(
             TextFilter.TEXT_LAYOUT_FORMAT, config);
@@ -221,7 +227,7 @@
                               markupToImport +
                               "</TextFlow>";
         }
-
+
         var importer:ITextImporter = whiteSpaceCollapse == "collapse" ?
                                      collapsingTextLayoutImporter :
                                      preservingTextLayoutImporter;


add comment

add comment

--- src/org/mangui/hls/demux/TSDemuxer.as
+++ src/org/mangui/hls/demux/TSDemuxer.as
@@ -138,6 +138,7 @@
         private function _parseTimer(e : Event) : void {
             var start_time : int = getTimer();
             _data.position = _read_position;
+            // dont spend more than 20ms demuxing TS packets to avoid loosing frames
             while ((_data.bytesAvailable >= 188) && ((getTimer() - start_time) < 20)) {
                 _parseTSPacket();
             }


fix playback of TS fragment containing null packet (PID 0x1fff) related to #321

--- src/org/mangui/hls/demux/TSDemuxer.as
+++ src/org/mangui/hls/demux/TSDemuxer.as
@@ -31,6 +31,8 @@
         private static const PAT_ID : int = 0;
         /** Packet ID of the SDT (is always 17). **/
         private static const SDT_ID : int = 17;
+        /** Null Packet PID **/
+        private static const NULL_PID : int = 0x1fff;
         /** has PMT been parsed ? **/
         private var _pmtParsed : Boolean;
         /** any TS packets before PMT ? **/
@@ -742,6 +744,7 @@
                     }
                     break;
                 case SDT_ID:
+                case NULL_PID:
                     break;
                 default:
                     _packetsBeforePMT = true;
@@ -863,4 +866,4 @@
             return len + pointerField;
         };
     }
-}+}


Throw error if object marked with [Rule] metdata doesn't implement IMethodRule or is null.

--- FlexUnit4/src/org/flexunit/runners/BlockFlexUnit4ClassRunner.as
+++ FlexUnit4/src/org/flexunit/runners/BlockFlexUnit4ClassRunner.as
@@ -394,6 +394,13 @@
 					//build statement wrappers
 					statement = rule.apply( statement, method, test );
 				}
+				else {
+					// CJP: This error will be thrown if an object marked with the [Rule] metadata tag either
+					//		a) does not implement the IMethodRule interface -or-
+					//		b) is null (even if defined as an IMethodRule)
+					//		Additionally, it will get thrown once for EACH test in the TestCase class.
+					throw new Error( "Something marked as [Rule] that does not implement IMethodRule!" );
+				}
 			}

 			return statement;


Transferred from the Adobe Open Source Subversion Repository

Revision: 17444
Author:   clucier@adobe.com
Date:     2010-08-23T16:54:41.091790Z

Log Message:
-----------
We pass requestTimeout down to URLRequest.idleTimeout now if relevant (e.g. AIR 2.0).

QE notes: None
Doc notes: None
Bugs: SDK-22016
Reviewer: Paul, Peter
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/messaging/channels/DirectHTTPChannel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as
+++ frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as
@@ -826,6 +826,10 @@
         if (asyncRequest.requestTimeout != value)
         {
             asyncRequest.requestTimeout = value;
+
+            // Propagate to operation instance.
+            if (operation)
+                operation.requestTimeout = value;
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 11286
Author:   egeorgie@adobe.com
Date:     2009-10-29T23:59:07.869109Z

Log Message:
-----------
Small fix to List multiple selection commit.

Problem: Dispatching programatically mouse_down event to the item renderer would not put it in the selection.
Reason: commitSelection() was getting called twice, once through ListBase.commitProperties() and a second time through List:commitProperties()
Fix: Clear the multipleSelectionChanged flag inside commitSelection() to prevent it from being called twice.

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

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -780,10 +780,12 @@
         super.commitProperties();

         if (multipleSelectionChanged)
-        {
+			// multipleSelectionChanged flag is cleared in commitSelection();
+			// this is so, because commitSelection() could be called from
+			// super.commitProperties() as well and in that case we don't
+			// want to commitSelection() twice, as that will actually wrongly
+			// clear the selection.
             commitSelection();
-            multipleSelectionChanged = false;
-        }
     }

     /**
@@ -845,6 +847,9 @@
      */
     override protected function commitSelection(dispatchChangedEvents:Boolean = true):Boolean
     {
+		// Clear the flag so that we don't commit the selection again.
+		multipleSelectionChanged = false;
+
         var oldSelectedIndex:Number = _selectedIndex;
         var oldCaretIndex:Number = _caretIndex;

@@ -1366,7 +1371,7 @@
             validateProperties();

         // Handle any drag gestures that may have been started
-        if (!dragEnabled || this.selectedIndices.indexOf(newIndex) == -1)
+        if (!dragEnabled || !selectedIndices || this.selectedIndices.indexOf(newIndex) == -1)
             return;

         mouseDownPoint = event.target.localToGlobal(new Point(event.localX, event.localY));


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

--- frameworks/projects/spark/src/spark/utils/LabelUtil.as
+++ frameworks/projects/spark/src/spark/utils/LabelUtil.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


added option to force deprecated state for a class

--- WeaveJS/src/weavejs/util/BackwardsCompatibility.as
+++ WeaveJS/src/weavejs/util/BackwardsCompatibility.as
@@ -7,6 +7,13 @@

 	public class BackwardsCompatibility
 	{
+		public static function forceDeprecatedState(classDef:Class):void
+		{
+			map_class_ignore.set(classDef, true);
+		}
+
+		private static const map_class_ignore:Object = new JS.Map();
+
 		public static function updateSessionState(state:Object):Object
 		{
 			var key:String;
@@ -21,7 +28,10 @@
 			for each (var typedState:Object in state)
 			{
 				var className:String = typedState[DynamicState.CLASS_NAME];
-				if (!isDeprecatedClass(className))
+				if (!classLookup.hasOwnProperty(className))
+					continue;
+				var classDef:Class = Weave.getDefinition(className);
+				if (classDef && !map_class_ignore.get(classDef))
 					continue;
 				if (!classLookup[className])
 				{
@@ -52,7 +62,7 @@
 								if (name.charAt(0) === 'I' && name.charAt(1) === name.charAt(1).toUpperCase())
 								{
 									name = name.substr(1);
-									var classDef:Class = Weave.getDefinition(name);
+									classDef = Weave.getDefinition(name);
 									if (classDef)
 										propType = Weave.className(classDef);
 								}
@@ -66,11 +76,6 @@
 				typedState[DynamicState.SESSION_STATE] = updateSessionState(childState);
 			}
 			return state;
-		}
-
-		public static function isDeprecatedClass(qname:String):Boolean
-		{
-			return classLookup.hasOwnProperty(qname) && Weave.getDefinition(qname) == null;
 		}

 		public static const classLookup:Object = {


abcdump: Fix NPE when TypeName.name is null

--- utils/abcdump.as
+++ utils/abcdump.as
@@ -254,7 +254,7 @@

         public function toString()
         {
-            var s : String = name.toString();
+            var s : String = name
             s += ".<"
             for( var i = 0; i < types.length; ++i )
                 s += types[i] != null ? types[i].toString() : "*" + " ";


Transferred from the Adobe Open Source Subversion Repository

Revision: 3057
Author:   jimurphy@adobe.com
Date:     2008-09-02T15:18:38.819662Z

Log Message:
-----------
Merged 3.0.x revisions [2966,2969,2995,3004,3018-3019,3023,3029-3030,3046,3049,3052] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/ModalWindowRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/PopUpRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/SliderThumb.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SizeRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/InterManagerRequest.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterManagerRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FocusRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDL.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/dividedBoxClasses/BoxDivider.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/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootDragEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.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/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/EventUtil.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootMouseEvent.as</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/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>

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

--- frameworks/projects/framework/src/mx/utils/EventUtil.as
+++ frameworks/projects/framework/src/mx/utils/EventUtil.as
@@ -13,7 +13,7 @@
 {

 import flash.events.MouseEvent;
-import mx.events.SandboxRootMouseEvent;
+import mx.events.SandboxMouseEvent;

 [ExcludeClass]

@@ -33,38 +33,38 @@
 	//--------------------------------------------------------------------------

 	//----------------------------------
-    //  sandboxRootMouseEventMap
+    //  sandboxMouseEventMap
 	//----------------------------------

 	/**
      *  @private
      */
-    private static var _sandboxRootEventMap:Object;
+    private static var _sandboxEventMap:Object;

 	/**
-	 *  Mapping of MouseEvents to SandboxRootMouseEvent types.
+	 *  Mapping of MouseEvents to SandboxMouseEvent types.
 	 */
-	public static function get sandboxRootMouseEventMap():Object
+	public static function get sandboxMouseEventMap():Object
 	{
-		if (!_sandboxRootEventMap)
+		if (!_sandboxEventMap)
 		{
-			_sandboxRootEventMap = {};
+			_sandboxEventMap = {};

-			_sandboxRootEventMap[SandboxRootMouseEvent.CLICK_SOMEWHERE] =
+			_sandboxEventMap[SandboxMouseEvent.CLICK_SOMEWHERE] =
                 MouseEvent.CLICK;
-			_sandboxRootEventMap[SandboxRootMouseEvent.DOUBLE_CLICK_SOMEWHERE] =
+			_sandboxEventMap[SandboxMouseEvent.DOUBLE_CLICK_SOMEWHERE] =
                 MouseEvent.DOUBLE_CLICK;
-			_sandboxRootEventMap[SandboxRootMouseEvent.MOUSE_DOWN_SOMEWHERE] =
+			_sandboxEventMap[SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE] =
                 MouseEvent.MOUSE_DOWN;
-			_sandboxRootEventMap[SandboxRootMouseEvent.MOUSE_MOVE_SOMEWHERE] =
+			_sandboxEventMap[SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE] =
                 MouseEvent.MOUSE_MOVE;
-			_sandboxRootEventMap[SandboxRootMouseEvent.MOUSE_UP_SOMEWHERE] =
+			_sandboxEventMap[SandboxMouseEvent.MOUSE_UP_SOMEWHERE] =
                 MouseEvent.MOUSE_UP;
-			_sandboxRootEventMap[SandboxRootMouseEvent.MOUSE_WHEEL_SOMEWHERE] =
+			_sandboxEventMap[SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE] =
                 MouseEvent.MOUSE_WHEEL;
 		}

-		return _sandboxRootEventMap;
+		return _sandboxEventMap;
 	}

 	//----------------------------------
@@ -77,7 +77,7 @@
 	private static var _mouseEventMap:Object;

 	/**
-	 *  Mapping of SandboxRootMouseEvent to MouseEvents types.
+	 *  Mapping of SandboxMouseEvent to MouseEvents types.
 	 */
 	public static function get mouseEventMap():Object
 	{
@@ -86,17 +86,17 @@
 			_mouseEventMap = {};

 			_mouseEventMap[MouseEvent.CLICK] =
-                SandboxRootMouseEvent.CLICK_SOMEWHERE;
+                SandboxMouseEvent.CLICK_SOMEWHERE;
 			_mouseEventMap[MouseEvent.DOUBLE_CLICK] =
-                SandboxRootMouseEvent.DOUBLE_CLICK_SOMEWHERE;
+                SandboxMouseEvent.DOUBLE_CLICK_SOMEWHERE;
 			_mouseEventMap[MouseEvent.MOUSE_DOWN] =
-                SandboxRootMouseEvent.MOUSE_DOWN_SOMEWHERE;
+                SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE;
 			_mouseEventMap[MouseEvent.MOUSE_MOVE] =
-                SandboxRootMouseEvent.MOUSE_MOVE_SOMEWHERE;
+                SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE;
 			_mouseEventMap[MouseEvent.MOUSE_UP] =
-                SandboxRootMouseEvent.MOUSE_UP_SOMEWHERE;
+                SandboxMouseEvent.MOUSE_UP_SOMEWHERE;
 			_mouseEventMap[MouseEvent.MOUSE_WHEEL] =
-                SandboxRootMouseEvent.MOUSE_WHEEL_SOMEWHERE;
+                SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE;
 		}

 		return _mouseEventMap;


Transferred from the Adobe Open Source Subversion Repository

Revision: 16547
Author:   cframpto@adobe.com
Date:     2010-06-14T16:12:06.398660Z

Log Message:
-----------
The following changes apply to Spark DataGrid and Tree only.   Code reviews have been deferred until the implementation is closer to completion.

Move Han's implementation of Press-Drag-Release Mouse Gesture Handling from Grid to EventUtil.  The mini-spec is http://zerowing.corp.adobe.com/display/flex/Conventional+Press-Drag-Release+Mouse+Gesture+Handling.  This will be used by the ColumnHeaderBar as well.

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/framework/src/mx/utils/EventUtil.as</path>

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

--- frameworks/projects/framework/src/mx/utils/EventUtil.as
+++ frameworks/projects/framework/src/mx/utils/EventUtil.as
@@ -12,7 +12,11 @@
 package mx.utils
 {

+import flash.events.Event;
+import flash.events.IEventDispatcher;
 import flash.events.MouseEvent;
+
+import mx.core.UIComponent;
 import mx.events.SandboxMouseEvent;

 [ExcludeClass]
@@ -26,6 +30,105 @@
 {
 	include "../core/Version.as";

+    //--------------------------------------------------------------------------
+    //
+    //  Static Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Set up event listeners for a complete down-drag-up mouse gesture.
+     *
+     *  Add MOUSE_DOWN, MOUSE_MOVE, and MOUSE_UP listeners to the target component
+     *  which call the handleDown(), handleDrag(), and handleUp() functions respectively.
+     *
+     *  The handleDrag() method will be called for as long as the mouse button is down,
+     *  whenever the mouse is dragged within the stage.   The handleUp() method will be
+     *  called no matter where the mouse button is released, however a MouseEvent type argument
+     *  will only be provided if the button is released over the stage.
+     *
+     *  The handleDown() and handleDrag() functions are passed a single MouseEvent
+     *  argument, and the handleUp() is passed an Event which may be a MouseEvent
+     *  or a SandboxMouseEvent.  Typically handleUp() functions ignore their event
+     *  argument.
+     *
+     *  Any of the functions arguments can be null.
+     *
+     *  The implementation only adds MOUSE_MOVE and MOUSE_UP listeners in response
+     *  to a MOUSE_DOWN event.   Similarly, the implementation removes its MOUSE_MOVE
+     *  and MOUSE_UP listeners when it receives a MOUSE_UP event.
+     *
+     *  @param target A MOUSE_DOWN event on this component begins the down-drag-up gesture
+     *  @param handleDown A function with a MouseEvent parameter; called when the MOUSE_DOWN event occurs.
+     *  @param handleDrag A function with a MouseEvent parameter; called when the mouse moves with the button down.
+     *  @param handleUp A function with an Event parameter; called when the button is relesed.
+     *
+     *  @see #removeDownDragUpListeners
+     */
+    public static function addDownDragUpListeners(
+                                target:UIComponent,
+                                handleDown:Function,
+                                handleDrag:Function,
+                                handleUp:Function):void
+    {
+        var f:Function = function(e:Event):void
+        {
+            var sbr:IEventDispatcher;
+            switch(e.type)
+            {
+                case MouseEvent.MOUSE_DOWN:
+                    if (e.isDefaultPrevented())
+                        break;
+                    handleDown(e);
+                    sbr = target.systemManager.getSandboxRoot();
+                    sbr.addEventListener(MouseEvent.MOUSE_MOVE, f, true);
+                    sbr.addEventListener(MouseEvent.MOUSE_UP, f, true );
+                    sbr.addEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, f, true);
+                    break;
+                case MouseEvent.MOUSE_MOVE:
+                    handleDrag(e);
+                    break;
+                case MouseEvent.MOUSE_UP:
+                    handleUp(e);
+                    sbr = target.systemManager.getSandboxRoot();
+                    sbr.removeEventListener(MouseEvent.MOUSE_MOVE, f, true);
+                    sbr.removeEventListener(MouseEvent.MOUSE_UP, f, true);
+                    sbr.removeEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, f, true);
+                    break;
+                case "removeHandler":
+                    target.removeEventListener("removeHandler", f);
+                    target.removeEventListener(MouseEvent.MOUSE_DOWN, f);
+                    sbr = target.systemManager.getSandboxRoot();
+                    sbr.removeEventListener(MouseEvent.MOUSE_MOVE, f, true);
+                    sbr.removeEventListener(MouseEvent.MOUSE_UP, f, true);
+                    sbr.removeEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, f, true);
+                    break;
+            }
+        }
+        target.addEventListener(MouseEvent.MOUSE_DOWN, f);
+        target.addEventListener("removeHandler", f);
+    }
+
+    /**
+     *  Removes the listeners added by a matching addDownDragUpListeners call.
+     *
+     *  @param target A MOUSE_DOWN event on this component begins the down-drag-up gesture
+     *  @param handleDown The listener for MOUSE_DOWN events
+     *  @param handleDrag The listener for MOUSE_MOVE events when the button is down.
+     *  @param handleUp The listener for MOUSE_UP events
+     *
+     *  @see #addDownDragUpListeners
+     */
+    public static function removeDownDragUpListeners(
+                                target:UIComponent,
+                                handleDown:Function,
+                                handleDrag:Function,
+                                handleUp:Function):void
+    {
+        target.dispatchEvent(
+            new RemoveHandlerEvent(handleDown, handleDrag, handleUp));
+    }
+
 	//--------------------------------------------------------------------------
 	//
 	//  Class properties
@@ -111,6 +214,26 @@

 		return _mouseEventMap;
 	}
+
 }
-
 }
+
+/**
+ * Event used to remove the handlers associated with the press-drag-release
+ * gesture handlers.
+ */
+class RemoveHandlerEvent extends flash.events.Event
+{
+    public var handleDown:Function;
+    public var handleDrag:Function;
+    public var handleUp:Function;
+    public function RemoveHandlerEvent(handleDown:Function,
+                                       handleDrag:Function = null,
+                                       handleUp:Function = null)
+    {
+        this.handleDown = handleDown;
+        this.handleDown = handleDrag;
+        this.handleUp = handleUp;
+        super("removeHandler");
+    }
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3237
Author:   hmuller@adobe.com
Date:     2008-09-16T22:57:19.486417Z

Log Message:
-----------
- Added HGroup and VGroup wrappers for Group+Horizontal,VerticalLayout.

- Removed the provisional support for specifying layout with a
classname string.  The type of the layout property in Group
and in ItemsComponent is now ILayout.

More about the rationale for this change here:
https://zerowing.corp.adobe.com/display/flex/Shorthand+MXML+syntax+for+object+values

Now, one must either use HGroup,VGroup or an explicit layout tag.
This change will affect most MXML files.  Upgrading is pretty easy.
For example, change

  <Group layout="flex.layout.VerticalLayout"/>

to this:

  <Group>
      <layout> <VerticalLayout/> </layout>
  </Group>

or this:

  <VGroup/>

The Panel and Application classes, whose default layout is BasicLayout,
have to be upgraded with an additional layout element, as in the
first example.

Substantially revised ScrollerSkin's measure and updateDisplayList
methods. The latter now calls invalidateSize (on itself!) if the
visibility of either scrollbar changes.  This causes the measure
method to compute new values for measuredWidth,Height based on the new
visibility state for the scrollbars.  When the scroll policy is "auto"
the Scroller's measured size includes space for the visible
scrollbars.

Note also: the logic for calling updateDisplayList and then restarting
the process if the component has become invalid is in
mx.managers.LayoutManager::validateDisplayList.

- Removed the protected Group invalidateSizeAndLayout() method.
It wasn't being used.

QE: This change will break many existing tests
Doc: No
Checkintests: Pass
Reviewer: Evtim
Bugs:
  SDK-16782 -  ScrollBars overlap content in Scroller

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/states/statefulNodes.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/AddItemsTest.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/layout/layout.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/RemoveItemsTest.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ItemsComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/DefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/states/statefulAttributes.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/flex4/flex4test.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SelectorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ScrollerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/flex4test.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -90,7 +90,10 @@
 {
     public function Group():void
     {
+        super();
         tabChildren = true;
+        _layout = new BasicLayout();
+        ILayout(_layout).target = this;
     }

     private var skinRegistry:Dictionary;
@@ -103,8 +106,6 @@
     public var itemRenderer:IFactory;
     public var itemRendererFunction:Function; // signature: itemRendererFunction(item:*):IFactory
     public var alwaysUseItemRenderer:Boolean = false; // if true, always use the itemRenderer
-    private var _layoutClass:Class;
-    private var _layout:ILayout;
     private var _content:*;
     private var _contentType:int;
     private var contentCollection:ICollectionView;
@@ -145,38 +146,6 @@
     public function get content():*
     {
         return _content;
-    }
-
-    public function get layout():Object
-    {
-        return _layout;
-    }
-
-    // TBD: HACK for the sake of getDefinitionByName
-    private static const forceLoad0:Class = flex.layout.BasicLayout;
-    private static const forceLoad1:Class = flex.layout.HorizontalLayout;
-    private static const forceLoad2:Class = flex.layout.VerticalLayout;
-
-    public function set layout(value:Object):void
-    {
-        if (value is ILayout) {
-            _layout = ILayout(value);
-            _layoutClass = null;
-    }
-        else if (value is String) {
-            _layout = null;
-            _layoutClass = flash.utils.getDefinitionByName(String(value)) as Class;
-    }
-        else if (value is Class) {
-            _layout = null;
-            _layoutClass = Class(value);
-        }
-        else {
-            _layout = null;
-            _layoutClass = null;
-        }
-        layoutChanged = true;
-        invalidateProperties();
     }

     private var _resizeMode:uint = ResizeMode._NORMAL_UINT;
@@ -434,12 +403,6 @@
     {
         super.commitProperties();

-        if (layoutChanged)
-        {
-            layoutChanged = false;
-            initializeLayoutObject();
-        }
-
         if (contentChanged)
         {
             contentChanged = false;
@@ -658,17 +621,33 @@
         throw(new Error("swapChildrenAt is not available in Group. Use swapItemsAt instead."));
     }

-    protected function invalidateSizeAndLayout():void
-    {
+
+    //----------------------------------
+    //  layout
+    //----------------------------------
+
+    private var _layout:ILayout;  // initialized in the ctor
+
+    public function get layout():ILayout
+    {
+        return _layout;
+    }
+
+    /**
+     * @private
+     */
+    public function set layout(value:ILayout):void
+    {
+        if (_layout == value)
+            return;
+
+        _layout = value;
+        if (_layout)
+            ILayout(_layout).target = this;
         invalidateSize();
         invalidateDisplayList();
-
-        if (parent && parent is UIComponent)
-        {
-            UIComponent(parent).invalidateSize();
-            UIComponent(parent).invalidateDisplayList();
-        }
-    }
+    }
+

     //----------------------------------
     //  horizontalScrollPosition
@@ -1350,24 +1329,6 @@

     //--------------------------------------------------------------------------
     //
-    //  Layout
-    //
-    //--------------------------------------------------------------------------
-
-    protected function initializeLayoutObject():void
-    {
-        if (_layout == null) {
-            _layout = (_layoutClass) ? new _layoutClass() : new BasicLayout();
-        }
-        ILayout(_layout).target = this;
-
-        invalidateSize();
-        invalidateDisplayList();
-    }
-
-
-    //--------------------------------------------------------------------------
-    //
     //  IGraphicElement Implementation
     //
     //--------------------------------------------------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 2622
Author:   gosmith@adobe.com
Date:     2008-07-24T23:13:32.982076Z

Log Message:
-----------
TextBox and TextGraphic now call applyDisplayObjectProperties() at the end of their draw() method, like all other GraphicElements. This method handles setting the visibiliy of the GraphicElement's DisplayObject, among other things.

Note: We should make it unnecessary for each GraphicElement subclass to have to call applyDisplayObjectProperties() at the end of draw(). The GraphicElement base class should ensure that this gets called at the appropriate time.

Group now calls draw() on graphic elements even if they are invisible, because otherwise applyDisplayObjectProperties() never gets called and the TextLines stay visible. Group was assuming that the only visible stuff in a GraphicElement is drawn with Graphics calls, which isn't the case.

This change is OK for now because every GraphicElement currently has its own DisplayObject, but it will need to be rethought when GraphicElements share DisplayObjects.

Reviewer: Chet
Bug: MXMLG-206 ("Setting visible property on TextGraphic does nothing")
QA: Peter, please add a Mustella test case for the 'visible property of TextBox and TextGraphic
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -371,8 +371,7 @@
                 if (g)
                 {
                     g.clear();
-                    if (element.visible)
-                        element.draw(g);
+                    element.draw(g);
                 }
             }
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12469
Author:   jimurphy@adobe.com
Date:     2009-12-03T22:04:16.560316Z

Log Message:
-----------
fix offsets for FB.  Convert line ending from lf to crlf in svn for the proects directory only.  When checking project files in, be sure to save you files this way.  Another update to make sure happens is set the svn properties svn:eol-style = native and svn:mime-type = text/plain (these have been updated on theses files as well)

QE notes: make sure the proper class is selected
Doc notes: no
Bugs: http://bugs.adobe.com/jira/browse/SDK-24498
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
133 paths were modified

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

--- frameworks/projects/spark/src/spark/effects/Rotate3D.as
+++ frameworks/projects/spark/src/spark/effects/Rotate3D.as
@@ -295,4 +295,4 @@
         super.initInstance(instance);
     }
 }
-}+}


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

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

 package mx.managers
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17201
Author:   cframpto@adobe.com
Date:     2010-08-05T14:56:08.412026Z

Log Message:
-----------
Add listStylePosition and listStyleType metadata for TLF's new list element.  Add them both to the list of size invalidating styles.  Add styles to list of styles in ASdoc.

QE notes:  listStylePosition=outside leaks outside our components - known issue which we're working with TLF on
Doc notes:
Bugs: SDK-27254
Reviewer: Corey
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/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/styles/metadata/AdvancedInheritingTextStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>

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

--- frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as
+++ frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as
@@ -203,6 +203,8 @@
             lineBreak: true,
             lineHeight: true,
             lineThrough: true,
+            listStylePosition: true,
+            listStyleType: true,
             locale: true,
             marginBottom: true,
             marginLeft: true,


Transferred from the Adobe Open Source Subversion Repository

Revision: 3979
Author:   smgilson@adobe.com
Date:     2008-10-31T12:51:30.536301Z

Log Message:
-----------
Add @private tags

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/DescribeTypeCacheRecord.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/DescribeTypeCache.as</path>

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


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

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

 package spark.components
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8487
Author:   smgilson@adobe.com
Date:     2009-07-09T18:57:21.985536Z

Log Message:
-----------
final checkin to update the namespace in ASDoc MXML syntax descriptions for Spark components

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/EaseInOutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Graphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Wipe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Keyframe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/SetAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientFilter.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -85,7 +85,7 @@
  *

  *
  *  @mxml
- *
The <HorizontalLayout> tag inherits all of the tag
+ *
The <s:HorizontalLayout> tag inherits all of the tag
  *  attributes of its superclass and adds the following tag attributes:

  *
  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 13354
Author:   egeorgie@adobe.com
Date:     2010-01-08T00:38:34.223711Z

Log Message:
-----------
Fix http://bugs.adobe.com/jira/browse/SDK-24962 verticalAlign rounds differently than horizontalAlign in spark VerticalLayout/HorizontaLayout

Update the rounding for the major axis alignment centering.

QE notes: N/A
Doc notes: N/A
Bugs: SDK-24416
Reviewer: Hans
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -1705,7 +1705,7 @@
             var hAlign:String = horizontalAlign;
             if (hAlign == HorizontalAlign.CENTER)
             {
-                dx = Math.floor(excessWidth / 2);
+                dx = Math.round(excessWidth / 2);
             }
             else if (hAlign == HorizontalAlign.RIGHT)
             {
@@ -1799,7 +1799,7 @@
             var hAlign:String = horizontalAlign;
             if (hAlign == HorizontalAlign.CENTER)
             {
-                x = paddingLeft + Math.floor(excessWidth / 2);
+                x = paddingLeft + Math.round(excessWidth / 2);
             }
             else if (hAlign == HorizontalAlign.RIGHT)
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 7803
Author:   dsubrama@adobe.com
Date:     2009-06-12T22:33:24.106666Z

Log Message:
-----------
Metadata needed by Bangalore team for event-handler generation.

Bug: http://bugs.adobe.com/jira/browse/SDK-21632
Checkintests: Pass
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TabBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToggleButtonBar.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ToggleButtonBar.as
+++ frameworks/projects/mx/src/mx/controls/ToggleButtonBar.as
@@ -84,6 +84,8 @@
 [IconFile("ButtonBar.png")]

 [Alternative(replacement="spark.components.ButtonBar", since="4.0")]
+
+[DefaultTriggerEvent("itemClick")]

 /**
  *  The ToggleButtonBar control defines a horizontal or vertical


Transferred from the Adobe Open Source Subversion Repository

Revision: 3509
Author:   jimurphy@adobe.com
Date:     2008-10-07T18:19:17.646255Z

Log Message:
-----------
Rename of flex -> mx.

For compatibility reasons it was decided that the new functionality remain integrated with the old framework, although we will continue to build two separate SWCs, one with primarily existing framework classes, and one with new Flex 4 classes. This change removes duplicate names from the Flex 4 framework to avoid class name overlapping with the old framework code.  The naming overlap consists of two major areas:  New Components, and New Effects

Modified Paths:
--------------
386 paths were modified

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

--- frameworks/projects/spark/src/spark/primitives/Ellipse.as
+++ frameworks/projects/spark/src/spark/primitives/Ellipse.as
@@ -9,7 +9,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package flex.graphics
+package mx.graphics
 {

 import flash.events.EventDispatcher;