Transferred from the Adobe Open Source Subversion Repository

Revision: 16648
Author:   cframpto@adobe.com
Date:     2010-06-24T13:36:09.930261Z

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

Layout changes for Hans to review.  For now the DefaultColumnHeaderRenderer set its width to 150 and its height to 32.  In GridLayout.updateDisplayList() commend out code which reset the widths of all the columns to their initial width.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DefaultColumnHeaderRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ColumnHeaderBarLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderGroupLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderGroupLayout.as
@@ -17,6 +17,8 @@
 import mx.core.IVisualElement;
 import mx.core.mx_internal;

+import spark.components.DataGroup;
+import spark.components.supportClasses.GridColumn;
 import spark.layouts.supportClasses.LayoutBase;

 use namespace mx_internal;
@@ -177,6 +179,8 @@
         // shrink below them.
         layoutTarget.measuredMinWidth = totalWidth;
         layoutTarget.measuredMinHeight = totalHeight;
+
+        //trace("CHB.measure", totalWidth, totalHeight);
     }

     /**
@@ -190,6 +194,8 @@
         var layoutTarget:GroupBase = target;
         if (!layoutTarget || !gridLayout)
             return;
+
+        //trace("CHB.udl", unscaledWidth, unscaledHeight);

         oldVisibleColumnIndices = visibleColumnIndices;
         visibleColumnIndices = gridLayout.getVisibleColumnIndices();
@@ -199,43 +205,49 @@
             var element:ILayoutElement =
                 layoutTarget.getVirtualElementAt(columnIndex);

+            var gridColumn:GridColumn =
+                DataGroup(target).dataProvider.getItemAt(columnIndex) as GridColumn;
+
+            var elementWidth:Number;
+            var elementHeight:Number;
+
+            // FIXME: this isn't right.  It isn't using a typicalItem.  And
+            // it is only working because the DefaultColumnHeaderItemRenderer
+            // has width set to 150, height set to 32.
+            if (!isNaN(gridColumn.width))
+                elementWidth = gridColumn.width;
+            else
+                elementWidth = element.getPreferredBoundsWidth();
+
+            if (!isNaN(gridColumn.minWidth) && elementWidth < gridColumn.minWidth)
+                elementWidth = gridColumn.minWidth;
+
+            if (!isNaN(gridColumn.maxWidth) && elementWidth > gridColumn.maxWidth)
+                elementWidth = gridColumn.maxWidth;
+
+            // FIXME: access this through cover method
+            gridDimensions.setColumnWidth(columnIndex, elementWidth);
+
+            elementHeight = element.getPreferredBoundsHeight();
+
+            element.setLayoutBoundsSize(elementWidth, elementHeight);
+
+            // Position the element.
+            // FIXME: can this be calculated from the width of each element
+            // plus the columnGap? (but there is not a columnGap property)
             const bounds:Rectangle = gridDimensions.getColumnBounds(columnIndex);
-
-            const elementWidth:Number = bounds.width;
-
-            var elementHeight:Number;
-            const prefHeight:Number =
-                typicalLayoutElement.getPreferredBoundsHeight();
-            if (prefHeight)
-            {
-                elementHeight = prefHeight;
-            }
-            else
-            {
-                // Find out the element's dimensions sizes.
-                // We do this after the element has been already resized
-                // to its preferred size by passing NaN for the constraints.
-                element.setLayoutBoundsSize(NaN, NaN);
-                elementHeight = element.getLayoutBoundsHeight();
-            }
-            element.setLayoutBoundsSize(elementWidth, elementHeight);
-
-            // Position the element.
             element.setLayoutBoundsPosition(bounds.x, 0);

-            // Find maximum element extents. This is needed for
-            // the scrolling support.
+            // Find maximum element extents.
             maxHeight = Math.max(maxHeight, elementHeight);
         }

         // Scrolling support - update the content size
         layoutTarget.setContentSize(gridDimensions.contentWidth, maxHeight);

-        // ToDo(cframpto):
-        // These separators will need mouse listeners for the column move.
-        // The listeners will have to be removed when the separators are freed
-        // or will have to be cached in a seperate freed list.
-
+        // ToDo(cframpto): refactor these methods so both GridLayout and
+        // this layout can use them.
+
         // Now layout the separators between the headers.
         visibleHeaderSeparators = gridLayout.layoutColumnHeaderSeparators(
                                                 oldVisibleColumnIndices,


Transferred from the Adobe Open Source Subversion Repository

Revision: 19122
Author:   clucier@adobe.com
Date:     2010-12-07T22:46:34.666632Z

Log Message:
-----------
Flip transition fix.

QE notes: None
Doc notes: None
Bugs: SDK-28807
Reviewer: Chiedo
Tests run: Checkin
Is noteworthy for integration: No

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

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
@@ -655,6 +655,11 @@
         // Initialize temporaries based on our currently flip direction.
         initTransitionParameters(targetNavigator.width, targetNavigator.height);

+        // Since we are using it to host our transition group, ensure the
+        // parent of our targetNavigator is fully validated, when its not
+        // our transition goes haywire because our bounds are wrong.
+        UIComponent(targetNavigator.parent).validateNow();
+
         // Add a temporary group to contain our snapshot view of the navigator
         // while we animate.
         transitionGroup = new Group();


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

--- frameworks/projects/framework/src/mx/core/IBorder.as
+++ frameworks/projects/framework/src/mx/core/IBorder.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2007 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


RTSPClient: Code cleanup

RTSPClient: Code cleanup

--- src/com/axis/rtspclient/RTSPClient.as
+++ src/com/axis/rtspclient/RTSPClient.as
@@ -16,27 +16,21 @@
   public class RTSPClient extends EventDispatcher {
     private static var userAgent:String = "Slush 0.1";

-    private static var STATE_INITIAL:uint       = 1<<0;
-    private static var STATE_OPTIONS_SENT:uint  = 1<<1;
-    private static var STATE_OPTIONS_RCVD:uint  = 1<<2;
-    private static var STATE_DESCRIBE_SENT:uint = 1<<3;
-    private static var STATE_DESCRIBE_RCVD:uint = 1<<4;
-    private static var STATE_SETUP:uint         = 1<<5;
-    private static var STATE_PLAY_SENT:uint     = 1<<6;
-    private static var STATE_PLAYING:uint       = 1<<7;
-    private static var STATE_PAUSE_SENT:uint    = 1<<8;
-    private static var STATE_PAUSED:uint        = 1<<9;
-    private static var STATE_TEARDOWN_SENT:uint = 1<<10;
-    private static var STATE_TEARDOWN_RCVD:uint = 1<<11;
+    private static var STATE_INITIAL:uint   = 1 << 0;
+    private static var STATE_OPTIONS:uint   = 1 << 1;
+    private static var STATE_DESCRIBE:uint  = 1 << 2;
+    private static var STATE_SETUP:uint     = 1 << 3;
+    private static var STATE_PLAY:uint      = 1 << 4;
+    private static var STATE_PLAYING:uint   = 1 << 5;
+    private static var STATE_PAUSE:uint     = 1 << 6;
+    private static var STATE_PAUSED:uint    = 1 << 7;
+    private static var STATE_TEARDOWN:uint  = 1 << 8;

     private var state:int = STATE_INITIAL;
-
     private var handle:IRTSPHandle;

-    private var sdp:SDP;
+    private var sdp:SDP = new SDP();
     private var flvmux:FLVMux;
-    private var analu:ANALU;
-    private var aaac:AAAC;

     private var urlParsed:Object;
     private var cSeq:uint = 1;
@@ -44,7 +38,6 @@
     private var contentBase:String;
     private var interleaveChannelIndex:uint = 0;

-    private var headers:ByteArray = new ByteArray();
     private var methods:Array = [];
     private var data:ByteArray = new ByteArray();
     private var rtpLength:int = -1;
@@ -58,9 +51,6 @@
     public function RTSPClient(handle:IRTSPHandle, urlParsed:Object) {
       this.handle = handle;
       this.urlParsed = urlParsed;
-      this.sdp = new SDP();
-      this.analu = new ANALU();
-      this.aaac = new AAAC(sdp);
       handle.addEventListener('data', onData);
       state = STATE_INITIAL;
     }
@@ -74,11 +64,9 @@
       if (0 === this.methods.length) {
         /* We don't know the options yet. Start with that. */
         sendOptionsReq();
-        state = STATE_OPTIONS_SENT;
       } else {
         /* Already queried the options (and perhaps got unauthorized on describe) */
         sendDescribeReq();
-        state = STATE_DESCRIBE_SENT;
       }
       return true;
     }
@@ -92,9 +80,8 @@

       try {
         sendPauseReq();
-        state = STATE_PAUSE_SENT;
       } catch (err:Error) {
-        trace(err.message);
+        trace("Unable to pause: " + err.message);
         return false;
       }

@@ -109,18 +96,16 @@
       }

       sendPlayReq();
-      state = STATE_PLAY_SENT;
       return true;
     }

     public function stop():Boolean
     {
-      if (state < STATE_PLAY_SENT) {
+      if (state < STATE_PLAY) {
         trace('Unable to stop if we never reached play.');
         return false;
       }
       sendTeardownReq();
-      state = STATE_TEARDOWN_SENT;
       return true;
     }

@@ -156,12 +141,10 @@
       var copy:ByteArray = new ByteArray();
       data.readBytes(copy);
       data.clear();
-
       copy.readBytes(data);

-      headers = new ByteArray();
-      rtpLength     = -1;
-      rtpChannel    = -1;
+      rtpLength  = -1;
+      rtpChannel = -1;
     }

     private function readRequest(oBody:ByteArray):*
