Transferred from the Adobe Open Source Subversion Repository

Revision: 15679
Author:   chaase@adobe.com
Date:     2010-04-23T23:33:44.107719Z

Log Message:
-----------
Made layout constraint animation actually work. Animating constraints (left, right, etc.) with the Animate effect worked previously, but only if the animation values were explicitly specified or, in a transition, if both states had valid values for the constraint. But if you attempted to run a transition animating "left" where the constraint was cleared in either state, the animation would fail.
The fix checks for invalid values in the states and, when they occur, animates other related properties instead, or in addition. For example, an animation on "left" may turn into an animation on "x".

QE notes: None (added new checkintest AnimateConstraintsTest; might be interesting to see for further Mustella test development)
Doc notes: None
Bugs: None
Reviewer: Jason
Tests run: checkintests (with new test), Mustella spark/effects
Is noteworthy for integration: Yes. Downstream teams asked for this functionality.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Resize.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/AnimateConstraintsTestScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/views/AnimateConstraintsTests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests-config.xml</path>

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

--- frameworks/projects/spark/src/spark/effects/Resize.as
+++ frameworks/projects/spark/src/spark/effects/Resize.as
@@ -281,62 +281,6 @@
         }
         return propertyChanges;
     }
-
-    /**
-     * @private
-     * When we're done, check to see whether explicitWidth/Height values
-     * for the target were NaN in the start state. If so, we should restore
-     * them to that value. This ensures that the target will be sized by
-     * its layout manager instead of by the width/height that we set during
-     * the Resize.
-     */
-    override mx_internal function applyEndValues(propChanges:Array,
-        targets:Array):void
-    {
-        super.applyEndValues(propChanges, targets);
-        // Special case for Resize - since we use width/height during the effect,
-        // we may have clobbered the explicitWidth/Height values which otherwise
-        // would not have been set. We need to restore these values plus any
-        // associated layout constraint values (percentWidth/Height)
-        // Note that this approach assumes that stripUnchangedValues on propChanges
-        // is false (which should be the case for Resize targets), otherwise
-        // unchanging explicit values would not be in propChanges and we would
-        // not restore them correctly.
-        if (propChanges)
-        {
-            var n:int = propChanges.length;
-            for (var i:int = 0; i < n; i++)
-            {
-                var target:Object = propChanges[i].target;
-                if (propChanges[i].end["explicitWidth"] !== undefined)
-                {
-                    if (isNaN(propChanges[i].end["explicitWidth"]) &&
-                        "explicitWidth" in target)
-                    {
-                        target.explicitWidth = NaN;
-                        if (propChanges[i].end["percentWidth"] !== undefined &&
-                            "percentWidth" in target)
-                        {
-                            target.percentWidth = propChanges[i].end["percentWidth"];
-                        }
-                    }
-                }
-                if (propChanges[i].end["explicitHeight"] !== undefined)
-                {
-                    if (isNaN(propChanges[i].end["explicitHeight"]) &&
-                        "explicitHeight" in target)
-                    {
-                        target.explicitHeight = NaN;
-                        if (propChanges[i].end["percentHeight"] !== undefined &&
-                            "percentHeight" in target)
-                        {
-                            target.percentHeight = propChanges[i].end["percentHeight"];
-                        }
-                    }
-                }
-            }
-        }
-    }

 }
 }


Improved pipeline tut 4 info

Improved pipeline tut 4 info

--- src/Levels/Level.as
+++ src/Levels/Level.as
@@ -262,7 +262,7 @@
 											   [ConstIn, SlowAdder, Latch, LatchQ, DataWriter, DataReader, InstructionDecoder, InstructionDemux], [OpcodeValue.OP_SAVI, OpcodeValue.OP_ADDM]);
 			L_PTutorial4.modules = LevelLoader.loadSimple("Y2BgYGFgYNAFYj4FIMEKxLyMMJ46iMEEEpL8////PxCDAaKBA4j5AQ==").modules;
 			L_PTutorial4.info = "Much like " + L_PTutorial3.displayName + ", but with a tight time limit.";
-			L_PTutorial4.info += "\n\n"+L_PTutorial2.displayName + " showed how you can speed up a machine by splitting it into two similarly-slow stages;"
+			L_PTutorial4.info += "\n\n"+L_PTutorial2.displayName + " showed how you can speed up a machine by splitting it into two similarly-timed stages;"
 			L_PTutorial4.info += " you can expand this to three stages, or even more, though there's a small overhead with each added stage.";
 			L_PTutorial4.info += "\n\nGive it a go!";
 			L_PTutorial4.predecessors.push(L_PTutorial2, L_PTutorial3);


change loop count if chroma_format_idc = 3

--- src/com/axis/rtspclient/FLVMux.as
+++ src/com/axis/rtspclient/FLVMux.as
@@ -133,8 +133,9 @@
         var seq_scaling_matrix_present_flag:uint = sps.readBits(1);

         if (seq_scaling_matrix_present_flag) {
-          var i:uint  =0;
-          for (i = 0; i < 8; i++) {
+          var i:uint = 0;
+          var loopCount: uint = (3 === chroma_format_idc) ? 12 : 8;
+          for (i = 0; i < loopCount; i++) {
             var seq_scaling_list_present_flag:uint = sps.readBits(1);
             if (seq_scaling_list_present_flag) {
               var sizeOfScalingList:uint = (i < 6) ? 16 : 64;


Be nicely behaved if the user manages to close the client before the socket is opened
* Use _writer != null iff the socket is open and the authrequest has been sent
* Warn when posting messages prior to socket connect
* Clear the outgoing queue prior to sending the auth request, the servers authing connection expects this
* If a logoff is encountered prior to the socket opening, just shut down without sending auth request
* Driveby unused variable removal

This should fix the log warning "AuthingConnection$1: Received non-authreq message during authentication process"

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@5548 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/presents/client/Communicator.as
+++ src/as/com/threerings/presents/client/Communicator.as
@@ -62,10 +62,6 @@
         _outStream = new ObjectOutputStream(_outBuffer);
         _inStream = new ObjectInputStream();

-        // create our message writer
-        _writer = new Timer(1);
-        _writer.addEventListener(TimerEvent.TIMER, sendPendingMessages);
-
         _portIdx = 0;
         logonToPort();
     }
@@ -80,6 +76,9 @@

     public function postMessage (msg :UpstreamMessage) :void
     {
+        if (_writer == null) {
+            log.warning("Posting message prior to opening socket", "msg", msg);
+        }
         _outq.push(msg);
     }

@@ -114,7 +113,6 @@
         }

         var host :String = _client.getHostname();
-        var pportKey :String = host + ".preferred_port";
         var pport :int = ports[0];
         var ppidx :int = Math.max(0, ports.indexOf(pport));
         var port :int = (ports[(_portIdx + ppidx) % ports.length] as int);
@@ -276,12 +274,28 @@
     {
         logonToPort(true);

+        // check for a logoff message
+        for each (var message :UpstreamMessage in _outq) {
+            if (message is LogoffRequest) {
+                // don't bother authing, just bail
+                log.info("Logged off prior to socket opening, shutting down");
+                shutdown(null);
+                return;
+            }
+        }
+
+        // kick off our writer thread now that we know we're ready to write
+        _writer = new Timer(1);
+        _writer.addEventListener(TimerEvent.TIMER, sendPendingMessages);
+        _writer.start();
+
+        // clear the queue, the server doesn't like anything sent prior to auth
+        _outq.length = 0;
+
         // well that's great! let's logon
+        log.info("Posting auth request");
         postMessage(new AuthRequest(_client.getCredentials(), _client.getVersion(),
                                     _client.getBootGroups()));
-
-        // start up our writer thread now that we know we're ready to write
-        _writer.start();
     }

     /**


FIX FLEX-33861 Flex Incorrectly Scaling Down Application mutella test pass: tests/mobile/*

--- frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as
+++ frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as
@@ -19,9 +19,12 @@

 package mx.core
 {
+import flash.display.DisplayObject;
+import flash.display.Stage;
 import flash.system.Capabilities;

 import mx.core.mx_internal;
+import mx.managers.SystemManager;

 use namespace mx_internal;

@@ -47,6 +50,8 @@
  *
640 DPI	>=640 DPI

  *

  *

+ *
+ *
  *
  *
Subclasses of RuntimeDPIProvider should only depend on runtime APIs
  *  and should not depend on any classes specific to the Flex framework except
@@ -68,7 +73,7 @@
 {
     /**
      *  Constructor.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5
@@ -77,32 +82,62 @@
     public function RuntimeDPIProvider()
     {
     }
-
+
     /**
      *  Returns the runtime DPI of the current device by mapping its
      *  flash.system.Capabilities.screenDPI to one of several DPI
      *  values in mx.core.DPIClassification.
-     *
+     *
      *  A number of devices can have slightly different DPI values and Flex maps these
      *  into the several DPI classes.
-     *
+     *
      *  Flex uses this method to calculate the current DPI value when an Application
      *  authored for a specific DPI is adapted to the current one through scaling.
-     *
+     *
+     *
 Exceptions:

+     *

+     *
All non-retina iPads  receive 160 DPI

+     *
All retina iPads  receive 320 DPI

+     *

+     *
      *  @param dpi The DPI value.
      *  @return The corresponding DPIClassification value.
-     *
+     *                                                                               isI
      *  @see flash.system.Capabilities
      *  @see mx.core.DPIClassification
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
+
     public function get runtimeDPI():Number
     {
-        return classifyDPI(Capabilities.screenDPI);
+
+        var isIOS:Boolean = Capabilities.version.indexOf("IOS") == 0;
+        var screenDPI : Number= Capabilities.screenDPI;
+
+        if (isIOS) {
+
+            var root:DisplayObject = SystemManager.getSWFRoot(this);
+            if (root != null )  {
+                var stage:Stage = root.stage;
+                if (stage != null){
+                    var scX:Number = stage.fullScreenWidth;
+                    var scY:Number = stage.fullScreenHeight;
+                    /*  as of Dec 2013,  iPad (resp. iPad retina)   are the only iOS devices to have 1024 (resp. 2048) screen width or height
+                     cf http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density#Apple
+                     * */
+                    if ((scX == 2048 || scY == 2048))
+                        return DPIClassification.DPI_320;
+                    else if (scX == 1024 || scY == 1024)
+                        return DPIClassification.DPI_160;
+                }
+            }
+        }
+        return classifyDPI(screenDPI);
+
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 4516
Author:   gosmith@adobe.com
Date:     2009-01-13T23:23:14.594709Z

