Transferred from the Adobe Open Source Subversion Repository

Revision: 17078
Author:   hmuller@adobe.com
Date:     2010-07-27T22:05:44.533951Z

Log Message:
-----------
Added DefaultGridItemRenderer to SparkClasses.as and removed the "..." truncation support from DefaultGridItemRenderer.

QE notes: changes apply to Spark DataGrid only
Doc notes:
Bugs:
Reviewer: Kevin
Tests run: none
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as
+++ frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as
@@ -3,6 +3,7 @@

 import flash.display.DisplayObject;
 import flash.events.Event;
+import flash.text.TextFieldAutoSize;

 import mx.core.LayoutElementUIComponentUtils;
 import mx.core.UIComponent;
@@ -295,6 +296,7 @@
             return;

         _labelDisplay = value;
+        invalidateSize();
         dispatchChangeEvent("labelDisplayChanged");
     }

@@ -334,6 +336,10 @@
         if (!labelDisplay)
         {
             labelDisplay = new UITextField();
+            /*
+            labelDisplay.autoSize = TextFieldAutoSize.LEFT;
+            labelDisplay.wordWrap = true;
+            */
             addChild(DisplayObject(labelDisplay));
             if (_label != "")
                 labelDisplay.text = _label;
@@ -366,7 +372,6 @@
         // labelDisplay layout: padding of 3 on left and right and padding of 5 on top and bottom.

         labelDisplay.setActualSize(width-6, height-10);
-        labelDisplay.truncateToFit();
         labelDisplay.move(3, 5);
     }


Better quality video and images in small containers.

--- src/as3/JpegCamera.as
+++ src/as3/JpegCamera.as
@@ -168,6 +168,7 @@
       displayedBitmap.x = viewWidth;
       displayedBitmap.scaleX = -scale;
       displayedBitmap.scaleY =  scale;
+      displayedBitmap.smoothing = true;
       addChild(displayedBitmap);

       return true;