@@ -214,18 +197,14 @@
       case STATE_INITIAL:
         trace("RTSPClient: STATE_INITIAL");

-      case STATE_OPTIONS_SENT:
-        trace("RTSPClient: STATE_DESCRIBE_SENT");
-        state = STATE_OPTIONS_RCVD;
+      case STATE_OPTIONS:
+        trace("RTSPClient: STATE_DESCRIBE");
         this.methods = parsed.headers.public.split(/[ ]*,[ ]*/);
-
         sendDescribeReq();
-        state = STATE_DESCRIBE_SENT;
-
-        break;
-      case STATE_DESCRIBE_SENT:
-        trace("RTSPClient: STATE_DESCRIBE_SENT");
-        state = STATE_DESCRIBE_RCVD;
+
+        break;
+      case STATE_DESCRIBE:
+        trace("RTSPClient: STATE_DESCRIBE");

         if (!sdp.parse(body)) {
           trace("RTSPClient:Failed to parse SDP file");
@@ -239,9 +218,13 @@

         contentBase = parsed.headers['content-base'];
         tracks = sdp.getMediaBlockList();
-        trace('SDP contained ' + tracks.length + ' tracks. Calling SETUP for each.');
-
-        state = STATE_SETUP;
+        trace('SDP contained ' + tracks.length + ' track(s). Calling SETUP for each.');
+
+        if (0 === tracks.length) {
+          trace('No tracks in SDP file.');
+          return;
+        }
+
         /* Fall through, it's time for setup */
       case STATE_SETUP:
         trace("RTSPClient: STATE_SETUP");
@@ -259,11 +242,10 @@

         /* All tracks setup and ready to go! */
         sendPlayReq();
-        state = STATE_PLAY_SENT;
-        break;
-
-      case STATE_PLAY_SENT:
-        trace("RTSPClient: STATE_PLAY_SENT");
+        break;
+
+      case STATE_PLAY:
+        trace("RTSPClient: STATE_PLAY");
         state = STATE_PLAYING;

         if (this.flvmux) {
@@ -273,9 +255,11 @@
         }

         this.flvmux = new FLVMux(this.sdp);
-
-        addEventListener("VIDEO_PACKET", analu.onRTPPacket);
-        addEventListener("AUDIO_PACKET", aaac.onRTPPacket);
+        var analu:ANALU = new ANALU();
+        var aaac:AAAC = new AAAC(sdp);
+
+        this.addEventListener("VIDEO_PACKET", analu.onRTPPacket);
+        this.addEventListener("AUDIO_PACKET", aaac.onRTPPacket);
         analu.addEventListener(NALU.NEW_NALU, flvmux.onNALU);
         aaac.addEventListener(AACFrame.NEW_FRAME, flvmux.onAACFrame);
         break;
@@ -284,14 +268,13 @@
         trace("RTSPClient: STATE_PLAYING");
         break;

-      case STATE_PAUSE_SENT:
-        trace("RTSPClient: STATE_PAUSE_SENT");
+      case STATE_PAUSE:
+        trace("RTSPClient: STATE_PAUSE");
         state = STATE_PAUSED;
         break;

-      case STATE_TEARDOWN_SENT:
-        trace('RTSPClient: STATE_TEARDOWN_SENT');
-        state = STATE_TEARDOWN_RCVD;
+      case STATE_TEARDOWN:
+        trace('RTSPClient: STATE_TEARDOWN');
         break;
       }
     }
@@ -335,6 +318,7 @@
     }

     private function sendOptionsReq():void {
+      state = STATE_OPTIONS;
       var req:String =
         "OPTIONS * RTSP/1.0\r\n" +
         "CSeq: " + (++cSeq) + "\r\n" +
@@ -344,6 +328,7 @@
     }

     private function sendDescribeReq():void {
+      state = STATE_DESCRIBE;
       var u:String = 'rtsp://' + urlParsed.host + ":" + urlParsed.port + urlParsed.urlpath;
       var req:String =
         "DESCRIBE " + u + " RTSP/1.0\r\n" +
@@ -356,6 +341,7 @@
     }

     private function sendSetupReq(block:Object):void {
+      state = STATE_SETUP;
       var interleavedChannels:String = interleaveChannelIndex++ + "-" + interleaveChannelIndex++;
       var p:String = url.isAbsolute(block.control) ? block.control : contentBase + block.control;

@@ -378,6 +364,8 @@
         Player.getNetStream().play(null);
       }

+      state = STATE_PLAY;
+
       var req:String =
         "PLAY " + contentBase + " RTSP/1.0\r\n" +
         "CSeq: " + (++cSeq) + "\r\n" +
@@ -392,6 +380,8 @@
       if (-1 === this.supportCommand("PAUSE")) {
         throw new Error('Pause is not supported by server.');
       }
+
+      state = STATE_PAUSE;

       /* NetStream must be closed here, otherwise it will think of this rtsp pause
          as a very bad connection and buffer a lot before playing again. Not
@@ -409,6 +399,7 @@
     }

     private function sendTeardownReq():void {
+      state = STATE_TEARDOWN;
       var req:String =
         "TEARDOWN " + contentBase + " RTSP/1.0\r\n" +
         "CSeq: " + (++cSeq) + "\r\n" +


Fix for bugs #81 and #91.

Fix for bugs #81 and #91.

--- src/flexlib/containers/WindowShade.as
+++ src/flexlib/containers/WindowShade.as
@@ -29,6 +29,8 @@
 	import mx.core.LayoutContainer;
 	import mx.core.ScrollPolicy;
 	import mx.effects.Resize;
+    import mx.effects.effectClasses.ResizeInstance;
+    import mx.events.EffectEvent;
 	import mx.styles.CSSStyleDeclaration;
 	import mx.styles.StyleManager;
 	import mx.utils.StringUtil;
@@ -186,6 +188,8 @@
             //default scroll policies are off
             this.verticalScrollPolicy = ScrollPolicy.OFF;
             this.horizontalScrollPolicy = ScrollPolicy.OFF;
+
+            addEventListener(EffectEvent.EFFECT_END, onEffectEnd);
         }

         protected function createOrReplaceHeaderButton():void {
@@ -417,12 +421,24 @@
 		 * @private
 		 */
 		private var resize:Resize;
+
+        /**
+         * @private
+         */
+        private var resizeInstance:ResizeInstance;
+
+        /**
+         * @private
+         */
+        private var resetExplicitHeight:Boolean;

         /**
          * @private
          */
         protected function runResizeEffect():void {
 			if(resize && resize.isPlaying) {
+                // before the call to end() returns, the onEffectEnd method will have been called
+                // for the currently playing resize.
 				resize.end();
 			}

@@ -437,11 +453,31 @@
             }

             resize = new Resize(this);
+
+            // If this WindowShade currently has no explicit height set, we want to
+            // restore that state when the resize effect is finished, in the onEffectEnd method.
+            // If it does, then the final height set by the effect will be retained.
+            resetExplicitHeight = isNaN(explicitHeight);
+
             resize.heightTo = Math.min(maxHeight, measuredHeight);

             resize.duration = duration;