Log Message:
-----------
Accessibility changes to Panel and TitleWindow, as requested by Freedom Scientific.

These components now report their accessibility role as "grouping" rather than "window". Their accessibility name is now simply their title. They no longer report any child items. Their accessibility location is the bounding rect of the entire Panel or TitleWindow.

The AccessibilityImplementation continues to be attached to the titleBar, not to the Panel/TitleWindow, because the Flash Player ignores Sprites with an AccessibilityImplementation that are inside other Sprites with an AccessibilityImplementation. (The Flash accessibility model is flat, not hierarchical, and "child IDs" are only used for things like list items, not for controls in titled container.)

So although in the display hierarchy the Panel is a parent of its content controls, in the MSAA model it appears as their preceding sibling. JAWS will look at the "grouping" role and understand that because the bounding rect of the grouping includes some of its following siblings, they are "inside". (I don't know what this means in terms of what JAWS will actually speak.)

Also, the AccImpl class now implements getChildIDArray() to return an empty array, so that by default all components have 0 child items (rather than reporting an error).

Finally, subclasses with child items now compute how many they have and then call a new AccImpl utility method, createChildIDArray(), to create an Array that looks like [ 1, 2, 3, 4, 5 ].

QE Notes: None
Doc Notes: None
Bugs: SDK-12390, SDK-16340
Reviewer: Deepa

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.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/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TitleWindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>

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

--- frameworks/projects/mx/src/mx/accessibility/ComboBaseAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/ComboBaseAccImpl.as
@@ -209,18 +209,11 @@
 	 */
 	override public function getChildIDArray():Array
 	{
-		var childIDs:Array = [];
-
-		if (ComboBase(master).dataProvider)
-		{
-			var n:int = ComboBase(master).dataProvider.length;
-			for (var i:int = 0; i < n; i++)
-			{
-				childIDs[i] = i + 1;
-			}
-		}
-
-		return childIDs;
+		var n:int = ComboBase(master).dataProvider ?
+					ComboBase(master).dataProvider.length :
+					0;
+
+		return createChildIDArray(n);
 	}

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/skins/halo/AccordionHeaderSkin.as
+++ frameworks/projects/mx/src/mx/skins/halo/AccordionHeaderSkin.as
@@ -0,0 +1,346 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.skins.halo
+{
+
+import flash.display.GradientType;
+import mx.core.EdgeMetrics;
+import mx.core.FlexVersion;
+import mx.skins.Border;
+import mx.styles.StyleManager;
+import mx.utils.ColorUtil;
+
+/**
+ *  The skin for all the states of an AccordionHeader in an Accordion.
+ */
+public class AccordionHeaderSkin extends Border
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static var cache:Object = {};
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Several colors used for drawing are calculated from the base colors
+	 *  of the component (themeColor, borderColor and fillColors).
+	 *  Since these calculations can be a bit expensive,
+	 *  we calculate once per color set and cache the results.
+	 */
+	private static function calcDerivedStyles(themeColor:uint,
+											  borderColor:uint,
+											  falseFillColor0:uint,
+											  falseFillColor1:uint,
+											  fillColor0:uint,
+											  fillColor1:uint):Object
+	{
+		var key:String = HaloColors.getCacheKey(themeColor, borderColor,
+												falseFillColor0,
+												falseFillColor1,
+												fillColor0, fillColor1);
+
+		if (!cache[key])
+		{
+			var o:Object = cache[key] = {};
+
+			// Cross-component styles.
+			HaloColors.addHaloColors(o, themeColor, fillColor0, fillColor1);
+
+		}
+
+		return cache[key];
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function AccordionHeaderSkin()
+	{
+		super();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  borderMetrics
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the borderMetrics property.
+	 */
+	private var _borderMetrics:EdgeMetrics = new EdgeMetrics(1, 1, 1, 1);
+
+	/**
+	 *  @private
+	 */
+	override public function get borderMetrics():EdgeMetrics
+	{
+		return FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0 ? _borderMetrics : super.borderMetrics;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  measuredWidth
+	//----------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function get measuredWidth():Number
+	{
+		return 10;
+	}
+
+	//----------------------------------
+	//  measuredHeight
+	//----------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function get measuredHeight():Number
+	{
+		return 22;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override protected function updateDisplayList(w:Number, h:Number):void
+	{
+		super.updateDisplayList(w, h);
+
+		// User-defined styles.
+		var borderColor:uint = getStyle("borderColor");
+		var fillAlphas:Array = getStyle("fillAlphas");
+		var fillColors:Array = getStyle("fillColors");
+		StyleManager.getColorNames(fillColors);
+		var highlightAlphas:Array = getStyle("highlightAlphas");
+		var selectedFillColors:Array = getStyle("selectedFillColors");
+		var themeColor:uint = getStyle("themeColor");
+
+		// Placehold styles stub.
+		var falseFillColors:Array /* of Color */ = []; // added style prop
+		falseFillColors[0] = ColorUtil.adjustBrightness2(fillColors[0], -8);
+		falseFillColors[1] = ColorUtil.adjustBrightness2(fillColors[1], -10);
+
+		var borderColorDrk1:Number =
+			ColorUtil.adjustBrightness2(borderColor, -15);
+
+		var overFillColor1:Number =
+				ColorUtil.adjustBrightness2(fillColors[0], -4);
+		var overFillColor2:Number =
+				ColorUtil.adjustBrightness2(fillColors[1], -6);
+
+		if (!selectedFillColors)
+		{
+			selectedFillColors = []; // So we don't clobber the original...
+			selectedFillColors[0] =
+				ColorUtil.adjustBrightness2(fillColors[0], 5);
+			selectedFillColors[1] =
+				ColorUtil.adjustBrightness2(fillColors[1], 15);
+		}
+
+		// Derivative styles.
+		var derStyles:Object = calcDerivedStyles(themeColor, borderColor,
+												 falseFillColors[0],
+												 falseFillColors[1],
+												 fillColors[0], fillColors[1]);
+
+		graphics.clear();
+
+		switch (name)
+		{
+			case "upSkin":
+			case "disabledSkin":
+			case "selectedDisabledSkin":
+			{
+   				var upFillColors:Array =
+					[ falseFillColors[0], falseFillColors[1] ];
+   				var upFillAlphas:Array = [ fillAlphas[0], fillAlphas[1] ];
+
+				// edge
+				drawRoundRect(
+					0, 0, w, h, 0,
+					[ borderColor, borderColorDrk1 ], 1,
+					verticalGradientMatrix(0, 0, w, h),
+					GradientType.LINEAR, null,
+                    { x: 1, y: 1, w: w - 2, h: h - 2, r: 0 });
+
+				// fill
+				drawRoundRect(
+					1, 1,w - 2, h - 2, 0,
+					upFillColors, upFillAlphas,
+					verticalGradientMatrix(1, 1, w - 2, h - 2));
+
+				// top highlight
+				drawRoundRect(
+					1, 1, w - 2, (h - 2) / 2, 0,
+					[ 0xFFFFFF, 0xFFFFFF ], highlightAlphas,
+					verticalGradientMatrix(1, 1, w - 2, (h - 2) / 2));
+
+				// bottom edge bevel shadow
+				drawRoundRect(
+					1, h - 2, w - 2, 1, 0,
+					borderColor, 0.1);
+
+				break;
+			}
+
+			case "overSkin":
+			{
+				var overFillColors:Array;
+				if (fillColors.length > 2)
+				{
+					overFillColors =
+					[
+						ColorUtil.adjustBrightness2(fillColors[2], -4),
+						ColorUtil.adjustBrightness2(fillColors[3], -6)
+					];
+				}
+				else
+				{
+					overFillColors = [ overFillColor1, overFillColor2 ];
+				}
+
+				var overFillAlphas:Array;
+				if (fillAlphas.length > 2)
+					overFillAlphas = [ fillAlphas[2], fillAlphas[3] ];
+  				else
+					overFillAlphas = [ fillAlphas[0], fillAlphas[1] ];
+
+				// edge
+				drawRoundRect(
+					0, 0, w, h, 0,
+					[ themeColor, derStyles.themeColDrk1 ], 1,
+					verticalGradientMatrix(0, 0, w, h),
+					GradientType.LINEAR, null,
+					{ x: 1, y: 1, w: w - 2, h: h - 2, r: 0 });
+
+				// fill
+				drawRoundRect(
+					1, 1, w - 2, h - 2, 0,
+					overFillColors, overFillAlphas,
+					verticalGradientMatrix(1, 1, w - 2, h - 2));
+
+				// top highlight
+				drawRoundRect(
+					1, 1, w - 2, (h - 2) / 2, 0,
+					[ 0xFFFFFF, 0xFFFFFF ], highlightAlphas,
+					verticalGradientMatrix(1, 1, w - 2, (h - 2) / 2));
+
+				// bottom edge bevel shadow
+				drawRoundRect(
+					1, h - 2, w - 2, 1, 0,
+					borderColor, 0.1);
+
+				break;
+			}
+
+			case "downSkin":
+			{
+				// edge
+				drawRoundRect(
+					0, 0, w, h, 0,
+					[ themeColor, derStyles.themeColDrk1 ], 1,
+					verticalGradientMatrix(0, 0, w, h));
+
+				// fill
+				drawRoundRect(
+					1, 1, w - 2, h - 2, 0,
+					[ derStyles.fillColorPress1, derStyles.fillColorPress2 ], 1,
+					verticalGradientMatrix(1, 1, w - 2, h - 2));
+
+				// top highlight
+				drawRoundRect(
+					1, 1, w - 2, (h - 2) / 2, 0,
+					[ 0xFFFFFF, 0xFFFFFF ], highlightAlphas,
+					verticalGradientMatrix(1, 1, w - 2, (h - 2) / 2));
+
+				break;
+			}
+
+			case "selectedUpSkin":
+			case "selectedOverSkin":
+			case "selectedDownSkin":
+			{
+   				var selectedFillAlphas:Array = [ fillAlphas[0], fillAlphas[1] ];
+
+				// edge
+				drawRoundRect(
+					0, 0, w, h, 0,
+					[ borderColor, borderColorDrk1 ], 1,
+					verticalGradientMatrix(0, 0, w, h),
+					GradientType.LINEAR, null,
+                    { x: 1, y: 1, w: w - 2, h: h - 2, r: 0 })
+
+				// fill
+				drawRoundRect(
+					1, 1, w - 2, h - 2, 0,
+					[ selectedFillColors[0],
+					  selectedFillColors[1] ], selectedFillAlphas,
+					verticalGradientMatrix(1, 1, w - 2, h - 2));
+
+				// top highlight
+				drawRoundRect(
+					1, 1, w - 2, (h - 2) / 2, 0,
+					[ 0xFFFFFF, 0xFFFFFF ], highlightAlphas,
+					verticalGradientMatrix(1, 1, w - 2, (h - 2) / 2));
+
+				// bottom edge highlight
+				drawRoundRect(
+					1, h - 2, w - 2, 1, 0,
+					borderColor, 0.05);
+
+				break;
+			}
+		}
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12540
Author:   smgilson@adobe.com
Date:     2009-12-04T18:35:53.988232Z

Log Message:
-----------
ASDoc localization updates

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

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

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -100,6 +100,7 @@
  *    paddingRight="0"
  *    paddingTop="0"
  *    requestedColumnCount="-1"
+ *    requestedMinColumnCount="-1"
  *    variableColumnWidth="true"
  *    verticalAlign="top"
  *  />


Player: scale sensibly

Player: scale sensibly

If the stage is smaller than the video, scale down the video.
If the stage is large, let a config decide if upscale should occur.
If the stage fits the video precisly do no scaling.
Afterwards, center the movie on the stage.

--- src/Player.as
+++ src/Player.as
@@ -29,6 +29,9 @@
   [SWF(backgroundColor="#efefef")]

   public class Player extends Sprite {
+    private var config:Object = {
+      'scaleUp' : false
+    };
     private var vid:Video;
     private var audioTransmit:AxisTransmit = new AxisTransmit();
     private var meta:Object = {};
@@ -94,15 +97,19 @@
       var stageheight:uint = (StageDisplayState.NORMAL === stage.displayState) ?
         stage.stageHeight : stage.fullScreenHeight;

-      vid.width  = Math.min(meta.width,  stagewidth);
-      vid.height = Math.min(meta.height, stageheight);
+      var scale:Number = ((stagewidth / meta.width) > (stageheight / meta.height)) ?
+        (stageheight / meta.height) : (stagewidth / meta.width);

-      vid.x = 0;
-      vid.y = 0;
-      if (meta.width < stagewidth || meta.height < stageheight) {
-        vid.x = (stagewidth - meta.width) / 2;
-        vid.y = (stageheight - meta.height) / 2;
+      vid.width = meta.width;
+      vid.height = meta.height;
+      if ((scale < 1.0) || (scale > 1.0 && true === config.scaleUp)) {
+        trace('scaling video, scale:', scale.toFixed(2), ' (aspect ratio: ' +  (vid.width / vid.height).toFixed(2) + ')');
+        vid.width = meta.width * scale;
+        vid.height = meta.height * scale;
       }
+
+      vid.x = (stagewidth - vid.width) / 2;
+      vid.y = (stageheight - vid.height) / 2;
     }

     public function play(iurl:String = null):void


added more functions

added more functions

--- WeaveCore/src/weave/core/UIUtils.as
+++ WeaveCore/src/weave/core/UIUtils.as
@@ -400,6 +400,32 @@
 				return parent.addChild(child);
 		}

+		public static function spark_addChildAt(parent:DisplayObjectContainer, child:DisplayObject, index:int):DisplayObject
+		{
+			if (parent is IVisualElementContainer)
+			{
+				if (child is IVisualElement)
+					return (parent as IVisualElementContainer).addElementAt(child as IVisualElement, index) as DisplayObject;
+				else
+					throw new Error("parent is IVisualElementContainer, but child is not an IVisualElement");
+			}
+			else
+				return parent.addChildAt(child, index);
+		}
+
+		public static function spark_getChildIndex(parent:DisplayObjectContainer, child:DisplayObject):int
+		{
+			if (parent is IVisualElementContainer && child is IVisualElement)
+			{
+				if (child is IVisualElement)
+					return (parent as IVisualElementContainer).getElementIndex(child as IVisualElement);
+				else
+					throw new Error("parent is IVisualElementContainer, but child is not an IVisualElement");
+			}
+			else
+				return parent.getChildIndex(child);
+		}
+
 		public static function spark_setChildIndex(parent:DisplayObjectContainer, child:DisplayObject, index:int):void
 		{
 			if (parent is IVisualElementContainer && child is IVisualElement)


Transferred from the Adobe Open Source Subversion Repository

Revision: 6227
Author:   gpburch@adobe.com
Date:     2009-04-23T20:43:37.698505Z

Log Message:
-----------
Removed the private class SkinPartInfo.

Reviewed By: Glenn

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -948,16 +948,4 @@
     private var skinStateIsDirty:Boolean = false;
 }

-}
-
-class SkinPartInfo
-{
-    public function SkinPartInfo()
-    {
-        super();
-    }
-
-    public var id:String;
-
-    public var required:Boolean;
-}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 16236
Author:   jszeto@adobe.com
Date:     2010-05-20T00:54:54.963159Z

Log Message:
-----------
Form Feature Work

Merging in Form classes from the private sandbox. All spec'ed functionality has been implemented.

QE notes: none
Doc notes: Needs ASDoc comments
Bugs: none
Reviewer: Hans, Kevin
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/layouts/FormItemLayout.as" copyfrom-rev="15875" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/FormItemLayout.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/skins/spark/assets/ErrorIndicator.png" copyfrom-rev="16235" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/assets/ErrorIndicator.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as" copyfrom-rev="15875" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/skins/spark/StackedFormItemSkin.mxml" copyfrom-rev="15875" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/StackedFormItemSkin.mxml</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/components/Form.as" copyfrom-rev="15875" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Form.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/skins/spark/FormItemSkin.mxml" copyfrom-rev="15875" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/FormItemSkin.mxml</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/skins/spark/StackedFormHeadingSkin.mxml" copyfrom-rev="16047" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/StackedFormHeadingSkin.mxml</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/skins/spark/FormHeadingSkin.mxml" copyfrom-rev="15875" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/FormHeadingSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/layouts/FormLayout.as" copyfrom-rev="15875" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/FormLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/bundles/en_US/layout.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/skins/spark/assets/RequiredIndicator.png" copyfrom-rev="16235" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/assets/RequiredIndicator.png</path>
<path kind="dir" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/skins/spark/assets" copyfrom-rev="16235" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/assets</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/components/FormItem.as" copyfrom-rev="15875" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/FormItem.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/components/FormHeading.as" copyfrom-rev="15875" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/FormHeading.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/skins/spark/FormSkin.mxml" copyfrom-rev="15875" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/FormSkin.mxml</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/spark/src/spark/skins/spark/FocusSkin.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -22,8 +22,8 @@
 import mx.core.IFactory;
 import mx.core.ILayoutElement;
 import mx.core.IVisualElement;
+import mx.core.UIComponent;
 import mx.core.mx_internal;
-import mx.core.UIComponent;
 import mx.events.PropertyChangeEvent;

 import spark.events.SkinPartEvent;
@@ -740,7 +740,7 @@
      */
     mx_internal function updateErrorSkin():void
     {
-        if (errorString != null && errorString != "")
+        if (errorString != null && errorString != "" && getStyle("showErrorSkin"))
         {
             if (!errorObj)
             {


Stop trying to recover from this error (it doesn't work), but try logging
the event target.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4644 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/presents/client/Communicator.as
+++ src/as/com/threerings/presents/client/Communicator.as
@@ -284,14 +284,9 @@
         }

         // total failure
-        Log.getLog(this).warning("socket error: " + event);
+        Log.getLog(this).warning("socket error: " + event + ", target=" + event.target);
         Log.dumpStack();
-        if (_socket.connected) {
-            Log.getLog(this).info("Things seem ok. Ignoring.");
-
-        } else {
-            shutdown(new Error("socket closed unexpectedly."));
-        }
+        shutdown(new Error("socket closed unexpectedly."));
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableContainerBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableContainerBase.as
@@ -20,16 +20,31 @@

 /**
  *  Normal State
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [SkinState("normal")]

 /**
  *  Disabled State
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [SkinState("disabled")]

 /**
  *  Base class for skinnable container components.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class FxContainerBase extends FxComponent implements IFocusManagerContainer
 {
@@ -43,6 +58,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function FxContainerBase()
     {
@@ -76,6 +96,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     override protected function getCurrentSkinState():String
     {
@@ -84,6 +109,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {


Fix incorrect comment in AS

Fix incorrect comment in AS

--- bin/Data/Scripts/Utilities/2D/Sample2D.as
+++ bin/Data/Scripts/Utilities/2D/Sample2D.as
@@ -131,7 +131,7 @@

     animatedSprite.animationSet = spriterAnimationSet;
     animatedSprite.SetAnimation("idle"); // Get scml file and Play "idle" anim
-    animatedSprite.layer = 3; // Put character over tile map (which is on layer 0) and over Orcs (which are on layer 1)
+    animatedSprite.layer = 3; // Put character over tile map (which is on layer 0) and over Orcs (which are on layer 2)
     RigidBody2D@ characterBody = character2DNode.CreateComponent("RigidBody2D");
     characterBody.bodyType = BT_DYNAMIC;
     characterBody.allowSleep = false;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/automation/src/AutomationClasses.as
+++ frameworks/projects/automation/src/AutomationClasses.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 6384
Author:   smgilson@adobe.com
Date:     2009-04-29T17:35:57.804487Z

Log Message:
-----------
First pass on ASDoc for containers

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/SelectionFormatTextStyles.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/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/Panel.as
+++ frameworks/projects/spark/src/spark/components/Panel.as
@@ -17,11 +17,29 @@
 [IconFile("Panel.png")]

 /**
- *  The Panel class is container whose skin usually contains a title.
+ *  The Panel class defines a container that includes a title bar,
+ *  a caption, a border, and a content area for its children.
+ *
+ *  @mxml
+ *
+ *
The <mx:Panel> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <mx:Panel
+ *   Properties
+ *   title=""
+ *   >
+ *      ...
+ *      child tags
+ *      ...
+ *  </mx:Panel>
+ *

  *
  *  @includeExample examples/PanelExample.mxml
  *
  *  @see SkinnableContainer
+ *  @see spark.skins.default.PanelSkin
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -64,7 +82,10 @@
     [SkinPart(required="true")]

     /**
-     * A skin part that defines the middle button(s).
+     *  The skin part that defines the appearance of the
+     *  title text in the container.
+     *
+     *  @see spark.skins.default.PanelSkin
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -81,9 +102,11 @@

     private var _title:String = "";

-	[Bindable]
+    [Bindable]
     /**
-     *  title that should appear in the header of the skin
+     *  Title or caption displayed in the title bar.
+     *
+     *  @default ""
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -102,8 +125,8 @@
     {
         _title = value;

-		if (titleField)
-			titleField.text = title;
+        if (titleField)
+            titleField.text = title;
     }

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls.advancedDataGridClasses
 {


Updated collidePoint(), was returning true for points 1 pixel beyond the hitbox from 2 sides.

--- net/flashpunk/Entity.as
+++ net/flashpunk/Entity.as
@@ -262,7 +262,7 @@
 		{
 			if (!collidable) return false;
 			if (pX >= x - originX && pY >= y - originY
-			&& pX <= x - originX + width && pY <= y - originY + height)
+			&& pX < x - originX + width && pY < y - originY + height)
 			{
 				if (!_mask) return true;
 				_x = this.x; _y = this.y;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/NavBar.as
+++ frameworks/projects/mx/src/mx/controls/NavBar.as
@@ -0,0 +1,1242 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls
+{
+
+import flash.display.DisplayObject;
+import flash.display.InteractiveObject;
+import flash.events.Event;
+import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
+import mx.collections.ArrayCollection;
+import mx.collections.IList;
+import mx.containers.Box;
+import mx.containers.BoxDirection;
+import mx.containers.ViewStack;
+import mx.core.ClassFactory;
+import mx.core.Container;
+import mx.core.FlexVersion;
+import mx.core.IFactory;
+import mx.core.IFlexDisplayObject;
+import mx.core.ScrollPolicy;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.events.ChildExistenceChangedEvent;
+import mx.events.CollectionEvent;
+import mx.events.FlexEvent;
+import mx.events.IndexChangedEvent;
+import mx.events.ItemClickEvent;
+import mx.managers.ISystemManager;
+import mx.managers.SystemManager;
+import mx.logging.AbstractTarget;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when a navigation item is selected.
+ *
+ *  @eventType mx.events.ItemClickEvent.ITEM_CLICK
+ */
+[Event(name="itemClick", type="mx.events.ItemClickEvent")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="defaultButton", kind="property")]
+[Exclude(name="horizontalLineScrollSize", kind="property")]
+[Exclude(name="horizontalPageScrollSize", kind="property")]
+[Exclude(name="horizontalScrollBar", kind="property")]
+[Exclude(name="horizontalScrollPolicy", kind="property")]
+[Exclude(name="horizontalScrollPosition", kind="property")]
+[Exclude(name="icon", kind="property")]
+[Exclude(name="label", kind="property")]
+[Exclude(name="maxHorizontalScrollPosition", kind="property")]
+[Exclude(name="maxVerticalScrollPosition", kind="property")]
+[Exclude(name="verticalLineScrollSize", kind="property")]
+[Exclude(name="verticalPageScrollSize", kind="property")]
+[Exclude(name="verticalScrollBar", kind="property")]
+[Exclude(name="verticalScrollPolicy", kind="property")]
+[Exclude(name="verticalScrollPosition", kind="property")]
+
+[Exclude(name="scroll", kind="event")]
+[Exclude(name="click", kind="event")]
+
+[Exclude(name="horizontalScrollBarStyleName", kind="style")]
+[Exclude(name="verticalScrollBarStyleName", kind="style")]
+
+[ResourceBundle("controls")]
+
+/**
+ *  The NavBar control is the superclass for navigator controls, such as the
+ *  LinkBar and TabBar controls, and cannot be instantiated directly.
+ *
+ *  @mxml
+ *
+ *
The <mx:NavBar> tag inherits all of the tag attributes
+ *  of its superclass, with the exception of scrolling-related
+ *  attributes, and adds the following tag attributes:

+ *
+ *

+ *  <mx:tagname
+ *    Properties
+ *    dataProvider="No default"
+ *    iconField="icon"
+ *    labeField="label"
+ *    selectedIndex="-1"
+ *    toolTipField="tooltip"
+ *
+ *    Events
+ *    itemClick="No default"
+ *    >
+ *     ...
+ *       child tags
+ *     ...
+ *    </mx:tagname>
+ *

+ *
+ *  @see mx.collections.IList
+ *  @see mx.containers.ViewStack
+ *  @see mx.controls.LinkBar
+ *  @see mx.controls.TabBar
+ *  @see mx.controls.ButtonBar
+ *
+ */
+public class NavBar extends Box
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function NavBar()
+    {
+        super();
+
+        direction = BoxDirection.HORIZONTAL;
+		showInAutomationHierarchy = true;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  The target ViewStack.
+     *  If this is null, the dataProvider is an Array.
+     */
+    mx_internal var targetStack:ViewStack;
+
+    /**
+     *  @private
+     *  This variable is set when the NavBar is still initializing and the
+     *  dataProvider is set to a ViewStack (or a String that might identify
+     *  a ViewStack in the parent document).
+     */
+    private var pendingTargetStack:Object;
+
+    /**
+     *  @private
+     *  The factory that generates the instances of the navigation items.
+     *  It generates instances of ButtonBarButton for ButtonBar and
+     *  ToggleButtonBar, of LinkButton for LinkBar, and of Tab for TabBar.
+     *  This var is expected to be set before the navigation items are created;
+     *  setting it does not re-create existing navigation items based on the
+     *  new factory.
+     */
+    mx_internal var navItemFactory:IFactory = new ClassFactory(Button);
+
+ 	/**
+     *  @private
+     *  allows us to null out child containers' toolTips without descending
+     *  into recursive madness.
+     */
+	private var lastToolTip:String = null;
+
+    /**
+     *  @private
+     */
+    private var measurementHasBeenCalled:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     *  @private
+     *  The baselinePosition of a NavBar is calculated
+	 *  for the label of the first nav item.
+ 	 *  If there are no nav items, the NavBar doesn't appear
+	 *  and the baselinePosition is irrelevant.
+     */
+    override public function get baselinePosition():Number
+    {
+		if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
+			return super.baselinePosition;
+
+		if (!validateBaselinePosition())
+			return NaN;
+
+		if (numChildren == 0)
+			return super.baselinePosition;
+
+		var child:Button = Button(getChildAt(0));
+
+		validateNow();
+
+		return child.y + child.baselinePosition;
+    }
+
+    //----------------------------------
+    //  enabled
+    //----------------------------------
+
+    [Inspectable(category="General", enumeration="true,false", defaultValue="true")]
+
+    /**
+     *  @private
+     */
+    override public function set enabled(value:Boolean):void
+    {
+        if (value != enabled)
+        {
+            super.enabled = value;
+
+            var n:int = numChildren;
+            for (var i:int = 0; i < n; i++)
+            {
+                if (targetStack)
+                {
+                    Button(getChildAt(i)).enabled = value &&
+                            Container(targetStack.getChildAt(i)).enabled;
+                }
+                else
+                {
+                    Button(getChildAt(i)).enabled = value;
+                }
+            }
+        }
+    }
+
+    //----------------------------------
+    //  horizontalScrollPolicy
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  @private
+     *  The NavBar control's horizontalScrollPolicy is always
+     *  ScrollPolicy.OFF.
+     *  It cannot be set to any other value.
+     */
+    override public function get horizontalScrollPolicy():String
+    {
+        return ScrollPolicy.OFF;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set horizontalScrollPolicy(value:String):void
+    {
+        // A NavBar control never scrolls.
+        // Its horizontalScrollPolicy property is initialized to
+        // ScrollPolicy.OFF and can't be changed.
+    }
+
+    //----------------------------------
+    //  verticalScrollPolicy
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  @private
+     *  The NavBar control's verticalScrollPolicy is always
+     *  ScrollPolicy.OFF.
+     *  It cannot be set to any other value.
+     */
+    override public function get verticalScrollPolicy():String
+    {
+        return ScrollPolicy.OFF;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set verticalScrollPolicy(value:String):void
+    {
+        // A NavBar control never scrolls.
+        // Its verticalScrollPolicy property is initialized
+        // to ScrollPolicy.OFF and can't be changed.
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  dataProvider
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dataProvider property.
+     */
+    private var _dataProvider:IList;
+
+    /**
+     *  @private
+     */
+    private var dataProviderChanged:Boolean = false;
+
+    [Bindable("collectionChange")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  Data used to populate the navigator control.
+     *  The type of data can either be a ViewStack container or an Array.
+     *
+     *
When you use a ViewStack container, the label
+     *  and icon properties of the ViewStack container's children
+     *  are used to populate the navigation items,
+     *  as in the following example:

+     *
+     *

+     *  <mx:LinkBar dataProvider="{vs}"/>
+     *  <mx:ViewStack id="vs">
+     *    <mx:VBox label="Accounts" icon="account_icon"/>
+     *    <mx:VBox label="Leads" icon="leads_icon"/>
+     *  </mx:ViewStack>

+     *
+     *
The LinkBar control contains two links: "Accounts" and "Leads,"
+     *  each with its own icon as specified on the VBox tags.
+     *  When you click a link, the ViewStack container navigates
+     *  to the corresponding view.

+     *
+     *
When you use an Array, the labelField property
+     *  determines the name of the dataProvider field
+     *  to use as the label for each navigation item; the iconField
+     *  property determines the name of the dataProvider field
+     *  to use as the icon for each navigation item.
+     *  If you use an Array of Strings, the labelField
+     *  property is ignored.

+     *
+     *  @default "undefined"
+     */
+    public function get dataProvider():Object
+    {
+        return targetStack ? targetStack : _dataProvider;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dataProvider(value:Object /* can be either String, ViewStack, Array or IList */):void
+    {
+        var message:String;
+
+		if (value &&
+            !(value is String) &&
+            !(value is ViewStack) &&
+            !(value is Array) &&
+            !(value is IList))
+        {
+			message = resourceManager.getString(
+				"controls", "errWrongContainer", [ id ]);
+            throw new Error(message);
+        }
+
+        // If value is a string, try to resolve here.
+        // If value is a ViewStack name, document[value] may not be defined yet.
+        // In this case, fall through to the code below
+        // which will setup a pending target view stack.
+        if ((value is String) && (document && document[value]))
+            value = document[value];
+
+        if ((value is String) || (value is ViewStack))
+        {
+            setTargetViewStack(value);
+            return;
+        }
+        else if ((value is IList && IList(value).length > 0 &&
+                 IList(value).getItemAt(0) is DisplayObject) ||
+                 (value is Array && (value as Array).length > 0 &&
+                 value[0] is DisplayObject))
+        {
+            var name:String = id ?
+                              className + " '" + id + "'" :
+                              "a " + className;
+            message = resourceManager.getString(
+				"controls", "errWrongType", [ name ]);
+			throw new Error(message);
+        }
+
+        // Clear any existing target stack.
+        setTargetViewStack(null);
+        removeAllChildren();
+
+        if (value is IList)
+            _dataProvider = IList(value);
+        else if (value is Array)
+            _dataProvider = new ArrayCollection(value as Array);
+        else
+            _dataProvider = null;
+
+        dataProviderChanged = true;
+        invalidateProperties();
+
+        if (_dataProvider)
+        {
+            // use weak reference
+            _dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE,
+                                           collectionChangeHandler, false, 0, true);
+        }
+
+        // Styles might not have been set yet, so short circuit and let
+        // createChildren() handle the rest.
+        if (inheritingStyles == UIComponent.STYLE_UNINITIALIZED)
+            return;
+
+        dispatchEvent(new Event("collectionChange"));
+    }
+
+    //----------------------------------
+    //  iconField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the iconField property.
+     */
+    private var _iconField:String = "icon";
+
+    [Bindable("iconFieldChanged")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  Name of the field in the dataProvider object
+     *  to display as the icon for each navigation item.
+     *
+     *  @default "icon"
+     */
+    public function get iconField():String
+    {
+        return _iconField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set iconField(value:String):void
+    {
+        _iconField = value;
+
+        // If we have a data provider, update here to
+        // reflect new icon field.
+        if (_dataProvider)
+            dataProvider = _dataProvider;
+
+        dispatchEvent(new Event("iconFieldChanged"));
+    }
+
+    //----------------------------------
+    //  labelField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the labelField property.
+     */
+    private var _labelField:String = "label";
+
+    [Bindable("labelFieldChanged")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  Name of the field in the dataProvider object
+     *  to display as the label for each navigation item.
+     *
+     *  @default "label"
+     */
+    public function get labelField():String
+    {
+        return _labelField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set labelField(value:String):void
+    {
+        _labelField = value;
+
+        // If we have a data provider, update here to
+        // reflect new label field.
+        if (_dataProvider)
+            dataProvider = _dataProvider;
+
+        dispatchEvent(new Event("labelFieldChanged"));
+    }
+
+ 	//----------------------------------
+    //  labelFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for labelFunction property.
+     */
+    private var _labelFunction:Function;
+
+    [Bindable("labelFunctionChanged")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  A user-supplied function to run on each item to determine its label.
+     *  By default, the component looks for a property named label
+     *  on each data provider item and displays it.
+     *  However, some data sets do not have a label property
+     *  nor do they have another property that can be used for displaying.
+     *  An example is a data set that has lastName and firstName fields
+     *  but you want to display full names.
+     *
+     *
You can supply a labelFunction that finds the
+     *  appropriate fields and returns a displayable string. The
+     *  labelFunction is also good for handling formatting and
+     *  localization.

+     *
+     *
For most components, the label function takes a single argument
+     *  which is the item in the data provider and returns a String.

+     *

+     *  myLabelFunction(item:Object):String

+     *
+     *
+     *  @default null
+     */
+    public function get labelFunction():Function
+    {
+        return _labelFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set labelFunction(value:Function):void
+    {
+        _labelFunction = value;
+
+    //    itemsSizeChanged = true;
+        invalidateDisplayList();
+
+        dispatchEvent(new Event("labelFunctionChanged"));
+    }
+
+    //----------------------------------
+    //  selectedIndex
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the selectedIndex property.
+     */
+    private var _selectedIndex:int = -1;
+
+    [Bindable("itemClick")]
+    [Bindable("valueCommit")]
+    [Inspectable(category="General", defaultValue="-1")]
+
+    /**
+     *  Index of the active navigation item,
+     *  where the first item is at an index of 0.
+     *
+     *  @default -1
+     */
+    public function get selectedIndex():int
+    {
+        return _selectedIndex;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectedIndex(value:int):void
+    {
+        _selectedIndex = value;
+
+        if (targetStack)
+            targetStack.selectedIndex = value;
+
+        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+    }
+
+    //----------------------------------
+    //  toolTipField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the toolTipField property.
+     */
+    private var _toolTipField:String = "toolTip";
+
+    [Bindable("toolTipFieldChanged")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  Name of the the field in the dataProvider object
+     *  to display as the tooltip label.
+     *
+     *  @default "toolTip"
+     */
+    public function get toolTipField():String
+    {
+        return _toolTipField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set toolTipField(value:String):void
+    {
+        _toolTipField = value;
+
+        // If we have a data provider, update here to
+        // reflect new toolTip field.
+        if (_dataProvider)
+            dataProvider = _dataProvider;
+
+        dispatchEvent(new Event("toolTipFieldChanged"));
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        if (dataProviderChanged)
+        {
+            createNavChildren();
+            dataProviderChanged = false;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (!measurementHasBeenCalled)
+        {
+            checkPendingTargetStack();
+            measurementHasBeenCalled = true;
+        }
+
+        if (dataProviderChanged)
+        {
+            dataProviderChanged = false;
+            createNavChildren();
+        }
+
+        if (blocker)
+            blocker.visible = false;
+    }
+
+    /**
+     *  @private
+     *  Always do a recursive notification since our content children may have us as
+     *  the styleName.
+     */
+    override public function notifyStyleChangeInChildren(
+                                styleProp:String, recursive:Boolean):void
+    {
+        super.notifyStyleChangeInChildren(styleProp, true);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+  	//--------------------------------------------------------------------------
+    //
+    //  Item fields
+    //
+    //--------------------------------------------------------------------------
+
+   /**
+     *  Returns the string the renderer would display for the given data object
+     *  based on the labelField and labelFunction properties.
+     *  If the method cannot convert the parameter to a string, it returns a
+     *  single space.
+     *
+     *  @param data Object to be rendered.
+     *
+     *  @return The string to be displayed based on the data.
+     */
+    public function itemToLabel(data:Object):String
+    {
+        if (data == null)
+            return "";
+
+        if (labelFunction != null)
+            return labelFunction(data);
+
+        if (data is XML)
+        {
+            try
+            {
+                if (data[labelField].length() != 0)
+                    data = data[labelField];
+                //by popular demand, this is a default XML labelField
+                //else if (data.@label.length() != 0)
+                //  data = data.@label;
+            }
+            catch(e:Error)
+            {
+            }
+        }
+        else if (data is Object)
+        {
+            try
+            {
+                if (data[labelField] != null)
+                    data = data[labelField];
+            }
+            catch(e:Error)
+            {
+            }
+        }
+
+        if (data is String)
+            return String(data);
+
+		if (data is Number)
+			return data.toString();
+
+        return "";
+    }
+
+    /**
+     *  Creates the individual navigator items.
+     *
+     *  By default, this method performs no action.
+     *  You can override this method in a
+     *  subclass to create a navigator item based on the type of
+     *  navigator items in your subclass.
+     *
+     *  @param label The label for the created navigator item.
+     *
+     *  @param icon The icon for the created navigator item.
+     *  Typically, this is an icon that you have embedded in the application.
+     *
+     *  @return The created navigator item.
+     */
+    protected function createNavItem(label:String,
+                                     icon:Class = null):IFlexDisplayObject
+    {
+        // Override to create a nav item.
+        return null;
+    }
+
+    /**
+     *  Highlights the selected navigator item.
+     *
+     *  By default, this method performs no action.
+     *  You can override this method in a subclass to
+     *  highlight the selected navigator item.
+     *
+     *  @param index The index of the selected item in the NavBar control.
+     *  The first item is at an index of 0.
+     */
+    protected function hiliteSelectedNavItem(index:int):void
+    {
+        // Override to hilite selected item.
+    }
+
+    /**
+     *  Resets the navigator bar to its default state.
+     *
+     *  By default, this method performs no action.
+     *  You can override this method in a subclass to
+     *  reset the navigator bar to a default state.
+     */
+    protected function resetNavItems():void
+    {
+        // Override to reset nav items.
+    }
+
+    /**
+     *  Sets the label property of a navigator item in the
+     *  NavBar control.
+     *
+     *  You can override this method in a subclass to
+     *  set the label of a navigator item based on the type of
+     *  navigator items in your subclass.
+     *
+     *  @param index The index of the navigator item in the NavBar control.
+     *  The first navigator item is at an index of 0.
+     *
+     *  @param label The new label text for the navigator item.
+     */
+    protected function updateNavItemLabel(index:int, label:String):void
+    {
+        // Override if your nav item doesn't derive from Button.
+        var item:Button = Button(getChildAt(index));
+
+        item.label = label;
+    }
+
+    /**
+     *  Resets the icon of a navigator item in the
+     *  NavBar control.
+     *
+     *  You can override this method in a subclass to
+     *  set the icon of a navigator item based on the type of
+     *  navigator items in your subclass.
+     *
+     *  @param index The index of the navigator item in the NavBar control.
+     *  The first navigator item is at an index of 0.
+     *
+     *  @param icon The new icon for the navigator item.
+     *  Typically, this is an icon that you have embedded in the application.
+     */
+    protected function updateNavItemIcon(index:int, icon:Class):void
+    {
+        // Override if your nav item doesn't derive from Button.
+        var item:Button = Button(getChildAt(index));
+
+        item.setStyle("icon", icon);
+    }
+
+    /**
+     *  @private
+     */
+    private function createNavChildren():void
+    {
+        if (!_dataProvider)
+            return;
+
+        var n:int = _dataProvider.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var item:Object = _dataProvider.getItemAt(i);
+            var navItem:Button;
+            if (item is String)
+            {
+                navItem = Button(createNavItem(String(item)));
+            }
+            else
+            {
+                var label:String = itemToLabel(item);
+                // if labelField doesn't exist in item, label will be null;
+
+                if (iconField)
+                {
+                    var iconValue:Object = null;
+
+                    try
+                    {
+                        iconValue = item[iconField];
+                    }
+                    catch(e:Error)
+                    {
+                    }
+
+                    // Workaround for bug 123651. Currently
+                    // the MXML compiler passes the class name
+                    // as a string instead of a Class reference.
+                    var icon:Class =
+                        iconValue is String ?
+                        Class(systemManager.getDefinitionByName(
+                                                String(iconValue))) :
+                        Class(iconValue);
+
+                    navItem = Button(createNavItem(label, icon));
+                }
+                else
+                {
+                    navItem = Button(createNavItem(label, null));
+                }
+
+                // Assigning undefined to a String coerces to "",
+                // which cancels an ancestor's tooltip.
+                // So we have to change undefined to null.
+                if (toolTipField)
+                {
+                    try
+                    {
+                        navItem.toolTip = (item[toolTipField] === undefined
+                                           ? null
+                                           : item[toolTipField]);
+                    }
+                    catch(e:Error)
+                    {
+                    }
+                }
+            }
+
+            navItem.enabled = enabled;
+        }
+    }
+
+
+
+    /**
+     *  @private
+     */
+    private function setTargetViewStack(
+                        newStack:Object /* can be String or ViewStack */):void
+    {
+        // If this property is set at creation time, the target view stack
+        // may not exist yet. In this case, we just save off the requested
+        // target stack and set it later.
+        if (!measurementHasBeenCalled && newStack)
+        {
+            pendingTargetStack = newStack;
+            invalidateProperties();
+        }
+        else
+        {
+            _setTargetViewStack(newStack);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function _setTargetViewStack(
+                        newStack:Object /* can be String or ViewStack */):void
+    {
+        var newTargetStack:ViewStack;
+
+        if (newStack is ViewStack)
+        {
+            newTargetStack = ViewStack(newStack);
+        }
+        else if (newStack)
+        {
+            // newStack is not a ViewStack.
+            // First, look for it on the current document
+            newTargetStack = parentDocument[newStack];
+        }
+        else
+        {
+            newTargetStack = null;
+        }
+
+        // Remove any existing event listeners
+        if (targetStack)
+        {
+            targetStack.removeEventListener(
+                ChildExistenceChangedEvent.CHILD_ADD,
+                childAddHandler);
+
+            targetStack.removeEventListener(
+                ChildExistenceChangedEvent.CHILD_REMOVE,
+                childRemoveHandler);
+
+            targetStack.removeEventListener(Event.CHANGE, changeHandler);
+
+            targetStack.removeEventListener(
+                IndexChangedEvent.CHILD_INDEX_CHANGE, childIndexChangeHandler);
+        }
+
+        // Clear out the current links
+        removeAllChildren();
+        _selectedIndex = -1;
+
+        targetStack = newTargetStack;
+
+        if (!targetStack)
+            return;
+
+        targetStack.addEventListener(ChildExistenceChangedEvent.CHILD_ADD,
+                                     childAddHandler);
+
+        targetStack.addEventListener(ChildExistenceChangedEvent.CHILD_REMOVE,
+                                     childRemoveHandler);
+
+        targetStack.addEventListener(Event.CHANGE, changeHandler);
+
+        targetStack.addEventListener(IndexChangedEvent.CHILD_INDEX_CHANGE,
+                                     childIndexChangeHandler);
+
+        var numViews:int = targetStack.numChildren;
+
+        for (var i:int = 0; i < numViews; i++)
+        {
+            var child:Container = Container(targetStack.getChildAt(i));
+            var item:Button = Button(createNavItem(itemToLabel(child), child.icon));
+
+
+
+            // Make the nav item inherit the tooltip from the child
+            if (child.toolTip)
+            {
+                item.toolTip = child.toolTip;
+                child.toolTip = null;
+            }
+
+            child.addEventListener("labelChanged", labelChangedHandler);
+            child.addEventListener("iconChanged", iconChangedHandler);
+            child.addEventListener("enabledChanged", enabledChangedHandler);
+        	child.addEventListener("toolTipChanged", toolTipChangedHandler);
+
+            item.enabled = enabled && child.enabled;
+        }
+
+        var index:int = targetStack.selectedIndex;
+        if (index == -1 && targetStack.numChildren > 0)
+            index = 0;
+
+        if (index != -1)
+            hiliteSelectedNavItem(index);
+
+        invalidateDisplayList();
+    }
+
+    /**
+     *  @private
+     */
+    private function checkPendingTargetStack():void
+    {
+        // Check for pending target view stacks.
+        if (pendingTargetStack)
+        {
+            _setTargetViewStack(pendingTargetStack);
+            pendingTargetStack = null;
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function collectionChangeHandler(event:Event):void
+    {
+        // Brute force -- rebuild everything...
+        dataProvider = dataProvider;
+    }
+
+    /**
+     *  @private
+     */
+    private function childAddHandler(event:ChildExistenceChangedEvent):void
+    {
+        // Prevent infinite recursion; the call to createNavItem() below
+        // can cause this handler to get invoked due to event bubbling,
+        // such as when a TabBar is inside a TabNavigator.
+        if (event.target == this)
+            return;
+
+        // Bail if this isn't a child of the target stack.
+        if (event.relatedObject.parent != targetStack)
+            return;
+
+        var newChild:Container = Container(event.relatedObject);
+        var item:Button = Button(createNavItem(itemToLabel(newChild), newChild.icon));
+        var index:int = newChild.parent.getChildIndex(DisplayObject(newChild));
+        setChildIndex(item, index);
+
+        if (newChild.toolTip)
+        {
+            item.toolTip = newChild.toolTip;
+            newChild.toolTip = null;
+        }
+
+        newChild.addEventListener("labelChanged", labelChangedHandler);
+        newChild.addEventListener("iconChanged", iconChangedHandler);
+        newChild.addEventListener("enabledChanged", enabledChangedHandler);
+        newChild.addEventListener("toolTipChanged", toolTipChangedHandler);
+
+        item.enabled = enabled && newChild.enabled;
+    }
+
+    /**
+     *  @private
+     */
+    private function childRemoveHandler(event:ChildExistenceChangedEvent):void
+    {
+        // Prevent infinite recursion; the call to removeChildAt() below
+        // can cause this handler to get invoked due to event bubbling,
+        // such as when a TabBar is inside a TabNavigator.
+        if (event.target == this)
+            return;
+
+        var viewStack:ViewStack = ViewStack(event.target);
+        removeChildAt(viewStack.getChildIndex(event.relatedObject));
+
+        callLater(resetNavItems);
+    }
+
+    /**
+     *  @private
+     */
+    private function changeHandler(event:Event):void
+    {
+        // Change events from text fields propagate, so we need to make sure
+        // this event is coming from our dataProvider
+        if (event.target == dataProvider)
+            hiliteSelectedNavItem(Object(event.target).selectedIndex);
+    }
+
+    /**
+     *  @private
+     */
+    private function childIndexChangeHandler(event:IndexChangedEvent):void
+    {
+        // Prevent infinite recursion; the call to setChildIndex() below
+        // can cause this handler to get invoked due to event bubbling,
+        // such as when a TabBar is inside a TabNavigator.
+        if (event.target == this)
+            return;
+
+        setChildIndex(getChildAt(event.oldIndex), event.newIndex);
+        resetNavItems();
+    }
+
+    /**
+     *  @private
+     */
+    private function labelChangedHandler(event:Event):void
+    {
+        // Event.target is a child of the target view stack. Need to
+        // convert to index
+        var itemIndex:int =
+            targetStack.getChildIndex(DisplayObject(event.target));
+
+        updateNavItemLabel(itemIndex, Container(event.target).label);
+    }
+
+    /**
+     *  @private
+     */
+    private function iconChangedHandler(event:Event):void
+    {
+        // Event.target is a child of the target view stack. Need to
+        // convert to index
+        var itemIndex:int =
+            targetStack.getChildIndex(DisplayObject(event.target));
+
+        updateNavItemIcon(itemIndex, Container(event.target).icon);
+    }
+
+    /**
+     * @private
+     */
+    private function toolTipChangedHandler(event:Event):void
+    {
+    	// Event.target is a child of the target view stack. Need to
+        // convert to index
+        var itemIndex:int =
+            targetStack.getChildIndex(DisplayObject(event.target));
+        var item:UIComponent = UIComponent(getChildAt(itemIndex));
+
+		if (UIComponent(event.target).toolTip)
+		{
+			item.toolTip = UIComponent(event.target).toolTip;
+			lastToolTip = UIComponent(event.target).toolTip;
+			UIComponent(event.target).toolTip = null;
+		}
+		else if (!lastToolTip)
+		{
+       		item.toolTip = UIComponent(event.target).toolTip;
+       		lastToolTip = "placeholder";
+        	UIComponent(event.target).toolTip = null;
+  		}
+  		else
+  		 	lastToolTip = null;
+    }
+
+    /**
+     *  @private
+     */
+    private function enabledChangedHandler(event:Event):void
+    {
+        // Event.target is a child of the target view stack. Need to
+        // convert to index
+        var itemIndex:int =
+            targetStack.getChildIndex(DisplayObject(event.target));
+
+        Button(getChildAt(itemIndex)).enabled = enabled && event.target.enabled;
+    }
+
+    /**
+     *  Handles the MouseEvent.CLICK event
+     *  for the items in the NavBar control. This handler
+     *  dispatches the itemClick event for the NavBar control.
+     *
+     *  @param event The event object.
+     */
+    protected function clickHandler(event:MouseEvent):void
+    {
+        var index:int = getChildIndex(DisplayObject(event.currentTarget));
+        if (targetStack)
+            targetStack.selectedIndex = index;
+
+        _selectedIndex = index;
+
+        var newEvent:ItemClickEvent =
+            new ItemClickEvent(ItemClickEvent.ITEM_CLICK);
+        newEvent.label = Button(event.currentTarget).label;
+        newEvent.index = index;
+        newEvent.relatedObject = InteractiveObject(event.currentTarget);
+        newEvent.item = _dataProvider ?
+                        _dataProvider.getItemAt(index) :
+                        null;
+        dispatchEvent(newEvent);
+
+        event.stopImmediatePropagation();
+    }
+
+}
+
+}


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

--- frameworks/projects/rpc/src/mx/rpc/Responder.as
+++ frameworks/projects/rpc/src/mx/rpc/Responder.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Made popping upwards not the default. (Which is more sensible anyway)

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4481 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/mx/controls/CommandMenu.as
+++ src/as/com/threerings/mx/controls/CommandMenu.as
@@ -60,7 +60,7 @@
      * Actually pop up the menu. This can be used instead of show().
      */
     public function popUp (
-        trigger :DisplayObject, popUpwards :Boolean = true) :void
+        trigger :DisplayObject, popUpwards :Boolean = false) :void
     {
         var r :Rectangle = trigger.getBounds(trigger.stage);


Include Ellipse in FlexJSUIClasses.as

Include Ellipse in FlexJSUIClasses.as

--- frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -121,6 +121,7 @@
     import org.apache.flex.core.SimpleStatesImpl; SimpleStatesImpl;
 	import org.apache.flex.core.graphics.GraphicShape; GraphicShape;
 	import org.apache.flex.core.graphics.Rect; Rect;
+	import org.apache.flex.core.graphics.Ellipse; Ellipse;
 	import org.apache.flex.core.graphics.SolidColor; SolidColor;
 	import org.apache.flex.core.graphics.SolidColorStroke; SolidColorStroke;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.messaging
 {