@@ -263,6 +264,7 @@
     private function cameraUnmuted():void {
       video = new Video(camera.width, camera.height);
       video.attachCamera(camera);
+      video.smoothing = true;

       debug("Camera resolution " + camera.width + "x" + camera.height);


fix percent size handling

fix percent size handling

--- frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
+++ frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
@@ -182,13 +182,13 @@
             if (initialView)
             {
                 initialView.applicationModel =  model;
+        	    this.addElement(initialView);
                 if (!isNaN(initialView.percentWidth) && !isNaN(initialView.percentHeight))
-                    initialView.setWidthAndHeight(stage.stageWidth, stage.stageHeight);
+                    initialView.setWidthAndHeight(stage.stageWidth, stage.stageHeight, true);
                 else if (!isNaN(initialView.percentWidth))
                     initialView.setWidth(stage.stageWidth);
                 else if (!isNaN(initialView.percentHeight))
                     initialView.setHeight(stage.stageHeight);
-        	    this.addElement(initialView);
                 var bgColor:Object = ValuesManager.valuesImpl.getValue(this, "background-color");
                 if (bgColor != null)
                 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 10672
Author:   dloverin@adobe.com
Date:     2009-09-29T11:43:11.672658Z

Log Message:
-----------
Use styleManager instance instead of the StyleManager singleton (airframework, halo, and spark projects)

A couple updates in the framework project as well.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex
Tests run: checkintests
Is noteworthy for integration: no.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/SliderTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/ProgrammaticSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/SetActionInstance.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/halo/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/DataGridHeaderBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/TLFDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ProgressTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/TitleBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ButtonBarButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/NumericStepperDownSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/PopUpButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/ApplicationTitleBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/TabSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/CheckBoxIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/NumericStepperUpSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleModule.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ProgressIndeterminateSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/RadioButtonIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/DateChooserMonthArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/SliderThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ComboBoxArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/MenuBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ProgressBarSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/ScrollThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SetStyleActionInstance.as</path>

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

--- frameworks/projects/airframework/src/mx/core/WindowedApplication.as
+++ frameworks/projects/airframework/src/mx/core/WindowedApplication.as
@@ -2146,7 +2146,7 @@
             if (gripSkin)
             {
                 var tmp:CSSStyleDeclaration =
-                    StyleManager.getStyleDeclaration("." + gripSkin);
+                    styleManager.getStyleDeclaration("." + gripSkin);
                 gripper.styleName = gripSkin;
             }
             rawChildren.addChild(gripper);


Transferred from the Adobe Open Source Subversion Repository

Revision: 16752
Author:   dloverin@adobe.com
Date:     2010-06-30T20:16:39.449998Z

Log Message:
-----------
Fix problem compiling WindowedApplication for ASDoc.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airspark/src/spark/components/WindowedApplication.as</path>

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

--- frameworks/projects/airframework/src/mx/core/WindowedApplication.as
+++ frameworks/projects/airframework/src/mx/core/WindowedApplication.as
@@ -2639,7 +2639,7 @@
         const vsLoc:File = File.applicationDirectory.resolvePath(viewSourceURL);
         if (vsLoc.exists)
         {
-            const screenRect:Rectangle = Screen.mainScreen.visibleBounds;
+            const screenRect:Rectangle = flash.display.Screen.mainScreen.visibleBounds;
             const screenWidth:int = screenRect.width;
             const screenHeight:int = screenRect.height;


Transferred from the Adobe Open Source Subversion Repository

Revision: 11179
Author:   preilly@adobe.com
Date:     2009-10-27T15:05:06.188862Z

Log Message:
-----------
* Weekly batch of compiler fixes.

QE notes:
Doc notes:
Bugs: SDK-23111, SDK-23262, SDK-17908, SDK-21737, SDK-23559
Reviewer: Corey
Tests run: full cyclone
Is noteworthy for integration: no
Code-level description of changes:

  frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as

    Added isExecuting logic to prevent infinite recursion with two way
    bindings.  We have a check in the Bindable generated setter, but
    it fails, because "NaN !== NaN" is returning true.  Go figure.

  modules/swfutils/src/java/flash/util/StringUtils.java

    Tweaked formatString() to handle unicode characters and added
    unformatString() to do the opposite for direct AST generation.

  modules/compiler/src/java/flex2/compiler/Source.java

    Added shortName arg to the constructor used by the
    InterfaceCompiler for inline components.

  modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java

    Modified completeTwoWayBindings() to ensure the destination is
    Bindable.

  modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.java

    Modified "Node formatExpr()" to use StringUtils.unformatString()
    to mimic what ASC's scanner would have done if it had read in the
    value.

  modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java

    Modified addExcludeClassNode() to no longer set the line and
    column for the inlineExcludeNode and excludeTextNode, so they
    don't have warnings and errors reported for them.  I guess no one
    compiles the frameworks with -keep.  Otherwise, this would have
    blocked them.

    Modified createInlineComponentUnit() and createDefinitionUnit() to
    pass in the className, as the shortName, to the Source
    constructor.

  modules/antTasks/src/flex/ant/MxmlcTask.java
  modules/antTasks/src/flex/ant/CompcTask.java
  modules/antTasks/src/flex/ant/AsDocTask.java

    Added support for show-invalid-css-property-warnings option.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/swfutils/src/java/flash/util/StringUtils.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/antTasks/src/flex/ant/AsDocTask.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/Source.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/antTasks/src/flex/ant/MxmlcTask.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/antTasks/src/flex/ant/CompcTask.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java</path>

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

--- frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as
+++ frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as
@@ -282,6 +282,7 @@
         this.next = next;
         events = {};
         useWeakReference = false;
+        isExecuting = false;
     }

     //--------------------------------------------------------------------------
@@ -368,6 +369,12 @@
      *  @productversion Flex 3
      */
     private var events:Object;
+
+    /**
+     * True while handling a change event.  Used to prevent two way
+     * bindings from getting into an infinite loop.
+     */
+    private var isExecuting:Boolean;

     //--------------------------------------------------------------------------
     //
@@ -536,17 +543,29 @@
      */
     private function wrapHandler(event:Event):void
     {
-        if (next)
-            next.reset(getHostPropertyValue());
-
-        if (event is PropertyChangeEvent)
-        {
-            if ((event as PropertyChangeEvent).property == name)
-                handler(event as PropertyChangeEvent);
-        }
-        else
-        {
-            handler(event);
+        if (!isExecuting)
+        {
+            try
+            {
+                isExecuting = true;
+
+                if (next)
+                    next.reset(getHostPropertyValue());
+
+                if (event is PropertyChangeEvent)
+                {
+                    if ((event as PropertyChangeEvent).property == name)
+                        handler(event as PropertyChangeEvent);
+                }
+                else
+                {
+                    handler(event);
+                }
+            }
+            finally
+            {
+                isExecuting = false;
+            }
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

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:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/formatters/ZipCodeFormatter.as
+++ frameworks/projects/framework/src/mx/formatters/ZipCodeFormatter.as
@@ -64,6 +64,11 @@
  *  @includeExample examples/ZipCodeFormatterExample.mxml
  *
  *  @see mx.formatters.SwitchSymbolFormatter
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ZipCodeFormatter extends Formatter
 {
@@ -88,6 +93,11 @@

 	/**
 	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function ZipCodeFormatter()
 	{
@@ -124,6 +134,11 @@
 	 *  "###-###" and "### ###".
 	 *
 	 *  @default "#####"
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get formatString():String
 	{
@@ -168,6 +183,11 @@
 	 *
 	 *  @return Formatted String. Empty if an error occurs. A description
 	 *  of the error condition is written to the error property.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	override public function format(value:Object):String
 	{


Extended Sample with ability to set window title and icon and take screenshots

--- Bin/Data/Scripts/Utilities/Sample.as
+++ Bin/Data/Scripts/Utilities/Sample.as
@@ -1,7 +1,9 @@
 // Common sample initialization as a framework for all samples.
 //    - Create Urho3D logo at screen;
+//    - Set custom window title and icon;
 //    - Create Console and Debug HUD, and use F1 and F2 key to toggle them;
 //    - Toggle rendering options from the keys 1-8;
+//    - Take screenshots with key 9;
 //    - Handle Esc key down to hide Console or exit application;

 Sprite@ logoSprite;
@@ -10,6 +12,9 @@
 {
     // Create logo
     CreateLogo();
+
+    // Set custom window Title & Icon
+    SetWindowTitleAndIcon();

     // Create console and debug HUD
     CreateConsoleAndDebugHud();
@@ -57,6 +62,13 @@

     // Set a low priority for the logo so that other UI elements can be drawn on top
     logoSprite.priority = -100;
+}
+
+void SetWindowTitleAndIcon()
+{
+    Image@ icon = cache.GetResource("Image", "Textures/LogoLarge.png");
+    graphics.windowIcon = icon;
+    graphics.windowTitle = "Urho3D Sample";
 }

 void CreateConsoleAndDebugHud()
@@ -158,5 +170,14 @@
         // Instancing
         else if (key == '8')
             renderer.dynamicInstancing = !renderer.dynamicInstancing;
+
+        // Take screenshot
+        else if (key == '9')
+        {
+        Image@ screenshot = Image();
+        graphics.TakeScreenShot(screenshot);
+        screenshot.FlipVertical();
+        screenshot.SavePNG("Data/" + time.timeStamp + " Screenshot.png"); // Here we save in the Data folder with date and time appended
+	    }
     }
 }


Added getters on the Assets.

Added getters on the Assets.

--- src/aerys/minko/type/loader/AssetsLibrary.as
+++ src/aerys/minko/type/loader/AssetsLibrary.as
@@ -25,6 +25,21 @@
 			initializeSignals();
 		}

+		public function get materials():Object
+		{
+			return _materials;
+		}
+
+		public function get textures():Object
+		{
+			return _textures;
+		}
+
+		public function get geometries():Object
+		{
+			return _geometries;
+		}
+
 		private function initialize():void
 		{
 			_geometries		= {};


Added some hooks for subclasses.

Added some hooks for subclasses.

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

--- src/as/com/threerings/util/MediaContainer.as
+++ src/as/com/threerings/util/MediaContainer.as
@@ -139,6 +139,8 @@
      */
     protected function setupSwfOrImage (url :String) :void
     {
+        startedLoading();
+
         // create our loader and set up some event listeners
         var loader :Loader = new Loader();
         _media = loader;
@@ -353,6 +355,7 @@
      */
     protected function loadError (event :IOErrorEvent) :void
     {
+        stoppedLoading();
         setupBrokenImage(-1, -1);
     }

@@ -413,6 +416,7 @@

         updateContentDimensions(info.width, info.height);
         updateLoadingProgress(1, 1);
+        stoppedLoading();
     }

     /**
@@ -482,6 +486,24 @@
         // nada, by default
     }

+    /**
+     * Called when we've started loading new media. Will not be called
+     * for new media that does not require loading.
+     */
+    protected function startedLoading () :void
+    {
+        // nada
+    }
+
+    /**
+     * Called when we've stopped loading, which may be as a result of
+     * completion, an error while loading, or early termination.
+     */
+    protected function stoppedLoading () :void
+    {
+        // nada
+    }
+
     /** The unaltered URL of the content we're displaying. */
     protected var _url :String;


Transferred from the Adobe Open Source Subversion Repository

Revision: 6792
Author:   jimurphy@adobe.com
Date:     2009-05-11T18:24:09.346026Z

Log Message:
-----------
Merged revisions 6729,6731,6746,6755,6757,6765,6767-6768,6770-6772,6775,6784-6786,6790 from http://p01weblab02.corp.adobe.com/svn/opensource/flex/sdk/branches/beta1

Modified Paths:
--------------
<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/utilities/src/FlashContainerPlaceholder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</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/flash-integration/src/mx/flash/FlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.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/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/TypeHelper.java</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types" copyfrom-rev="6790" action="A">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/swf/FXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/RadioButtonSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types/FXGMatrix.java" copyfrom-rev="6790" action="R">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types/FXGMatrix.java</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
@@ -956,10 +956,8 @@
             return;

         // Check if the label text is truncated
-        // TODO EGeorgie: use TextGraphicElement API to check for truncated text.
         labelElement.validateNow();
-        var truncated:Boolean = labelElement.getLayoutBoundsWidth() < labelElement.getPreferredBoundsWidth() ||
-                                labelElement.getLayoutBoundsHeight() < labelElement.getPreferredBoundsHeight();
+        var truncated:Boolean = labelElement.isTruncated();

         // If the label is truncated, show the whole label string as a tooltip
         super.toolTip = truncated ? labelElement.text : null;


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

--- frameworks/projects/advancedgrids/src/mx/olap/IOLAPTuple.as
+++ frameworks/projects/advancedgrids/src/mx/olap/IOLAPTuple.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.olap
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11657
Author:   rfrishbe@adobe.com
Date:     2009-11-11T17:24:23.830556Z

Log Message:
-----------
We need to set menu's automationParent/automationOwner.  This is needed for automation, and this was already in the MX Window/WindowedApplication but not in Spark Window/WIndowedApplication

QE notes: -
Doc notes: -
Bugs: SDK-23798
Reviewer: Darrell
Tests run: checkintest
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>

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

--- frameworks/projects/airspark/src/spark/components/Window.as
+++ frameworks/projects/airspark/src/spark/components/Window.as
@@ -1275,8 +1275,20 @@
      */
     public function set menu(value:FlexNativeMenu):void
     {
+        if (_menu)
+        {
+            _menu.automationParent = null;
+            _menu.automationOwner = null;
+        }
+
         _menu = value;
         menuChanged = true;
+
+        if (_menu)
+        {
+            menu.automationParent = this;
+            menu.automationOwner = this;
+        }
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 12733
Author:   smgilson@adobe.com
Date:     2009-12-09T18:19:48.608649Z

Log Message:
-----------
ASDoc l10n prep

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/mx/controls/treeClasses/MXTreeItemRenderer.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/framework/src/mx/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IRepeater.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/listClasses/MXItemRenderer.as</path>

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

--- frameworks/projects/framework/src/mx/core/IVisualElement.as
+++ frameworks/projects/framework/src/mx/core/IVisualElement.as
@@ -236,11 +236,12 @@
     /**
      *  Defines a set of adjustments that can be applied to the object's
      *  transform in a way that is invisible to its parent's layout.
-     *  For example, if you want a layout to adjust for an object
-     *  that will be rotated 90 degrees, you set the object's
+     *
+     *
For example, if you want a layout to adjust for an object
+     *  that is rotated 90 degrees, set the object's
      *  rotation property. If you want the layout to not
      *  adjust for the object being rotated,
-     *  you set its postLayoutTransformOffsets.rotationZ property.
+     *  set its postLayoutTransformOffsets.rotationZ property.

      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -255,7 +256,8 @@
     function set postLayoutTransformOffsets(value:TransformOffsets):void;

     /**
-     *  True, when the element is in 3D. The element can be in 3D either because
+     *  Contains true, when the element is in 3D.
+     *  The element can be in 3D either because
      *  it has 3D transform properties or it has 3D post layout transform offsets or both.
      *
      *  @see #postLayoutTransformOffsets


Transferred from the Adobe Open Source Subversion Repository

Revision: 3714
Author:   dsubrama@adobe.com
Date:     2008-10-17T19:25:03.490705Z

Log Message:
-----------
Fixes MXMLG-161. BitmapFill needed setters/getters for its properties that dispatched propertyChange events upon setting new values. Post-MAX we will deprecate originX/originY/offsetX/offsetY and proxy those values to transformX/transformY/x/y as per the FXG spec. That work is captured in bug SDK-17404.

Checkintests: Pass
Reviewer: Jason
QA: Yes

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as

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

--- frameworks/projects/framework/src/mx/graphics/BitmapFill.as
+++ frameworks/projects/framework/src/mx/graphics/BitmapFill.as
@@ -16,9 +16,12 @@
 import flash.display.BitmapData;
 import flash.display.DisplayObject;
 import flash.display.Graphics;
+import flash.events.EventDispatcher;
 import flash.geom.Matrix;
 import flash.geom.Rectangle;
 import flash.utils.getDefinitionByName;
+
+import mx.events.PropertyChangeEvent;

 /**
  *  Defines a set of values used to fill an area on screen
@@ -29,7 +32,7 @@
  *  @see flash.display.BitmapData
  *  @see flash.display.DisplayObject
  */
-public class BitmapFill implements IFill
+public class BitmapFill extends EventDispatcher implements IFill
 {
 	include "../core/Version.as";

@@ -70,9 +73,12 @@
 	//--------------------------------------------------------------------------

 	//----------------------------------
-	//  centerX
-	//----------------------------------
-
+	//  originX
+	//----------------------------------
+
+	private var _originX:Number = 0;
+
+	[Bindable("propertyChange")]
 	[Inspectable(category="General")]

 	/**
@@ -82,12 +88,28 @@
 	 *
 	 *  @default 0
 	 */
-	public var originX:Number = 0;
-
-	//----------------------------------
-	//  centerY
-	//----------------------------------
-
+	public function get originX():Number
+	{
+		return _originX;
+	}
+
+	public function set originX(value:Number):void
+	{
+		var oldValue:Number = _originX;
+		if (value != oldValue)
+		{
+			_originX = value;
+			dispatchFillChangedEvent("originX", oldValue, value);
+		}
+	}
+
+	//----------------------------------
+	//  originY
+	//----------------------------------
+
+	private var _originY:Number = 0;
+
+	[Bindable("propertyChange")]
 	[Inspectable(category="General")]

 	/**
@@ -97,12 +119,27 @@
 	 *
 	 *  @default 0
 	 */
-	public var originY:Number = 0;
+	public function get originY():Number
+	{
+		return _originY;
+	}
+
+	public function set originY(value:Number):void
+	{
+		var oldValue:Number = _originY;
+		if (value != oldValue)
+		{
+			_originY = value;
+			dispatchFillChangedEvent("originY", oldValue, value);
+		}
+	}

 	//----------------------------------
 	//  offsetX
 	//----------------------------------
-
+	private var _offsetX:Number = 0;
+
+	[Bindable("propertyChange")]
 	[Inspectable(category="General")]

 	/**
@@ -111,12 +148,27 @@
 	 *
 	 *  @default 0
 	 */
-	public var offsetX:Number = 0;
+	public function get offsetX():Number
+	{
+		return _offsetX;
+	}
+
+	public function set offsetX(value:Number):void
+	{
+		var oldValue:Number = _offsetX;
+		if (value != oldValue)
+		{
+			_offsetX = value;
+			dispatchFillChangedEvent("offsetX", oldValue, value);
+		}
+	}

 	//----------------------------------
 	//  offsetY
 	//----------------------------------
-
+	private var _offsetY:Number = 0;
+
+	[Bindable("propertyChange")]
 	[Inspectable(category="General")]

 	/**
@@ -125,13 +177,30 @@
 	 *
 	 *  @default 0
 	 */
-	public var offsetY:Number = 0;
+	public function get offsetY():Number
+	{
+		return _offsetY;
+	}
+
+	public function set offsetY(value:Number):void
+	{
+		var oldValue:Number = _offsetY;
+		if (value != oldValue)
+		{
+			_offsetY = value;
+			dispatchFillChangedEvent("offsetY", oldValue, value);
+		}
+	}

 	//----------------------------------
 	//  repeat
 	//----------------------------------

-	[Inspectable(category="General")]
+	private var _repeat:Boolean = true;
+
+	[Bindable("propertyChange")]
+    [Inspectable(category="General")]
+

 	/**
 	 *  Whether the bitmap is repeated to fill the area.
@@ -141,12 +210,28 @@
 	 *
 	 *  @default true
 	 */
-	public var repeat:Boolean = true;
+	public function get repeat():Boolean
+	{
+		return _repeat;
+	}
+
+	public function set repeat(value:Boolean):void
+	{
+		var oldValue:Boolean = _repeat;
+		if (value != oldValue)
+		{
+			_repeat = value;
+			dispatchFillChangedEvent("repeat", oldValue, value);
+		}
+	}

 	//----------------------------------
 	//  rotation
 	//----------------------------------
-
+
+	private var _rotation:Number = 0;
+
+	[Bindable("propertyChange")]
 	[Inspectable(category="General")]

 	/**
@@ -155,12 +240,28 @@
 	 *
 	 *  @default 0
 	 */
-	public var rotation:Number = 0.0;
+	public function get rotation():Number
+	{
+		return _rotation;
+	}
+
+	public function set rotation(value:Number):void
+	{
+		var oldValue:Number = _rotation;
+		if (value != oldValue)
+		{
+			_rotation = value;
+			dispatchFillChangedEvent("rotation", oldValue, value);
+		}
+	}

 	//----------------------------------
 	//  scaleX
 	//----------------------------------
-
+
+	private var _scaleX:Number = 1.0;
+
+	[Bindable("propertyChange")]
 	[Inspectable(category="General")]

 	/**
@@ -170,12 +271,28 @@
 	 *
 	 *  @default 1.0
 	 */
-	public var scaleX:Number = 1.0;
+	public function get scaleX():Number
+	{
+		return _scaleX;
+	}
+
+	public function set scaleX(value:Number):void
+	{
+		var oldValue:Number = _scaleX;
+		if (value != oldValue)
+		{
+			_scaleX = value;
+			dispatchFillChangedEvent("scaleX", oldValue, value);
+		}
+	}

 	//----------------------------------
 	//  scaleY
 	//----------------------------------

+	private var _scaleY:Number = 1.0;
+
+	[Bindable("propertyChange")]
 	[Inspectable(category="General")]

 	/**
@@ -185,7 +302,20 @@
 	 *
 	 *  @default 1.0
 	 */
-	public var scaleY:Number = 1.0;
+	public function get scaleY():Number
+	{
+		return _scaleY;
+	}
+
+	public function set scaleY(value:Number):void
+	{
+		var oldValue:Number = _scaleY;
+		if (value != oldValue)
+		{
+			_scaleY = value;
+			dispatchFillChangedEvent("scaleY", oldValue, value);
+		}
+	}

 	//----------------------------------
 	//  source
@@ -263,7 +393,10 @@
 	//  smooth
 	//----------------------------------

-	[Inspectable(category="General")]
+	private var _smooth:Boolean = false;
+
+	[Inspectable(category="General")]
+	[Bindable("propertyChange")]

 	/**
 	 *  A flag indicating whether to smooth the bitmap data
@@ -271,7 +404,20 @@
 	 *
 	 *  @default false
 	 */
-	public var smooth:Boolean = false;
+	public function get smooth():Boolean
+	{
+		return _smooth;
+	}
+
+	public function set smooth(value:Boolean):void
+	{
+		var oldValue:Boolean = _smooth;
+		if (value != oldValue)
+		{
+			_smooth = value;
+			dispatchFillChangedEvent("smooth", oldValue, value);
+		}
+	}

 	//--------------------------------------------------------------------------
 	//
@@ -312,6 +458,16 @@
 		matrix.rotate(rotation);
 		matrix.translate(offsetX, offsetY);
 	}
+
+	/**
+	 *  @private
+	 */
+	private function dispatchFillChangedEvent(prop:String, oldValue:*,
+											  value:*):void
+	{
+        dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, prop,
+															oldValue, value));
+	}
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19816
Author:   rfrishbe@adobe.com
Date:     2011-01-20T00:06:35.709500Z

Log Message:
-----------
Cleaning up how virtualization works.  Getting rid of an extra validateNow() and a setLayoutBoundsSize(0,0) call.  Now when grabbing a virtual item renderer, we just "bring it up to speed" in that we are in the middle of an updateDisplayList() pass, so we force it to validateProperties() and validateSize().  It'll just validateDisplayList() naturally as part of the natural LayoutManager pass that it's already in the middle of.

The main performance boost comes from removing the setLayoutBoundsSize(0,0) call, which was already made in the justify layout case, so we shouldn't see a huge difference in Mobile performance; however, we should see a performance boost for scrolling virtual lists in general because of this.

QE notes: -
Doc notes:
Bugs: SDK-29057
Reviewer: Evtim, Hans
Tests run: checkintests, full mustella cyclone (tho I did make one minor change afterwards in DataGroup)
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -23,11 +23,13 @@
 import mx.core.IInvalidating;
 import mx.core.ILayoutElement;
 import mx.core.IVisualElement;
+import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
-import mx.core.UIComponentGlobals;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
 import mx.events.PropertyChangeEvent;
+import mx.managers.ILayoutManagerClient;
+import mx.managers.LayoutManager;
 import mx.utils.MatrixUtil;

 import spark.components.supportClasses.GroupBase;
@@ -1245,15 +1247,6 @@
                 elt.includeInLayout = false;
                 elt.visible = false;

-                // If the width isn't constrained,
-                // reset the size back to (0,0), otherwise when the element is reused
-                // it will be validated at its last layout size which causes
-                // problems with text reflow.
-                var widthConstrained:Boolean = ((layout is VerticalLayout) &&
-                    (VerticalLayout(layout).horizontalAlign == HorizontalAlign.JUSTIFY));
-                if (!widthConstrained)
-                    elt.setLayoutBoundsSize(0, 0, false);
-
                 freeRenderers.push(elt);
             }
             else if (elt)
@@ -1439,18 +1432,19 @@
                 addItemRendererToDisplayList(DisplayObject(elt));
             }

+            // We have the renderer now.  getVirtualElement() is called from within layout's
+            // updateDisplayList().  This means it hasn't gone through a fully baked validation
+            // pass yet.  To get it in to a valid state, we want to first force a
+            // commitProperties() and measure() to run on our item renderer.
+            if (elt is ILayoutManagerClient)
+                LayoutManager.getInstance().validateClient(elt as ILayoutManagerClient, true);
+
+            // Now, we can resume normal layout updateDisplayList() code.  The layout
+            // could directly run this setLayoutBoundsSize() for us, but as legacy,
+            // getVirtualElementAt() calls this on behalf of the layout system
+            // if eltWidth and eltHeight are both NaN
             if (!isNaN(eltWidth) || !isNaN(eltHeight))
-            {
-                // If we're going to set the width or height of this
-                // layout element, first force it to initialize its
-                // measuredWidth,Height.
-                if (elt is IInvalidating)
-                    IInvalidating(elt).validateNow();
                 elt.setLayoutBoundsSize(eltWidth, eltHeight);
-            }
-
-            if (elt is IInvalidating)
-                IInvalidating(elt).validateNow();

             if (createdIR)
                 dispatchEvent(new RendererExistenceEvent(RendererExistenceEvent.RENDERER_ADD, false, false, elt, index, item));


Transferred from the Adobe Open Source Subversion Repository

Revision: 6137
Author:   egeorgie@adobe.com
Date:     2009-04-10T23:58:54.405311Z

Log Message:
-----------
Fix bugs: http://bugs.adobe.com/jira/browse/SDK-20513 distributeHeight() method should be protected or private for VerticalLayout;
http://bugs.adobe.com/jira/browse/SDK-20514 distributeWidth() method should be private or protected for HorizontalLayout;
http://bugs.adobe.com/jira/browse/SDK-20460 typo in Flex 4 language reference for requestedRowCount property of VerticalLayout;
http://bugs.adobe.com/jira/browse/SDK-18713 Layouts are missing enum metadata for alignment

Fix: update the layouts, add initial padding support.

QE Notes: None
Doc Notes: None
Bugs: SDK-20513, SDK-20514, SDK-20460, SDK-18713
Reviewer: Hans
tests: checkintests, mustella (layout, group, datagroup)

Modified Paths:
--------------
<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/layout/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -819,6 +819,12 @@
                 IDataRenderer(elt).data = null;  // reduce probability of leaks
                 elt.visible = false;
                 elt.includeInLayout = false;
+
+                // Reset back to (0,0), otherwise when the element is reused
+                // it will be validated at its last layout size which causes
+                // problems with text reflow.
+                elt.setLayoutBoundsSize(0, 0, false);
+
                 freeRenderers.push(elt);
             }
             else if (elt)


Transferred from the Adobe Open Source Subversion Repository

Revision: 6407
Author:   egeorgie@adobe.com
Date:     2009-04-30T03:50:59.993576Z

Log Message:
-----------
Updates to the IGraphicElement interface.
Code generation for FXG text element has been updated.

QE Notes: None
Doc Notes: None
Bugs:
Reviewer: Ely, Pete
tests: checkintests, mustella (components, group, dataGroup, layout)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/VideoElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexTextGraphicNode.java</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/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/InvalidatingSprite.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/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/ISharedGraphicsDisplayObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IGraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/core/IGraphicElement.as
+++ frameworks/projects/spark/src/spark/core/IGraphicElement.as
@@ -61,17 +61,13 @@
      *  The shared DisplayObject where this
      *  IGraphicElement is drawn.
      *
-     *  The parent Group sets this property to the
-     *  DisplayObject created by the first
-     *  IGraphicElement in the sequence.
-     *
      *  Implementers should not create the DisplayObject
      *  here, but in createDisplayObject().
-     *
+     *
      *  @see #createDisplayObject
      *  @see #validateDisplayList
-     *  @see #shareIndex
-     *
+     *  @see #sharedIndex
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
@@ -79,13 +75,8 @@
      */
     function get displayObject():DisplayObject;

-    /**
-     *  @private
-     */
-    function set displayObject(value:DisplayObject):void;
-
     //----------------------------------
-    //  shareIndex
+    //  sharedIndex
     //----------------------------------

     /**
@@ -102,8 +93,7 @@
      *  A value of 0 also indicates that this element creates the
      *  DisplayObject for its sequence.
      *
-     *  Group sets this index before updating the
-     *  displayObject property.
+     *  Group manages this property.
      *
      *  @see #displayObject
      *  @see #createDisplayObject
@@ -113,12 +103,12 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    function get shareIndex():int;
+    function get sharedIndex():int;

     /**
      *  @private
      */
-    function set shareIndex(value:int):void;
+    function set sharedIndex(value:int):void;

     //--------------------------------------------------------------------------
     //
@@ -129,13 +119,12 @@
     /**
      *  Creates a new DisplayObject where this IGraphicElement
      *  is drawn.
+     *
+     *  Subsequent calls to the getter of the displayObject property must
+     *  return the same display object.
      *
      *  After the DisplayObject is created, the parent Group
-     *  will assign it to this element's displayObject property as well
-     *  update the display objects of all the other elements in the sequence.
-     *
-     *  Implementers of this method must always create a new DisplayObject instead
-     *  of returning the value of the displayObject property.
+     *  will pass along the display objects to the rest of the elements in the sequence.
      *
      *  Group will ensure that this method is called only when needed.
      *
@@ -148,8 +137,9 @@
      *  To reevaluate the shared sequences, call the parent Group
      *  graphicElementLayerChanged() method.
      *
-     *  To force the Group to discard the element's current
-     *  DisplayObject call the parent Group
+     *  To force the Group to remove the element's current
+     *  DisplayObject from its display list and recalculate the
+     *  display object sharing, call the parent Group
      *  discardDisplayObject() method.
      *
      *  @return The display object created
@@ -176,7 +166,10 @@
      *  rest of the elements in the sequence this method must return false.
      *  Examples for such properties are rotation, scale, transform,
      *  mask, alpha, filters, color transform, 3D, layer, etc.

-     *
+     *
+     *  When this method returns true, subsequent calls to the getter of the
+     *  displayObject property must return the same display object.
+     *
      *
Note that in certain cases the sharedDisplayObject may be
      *  the parent Group itself.  In the rest of the cases the
      *  DisplayObject is created by the first element in the sequence.

@@ -188,7 +181,8 @@
      *  @return Returns true when this IGraphicElement can draw itself
      *  to the shared DisplayObject of the sequence.
      *
-     *  @see #closeSequence
+     *  @see #canShareWithPrevious
+     *  @see #canShareWithNext
      *  @see spark.components.Group#graphicElementLayerChanged
      *
      *  @langversion 3.0
@@ -196,36 +190,50 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    function canDrawToShared(sharedDisplayObject:DisplayObject):Boolean;
-
-    /**
-     *  Returns whether the parent Group can append graphic
-     *  elements to this element's shared sequence.
-     *
-     *  This method is called only for elements that already return
-     *  true for canDrawToShared().
-     *
-     *
This method is useful for the cases where a graphic element uses
-     *  the shared DisplayObject in a way that prevents any other
-     *  element from using drawing to it.  For example, if a graphic element
-     *  adds child display objects to the shared DisplayObject,
-     *  it should return false, otherwise any subsequent draws to the
-     *  shared DisplayObject will have the incorrect
-     *  rendering order.

-     *
-     *  @return Returns true when this IGraphicElement can
-     *  have more elements appended to its shared sequence.
-     *
-     *  @see #canDrawToShared
-     *  @see spark.components.Group#graphicElementLayerChanged
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    function closeSequence():Boolean;
-
+    function setSharedDisplayObject(sharedDisplayObject:DisplayObject):Boolean;
+
+    /**
+     *  Return true if this IGraphicElement is compatible and can
+     *  share display objects with the previous IGraphicElement
+     *  in the sequence.
+     *
+     *
Note that in certain cases the element may be passed offered the parent
+     *  Group itself in a call to setSharedDisplayObject.
+     *  In those cases, this method won't be called.

+     *
+     *  @param element The element that comes before this element in the sequence.
+     *  @return Returns true when this element is compatible with the previous
+     *  element in the sequence.
+     *
+     *  @see #canShareWithNext
+     *  @see #setSharedDisplayObject
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function canShareWithPrevious(element:IGraphicElement):Boolean;
+
+    /**
+     *  Return true if this IGraphicElement is compatible and can
+     *  share display objects with the next IGraphicElement
+     *  in the sequence.
+     *
+     *  @param element The element that comes after this element in the sequence.
+     *  @return Returns true when this element is compatible with the previous
+     *  element in the sequence.
+     *
+     *  @see #canShareWithPrevious
+     *  @see #setSharedDisplayObject
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function canShareWithNext(element:IGraphicElement):Boolean;
+
     /**
      *  Called by Group when an IGraphicElement
      *  is added to or removed from a Group.
@@ -282,13 +290,13 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    function validateSize(recursive:Boolean = false):void;
+    function validateSize():void;

     /**
      *  Called by the parent Group to redraw this element
      *  in its displayObject property.
      *
-     *
If the element is the first in the sequence (shareIndex
+     *
If the element is the first in the sequence (sharedIndex
      *  is less than or equal to zero) it must clear the displayObject
      *  graphics and set it up as necessary for drawing the rest of the elements.

      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 4106
Author:   rfrishbe@adobe.com
Date:     2008-11-14T01:56:47.949068Z

Log Message:
-----------
Mostly rename changes.  IVisualItem -> IVisualElement.  IVisualContainer -> IVisualElementContainer.  Also changed the APIs so that it's addElement, removeElement, etc.. instead of addItem, removeItem, etc...  Moreover, all of these APIs have been added to IVisualElementContainer (not just the read-only ones).  Now there's a common interface for all containers (even Halo's Container class implements it).  There's no more need to do:

if (x is Group || x is FxContainer)

Just use the IVisualElementContainer interface.

Some classes, like FxScroller (and perhaps DataGroup/FxDataContainer), will only implement the "getter" part of the API.  For now, if you call the mutation methods, we will throw an exception.  Perhaps later we'll add a separate interface for the read-only portion and the mutator interface will extend that one.

There might be a few more places in the code that need to be updated to use the new names for the methods.  I know Mustella needs cleaning up so it doesn't use getItem and uses getElement instead.  I've left the old APIs in there exactly for this purpose, so we can gradually move over to the new names (esp. QA).

At some point soon, we will remove the old methods as well as type them more strictly to only accept IVisualElements, for example addElement(element:IVisualElement).  Part of this work is dependent on updating the Flash Component Kit so that it implements IVisualElement (and perhaps IVisualElementContainer for containers).

Ran checkintests and all gumbo mustella tests.

QE Notes: Please update your tests to use addElement, removeElement, etc... along with the new IVisualElementContainer interface.  The old APIs (addItem, removeItem, etc...) will be removed soon.
Doc Notes: None
Bugs: -
Reviewer: Hans (he patiently sat through all these files...)

Modified Paths:
--------------
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IVisualContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/RemoveActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxFadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IUIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutItem.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/core/Container.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualItem.as" copyfrom-rev="4083" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IVisualContainer.as" copyfrom-rev="4083" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElementContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/effects/RemoveAction.as
+++ frameworks/projects/spark/src/spark/effects/RemoveAction.as
@@ -18,6 +18,7 @@
 import mx.effects.Effect;
 import mx.effects.effectClasses.PropertyChanges;
 import mx.effects.effectClasses.RemoveChildActionInstance;
+import mx.core.IVisualElementContainer;

 use namespace mx_internal;

@@ -135,7 +136,9 @@
         var container:* = target.parent;
         if (property == "index")
             return container ?
-                (!(container is Group) ? container.getChildIndex(target) : container.getItemIndex(target)) : 0;
+                    ((container is IVisualElementContainer) ?
+                    IVisualElementContainer(container).getElementIndex(target) : container.getChildIndex(target))
+                : 0;

 		return super.getValueFromTarget(target, property);
 	}
@@ -154,9 +157,9 @@
             {
                 // TODO : workaround for current situation of mis-match between
                 // Group having 'item's and Flex3 components having 'parent's
-                if (value is Group)
-                    value.addItemAt(target, Math.min(props.index,
-                        value.numItems));
+                if (value is IVisualElementContainer)
+                    IVisualElementContainer(value).addElementAt(target, Math.min(props.index,
+                        IVisualElementContainer(value).numElements));
                 else
                     value.addChildAt(target, Math.min(props.index,
                         value.numChildren));


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

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

 package mx.containers.utilityClasses
 {


Added 'prompt' property

Added 'prompt' property

Added 'errorMessage' property

Fixed bug with dispatching InputAssistEvent.CHANGE for null selectedItem

Fixed bug with auto completion by hitting ENTER key

--- src/com/jabbypanda/controls/InputAssist.as
+++ src/com/jabbypanda/controls/InputAssist.as
@@ -1,34 +1,34 @@
 package com.jabbypanda.controls {
-
-	import com.jabbypanda.data.SearchModes;
-	import com.jabbypanda.event.HighlightItemListEvent;
-	import com.jabbypanda.event.InputAssistEvent;
-
-	import flash.display.DisplayObject;
-	import flash.display.DisplayObjectContainer;
-	import flash.events.Event;
-	import flash.events.FocusEvent;
-	import flash.events.KeyboardEvent;
-	import flash.ui.Keyboard;
-
-	import mx.collections.ArrayCollection;
-	import mx.core.FlexGlobals;
-	import mx.core.mx_internal;
-	import mx.events.FlexEvent;
-	import mx.events.FlexMouseEvent;
-	import mx.managers.FocusManager;
-	import mx.managers.SystemManager;
-	import mx.styles.CSSStyleDeclaration;
-	import mx.styles.StyleProxy;
-
-	import spark.components.PopUpAnchor;
-	import spark.components.TextInput;
-	import spark.components.supportClasses.SkinnableComponent;
-	import spark.events.TextOperationEvent;
-	import spark.utils.LabelUtil;
+
+    import com.jabbypanda.data.SearchModes;
+    import com.jabbypanda.event.HighlightItemListEvent;
+    import com.jabbypanda.event.InputAssistEvent;
+
+    import flash.display.DisplayObject;
+    import flash.display.DisplayObjectContainer;
+    import flash.events.Event;
+    import flash.events.FocusEvent;
+    import flash.events.KeyboardEvent;
+    import flash.ui.Keyboard;
+
+    import mx.collections.ArrayCollection;
+    import mx.core.FlexGlobals;
+    import mx.core.mx_internal;
+    import mx.events.FlexEvent;
+    import mx.events.FlexMouseEvent;
+    import mx.managers.FocusManager;
+    import mx.managers.SystemManager;
+    import mx.styles.CSSStyleDeclaration;
+    import mx.styles.StyleProxy;
+
+    import spark.components.PopUpAnchor;
+    import spark.components.TextInput;
+    import spark.components.supportClasses.SkinnableComponent;
+    import spark.events.TextOperationEvent;
+    import spark.utils.LabelUtil;

     use namespace mx_internal;
-
+
     /**
      *  The color of the background for highlighted text segments
      *
@@ -41,9 +41,9 @@
      */
     [Style(name="highlightBackgroundColor", type="uint", format="Color", inherit="yes", theme="spark")]

-	[Event (name="change", type="com.jabbypanda.event.InputAssistEvent")]
-	public class InputAssist extends SkinnableComponent {
-
+    [Event (name="change", type="com.jabbypanda.event.InputAssistEvent")]
+    public class InputAssist extends SkinnableComponent {
+
         [Bindable]
         public var maxRows : Number = 6;

@@ -54,24 +54,22 @@

         public var requireSelection : Boolean = false;

-        public var noLookupOptionsMessage : String = "No available options";
-
         [SkinPart(required="true",type="spark.components.PopUpAnchor")]
-		public var popUp : PopUpAnchor;
+        public var popUp : PopUpAnchor;

         [SkinPart(required="true",type="odyssey.common.component.HighlightItemList")]
         public var list : HighlightItemList;

         [SkinPart(required="true",type="spark.components.TextInput")]
         public var inputTxt : TextInput;
-
+
         // Define a static variable.
         private static var classConstructed:Boolean = classConstruct();

         // Define a static method.
         private static function classConstruct():Boolean {
             var customListStyles : CSSStyleDeclaration;
-
+
             if (!FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration("com.jabbypanda.controls.InputAssist")) {
                 // If there is no CSS definition for InputAssist
                 // then create one and set the default value.
@@ -79,7 +77,7 @@
                 customListStyles.defaultFactory = function() : void {
                     this.highlightBackgroundColor = 0xFFCC00;
                 }
-
+
                 FlexGlobals.topLevelApplication.styleManager.setStyleDeclaration("com.jabbypanda.controls.InputAssist", customListStyles, true);
             }

@@ -92,36 +90,29 @@
             this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
             dataProvider = null;
         }
-
+
         [Bindable]
         public function set dataProvider(value:Object) : void {
             if (value is Array) {
-        		_collection = new ArrayCollection(value as Array);
-            }
-        	else if (value is ArrayCollection) {
-        		_collection = value as ArrayCollection;
-        	} else {
+                _collection = new ArrayCollection(value as Array);
+            }
+            else if (value is ArrayCollection) {
+                _collection = value as ArrayCollection;
+            } else {
                 _collection = new ArrayCollection();
             }
-
+
+            if (isOurFocus(this.getFocus())) {
+                filterData();
+            }
+
             _dataProviderChanged = true;
             invalidateProperties();
         }
-
+
         public function get dataProvider() : Object {
             return _collection;
         }
-
-        public function set labelField(field:String) : void {
-			_labelField = field;
-			if (list) {
-                list.labelField = field;
-            }
-		}
-
-        public function get labelField() : String {
-            return _labelField;
-        };

         public function set searchMode(searchMode : String) : void {
             _searchMode = searchMode;
@@ -129,46 +120,65 @@
                 list.searchMode = searchMode;
             }
         }
-
+
         public function get searchMode() : String {
             return _searchMode;
         };
-
+
+        public function get labelField() : String {
+            return _labelField;
+        };
+
+        public function set labelField(field:String) : void {
+            _labelField = field;
+            if (list) {
+                list.labelField = field;
+            }
+        }
+
+        public function get labelFunction() : Function	 {
+            return _labelFunction;
+        }
+
         public function set labelFunction(func:Function) : void {
-        	_labelFunction = func;
-        	if (list) {
+            _labelFunction = func;
+            if (list) {
                 list.labelFunction = func;
             }
         }
-
-        public function get labelFunction() : Function	 {
-            return _labelFunction;
-        }

         [Bindable]
         public function get selectedItem() : Object {
             return _selectedItem;
         }

-        public function set selectedItem(item : Object) : void {
+        public function set selectedItem(item : Object) : void {
             _selectedItem = item;
-            _previouslyEnteredText = enteredText = getSelectedItemDisplayLabel(_selectedItem);
-
-            _selectedItemChanged = true;
-            invalidateProperties();
+            _selectedItemChanged = true;
+            invalidateProperties();
+        }
+
+        public function get prompt() : String {
+            return _prompt;
         }

         public function set prompt(value : String) : void {
             _prompt = value;
             _promptChanged = true;
-
             invalidateProperties();
         }

-        public function get prompt() : String {
-            return _prompt;
-        }
-
+        public function get errorMessage() : String {
+            return _errorMessage;
+        }
+
+        public function set errorMessage(value : String) : void {
+            _errorMessage = value;
+            _errorMessageChanged = true;
+            invalidateProperties();
+        }
+
+
         // default filter function
         public function filterFunction(item : Object) : Boolean {
             var itemLabel : String = itemToLabel(item).toLowerCase();
@@ -192,10 +202,6 @@

             return false;
         }
-
-        public function itemToLabel(item : Object) : String {
-            return LabelUtil.itemToLabel(item, labelField, labelFunction);
-        }

         override public function set enabled(value:Boolean) : void {
             super.enabled = value;
@@ -221,7 +227,7 @@
             super.partAdded(partName, instance)

             if (instance == inputTxt) {
-                inputTxt.text = _enteredText;
+                inputTxt.text = _enteredText;

                 inputTxt.addEventListener(FocusEvent.FOCUS_IN, onInputFieldFocusIn);
                 inputTxt.addEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut);
@@ -242,48 +248,52 @@
         }

         override protected function commitProperties():void {
-            if (_dataProviderChanged) {
+            if (_dataProviderChanged) {
+                list.dataProvider = _collection;

                 if (!dataProvider || dataProvider.length == 0) {
                     enabled = false;
-                    enteredText = noLookupOptionsMessage;
-                } else {
+                    displayErrorMessage();
+                } else {
                     enabled = true;
-                    enteredText = getSelectedItemDisplayLabel(_selectedItem as Object);
-                }
-
-                list.dataProvider = _collection;
-
-                selectedItem = null;
+                    if (prompt) {
+                        displayPromptMessage();
+                    } else {
+                        displayInputTextText(selectedItem);
+                    }
+                }

                 _dataProviderChanged = false;
             }

-            if (_selectedItemChanged) {
-                var selectedIndex : int = _collection.getItemIndex(selectedItem);
-                list.selectedIndex = _collection.getItemIndex(selectedItem);
+            if (_selectedItemChanged) {
+                displayInputTextText(_selectedItem);
                 _selectedItemChanged = false;
             }

-            if (_promptChanged &&
-                dataProvider && dataProvider.length > 0
-                && !selectedItem) {
-                enteredText = _prompt;
+            if (_promptChanged) {
+                displayPromptMessage();
                 _promptChanged = false;
             }
-
+
+            if (_errorMessageChanged) {
+                displayErrorMessage();
+                _errorMessageChanged = false;
+            }
+
             if (_enabledChanged) {
                 inputTxt.enabled = enabled;
                 _enabledChanged = false;
             }

+
             // Should be last statement.
             // Don't move it up.
             super.commitProperties();
         }
-
+
         protected function set enteredText(t : String) : void {
-            _enteredText = t;
+            _enteredText = t;
             if (inputTxt) {
                 inputTxt.text = t;
             }
@@ -291,126 +301,146 @@
             if (list) {
                 list.lookupValue = _enteredText;
             }
+
+            filterData();
         }

         protected function get enteredText() : String {
             return _enteredText;
-        }
-
-        protected function acceptCompletion() : void {
+        }
+
+        protected function filterData() : void {
+            _collection.filterFunction = filterFunction;
+            _collection.refresh();
+        }
+
+        protected function itemToLabel(item : Object) : String {
+            if (!item) {
+                return "";
+            } else {
+                return LabelUtil.itemToLabel(item, labelField, labelFunction);
+            }
+        }
+
+        private function acceptCompletion() : void {
+            var proposedSelectedItem : Object;
             if (_collection.length > 0 && list.selectedIndex >= 0) {
-                _completionAccepted = true;
-                selectedItem = _collection.getItemAt(list.selectedIndex);
-                hidePopUp();
+                _completionAccepted = true;
+                proposedSelectedItem = _collection.getItemAt(list.selectedIndex);
             }
             else {
                 _completionAccepted = false;
-                selectedItem = null;
-                restoreEnteredTextAndHidePopUp(!_completionAccepted);
-            }
-
-            var e:InputAssistEvent = new InputAssistEvent(InputAssistEvent.CHANGE, _selectedItem);
-            dispatchEvent(e);
-        }
-
-        protected function filterData() : void {
-            _collection.filterFunction = filterFunction;
-            _collection.refresh();
-
+                proposedSelectedItem = null;
+                displayInputTextText(null);
+            }
+
+            if (proposedSelectedItem != selectedItem) {
+                selectedItem = proposedSelectedItem;
+                var e:InputAssistEvent = new InputAssistEvent(InputAssistEvent.CHANGE, _selectedItem);
+                dispatchEvent(e);
+                hidePopUp();
+            } else {
+                showPreviousTextAndHidePopUp(true);
+            }
+        }
+
+        private function displayOptionsList() : void {
             if (_collection.length == 0) {
                 hidePopUp();
-            } else if (!isDropDownOpen) {
-                if (forceOpen || enteredText.length > 0) {
-                    showPopUp();
-                }
-            }
+            } else if (forceOpen || enteredText.length > 0) {
+                showPopUp();
+
+                if (isDropDownOpen && requireSelection) {
+                    setListOptionsSelectedIndex();
+                }
+            }
+        }
+
+        private function displayInputTextText(selectedItem : Object) : void {
+            _previouslyDisplayedText = enteredText = getSelectedItemDisplayLabel(selectedItem as Object);
+        }
+
+        private function displayErrorMessage() : void {
+            if (_collection.length == 0) {
+                inputTxt.text = _errorMessage;
+            }
+        }
+
+        private function displayPromptMessage() : void {
+            if (_collection.length > 0) {
+                inputTxt.text = _prompt;
+            }
         }

         private function getSelectedItemDisplayLabel(item : Object) : String {
-            if (item == null) {
-                if (prompt)  {
-                    return prompt;
+            /*if (item == null) {
+            return "";
+            }*/
+            return itemToLabel(item);
+        }
+
+        private function hidePopUp() : void {
+            if (isDropDownOpen) {
+                popUp.popUp.removeEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, onMouseDownOutside);
+                popUp.displayPopUp = false;
+            }
+        }
+
+        private function showPopUp() : void {
+            if (!isDropDownOpen) {
+                popUp.displayPopUp = true;
+
+                if (requireSelection) {
+                    setListOptionsSelectedIndex();
                 } else {
-                    return "";
+                    list.selectedIndex = -1;
                 }
-            }
-
-            if (labelField) {
-            	return item[labelField];
-            }
-            else {
-            	return itemToLabel(item);
-            }
-        }
-
-        private function hidePopUp() : void {
-            popUp.popUp.removeEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, onMouseDownOutside);
-            popUp.displayPopUp = false;
-        }
-
-        private function showPopUp() : void {
-            popUp.displayPopUp = true;
-
-            if (requireSelection) {
+
+                popUp.popUp.addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, onMouseDownOutside);
+            }
+        }
+
+        private function setListOptionsSelectedIndex() : void {
+            var selectedIndex : int = _collection.getItemIndex(selectedItem);
+            if (selectedIndex != -1) {
+                list.selectedIndex = selectedIndex;
+            } else {
                 list.selectedIndex = 0;
             }
-            else {
-                list.selectedIndex = -1;
-            }
-
-            if (list.dataGroup) {
-                list.dataGroup.verticalScrollPosition = 0;
-                list.dataGroup.horizontalScrollPosition = 0;
-            }
-
-            popUp.popUp.addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, onMouseDownOutside);
-        }
-
-        private function restoreEnteredTextAndHidePopUp(restoreEnteredText : Boolean) : void {
-            if (restoreEnteredText) {
-                enteredText = _previouslyEnteredText;
-            }
-
-            hidePopUp();
+        }
+
+        private function showPreviousTextAndHidePopUp(showPreviousText : Boolean) : void {
+            if (showPreviousText) {
+                enteredText = _previouslyDisplayedText;
+            }
+
+            hidePopUp();
         }

         private function get isDropDownOpen() : Boolean {
             return popUp.displayPopUp;
         }

-        private function onAddedToStage(event : Event) : void {
-            focusManager.addEventListener(FlexEvent.FLEX_WINDOW_ACTIVATE, onFlexWindowActivate);
-        }
-
-        private function onFlexWindowActivate(event : FlexEvent) : void {
-            /* reset lastFocus value to prevent shifting focus
-            to previously selected component
-            */
-            (focusManager as FocusManager).lastFocus = null;
-        }
-
-        private function onInputFieldFocusIn(event : FocusEvent) : void {
-            if (forceOpen) {
-            	filterData();
-            }
-
-
-            _previouslyEnteredText = enteredText;
-
-            //empty displayed enteredText if selectedItem is not set yet
-            if (!selectedItem && enteredText) {
-                enteredText = "";
-            }
-        }
-
-        private function onInputFieldFocusOut(event : FocusEvent) : void {
-            restoreEnteredTextAndHidePopUp(false);
-        }
-
         private function onInputFieldChange(event : TextOperationEvent = null) : void {
             _completionAccepted = false;
-            enteredText = inputTxt.text;
-            filterData();
+            enteredText = inputTxt.text;
+            displayOptionsList();
+        }
+
+        private function onInputFieldFocusIn(event : FocusEvent) : void {
+            displayInputTextText(selectedItem);
+            if (forceOpen) {
+                displayOptionsList();
+            }
+        }
+
+        private function onInputFieldFocusOut(event : FocusEvent) : void {
+            if (!selectedItem && prompt) {
+                displayPromptMessage();
+                hidePopUp();
+            } else {
+                showPreviousTextAndHidePopUp(!_completionAccepted);
+            }
         }

         private function onInputFieldKeyDown(event: KeyboardEvent) : void {
@@ -428,20 +458,20 @@
                     break;
                 case Keyboard.TAB:
                 case Keyboard.ESCAPE:
-                    restoreEnteredTextAndHidePopUp(!_completionAccepted);
+                    showPreviousTextAndHidePopUp(!_completionAccepted);
                     break;
             }
         }

-        private function onListItemClick(event : HighlightItemListEvent) : void {
-            acceptCompletion();
+        private function onListItemClick(event : HighlightItemListEvent) : void {
+            acceptCompletion();
             event.stopPropagation();
         }

         private function onMouseDownOutside(event:FlexMouseEvent) : void {
             var mouseDownInsideComponent : Boolean = false;
             var clickedObject : DisplayObjectContainer = event.relatedObject as DisplayObjectContainer;
-
+
             while (!(clickedObject.parent is SystemManager)) {
                 if (clickedObject == this) {
                     mouseDownInsideComponent = true;
@@ -450,25 +480,36 @@

                 clickedObject = clickedObject.parent;
             }
-
+
             if (!mouseDownInsideComponent) {
-                restoreEnteredTextAndHidePopUp(!_completionAccepted);
-            }
-        }
-
+                showPreviousTextAndHidePopUp(!_completionAccepted);
+            }
+        }
+
+        private function onAddedToStage(event : Event) : void {
+            focusManager.addEventListener(FlexEvent.FLEX_WINDOW_ACTIVATE, onFlexWindowActivate);
+        }
+
+        private function onFlexWindowActivate(event : FlexEvent) : void {
+            /* reset lastFocus value to prevent shifting focus
+            to previously selected component
+            */
+            (focusManager as FocusManager).lastFocus = null;
+        }
+
         private var _collection : ArrayCollection = new ArrayCollection();
-
+
         private var _completionAccepted : Boolean;

         private var _dataProviderChanged : Boolean;
-
+
         private var _enteredText : String = "";

         private var _labelField : String;

         private var _labelFunction : Function;

-        private var _previouslyEnteredText : String = "";
+        private var _previouslyDisplayedText : String = "";

         private var _searchMode : String = SearchModes.INFIX_SEARCH;

@@ -480,8 +521,12 @@

         private var _promptChanged : Boolean;

+        private var _errorMessage : String = "No available options";
+
+        private var _errorMessageChanged : Boolean;
+
         private var _enabledChanged : Boolean;
-
+
     }
-
+
 }