-
-            resize.play();
+
+            var instances:Array = resize.play();
+            if(instances && instances.length) {
+                resizeInstance = instances[0];
+            }
+        }
+
+        /**
+         * @private
+         */
+        protected function onEffectEnd(evt:EffectEvent):void {
+            // Make sure this is our effect ending
+            if(evt.effectInstance == resizeInstance) {
+                if(resetExplicitHeight) explicitHeight = NaN;
+                resizeInstance = null;
+            }
         }

         /**


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/mediaClasses/SparkMuteButtonAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/mediaClasses/SparkMuteButtonAutomationImpl.as
@@ -0,0 +1,118 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.automation.delegates.components.mediaClasses
+{
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.events.MouseEvent;
+
+import mx.automation.Automation;
+import mx.automation.IAutomationObjectHelper;
+import mx.automation.events.AutomationRecordEvent;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+
+import spark.automation.delegates.components.SparkButtonAutomationImpl;
+import spark.components.mediaClasses.MuteButton;
+
+use namespace mx_internal;
+
+[Mixin]
+/**
+ *
+ *  Defines methods and properties required to perform instrumentation for the
+ *  MuteButton control.
+ *
+ *  @see spark.components.mediaClasses.MuteButton
+ *
+ */
+public class SparkMuteButtonAutomationImpl extends SparkButtonAutomationImpl
+{
+
+	include "../../../../core/Version.as";
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Registers the delegate class for a component class with automation manager.
+     *
+     *  @param root The SystemManger of the application.
+     */
+    public static function init(root:DisplayObject):void
+    {
+        Automation.registerDelegateClass(spark.components.mediaClasses.MuteButton, SparkMuteButtonAutomationImpl);
+    }
+
+    /**
+     *  Constructor.
+     * @param obj MuteButton object to be automated.
+     */
+    public function SparkMuteButtonAutomationImpl(obj:spark.components.mediaClasses.MuteButton)
+    {
+        super(obj);
+		obj.addEventListener(FlexEvent.MUTED_CHANGE , muteChangeHandler, false, 0, true);
+		obj.addEventListener(AutomationRecordEvent.RECORD, recordHandler,false,0,true);
+
+    }
+
+
+	/**
+	 *  @private
+	 */
+
+	private function recordHandler(event:AutomationRecordEvent):void
+	{
+		// let us not record the click event.
+		var re:Event = event.replayableEvent;
+		if((re is MouseEvent) && (re.type == MouseEvent.CLICK))
+			event.preventDefault();
+	}
+
+
+	/**
+	 *  @private
+	 */
+	private function muteChangeHandler(event:mx.events.FlexEvent):void
+	{
+		recordAutomatableEvent(event);
+	}
+
+	override public function replayAutomatableEvent(event:Event):Boolean
+	{
+		var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+
+		if (event is mx.events.FlexEvent)
+		{
+			// we need to replay the click on the muteButton
+			if(event.type == FlexEvent.MUTED_CHANGE)
+			{
+				help.replayClick(sparkMuteButton);
+			}
+		}
+		return super.replayAutomatableEvent(event);
+	}
+
+	/**
+	 *  @private
+	 *  storage for the owner component
+	 */
+	protected function get sparkMuteButton():spark.components.mediaClasses.MuteButton
+	{
+		return uiComponent as spark.components.mediaClasses.MuteButton;
+	}
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkListBaseAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkListBaseAutomationImpl.as
@@ -0,0 +1,818 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.automation.delegates.components.supportClasses
+{
+
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+	import flash.events.KeyboardEvent;
+	import flash.events.MouseEvent;
+	import flash.ui.Keyboard;
+	import flash.utils.getTimer;
+
+	import mx.automation.Automation;
+	import mx.automation.AutomationIDPart;
+	import mx.automation.IAutomationClass;
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationObjectHelper;
+	import mx.automation.IAutomationTabularData;
+	import mx.automation.delegates.DragManagerAutomationImpl;
+	import mx.automation.events.AutomationDragEvent;
+	import mx.core.IVisualElement;
+	import mx.core.mx_internal;
+	import mx.managers.DragManager;
+	import mx.utils.StringUtil;
+
+	import spark.automation.events.SparkListItemSelectEvent;
+	import spark.automation.tabularData.SparkListBaseTabularData;
+	import spark.components.IItemRenderer;
+	import spark.components.supportClasses.ListBase;
+	import spark.events.RendererExistenceEvent;
+	import spark.layouts.HorizontalLayout;
+	import spark.layouts.VerticalLayout;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  ListBase class.
+	 *
+	 *  @see spark.components.supportClasses.ListBase
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class SparkListBaseAutomationImpl extends SparkSkinnableContainerBaseAutomationImpl
+	{
+		include "../../../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(spark.components.supportClasses.ListBase, SparkListBaseAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 * @param obj ListBase object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function SparkListBaseAutomationImpl(obj:spark.components.supportClasses.ListBase)
+		{
+			super(obj);
+
+			obj.addEventListener(Event.ADDED, childAddedHandler, false, 0, true);
+		}
+
+
+		//--------------------------------------------------------------------------
+		//
+		//  Variables
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 *  storage for the owner component
+		 */
+		protected function get sparkListBase():spark.components.supportClasses.ListBase
+		{
+			return uiComponent as spark.components.supportClasses.ListBase;
+		}
+
+		/**
+		 *  @private
+		 */
+		protected var preventDragDropRecording:Boolean = true;
+
+		/**
+		 *  @private
+		 */
+		protected var shiftKeyDown:Boolean = false;
+
+		/**
+		 *  @private
+		 */
+		protected var ctrlKeyDown:Boolean = false;
+
+		//--------------------------------------------------------------------------
+		//
+		//  Methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 * @private
+		 */
+
+		protected function recordListItemSelectEvent(item:IItemRenderer,
+													 trigger:Event,
+													 cacheable:Boolean=true):void
+		{
+			var selected:Boolean = false;
+			if(sparkListBase.selectedItem == item.data)
+				selected = true;
+
+			var selectionType:String = SparkListItemSelectEvent.SELECT;
+			var keyEvent:KeyboardEvent = trigger as KeyboardEvent;
+			var mouseEvent:MouseEvent = trigger as MouseEvent;
+
+			var indexSelection:Boolean = false;
+
+			if (!Automation.automationManager || !Automation.automationManager.automationEnvironment)
+				return ;
+
+			var automationClass:IAutomationClass = Automation.automationManager.automationEnvironment.getAutomationClassByInstance(sparkListBase);
+			if (automationClass)
+			{
+				var propertyNameMap:Object = automationClass.propertyNameMap;
+				if (propertyNameMap["enableIndexBasedSelection"])
+				{
+					trace("TBD - We should find the item renderer and convert it to index");
+					selectionType = SparkListItemSelectEvent.SELECT_INDEX;
+					indexSelection = true;
+				}
+			}
+
+			var event:SparkListItemSelectEvent = new SparkListItemSelectEvent(selectionType);
+			if (indexSelection)
+				fillItemRendererIndex(item, event);
+			else
+				event.itemRenderer = item;
+
+			event.triggerEvent = trigger;
+			if (keyEvent)
+			{
+				event.ctrlKey = keyEvent.ctrlKey;
+				event.shiftKey = keyEvent.shiftKey;
+				event.altKey = keyEvent.altKey;
+			}
+			else if (mouseEvent)
+			{
+				event.ctrlKey = mouseEvent.ctrlKey;
+				event.shiftKey = mouseEvent.shiftKey;
+				event.altKey = mouseEvent.altKey;
+			}
+
+			recordAutomatableEvent(event, cacheable);
+		}
+
+
+		//--------------------------------------------------------------------------
+		//
+		// Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 * @private
+		 */
+		override protected function componentInitialized():void
+		{
+			// Sometimes List doesn't get initialized by the time constructor of
+			// this delegate is called.
+			// For ex: In TitleWindow - http://bugs.adobe.com/jira/browse/FLEXENT-1128
+			// So instead of calling these code directly from the constructor, we call it
+			// on component initialization.
+			addMouseClickHandlerToExistingRenderers();
+
+			if(sparkListBase.dataGroup)
+			{
+				sparkListBase.dataGroup.addEventListener(
+					RendererExistenceEvent.RENDERER_ADD, dataGroup_rendererAddHandler, false, 0, true);
+				sparkListBase.dataGroup.addEventListener(
+					RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler, false, 0 , true);
+			}
+			super.componentInitialized();
+		}
+
+
+		//--------------------------------------------------------------------------
+		//
+		//  Properties
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 * @private
+		 */
+		mx_internal var itemAutomationNameFunction:Function = getItemAutomationValue;
+
+		/**
+		 * @private
+		 */
+		public function getItemAutomationValue(item:IAutomationObject):String
+		{
+			// check for atleast one non-null item
+			var values:Array = item.automationValue;
+			if (values)
+			{
+				var n:int = values.length;
+				for (var i:int = 0; i < n; i++)
+				{
+					if (values[i])
+						return values.join(" | ");
+					// found one non null item, so return
+				}
+			}
+
+			return null;
+		}
+
+		/**
+		 * @private
+		 */
+		public function getItemAutomationName(item:IAutomationObject):String
+		{
+			return item.automationName;
+		}
+
+		/**
+		 * @private
+		 */
+
+		public function getItemAutomationIndex(item:IAutomationObject):String
+		{
+			return String("index:" + sparkListBase.dataGroup.getChildIndex(item as DisplayObject));
+
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden properties
+		//
+		//--------------------------------------------------------------------------
+
+		//----------------------------------
+		//  automationValue
+		//----------------------------------
+
+		/**
+		 * @private
+		 */
+		override public function get automationValue():Array
+		{
+			var result:Array = [];
+			return result;
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function createAutomationIDPart(child:IAutomationObject):Object
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return (help
+				? help.helpCreateIDPart(uiAutomationObject, child, itemAutomationNameFunction,
+					getItemAutomationIndex)
+				: null);
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return (help
+				? help.helpCreateIDPartWithRequiredProperties(uiAutomationObject, child, properties,itemAutomationNameFunction,
+					getItemAutomationIndex)
+				: null);
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function resolveAutomationIDPart(part:Object):Array
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return help ? help.helpResolveIDPart(uiAutomationObject, part) : null;
+		}
+
+
+		/**
+		 * private
+		 */
+		protected function getVisibleRowsRenderers():Array
+		{
+			var visibleRows:Array = new Array();
+
+			var count:int = sparkListBase.dataGroup?sparkListBase.dataGroup.numElements:0;
+			var startIndex:int = 0;
+			if(sparkListBase.useVirtualLayout == false)
+			{
+				if(sparkListBase.layout is VerticalLayout)
+				{
+					startIndex = ((sparkListBase.layout)as VerticalLayout).firstIndexInView;
+					count = ((sparkListBase.layout)as VerticalLayout).lastIndexInView+1;
+				}
+				else if (sparkListBase.layout is HorizontalLayout)
+				{
+					startIndex = ((sparkListBase.layout)as HorizontalLayout).firstIndexInView;
+					count = ((sparkListBase.layout)as HorizontalLayout).lastIndexInView+1;
+				}
+
+			}
+
+			for (var i:int = startIndex; i<count ; i++)
+			{
+				var currentObj:Object = sparkListBase.dataGroup.getElementAt(i);
+				if( currentObj is IItemRenderer)
+				{
+					visibleRows.push([currentObj]);
+				}
+			}
+			return visibleRows;
+		}
+
+
+		/**
+		 *  @private
+		 */
+		override public function get numAutomationChildren():int
+		{
+
+			var listItems:Array = getVisibleRowsRenderers();
+			if (listItems.length == 0)
+				return 0;
+
+			//this code is for multi colum list also.
+			// eventhough we have only one column spark list
+			// we are maintaining the same as it does not cause any harm.
+			var result:int = listItems.length * listItems[0].length;
+			var row:uint = listItems.length - 1;
+			var col:uint = listItems[0].length - 1;
+			while (!listItems[row][col] && result > 0)
+			{
+				result--;
+				if (col != 0)
+					col--;
+				else if (row != 0)
+				{
+					row--;
+					col = listItems[0].length - 1;
+				}
+			}
+			return result;
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function getAutomationChildAt(index:int):IAutomationObject
+		{
+
+			var listItems:Array = getVisibleRowsRenderers();
+			var numCols:int = listItems? listItems[0].length:0;
+			var row:uint = uint(numCols == 0 ? 0 : index / numCols);
+			var col:uint = uint(numCols == 0 ? index : index % numCols);
+			var item:IAutomationObject = listItems[row][col];
+			return item;
+		}
+
+		/**
+		 * @private
+		 */
+		override public function getAutomationChildren():Array
+		{
+
+			var childrenList:Array = new Array();
+
+			var listItems:Array = getVisibleRowsRenderers();
+
+			// we get this as the 2 dim array of row and columns
+			// we need to make this as single element array
+			//while (!listItems[row][col]
+			var  rowcount:int  = listItems?listItems.length:0;
+			if (rowcount != 0)
+			{
+				var coulumcount:int = 0;
+
+				if ((listItems[0]) is Array)
+					coulumcount = (listItems[0] as Array).length;
+
+				for (var i:int = 0; i < rowcount ; i++)
+				{
+					for(var j:int = 0; j < coulumcount ; j++)
+					{
+						var item:IItemRenderer = listItems[i][j];
+						if(item)
+							childrenList.push(item as IAutomationObject);
+					}
+				}
+			}
+
+			childrenList =  addScrollers(childrenList);
+			return  childrenList;
+		}
+
+		/**
+		 * private
+		 */
+
+		protected function addScrollers(chilArray:Array):Array
+		{
+
+			var count:int = sparkListBase.numChildren;
+			for (var i:int=0; i<count; i++)
+			{
+				var obj:Object = sparkListBase.getChildAt(i);
+				// here if are getting scrollers, we need to add the scrollbars. we dont need to
+				// consider the view port contents as the data content is handled using the renderes.
+				if(obj is spark.components.Scroller)
+				{
+					var scroller:spark.components.Scroller = obj as spark.components.Scroller;
+					if(scroller.horizontalScrollBar && scroller.horizontalScrollBar.visible)
+						chilArray.push(scroller.horizontalScrollBar);
+					if(scroller.verticalScrollBar && scroller.verticalScrollBar.visible)
+						chilArray.push(scroller.verticalScrollBar);
+				}
+			}
+
+
+			var scrollBars:Array = getScrollBars(sparkListBase,null);
+			var n:int = scrollBars? scrollBars.length : 0;
+
+			for ( i=0; i<n ; i++)
+			{
+				chilArray.push(scrollBars[i]);
+			}
+			return chilArray;
+		}
+
+
+		/**
+		 *  A matrix of the automationValues of each item in the grid. The return value
+		 *  is an array of rows, each of which is an array of item renderers (row-major).
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		override public function get automationTabularData():Object
+		{
+			return new SparkListBaseTabularData(sparkListBase);
+		}
+
+		/**
+		 * @private
+		 */
+		override public function replayAutomatableEvent(event:Event):Boolean
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			switch (event.type)
+			{
+				case MouseEvent.CLICK:
+				{
+					return help.replayClick(uiComponent, MouseEvent(event));
+				}
+				    // There is no double click support on spark list as we do not have
+					// any event from spark list for double click
+				/*	case ListEvent.ITEM_DOUBLE_CLICK:
+				{
+					var clickEvent:ListEvent = ListEvent(event);
+					return replayMouseDoubleClickOnItem(clickEvent.itemRenderer);
+				}  */
+				case KeyboardEvent.KEY_DOWN:
+				{
+					sparkListBase.setFocus();
+					return help.replayKeyboardEvent(uiComponent, KeyboardEvent(event));
+				}
+				case SparkListItemSelectEvent.SELECT_INDEX:
+				case SparkListItemSelectEvent.SELECT:
+				{
+					var completeTime:Number = getTimer() + sparkListBase.getStyle("selectionDuration");
+
+					help.addSynchronization(function():Boolean
+					{
+						return getTimer() >= completeTime;
+					});
+
+					var lise:SparkListItemSelectEvent = SparkListItemSelectEvent(event);
+
+					if (event.type == SparkListItemSelectEvent.SELECT_INDEX)
+					{
+						lise.itemRenderer = sparkListBase.dataGroup.getElementAt(lise.itemIndex) as IItemRenderer;
+					}
+					else
+					{
+						if (!lise.itemRenderer)
+							findItemRenderer(lise);
+					}
+
+
+					// keyboard and mouse are currently treated the same
+					if (lise.triggerEvent is MouseEvent)
+					{
+						return replayMouseClickOnItem(lise.itemRenderer,
+							lise.ctrlKey,
+							lise.shiftKey,
+							lise.altKey);
+					}
+					else if (lise.triggerEvent is KeyboardEvent)
+					{
+						return help.replayKeyDownKeyUp(lise.itemRenderer,
+							Keyboard.SPACE,
+							lise.ctrlKey,
+							lise.shiftKey,
+							lise.altKey);
+					}
+					else
+					{
+						throw new Error();
+					}
+				}
+
+				case AutomationDragEvent.DRAG_START:
+				case AutomationDragEvent.DRAG_DROP:
+				case AutomationDragEvent.DRAG_COMPLETE:
+				{
+					return DragManagerAutomationImpl.replayAutomatableEvent(uiAutomationObject,
+						event);
+				}
+					// fall thru if not dragging while scroll occurs
+				default:
+				{
+					return super.replayAutomatableEvent(event);
+				}
+			}
+		}
+
+		/**
+		 * @private
+		 * Plays back MouseEvent.CLICK on the item renderer.
+		 */
+		protected function replayMouseClickOnItem(item:IItemRenderer,
+												  ctrlKey:Boolean = false,
+												  shiftKey:Boolean = false,
+												  altKey:Boolean = false):Boolean
+		{
+			var me:MouseEvent = new MouseEvent(MouseEvent.CLICK);
+			me.ctrlKey = ctrlKey;
+			me.altKey = altKey;
+			me.shiftKey = shiftKey;
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return help.replayClick(item, me);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Event handlers
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+
+		public function childAddedHandler(event:Event):void
+		{
+
+		}
+
+
+		/**
+		 *  @private
+		 */
+
+		protected function dataGroup_rendererAddHandler(event:RendererExistenceEvent):void
+		{
+			var renderer:IVisualElement = event.renderer;
+
+			if (renderer)
+				renderer.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler,false,-100,true);
+
+			if(renderer is IAutomationObject)
+				IAutomationObject(renderer).showInAutomationHierarchy = true;
+		}
+
+
+		/**
+		 *  @private
+		 */
+		protected function dataGroup_rendererRemoveHandler(event:RendererExistenceEvent):void
+		{
+			var renderer:Object = event.renderer;
+
+			if (renderer)
+				renderer.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+		}
+
+		protected function addMouseClickHandlerToExistingRenderers():void
+		{
+
+			var count:int = sparkListBase.dataGroup? sparkListBase.dataGroup.numElements:0;
+			for (var i:int = 0; i<count ; i++)
+			{
+				var currentObj:Object = sparkListBase.dataGroup.getElementAt(i);
+				if( currentObj is IItemRenderer)
+					(currentObj as IItemRenderer).addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler,false, -100,true);
+				if(currentObj is IAutomationObject)
+					IAutomationObject(currentObj).showInAutomationHierarchy = true;
+			}
+
+		}
+		/**
+		 *  @private
+		 */
+
+		protected function mouseDownHandler(event:MouseEvent):void
+		{
+			if(event.currentTarget as IItemRenderer)
+				recordListItemSelectEvent(event.currentTarget as IItemRenderer , event);
+
+		}
+
+		/**
+		 *  @private
+		 */
+
+		override protected function keyDownHandler(event:KeyboardEvent):void
+		{
+			if (event.keyCode == Keyboard.SPACE)
+			{
+
+				var listItems:Array = getVisibleRowsRenderers();
+				var caretIndex:int = sparkListBase.caretIndex;
+				if (caretIndex != -1)
+				{
+					// we may face this situation with two scenario.
+					// user pressed the space bar when the drop down list was open
+					// on when the dropDown list was closed.
+					// when it is closed, we dont have an itemrenderer nor the layout.
+					// so we wont be recording the select operation here
+					// http://bugs.adobe.com/jira/browse/FLEXENT-1103
+					if((sparkListBase.layout as VerticalLayout)&& listItems && (listItems.length))
+					{
+						var rendererIndex:int = caretIndex - (sparkListBase.layout as VerticalLayout).firstIndexInView;
+
+						var item:IItemRenderer = listItems[rendererIndex][0] as IItemRenderer;
+						recordListItemSelectEvent(item, event);
+					}
+				}
+
+			}
+			else if (event.keyCode != Keyboard.SPACE &&
+				event.keyCode != Keyboard.CONTROL &&
+				event.keyCode != Keyboard.SHIFT &&
+				event.keyCode != Keyboard.TAB)
+			{
+				recordAutomatableEvent(event);
+			}
+		}
+
+		/**
+		 *  @private
+		 */
+		protected function trimArray(val:Array):void
+		{
+			var n:int = val.length;
+			for (var i:int = 0; i <n; i++)
+			{
+				val[i] = StringUtil.trim(val[i]);
+			}
+		}
+
+		/**
+		 *  @private
+		 */
+
+		protected function findItemRenderer(selectEvent:SparkListItemSelectEvent):Boolean
+		{
+			if (selectEvent.itemAutomationValue && selectEvent.itemAutomationValue.length)
+			{
+				var itemLabel:String = selectEvent.itemAutomationValue;
+				var tabularData:IAutomationTabularData = automationTabularData as IAutomationTabularData;
+				var values:Array = tabularData.getValues(0, tabularData.numRows);
+				var length:int = values.length;
+
+				var part:AutomationIDPart = new AutomationIDPart();
+				part.automationName = itemLabel;
+
+				var labels:Array = itemLabel.split("|");
+
+				trimArray(labels);
+
+				var index:int = 0;
+				for each (var a:Array in values)
+				{
+					values[index] = [];
+					trimArray(a);
+					var colIndex:int = 0 ;
+					for each (var b:String in a)
+					{
+						var splitArray:Array = b.split("|");
+						for each ( var c:String in splitArray)
+						values[index].push(c);
+					}
+					trimArray(values[index]);
+					++index;
+				}
+
+				var n:int = labels.length;
+				for (var i:int = 0; i < n; i++)
+				{
+					var lString:String = labels[i];
+					if (lString.charAt(0) == "*" && lString.charAt(lString.length-1) == "*")
+						labels[i] = lString.substr(1, lString.length-2);
+				}
+
+				for ( i = 0; i < length; i++)
+				{
+					if(compare(labels, values[i]))
+					{
+						var ao:IAutomationObject = Automation.automationManager.resolveIDPartToSingleObject(uiAutomationObject, part);
+
+						if (ao)
+						{
+							selectEvent.itemRenderer = ao as IItemRenderer;
+							return true;
+						}
+					}
+				}
+			}
+
+			return false;
+		}
+
+
+		/**
+		 *  @private
+		 */
+		protected function compare(labels:Array, values:Array):Boolean
+		{
+			if (labels.length != values.length)
+				return false;
+			var n:int = labels.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				if (labels[i] != values[i])
+					return false;
+			}
+
+			return true;
+		}
+
+		/**
+		 *  @private
+		 */
+
+		protected function fillItemRendererIndex(item:IItemRenderer, event:SparkListItemSelectEvent):void
+		{
+			event.itemIndex = sparkListBase.dataGroup.getElementIndex(item as IVisualElement);
+
+		}
+
+
+		/**
+		 *  @private
+		 */
+		public function getItemsCount():int
+		{
+			if (sparkListBase.dataProvider)
+				return sparkListBase.dataProvider.length;
+
+			return 0;
+		}
+	}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17454
Author:   klin@adobe.com
Date:     2010-08-23T23:00:57.671134Z

Log Message:
-----------
Add icons for DataGrid and FormHeading.

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

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/FormHeading.png</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="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.png</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/FormHeading.as</path>

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

--- frameworks/projects/spark/src/spark/components/FormHeading.as
+++ frameworks/projects/spark/src/spark/components/FormHeading.as
@@ -54,6 +54,8 @@
  * see Spark Skinning.
  */
 [DiscouragedForProfile("mobileDevice")]
+
+[IconFile("FormHeading.png")]

 /**
  * A simple form item component which contains a label. It is used to


Transferred from the Adobe Open Source Subversion Repository

Revision: 4733
Author:   cframpto@adobe.com
Date:     2009-01-29T17:19:28.981901Z

Log Message:
-----------
Revert 4731 until I figure out one case I realized I broke.

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxRadioButton.as

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

--- frameworks/projects/spark/src/spark/components/RadioButton.as
+++ frameworks/projects/spark/src/spark/components/RadioButton.as
@@ -12,7 +12,6 @@
 package mx.components
 {
 import flash.events.Event;
-import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
 import flash.ui.Keyboard;
@@ -154,12 +153,8 @@

     /**
      *  The FxRadioButtonGroup object to which this FxRadioButton belongs.
-     *  All radio buttons in the group must have the same parent.
      *
      *  @default "undefined"
-     *
-     *  @throws ArgumentError If the radio button has a different parent than
-     *  the other radio buttons already in the group.
      */
     public function get group():FxRadioButtonGroup
     {
@@ -252,12 +247,8 @@
      *  Specifies the name of the group to which this FxRadioButton control belongs, or
      *  specifies the value of the id property of a FxRadioButtonGroup control
      *  if this FxRadioButton is part of a group defined by a FxRadioButtonGroup control.
-     *  All radio buttons in the group must have the same parent.
      *
      *  @default "undefined"
-     *
-     *  @throws ArgumentError If the radio button has a different parent than
-     *  the other radio buttons already in the group.
      */
     public function get groupName():String
     {
@@ -346,13 +337,6 @@
             addToGroup();
             groupChanged = false;
         }
-
-        if (enabledChanged)
-        {
-            // Make sure the group is known before calling this.
-            setEnabled();
-            enabledChanged = true;
-        }
     }

     //--------------------------------------------------------------------------
@@ -376,22 +360,12 @@
      *  @private
      *  Create radio button group if it does not exist
      *  and add the instance to the group.
-     *
-     *  @throws ArgumentError If the radio button has a different parent than
-     *  the other radio buttons already in the group.
      */
     private function addToGroup():FxRadioButtonGroup
     {
         var g:FxRadioButtonGroup = group; // Trigger getting the group
         if (g)
         {
-            if (g.numRadioButtons && g.getRadioButtonAt(0).parent != parent)
-            {
-                throw ArgumentError(
-                    "This radio button must have the same parent as the " +
-                    "other radio buttons already in the radio button group.");
-            }
-
             g.addInstance(this);

             // If this button is selected, then change the group selection.
@@ -506,12 +480,20 @@

     /**
      *  @private
-     *  Enable the component if the group it is in is enabled and the radio
-     *  button itself is enabled. If the group is disabled, the button is disabled.
+     *  Enable the component if the group it is enabled and the radio button
+     *  itself is enabled. If the group is disabled the button is disabled.
      */
     mx_internal function setEnabled():void
     {
-        super.enabled = (group && !group.enabled) ? false : _buttonEnabled;
+        if (_group && !_group.enabled)
+        {
+            super.enabled = false;
+        }
+        else
+        {
+            super.enabled = _buttonEnabled;
+        }
+
         invalidateButtonState();
     }

@@ -520,12 +502,7 @@
      *  Storage for enabled property.  It must be merged with the FxRadionButtonGroup
      *  enabled property to determine if the button is enabled.
      */
-    private var _buttonEnabled:Boolean;
-
-    /**
-     *  @private
-     */
-    private var enabledChanged:Boolean = false;
+    mx_internal var _buttonEnabled:Boolean;

     /**
      *  @private
@@ -536,8 +513,7 @@
     override public function set enabled(value:Boolean):void
     {
         _buttonEnabled = value;
-        enabledChanged = true;
-        invalidateProperties();
+        setEnabled();
     }

     //--------------------------------------------------------------------------
@@ -546,18 +522,6 @@
     //
     //--------------------------------------------------------------------------

-    /**
-     *  @private
-     */
-    override protected function focusInHandler(event:FocusEvent):void
-    {
-        var fm:IFocusManager = focusManager;
-        if (fm)
-            fm.showFocusIndicator = enabled;
-
-        super.focusInHandler(event);
-    }
-
     /**
      *  @private
      *  Support the use of keyboard within the group.


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

--- frameworks/projects/framework/src/mx/effects/effectClasses/TweenEffectInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/TweenEffectInstance.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2007 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


fix for #7, add static function modifier to linePlus.

--- net/flashpunk/utils/Draw.as
+++ net/flashpunk/utils/Draw.as
@@ -155,7 +155,7 @@
 		 * @param	alpha	Alpha of the line.
 		 * @param	thick	The thickness of the line.
 		 */
-		public function linePlus(x1:int, y1:int, x2:int, y2:int, color:uint = 0xFF000000, alpha:Number = 1, thick:Number = 1):void
+		public static function linePlus(x1:int, y1:int, x2:int, y2:int, color:uint = 0xFF000000, alpha:Number = 1, thick:Number = 1):void
 		{
 			_graphics.clear();
 			_graphics.lineStyle(thick, color, alpha, false, LineScaleMode.NONE);


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

--- frameworks/projects/automation_air/src/mx/automation/delegates/controls/fileSystemClasses/FileSystemDataGridNameColumnRendererAutomationImpl.as
+++ frameworks/projects/automation_air/src/mx/automation/delegates/controls/fileSystemClasses/FileSystemDataGridNameColumnRendererAutomationImpl.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


[fix] fix parameter typing

[fix] fix parameter typing

- EntityImageCollection addItem

--- src/main/actionscript/com/dotfold/dotvimstat/model/image/EntityImageCollection.as
+++ src/main/actionscript/com/dotfold/dotvimstat/model/image/EntityImageCollection.as
@@ -1,5 +1,6 @@
 package com.dotfold.dotvimstat.model.image
 {
+	import asx.array.empty;
 	import asx.array.reduce;

 	import com.dotfold.dotvimstat.model.enum.ImageSize;
@@ -19,6 +20,8 @@

 		protected var sizes:Array = [30, 75, 100, 300];

+		// TODO: `addItems` add many method
+
 		/**
 		 * Constructor.
 		 */
@@ -32,7 +35,7 @@
 		/**
 		 * Adds an item to the internal collection, and sorts on the dimension field.
 		 */
-		public function addItem(item:Object):void
+		public function addItem(item:EntityImage):void
 		{
 			_list ||= [];
 			_list.push(item);
@@ -57,6 +60,22 @@
 			}

 			return image;
+		}
+
+		/**
+		 * Returns true if internal list is empty.
+		 */
+		public function isEmpty():Boolean
+		{
+			return empty(_list);
+		}
+
+		/**
+		 * Returns length of internal list.
+		 */
+		public function get length():int
+		{
+			return _list.length;
 		}

 		/**


Oops, FP.sort() updated with static modifier.

--- net/flashpunk/FP.as
+++ net/flashpunk/FP.as
@@ -478,7 +478,7 @@
 		 * @param	a		The array to shuffle.
 		 * @return	The provided array with elements shuffled.
 		 */
-		public function shuffle(a:Array):Array
+		public static function shuffle(a:Array):Array
 		{
 			var l:int = a.length,
 				b:Array = a.concat(),


Removed removeNulls() and added shuffle(), sort() and quicksort().

--- net/flashpunk/FP.as
+++ net/flashpunk/FP.as
@@ -469,34 +469,84 @@
 		}

 		/**
-		 * Removes all nulls from the array.
-		 * @param	a		The array to clean.
-		 * @return	The provided array with nulls removed.
-		 */
-		public static function removeNulls(a:Array):Array
-		{
-			var i:int = 0,
-				j:int = a.length;
-			while (i < j)
-			{
-				while (a[i] != null) i ++;
-				while (a[j] == null) j --;
-				a[i] = a[j];
-				a[j] = null;
-			}
-			a[j] = a[i];
-			a[i] = null;
-			a.length -= a.length - a.indexOf(null);
-			return a;
-		}
-
-		/**
 		 * Forces a garbage collector sweep.
 		 */
 		public static function cleanup():void
 		{
 			System.gc();
 			System.gc();
+		}
+
+		/**
+		 * Shuffles the elements in the array.
+		 * @param	a		The array to shuffle.
+		 * @return	The provided array with elements shuffled.
+		 */
+		public function shuffle(a:Array):Array
+		{
+			var l:int = a.length,
+				b:Array = a.concat(),
+				n:int = 0,
+				r:int;
+			a.length = 0;
+			while (l)
+			{
+				r = FP.rand(l --);
+				a[n ++] = b[r];
+				if (r < l) b[r] = b[l];
+			}
+			return a;
+		}
+
+		/**
+		 * Sorts the elements in the array.
+		 * @param	a			The array to sort.
+		 * @param	ascending	If it should be sorted ascending (true) or descending (false).
+		 * @return	The provided array with elements sorted.
+		 */
+		public static function sort(a:Array, ascending:Boolean = true):Array
+		{
+			quicksort(a, 0, a.length - 1, ascending);
+			return a;
+		}
+
+		/** @private Quicksorts the array ascending. */
+		private static function quicksort(a:Array, left:int, right:int, ascending:Boolean):void
+		{
+			var i:int = left,
+				j:int = right,
+				p:Number = a[Math.round((left + right) * .5)],
+				t:Number;
+			if (ascending)
+			{
+				while (i <= j)
+				{
+					while (a[i] < p) i ++;
+					while (a[j] > p) j --;
+					if (i <= j)
+					{
+						t = a[i];
+						a[i ++] = a[j];
+						a[j --] = t;
+					}
+				}
+			}
+			else
+			{
+				while (i <= j)
+				{
+					while (a[i] > p) i ++;
+					while (a[j] < p) j --;
+					if (i <= j)
+					{
+						t = a[i];
+						a[i ++] = a[j];
+						a[j --] = t;
+					}
+				}
+			}
+			if (left < j) quicksort(a, left, j, ascending);
+			if (i < right) quicksort(a, i, right, ascending);
 		}

 		// World information


Transferred from the Adobe Open Source Subversion Repository

Revision: 10464
Author:   rfrishbe@adobe.com
Date:     2009-09-21T17:40:30.663638Z

Log Message:
-----------
Removing support in Flex framework for compatibility version < 3.  We won't support compatibility-version 2 or 2.01 anymore.  We only keep compatibility-version for one full release, so for Flex 4, we only support compatibility-version = 3.x.

This should reduce our code-size some as we no longer need this old code.  I didn't clean up the compiler's support for compatibility-versioning as it didn't seem worth the effort.

QE notes: -
Doc notes: -
Bugs: SDK-15360
Reviewer: Kevin
Tests run: checkintests, Joan ran all mustella tests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.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/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.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/styles/StyleProxy.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/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.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/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserYearArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</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/controls/menuClasses/MenuBarItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PanelSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.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/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.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/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/controls/Label.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/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/Flex.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>

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

--- frameworks/projects/mx/src/mx/controls/Label.as
+++ frameworks/projects/mx/src/mx/controls/Label.as
@@ -22,7 +22,6 @@
 import mx.controls.listClasses.BaseListData;
 import mx.controls.listClasses.IDropInListItemRenderer;
 import mx.controls.listClasses.IListItemRenderer;
-import mx.core.FlexVersion;
 import mx.core.IDataRenderer;
 import mx.core.IFlexModuleFactory;
 import mx.core.IFontContextComponent;
@@ -397,29 +396,6 @@
      */
     override public function get baselinePosition():Number
     {
-        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
-        {
-            if (!textField)
-                return NaN;
-
-            // Ensure that textField.y is accurate.
-            validateNow();
-
-            var t:String = isHTML ? explicitHTMLText : text;
-
-            if (t == "")
-                t = " ";
-
-            // Measure the width and height of the text to be displayed.
-            // (This uses another TextField that isn't part of the
-            // DisplayObject hierarchy.)
-            var lineMetrics:TextLineMetrics = isHTML ?
-                                              measureHTMLText(t) :
-                                              measureText(t);
-
-            return textField.y + lineMetrics.ascent;
-        }
-
         if (!validateBaselinePosition())
             return NaN;


Transferred from the Adobe Open Source Subversion Repository

Revision: 11795
Author:   dloverin@adobe.com
Date:     2009-11-13T21:52:56.367021Z

Log Message:
-----------
Reduce size of hello world spark application.

Removed Module from StyleProtoChain to save 22k in a spark “hello world” application. Module also dragged in LayoutContainer, Container, and other mx classes that would not normally be in a spark application. Replaced Module with a new interface, IModule.

QE notes: None.
Doc notes: None.
Bugs: SDK-24164
Reviewer: Alex
Tests run: checkintests
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/Module.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/IModule.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>

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

--- frameworks/projects/mx/src/mx/modules/Module.as
+++ frameworks/projects/mx/src/mx/modules/Module.as
@@ -51,7 +51,7 @@
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-public class Module extends LayoutContainer
+public class Module extends LayoutContainer implements IModule
 {
     include "../core/Version.as";


- bugfix: re-enabled CSS selector matching for CSS declarations ending in '*'.

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

--- src/reprise/css/CSSDeclarationList.as
+++ src/reprise/css/CSSDeclarationList.as
@@ -25,7 +25,8 @@
 		protected var m_items : Array;
 		protected var m_declarationIndex : Number = 0;
 		protected var m_declarationCache : Array;
-		protected var m_selectorHeadParts : Object = {};
+		protected var m_selectorHeadParts : Object = {};
+		protected var m_starSelectors : Array = [];

 		/***************************************************************************
@@ -51,6 +52,11 @@
 				{
 					continue;
 				}
+				if (part == '*')
+				{
+					m_starSelectors.push(item);
+					continue;
+				}
 				if (!m_selectorHeadParts[part])
 				{
 					m_selectorHeadParts[part] = [];
@@ -71,13 +77,11 @@

 			var matches : Array = [];
 			var checks : Dictionary = new Dictionary(true);
-			var i : int = m_items.length;
 			var item : CSSDeclarationListItem;
 	 		decl = new CSSDeclaration();
 	 		var endParts : Array = sp.split(' ').pop().split('@');

-			i = endParts.length;
-			while (i--)
+			for (var i : int = endParts.length; i--;)
 			{
 				var items : Array = m_selectorHeadParts[endParts[i]];
 				if (!items)
@@ -94,6 +98,18 @@
 						{
 							matches.push(item);
 						}
+					}
+				}
+			}
+			for (j = m_starSelectors.length; j--;)
+			{
+				item = m_starSelectors[j];
+				if (item && !checks[item])
+				{
+					checks[item] = true;
+					if (item.matchesSubjectPath(sp))
+					{
+						matches.push(item);
 					}
 				}
 			}


Enhanced "attach://"-protocol support in ImageResource to support MovieClipController-managing of attached MovieClips and to support attach from classes that are contained in packages other than the root package.

--- src/reprise/external/ImageResource.as
+++ src/reprise/external/ImageResource.as
@@ -13,13 +13,14 @@
 	import flash.events.Event;
 	import flash.events.HTTPStatusEvent;
 	import flash.events.IOErrorEvent;
-	import flash.events.ProgressEvent;
 	import flash.events.TimerEvent;
 	import flash.system.ApplicationDomain;
 	import flash.system.LoaderContext;
 	import flash.system.Security;
+	import flash.utils.ByteArray;
 	import flash.utils.Timer;
 	import flash.utils.getDefinitionByName;
+	import flash.utils.getQualifiedClassName;

 	public class ImageResource extends AbstractResource
 	{
@@ -99,39 +100,88 @@
 		***************************************************************************/
 		protected override function doLoad() : void
 		{
+			var useByteloader : Boolean;
+			var assetBytes : ByteArray;
 			// asset from library
 			if (m_url.indexOf('attach://') == 0)
 			{
-				var symbolId:String = m_url.split('//')[1];
+				//remove protocol
+				var symbolId:String = m_url.substr(9);
 				m_attachMode = true;
+
+				//get FQCN name of assets class that contains the requested symbol
+				var pieces:Array = symbolId.split('/');
+				var className : String = pieces.shift();
 	            try
 	            {
-					var pieces:Array = symbolId.split('.');
-					symbolId = pieces[0];
-	                var symbolClass : Class = getDefinitionByName(symbolId) as Class;
-					for (var i:int = 1; i < pieces.length; i++)
+	                var symbol : Object = getDefinitionByName(className);
+	            }
+				catch (e : Error)
+				{
+					log('w Unable to use attach:// procotol. Symbol ' + symbolId + ' not found or not of type Class');
+					onData(false);
+	            }
+
+				//iterate over remaining path parts, getting nested symbols from the assets class
+				for (var i:int = 0; i < pieces.length; i++)
+				{
+					symbol = symbol[pieces[i]];
+					if (!symbol)
 					{
-						symbolClass = symbolClass[pieces[i]];
+						log('w Unable to use attach:// procotol! Static property ' + pieces.join('/') +
+								' not found on Class ' + className);
+						onData(false);
+						return;
 					}
-					m_resource = new symbolClass() as DisplayObject;
+				}
+				if (!(symbol is Class))
+				{
+					log('w Unable to use attach:// procotol. Static property ' + pieces.join('/') +
+							' on Class ' + className + ' is not of type Class.');
+					onData(false);
+					return;
+				}
+
+				var resource : Object = new (symbol as Class)();
+
+				if (resource is ByteArray)
+				{
+					useByteloader = true;
+					assetBytes = ByteArray(resource);
+				}
+				else if (resource.hasOwnProperty('bytes'))
+				{
+					useByteloader = true;
+					assetBytes = resource['bytes'];
+				}
+				else if (resource is DisplayObject)
+				{
+					m_resource = DisplayObject(resource);
 					m_httpStatus = new HTTPStatus(200, m_url);
 					onData(true);
-	            }
-				catch (e : Error)
-				{
-					log('w Unable to use attach:// procotol! Symbol ' + symbolId + ' not found!');
+					return;
+				}
+				else
+				{
+					var fqcn : String = getQualifiedClassName(symbol);
+					log('w Unable to use attach:// procotol. Static property ' + pieces.join('/') + ' on Class ' +
+							className + ' has type ' + fqcn + ', which is not supported by ImageResource');
 					onData(false);
-	            }
+					return;
+				}
+			}
+
+			var context : LoaderContext = new LoaderContext(m_checkPolicyFile, ApplicationDomain.currentDomain);
+			m_loader = new Loader();
+			m_loader.contentLoaderInfo.addEventListener(Event.INIT, loader_init);
+			if (useByteloader)
+			{
+				m_loader.loadBytes(assetBytes, context);
 				return;
 			}
-
-			m_loader = new Loader();
 			m_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_complete);
-			m_loader.contentLoaderInfo.addEventListener(
-				HTTPStatusEvent.HTTP_STATUS, loader_httpStatus);
-			m_loader.contentLoaderInfo.addEventListener(Event.INIT, loader_init);
+			m_loader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, loader_httpStatus);
 			m_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loader_error);
-			var context : LoaderContext = new LoaderContext(m_checkPolicyFile, ApplicationDomain.currentDomain);
 			m_loader.load(m_request, context);
 		}


Make use of Plain conditional on no other mechanisms being found... really I think this should be deleted, but I need to investigate that

--- src/org/jivesoftware/xiff/core/XMPPBOSHConnection.as
+++ src/org/jivesoftware/xiff/core/XMPPBOSHConnection.as
@@ -326,7 +326,8 @@
 	//            auth = new XMPP.SASLAuth.Anonymous();
 	 //       }
 	 //       else {
-	        auth = new Plain(username, password, server);
+	 		if(!auth)
+	        	auth = new Plain(username, password, server);
 	  //      }

 	        authHandler = handleAuthentication;


Transferred from the Adobe Open Source Subversion Repository

Revision: 10704
Author:   aharui@adobe.com
Date:     2009-09-30T00:09:12.076378Z

Log Message:
-----------
Fix buttonbar measurement

QE Notes: Lots of bitmaps need updating
Doc Notes: New controlBarVisible property
Bugs: SDK-23639
Reviewer: Evtim
API Change: Yes
Is noteworthy for integration: No
tests: checkintests mustella/gumbo/components/ButtonBar

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as
@@ -134,6 +134,9 @@
         if (!layoutTarget)
             return;

+        var elementCount:int = 0;
+        var gap:Number = this.gap;
+
         var width:Number = 0;
         var height:Number = 0;

@@ -145,9 +148,13 @@
                 continue;

             width += layoutElement.getPreferredBoundsWidth();
+            elementCount++;
             height = Math.max(height, layoutElement.getPreferredBoundsHeight());

         }
+
+        if (elementCount > 1)
+            width += gap * (elementCount - 1);

         layoutTarget.measuredWidth = width;
         layoutTarget.measuredHeight = height;


fix wrong update of the reference to the previous pass in case it got dismissed realy because it's not enabled

--- src/aerys/minko/scene/controller/scene/RenderingController.as
+++ src/aerys/minko/scene/controller/scene/RenderingController.as
@@ -236,15 +236,15 @@
 			var numTriangles	: uint 				= 0;

 			var sortValues 		: Vector.<Number> 	= TMP_NUMBERS;
-			var i				: uint				= 0;
+			var passId			: uint				= 0;

 			context.enableErrorChecking = (Minko.debugLevel & DebugLevel.CONTEXT) != 0;
-
+
 			// sort passes
 			if (!_passesAreSorted && numPasses > 1)
 			{
-				for (i = 0; i < numPasses; ++i)
-					sortValues[i] = -(_passes[i] as ShaderInstance).settings.priority;
+				for (passId = 0; passId < numPasses; ++passId)
+					sortValues[passId] = -(_passes[passId] as ShaderInstance).settings.priority;

 				Sort.flashSort(sortValues, _passes, numPasses);
 				_passesAreSorted = true;
@@ -258,9 +258,9 @@
 			var passes			: Array				= _passes.concat();
 			var clearedTargets	: Dictionary		= new Dictionary(true);

-			for (i = 0; i < numPasses; ++i)
-			{
-				var pass			: ShaderInstance	= passes[i];
+			for (passId = 0; passId < numPasses; ++passId)
+			{
+				var pass			: ShaderInstance	= passes[passId];
 				var calls 			: Array				= _passInstanceToDrawCalls[pass];
 				var settings		: ShaderSettings	= pass.settings;
 				var renderTarget 	: RenderTarget 		= settings.renderTarget || backBuffer;
@@ -274,7 +274,10 @@
 				clearedTargets[renderTarget] = true;

 				if (!pass.settings.enabled || !pass.shader.enabled || !calls)
+                {
+                    previous = pass;
 					continue;
+                }

 				++_numEnabledPasses;

@@ -287,8 +290,8 @@
 				// sort draw calls if necessary
 				if (pass.settings.depthSortDrawCalls)
 				{
-					for (var k : uint = 0; k < numCalls; ++k)
-						sortValues[k] = -(calls[k] as DrawCall).depth;
+					for (var drawCallId : uint = 0; drawCallId < numCalls; ++drawCallId)
+						sortValues[drawCallId] = -(calls[drawCallId] as DrawCall).depth;

 					Sort.flashSort(sortValues, calls, numCalls);
 				}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 5545
Author:   jimurphy@adobe.com
Date:     2009-03-25T19:00:52.330680Z

Log Message:
-----------
1st pass of rename according to the spec http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix

Flex now requires CSS Style declarations to declare @namespace rules and disambiguate between halo and spark components using CSS 3 namespace prefixes on type selectors. At compile time, this namespace information will be used to map type names to qualified ActionScript class names. At runtime, type selectors are matched on qualified ActionScript class name (for example mx.controls.Button rather than just Button). Flex 3 applications must be compiled with -compatibility-version=3.0.0 to get unqualified CSS type selector behavior.

QE: Yes, this build may help in updating test cases to use the new namespaces and class names.
Dev: Not yet
Doc: Not yet

Modified Paths:
--------------
748 paths were modified

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

--- frameworks/projects/spark/src/spark/components/HSlider.as
+++ frameworks/projects/spark/src/spark/components/HSlider.as
@@ -9,30 +9,30 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package mx.components
+package spark.components
 {

 import flash.display.DisplayObject;
 import flash.geom.Point;
 import flash.geom.Rectangle;

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

-[IconFile("FxHSlider.png")]
+[IconFile("HSlider.png")]

 /**
- *  The FxHSlider class defines a horizontal slider component.
+ *  The HSlider class defines a horizontal slider component.
  *
- *  @includeExample examples/FxHSliderExample.mxml
+ *  @includeExample examples/HSliderExample.mxml
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class FxHSlider extends FxSlider
+public class HSlider extends Slider
 {
     include "../core/Version.as";

@@ -50,7 +50,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function FxHSlider()
+    public function HSlider()
     {
         super();
     }
@@ -123,7 +123,7 @@
     }

     /**
-     *  Return the position of the thumb button on a FxHSlider component.
+     *  Return the position of the thumb button on a HSlider component.
      *  The position of the thumb on an HSlider is equal to the
      *  given localX parameter.
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 7862
Author:   jszeto@adobe.com
Date:     2009-06-15T22:06:23.250745Z

Log Message:
-----------
GraphicElement PARB Changes

mx.core.AdvancedLayoutFeatures
•	Rename layer -> depth
•	Rename offsets -> postLayoutTransformOffsets

mx.core.IVisualElement
•	Rename layer -> depth

mx.core.UIComponent
•	Rename offsets -> postLayoutTransformOffsets
•	Rename layer -> depth

mx.graphics.GradientBase
•	Remove scaleX

mx.graphics.GradientStroke
•	Add apply(g:Graphics, bounds:Rectangle)

mx.graphics.IStroke
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.graphics.LinearGradient
•	Add scaleX

mx.graphics.LinearGradientStroke
•	Add scaleX
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.graphics.RadialGradient
•	Add scaleX

mx.graphics.RadialGradientStroke
•	Add scaleX
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.graphics.SolidColorStroke
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.flash.UIMovieClip
•	Rename offsets -> postLayoutTransformOffsets
•	Rename layer -> depth

spark.components.PopUpAnchor
•	Change popUp type from UIComponent -> IFlexDisplayObject
•	Rename positionPopUp -> calculatePopUpPosition
•	Rename autoSizePopUpWidth -> popUpWidthMatchesAnchorWidth
•	Rename autoSizePopUpHeight -> popUpHeightMatchesAnchorHeight

spark.core.RelativePosition
•	Rename and move spark.core.RelativePosition -> spark.components.PopUpPosition
•	Rename EXACT -> TOP_LEFT (topLeft)

spark.core.SpriteVisualElement
•	Rename layer -> depth
•	Remove computeMatrix

spark.primitives.BitmapImage
•	Change _NORMAL_UINT from protected -> private
•	Change _REPEAT_UINT from protected -> private
•	Change _SCALE_UINT from protected -> private
•	Change resizeModeToUINT from protected -> private
•	Rename drawElement -> draw

spark.primitives.Line
•	Rename skipMeasure -> canSkipMeasurement
•	Rename drawElement -> draw

spark.primitives.Path
•	Change graphicsPath fro protected -> mx_internal
•	Rename skipMeasure -> canSkipMeasurement
•	Rename drawElement -> draw
•	Rename renderGraphicsAtScale -> generateGraphicsPath
•	Change generateGraphicsPath from protected -> mx_internal
•	Rename notifyElementLayerChanged -> invalidateDisplayObjectSharing

spark.primitives.Rect
•	Rename drawElement -> draw

spark.primitives.supportClasses.GraphicElement
•	Rename layer -> depth
•	Rename offsets -> postLayoutTransformOffsets
•	Rename getBitmapData -> captureBitmapData
•	Rename notifyElementLayerChanged -> invalidateDisplayObjectSharing
•	Rename skipMeasure -> canSkipMeasurement
•	Add protected hasComplexLayoutMatrix:Boolean getter
•	Remove target
•	Remove computeMatrix
•	Change DEFAULT_MAX_WIDTH from public -> private
•	Change DEFAULT_MAX_HEIGHT from public -> private
•	Change DEFAULT_MIN_WIDTH from public -> private
•	Change DEFAULT_MIN_HEIGHT from public -> private
•	Change allocateLayoutFeatures from protected -> mx_internal
•	Change invalidateTransform from protected -> private
•	Change captureBitmapData from public -> mx_internal
•	Change applyMaskType from protected -> mx_internal
•	Change dispatchPropertyChangeEvent from protected -> private
•	Change applyComputedTransform from protected -> mx_internal
•	Change filterChangedHandler from protected -> private

spark.supportClasses.StrokedElement
•	Rename drawElement -> draw
•	Remove getStroke()
•	Add getStrokeExtents() override

QE Notes: None
Doc Notes: None
Bugs: N/A
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/TransformOffsets.as</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/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/primitives/Line.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="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/FilledElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBar.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="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/Ellipse.as
+++ frameworks/projects/spark/src/spark/primitives/Ellipse.as
@@ -12,13 +12,16 @@
 package spark.primitives
 {

-import flash.events.EventDispatcher;
 import flash.display.Graphics;
-import flash.geom.Rectangle;
+import flash.geom.Matrix;
 import flash.geom.Point;
-import flash.geom.Matrix;
+
+import mx.core.mx_internal;
 import mx.utils.MatrixUtil;
+
 import spark.primitives.supportClasses.FilledElement;
+
+use namespace mx_internal;

 /**
  *  The Ellipse class is a filled graphic element that draws an ellipse.
@@ -77,7 +80,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    override protected function drawElement(g:Graphics):void
+    override protected function draw(g:Graphics):void
     {
         g.drawEllipse(drawX, drawY, width, height);
     }
@@ -89,12 +92,9 @@
                                                         height:Number,
                                                         postLayoutTransform:Boolean = true):Number
     {
-        if (postLayoutTransform)
-        {
-            var m:Matrix = computeMatrix();
-            if (m)
-                width = MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2, m).width;
-        }
+        if (postLayoutTransform && hasComplexLayoutMatrix)
+        	width = MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2,
+        											 layoutFeatures.layoutMatrix).width;

         // Take stroke into account
         return width + getStrokeExtents().x;
@@ -107,12 +107,9 @@
                                                          height:Number,
                                                          postLayoutTransform:Boolean = true):Number
     {
-        if (postLayoutTransform)
-        {
-            var m:Matrix = computeMatrix();
-            if (m)
-                height = MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2, m).height;
-        }
+        if (postLayoutTransform && hasComplexLayoutMatrix)
+			height = MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2,
+													  layoutFeatures.layoutMatrix).height;

         // Take stroke into account
         return height + getStrokeExtents().y;
@@ -129,7 +126,7 @@
     override public function getBoundsXAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
     {
         var strokeExtents:Point = getStrokeExtents(postLayoutTransform);
-        var m:Matrix = postLayoutTransform ? computeMatrix() : null;
+        var m:Matrix = getComplexMatrix(postLayoutTransform);
         if (!m)
             return strokeExtents.x * -0.5 + this.x;

@@ -162,7 +159,7 @@
     override public function getBoundsYAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
     {
         var strokeExtents:Point = getStrokeExtents(postLayoutTransform);
-        var m:Matrix = postLayoutTransform ? computeMatrix() : null;
+        var m:Matrix = getComplexMatrix(postLayoutTransform);
         if (!m)
             return strokeExtents.y * -0.5 + this.y;

@@ -191,12 +188,9 @@
     {
         var stroke:Number = -getStrokeExtents(postLayoutTransform).x * 0.5;

-        if (postLayoutTransform)
-        {
-            var m:Matrix = computeMatrix();
-            if (m)
-                return stroke + MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2, m).x;
-        }
+        if (postLayoutTransform && hasComplexLayoutMatrix)
+            return stroke + MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2,
+            												 layoutFeatures.layoutMatrix).x;

         return stroke + this.x;
     }
@@ -208,12 +202,9 @@
     {
         var stroke:Number = - getStrokeExtents(postLayoutTransform).y * 0.5;

-        if (postLayoutTransform)
-        {
-            var m:Matrix = computeMatrix();
-            if (m)
-                return stroke + MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2, m).y;
-        }
+        if (postLayoutTransform && hasComplexLayoutMatrix)
+                return stroke + MatrixUtil.getEllipseBoundingBox(width / 2, height / 2, width / 2, height / 2,
+                												 layoutFeatures.layoutMatrix).y;

         return stroke + this.y;
     }