Now using triple equals in isUndefined() and isDefined()

Change-Id: I92e2117ba9ec65d0dc945818b479526624f5483a

--- WeaveCore/src/weave/compiler/StandardLib.as
+++ WeaveCore/src/weave/compiler/StandardLib.as
@@ -97,11 +97,11 @@

 		public static function isDefined(value:*):Boolean
 		{
-			return !(value == undefined || (value is Number && isNaN(value)) || value == null);
+			return value !== undefined && value !== null && !(value is Number && isNaN(value));
 		}
 		public static function isUndefined(value:*):Boolean
 		{
-			return (value == undefined || (value is Number && isNaN(value)) || value == null);
+			return value === undefined || value === null || (value is Number && isNaN(value));
 		}

 		public static function lpad(str:String, length:uint, padString:String = ' '):String


fix typo

fix typo

--- frameworks/projects/Core/as/src/org/apache/flex/core/UIButtonBase.as
+++ frameworks/projects/Core/as/src/org/apache/flex/core/UIButtonBase.as
@@ -106,10 +106,6 @@
                     style = { top: value };
                 else
                     style.top = value;
-                if (!isNaN(_y))
-                    _styles.top = _y;
-                if (!isNaN(_x))
-                    _styles.left = _x;
 				dispatchEvent(new Event("yChanged"));
 			}
 		}
@@ -626,6 +622,10 @@
                 _styles = ValuesManager.valuesImpl.parseStyles(value as String);
             else
                 _styles = value;
+            if (!isNaN(_y))
+                _styles.top = _y;
+            if (!isNaN(_x))
+                _styles.left = _x;
             dispatchEvent(new Event("stylesChanged"));
         }


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

--- frameworks/projects/charts/src/mx/charts/chartClasses/IDataCanvas.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/IDataCanvas.as
@@ -1,3 +1,14 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.charts.chartClasses
 {


--- as3/com/netease/protobuf/messageToString.as
+++ as3/com/netease/protobuf/messageToString.as
@@ -12,30 +12,31 @@
 	public function messageToString(message:Object):String {
 		var s:String = getQualifiedClassName(message) + "(\n"
 		const descriptor:XML = describeType(message)
-		function testField(name:String):void {
-			var hasField:String = "has" + name.charAt(0).toUpperCase() + name.substr(1)
-			if (descriptor.accessor.(@name == hasField).length() != 0 && !message[hasField]) {
-				return
-			}
-			var field:* = message[name]
-			if (field.constructor == Array && field.length == 0) {
-				return
-			}
-			s += name + "=" + message[name] + ";\n"
-		}
 		for each(var getter:String in descriptor.accessor.(@access != "writeonly").@name) {
 			if (getter.search(/^has(.)(.*)$/) != -1) {
 				continue
 			}
-			testField(getter)
+			s += fieldToString(message, descriptor, getter)
 		}
 		for each(var field:String in descriptor.variable.@name) {
-			testField(field)
+			s += fieldToString(message, descriptor, field)
 		}
-		for (var k:String in message) {
+		for (var k:* in message) {
 			s += k + "=" + message[k] + ";\n"
 		}
 		s += ")"
 		return s
 	}
 }
+
+function fieldToString(message:Object, descriptor:XML, name:String):String {
+	var hasField:String = "has" + name.charAt(0).toUpperCase() + name.substr(1)
+	if (descriptor.accessor.(@name == hasField).length() != 0 && !message[hasField]) {
+		return ""
+	}
+	var field:* = message[name]
+	if (field.constructor == Array && field.length == 0) {
+		return ""
+	}
+	return name + "=" + message[name] + ";\n"
+}


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

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

 package mx.controls
 {


getting false conflicts sorted out

getting false conflicts sorted out

--- src/laml/display/IconButton.as
+++ src/laml/display/IconButton.as
@@ -141,7 +141,7 @@

 		protected function validateEmbedFonts(newValue:*, oldValue:*):void {
 			label.embedFonts = newValue;
-		}
+		}

 		protected function get configXml():XML {
 			var xml:XML = <HBox id={ICON_CONTAINER} width="100%" height="100%" xmlns="laml.display">


linkBindableProperty now checking objectWasDisposed in another place.

--- WeaveCore/src/weave/core/SessionManager.as
+++ WeaveCore/src/weave/core/SessionManager.as
@@ -631,7 +631,7 @@
 		/**
 		 * This function checks if an object has been disposed of by SessionManager.
 		 * @param object An object to check.
-		 * @return true if SsessionManager.dispose() was called for the specified object.
+		 * @return true if SessionManager.dispose() was called for the specified object.
 		 *
 		 */
 		public function objectWasDisposed(object:Object):Boolean
@@ -1002,6 +1002,13 @@
 			// a function that takes zero parameters and sets the bindable value.
 			var setBindableProperty:Function = function(callingLater:Boolean = false):void
 			{
+				// unlink if linkableVariable was disposed of
+				if (objectWasDisposed(linkableVariable))
+				{
+					unlinkBindableProperty(linkableVariable, bindableParent, bindablePropertyName);
+					return;
+				}
+
 				var uiComponent:UIComponent = bindableParent as UIComponent;
 				if (uiComponent)
 				{


Allow ValueEvents to be cancelable.

Allow ValueEvents to be cancelable.

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

--- src/as/com/threerings/util/ValueEvent.as
+++ src/as/com/threerings/util/ValueEvent.as
@@ -39,15 +39,16 @@
     /**
      * Construct the value event.
      */
-    public function ValueEvent (type :String, value :Object)
+    public function ValueEvent (
+        type :String, value :Object, bubbles :Boolean = false, cancelable :Boolean = false)
     {
-        super(type);
+        super(type, bubbles, cancelable);
         _value = value;
     }

     override public function clone () :Event
     {
-        return new ValueEvent(type, _value);
+        return new ValueEvent(type, _value, bubbles, cancelable);
     }

     /** The value. */


fixed a wrong cast

fixed a wrong cast

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

--- src/reprise/media/MP3Player.as
+++ src/reprise/media/MP3Player.as
@@ -45,7 +45,7 @@
 		public override function setResource(resource:IResource):void
 		{
 			super.setResource(resource);
-			m_sound = Sound(MP3Resource(resource.content()));
+			m_sound = Sound(MP3Resource(resource).content());
 			m_sound.addEventListener(Event.ID3, sound_id3);
 			m_soundTransform = new SoundTransform(1.0, 0.0);
 		}


Adds a "changing" event to slidepane before the change event

--- src/org/openPyro/containers/SlidePane.as
+++ src/org/openPyro/containers/SlidePane.as
@@ -1,14 +1,20 @@
 package org.openPyro.containers
 {
 	import flash.display.DisplayObject;
+	import flash.events.Event;

 	import org.openPyro.core.Direction;
 	import org.openPyro.core.UIContainer;
 	import org.openPyro.effects.Effect;
 	import org.openPyro.effects.EffectDescriptor;

+	[Event(name="selectedItemChanging", type="flash.events.Event")]
+
 	public class SlidePane extends ViewStack
 	{
+
+		public static const SELECTED_ITEM_CHANGING:String = "selectedItemChanging";
+
 		 protected var _transitionDirection:String = Direction.HORIZONTAL;
 		 protected var transitionDirectionMultiplier:int = 1;

@@ -118,6 +124,11 @@
 			}
 			Effect.play(oldViewEffectDescriptor);
 			Effect.play(newViewEffectDescriptor);
+
+
+			var event:Event = new Event(SELECTED_ITEM_CHANGING);
+
+			dispatchEvent(event)
 		 }

 	}


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

--- frameworks/projects/framework/src/mx/validators/ZipCodeValidatorDomainType.as
+++ frameworks/projects/framework/src/mx/validators/ZipCodeValidatorDomainType.as
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.validators
+{
+
+/**
+ *  The ZipCodeValidatorDomainType class defines the values
+ *  for the domain property of the ZipCodeValidator class,
+ *  which you use to specify the type of ZIP code to validate.
+ *
+ *  @see mx.validators.ZipCodeValidator
+ */
+public final class ZipCodeValidatorDomainType
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Specifies to validate a United States or Canadian ZIP code.
+	 */
+	public static const US_OR_CANADA:String = "US or Canada";
+
+	/**
+	 *  Specifies to validate a United States ZIP code.
+	 */
+	public static const US_ONLY:String = "US Only";
+}
+
+}


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

--- frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as
+++ frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2004-2010 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


REPRISE: RadioButtonGroup - selecteNextButton / selectPreviousButton functions added

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

--- src/reprise/controls/RadioButtonGroup.as
+++ src/reprise/controls/RadioButtonGroup.as
@@ -12,7 +12,7 @@
 	import reprise.ui.DocumentView;

 	import flash.events.Event;
-	import flash.events.EventDispatcher;
+	import flash.events.EventDispatcher;

 	use namespace reprise;

@@ -120,6 +120,26 @@
 			return (m_radioButtons[m_selectedIndex] as RadioButton).data();
 		}

+		public function selectNextButton(currentButton : RadioButton) : void
+		{
+			var currentIndex : int = m_radioButtons.indexOf(currentButton);
+			if (currentIndex < m_radioButtons.length - 1)
+			{
+				var nextButton : RadioButton = m_radioButtons[currentIndex + 1];
+				setRadioButtonSelected(nextButton, true);
+			}
+		}
+
+		public function selectPreviousButton(currentButton : RadioButton) : void
+		{
+			var currentIndex : int = m_radioButtons.indexOf(currentButton);
+			if (currentIndex > 0)
+			{
+				var nextButton : RadioButton = m_radioButtons[currentIndex - 1];
+				setRadioButtonSelected(nextButton, true);
+			}
+		}
+
 		public function activateNextButton(currentButton : RadioButton) : void
 		{
 			var currentIndex : int = m_radioButtons.indexOf(currentButton);


 - fixed
 	- wrong import of ResourceEvent (was from the mx package)

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

--- src/reprise/external/AbstractResource.as
+++ src/reprise/external/AbstractResource.as
@@ -10,18 +10,16 @@
 ////////////////////////////////////////////////////////////////////////////////

 package reprise.external
-{
+{
+	import reprise.commands.AbstractAsynchronousCommand;
+	import reprise.commands.TimeCommandExecutor;
+	import reprise.utils.Delegate;
+	import reprise.events.ResourceEvent;
+
 	import flash.events.Event;
 	import flash.net.URLRequest;
-	import flash.utils.getTimer;
-
-	import mx.events.ResourceEvent;
-
-	import reprise.commands.AbstractAsynchronousCommand;
-	import reprise.commands.TimeCommandExecutor;
-	import reprise.events.CommandEvent;
-	import reprise.events.ResourceEvent;
-	import reprise.utils.Delegate;
+	import flash.utils.getTimer;
+
 	public class AbstractResource extends AbstractAsynchronousCommand
 		implements IResource
 	{