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

--- frameworks/projects/mx/src/mx/controls/TabBar.as
+++ frameworks/projects/mx/src/mx/controls/TabBar.as
@@ -0,0 +1,367 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls
+{
+
+import flash.display.DisplayObject;
+import flash.events.MouseEvent;
+import mx.controls.tabBarClasses.Tab;
+import mx.core.ClassFactory;
+import mx.core.IFlexDisplayObject;
+import mx.core.mx_internal;
+import mx.events.ItemClickEvent;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when a tab navigation item is selected.
+ *  This event is sent only if the data provider is not a ViewStack container.
+ *
+ *  @eventType mx.events.ItemClickEvent.ITEM_CLICK
+ */
+[Event(name="itemClick", type="mx.events.ItemClickEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  Name of CSS style declaration that specifies the styles to use for the
+ *  first tab navigation item.
+ *
+ *  @default "tabStyleName"
+ */
+[Style(name="firstTabStyleName", type="String", inherit="no")]
+
+/**
+ * Horizontal alignment of all tabs within the TabBar. Since individual
+ * tabs stretch to fill the entire TabBar, this style is only useful if you
+ * use the tabWidth style and the combined widths of the tabs are less than
+ * than the width of the TabBar.
+ * Possible values are "left", "center",
+ * and "right".
+ *
+ * @default "center"
+ */[Style(name="horizontalAlign", type="String", enumeration="left,center,right", inherit="no")]
+
+/**
+ *  Number of pixels between tab navigation items in the horizontal direction.
+ *
+ *  @default -1
+ */
+[Style(name="horizontalGap", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Name of CSS style declaration that specifies the styles to use for the
+ *  last tab navigation item.
+ *
+ *  @default "tabStyleName"
+ */
+[Style(name="lastTabStyleName", type="String", inherit="no")]
+
+/**
+ *  Name of CSS style declaration that specifies the styles to use for the text
+ *  of the selected tab navigation item.
+ *
+ *  @default "activeTabStyle"
+ */
+[Style(name="selectedTabTextStyleName", type="String", inherit="no")]
+
+/**
+ *  Name of CSS style declaration that specifies the styles to use for the tab
+ *  navigation items.
+ *
+ *  @default undefined
+ */
+[Style(name="tabStyleName", type="String", inherit="no")]
+
+/**
+ *  Height of each tab navigation item, in pixels.
+ *  When this property is undefined, the height of each tab
+ *  is determined by the font styles applied to the container.
+ *  If you set this property, the specified value overrides this calculation.
+ *
+ *  @default undefined
+ */
+[Style(name="tabHeight", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Width of the tab navigation item, in pixels.
+ *  If undefined, the default tab widths are calculated from the label text.
+ *
+ *  @default undefined
+ */
+[Style(name="tabWidth", type="Number", format="Length", inherit="no")]
+
+/**
+ * Vertical alignment of all tabs within the TabBar. Since individual
+ * tabs stretch to fill the entire TabBar, this style is only useful if you
+ * use the tabHeight style and the combined heights of the tabs are less than
+ * than the height of the TabBar.
+ * Possible values are "top", "middle",
+ * and "bottom".
+ *
+ * @default "middle"
+ */[Style(name="verticalAlign", type="String", enumeration="top,middle,bottom", inherit="no")]
+
+/**
+ *  Number of pixels between tab navigation items in the vertical direction.
+ *
+ *  @default -1
+ */
+[Style(name="verticalGap", type="Number", format="Length", inherit="no")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="horizontalLineScrollSize", kind="property")]
+[Exclude(name="horizontalPageScrollSize", kind="property")]
+[Exclude(name="horizontalScrollBar", kind="property")]
+[Exclude(name="horizontalScrollPolicy", kind="property")]
+[Exclude(name="horizontalScrollPosition", kind="property")]
+[Exclude(name="maxHorizontalScrollPosition", kind="property")]
+[Exclude(name="maxVerticalScrollPosition", kind="property")]
+[Exclude(name="verticalLineScrollSize", kind="property")]
+[Exclude(name="verticalPageScrollSize", kind="property")]
+[Exclude(name="verticalScrollBar", kind="property")]
+[Exclude(name="verticalScrollPolicy", kind="property")]
+[Exclude(name="verticalScrollPosition", kind="property")]
+
+[Exclude(name="scroll", kind="event")]
+
+[Exclude(name="backgroundAlpha", kind="style")]
+[Exclude(name="backgroundAttachment", kind="style")]
+[Exclude(name="backgroundColor", kind="style")]
+[Exclude(name="backgroundImage", kind="style")]
+[Exclude(name="backgroundSize", kind="style")]
+[Exclude(name="borderColor", kind="style")]
+[Exclude(name="borderSides", kind="style")]
+[Exclude(name="borderSkin", kind="style")]
+[Exclude(name="borderStyle", kind="style")]
+[Exclude(name="borderThickness", kind="style")]
+[Exclude(name="cornerRadius", kind="style")]
+[Exclude(name="dropShadowColor", kind="style")]
+[Exclude(name="dropShadowEnabled", kind="style")]
+[Exclude(name="firstButtonStyleName", kind="style")]
+[Exclude(name="horizontalScrollBarStyleName", kind="style")]
+[Exclude(name="lastButtonStyleName", kind="style")]
+[Exclude(name="shadowCapColor", kind="style")]
+[Exclude(name="shadowColor", kind="style")]
+[Exclude(name="shadowDirection", kind="style")]
+[Exclude(name="shadowDistance", kind="style")]
+[Exclude(name="verticalScrollBarStyleName", kind="style")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[AccessibilityClass(implementation="mx.accessibility.TabBarAccImpl")]
+
+[DefaultProperty("dataProvider")]
+
+[IconFile("TabBar.png")]
+
+[MaxChildren(0)]
+
+/**
+ *  The TabBar control lets you create a horizontal or vertical group of tab navigation
+ *  items by defining the labels and data associated with each tab. Use the
+ *  TabBar control instead of the TabNavigator container to create tabs that, by default, are not
+ *  associated with multiple views.
+ *
+ *
Using the TabBar control lets the tabs be directly determined by the
+ *  data so that you can change the view or views in any way.

+ *
+ *
A TabBar control has the following default characteristics:

+ *

+ *

+ *           Characteristic
+ *           Description
+ *

+ *

+ *           Preferred size
+ *           A width wide enough to contain all label text, plus any padding, and a height tall enough for the label text. The default tab height is determined by the font, style, and skin applied to the control. If you set an explicit height using the tabHeight property, that value overrides the default value.
+ *

+ *

+ *           Control resizing rules
+ *           TabBar controls do not resize by default. Specify percentage sizes if you want your TabBar to resize based on the size of its parent container.
+ *

+ *

+ *           Padding
+ *           0 pixels for the left and right properties.
+ *

+ *

+ *
+ *  @mxml
+ *
+ *
The <mx:TabBar> tag inherits all of the tag attributes
+ *  of its superclass, and adds the following tag attributes:

+ *
+ *

+ *  <mx:TabBar
+ *    Styles
+ *    firstTabStyleName="Value of the tabStyleName property"
+ *    horizontalAlign="left|center|right"
+ *    horizontalGap="-1"
+ *    lastTabStyleName="Value of the tabStyleName property"
+ *    selectedTabTextStyleName="activeTabStyle"
+ *    tabHeight="undefined"
+ *    tabStyleName="Tab"
+ *    tabWidth="undefined"
+ *    verticalAlign="top|middle|bottom"
+ *    verticalGap="-1"
+ *
+ *    Events
+ *    itemClick="No default"
+ *    >
+ *    ...
+ *       child tags
+ *    ...
+ *  </mx:TabBar>
+ *

+ *
+ *  @includeExample examples/TabBarExample.mxml
+ */
+public class TabBar extends ToggleButtonBar
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class mixins
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Placeholder for mixin by TabBarAccImpl.
+     */
+    mx_internal static var createAccessibilityImplementation:Function;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function TabBar()
+    {
+        super();
+
+        buttonHeightProp = "tabHeight";
+        buttonStyleNameProp = "tabStyleName";
+        firstButtonStyleNameProp = "firstTabStyleName";
+        lastButtonStyleNameProp = "lastTabStyleName";
+        buttonWidthProp = "tabWidth";
+        navItemFactory = new ClassFactory(Tab);
+        selectedButtonTextStyleNameProp = "selectedTabTextStyleName";
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function initializeAccessibility():void
+    {
+        if (TabBar.createAccessibilityImplementation != null)
+            TabBar.createAccessibilityImplementation(this);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: NavBar
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function createNavItem(
+                                        label:String,
+                                        icon:Class = null):IFlexDisplayObject
+    {
+        var navItem:IFlexDisplayObject = super.createNavItem(label, icon);
+
+        DisplayObject(navItem).addEventListener(
+            MouseEvent.MOUSE_DOWN, tab_mouseDownHandler);
+
+        DisplayObject(navItem).addEventListener(
+            MouseEvent.DOUBLE_CLICK, tab_doubleClickHandler);
+
+        return navItem;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers: NavBar
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function clickHandler(event:MouseEvent):void
+    {
+        // Since we select on mouse down instead of click, make
+        // sure the click is only handled when the selection
+        // actually changes (selectButton sends a "faked"
+        // click event which we do need to handle).
+        if (getChildIndex(DisplayObject(event.currentTarget)) == selectedIndex)
+        {
+            Button(event.currentTarget).selected = true;
+            event.stopImmediatePropagation();
+            return;
+        }
+
+        super.clickHandler(event);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  TabBars select the tab on mouse down instead of click.
+     */
+    private function tab_mouseDownHandler(event:MouseEvent):void
+    {
+        selectButton(event.currentTarget.parent.getChildIndex(
+                     event.currentTarget), true, event);
+    }
+
+    /**
+     *  @private
+     */
+    private function tab_doubleClickHandler(event:MouseEvent):void
+    {
+        // Make sure the tab remains selected when double-clicked.
+        Button(event.currentTarget).selected = true;
+    }
+}
+
+}


meshRemovedFromSceneHandler remove callback on 'worldToView'

--- src/aerys/minko/scene/controller/mesh/MeshVisibilityController.as
+++ src/aerys/minko/scene/controller/mesh/MeshVisibilityController.as
@@ -103,6 +103,7 @@
 		private function meshRemovedFromSceneHandler(mesh	: Mesh,
 													 scene	: Scene) : void
 		{
+			scene.bindings.removeCallback('worldToView', worldToViewChangedHandler);
 			mesh.localToWorld.changed.remove(meshLocalToWorldChangedHandler);
 		}


Fix.

Fix.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@436 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flash/TextFieldUtil.as
+++ src/as/com/threerings/flash/TextFieldUtil.as
@@ -65,7 +65,7 @@

         Util.init(tf, initProps, null, MASK_FIELD_PROPS);
         tf.text = text;
-        if (tf.autoSize != null) {
+        if (tf.autoSize != TextFieldAutoSize.NONE) {
             tf.width = tf.textWidth + WIDTH_PAD;
             tf.height = tf.textHeight + HEIGHT_PAD;
         }


Added missing getter for data.

Added missing getter for data.

--- examples/DataGridExample/src/products/ProductItemRenderer.as
+++ examples/DataGridExample/src/products/ProductItemRenderer.as
@@ -39,6 +39,11 @@
 			addElement(image);
 		}

+		override public function get data():Object
+		{
+			return super.data;
+		}
+
 		override public function set data(value:Object):void
 		{
 			super.data = value;


HLSProviderOSMF.swf:  workaround for load trait state not changing when loading a new URL

--- src/org/mangui/osmf/plugins/HLSLoaderBase.as
+++ src/org/mangui/osmf/plugins/HLSLoaderBase.as
@@ -110,7 +110,12 @@
             try {
                 var loadedElem : MediaElement = new HLSMediaElement(resource, _hls, event.levels[0].duration);
                 LoadFromDocumentLoadTrait(_loadTrait).mediaElement = loadedElem;
+                /* workaround for load trait state not changing when loading a new URL
+                 * we force state to loading first ...
+                 */
+                if (_loadTrait.loadState == LoadState.READY) {
                 updateLoadTrait(_loadTrait, LoadState.LOADING);
+                }
                 updateLoadTrait(_loadTrait, LoadState.READY);
             } catch(e : Error) {
                 updateLoadTrait(_loadTrait, LoadState.LOAD_ERROR);


Transferred from the Adobe Open Source Subversion Repository

Revision: 7954
Author:   hmuller@adobe.com
Date:     2009-06-18T15:43:15.080808Z

Log Message:
-----------
Range et al PARB changes, Opus #3.

@privatized the mx_internal overrides in HScrollBar.  Removed @langversion etc ASDoc boilerplate from mx_internal methods in ScrollBar, H,VScrollBar.

QE Notes: ASDoc change only
Doc Notes:
Bugs:
Reviewer:

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>

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

--- frameworks/projects/spark/src/spark/components/HScrollBar.as
+++ frameworks/projects/spark/src/spark/components/HScrollBar.as
@@ -277,14 +277,8 @@
     }

     /**
+     *  @private
      *  Set this scrollbar's value to the viewport's current horizontalScrollPosition.
-     *
-     *  @see IViewport#horizontalScrollPosition
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
      */
     override mx_internal function viewportHorizontalScrollPositionChangeHandler(event:PropertyChangeEvent):void
     {
@@ -293,13 +287,9 @@
     }

     /**
+     *  @private
      *  Set this scrollbar's maximum to the viewport's contentWidth
      *  less the viewport width and its pageSize to the viewport's width.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
      */
     override mx_internal function viewportResizeHandler(event:ResizeEvent):void
     {
@@ -316,16 +306,9 @@
     }

     /**
+     *  @private
      *  Set this scrollbar's maximum to the viewport's contentWidth
      *  less the viewport width.
-     *
-     *  @see IViewport#contentWidth
-     *  @see IViewport#width
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
      */
     override mx_internal function viewportContentWidthChangeHandler(event:PropertyChangeEvent):void
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12870
Author:   klin@adobe.com
Date:     2009-12-11T23:52:43.652707Z

Log Message:
-----------
Couple of minor fixes including SDK-24627 and SDK-24628.

-Added metadata so that resizeMode code hints. Needed to add the same metadata to Group since it doesn't inherit the enumerations from GroupBase. Renamed NOSCALE to NO_SCALE, which is more in line with naming conventions.
-Added null checks in VScrollBar and HScrollBar in pointToValue().
-Cleaned up VSlider's code.

QE notes: No
Doc notes: No
Bugs: SDK-24627, SDK-24628
Reviewer: Ryan
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ResizeMode.as</path>

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

--- frameworks/projects/spark/src/spark/components/ResizeMode.as
+++ frameworks/projects/spark/src/spark/components/ResizeMode.as
@@ -41,7 +41,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public static const NOSCALE:String = "noScale";
+    public static const NO_SCALE:String = "noScale";

     /**
      *  Resizes by setting the scaleX


Transferred from the Adobe Open Source Subversion Repository

Revision: 4958
Author:   rfrishbe@adobe.com
Date:     2009-02-13T23:07:46.243121Z

Log Message:
-----------
Change the initialization sequence of FxComponent and Group.  Basically now children (including the skin) should get created at createChildren() time and follow the correct lifecycle pattern.  Unfortunately, this change got mingled in with all my PARB changes, so I'm submitting a bunch of PARB changes for Group, DataGroup, FxContainer, and FxDataContainer, outlined below:

1.     New event classes/names for Group/FxContainer and DataGroup ("elementAdd" and "elementRemove" event of type ElementExistenceEvent for Group/FxContainer and "rendererAdd" and "rendererRemove" event of type RendererExistenceEvent for DataGroup). It was just one event class of ItemExistenceChangedEvent before.
2.     LayoutBase.clipContent->clipAndEnableScrolling (same with IViewport.clipContent and GroupBase.clipContent)
3.     GroupBase.getLayoutELementAt()->getElementAt()
4.     GroupBase.numLayoutElements -> numElements.
5.     LayoutBase.virtualLayout -> useVirtualLayout
6.     ScrollUnit constants are now changed to be uints instead of typed as ScrollUnit.  This means the signature for getHorizontalScrollPositionDelta(unit:ScrollUnit):Number has changed to getHorizontalScrollPositionDelta(scrollUnit:uint):Number (and ditto for getVerticalScrollPositionDelta())
7.  DataGroup.getRendererForItemAt() -> getElementAt()
8.  DataGroup.getItemIndexForRenderer() -> getElementIndex()

Other changes:
 - Change IVisualElement interface so that it's smaller now.  It also extends ILayoutElement now.  The properties removed from IVisualElement are: rotation, rotationX, rotationY, rotationZ, transformX, transformY, offsets, x, y, z, scaleX, scaleY, scaleZ, explicitWidth, explicitMinWidth, explicitMaxWidth, explicitHeight, explicitMinHeight, explicitMaxHeight)
-  Fix in DataGroup so we don’t remove/add elements if we’re gonna do it later anyways.  I also need to do some other work in here around cleaning up of renderers.
- AddItems fix around handling IVisualElementContainers more effeciently
- get mxmlContent now returns a copy of the Array rather than the one we're using internally
- Had to update mustella since there was special case logic for dealing with getLayoutElementAt().  I added this logic for getElementAt(), which replaces that method.

QE Notes: Thanks for changing all the tests and working on the cyclone
Doc Notes: Made some ASDoc changes to some core classes to move the comments into the interfaces.  I did update the comments a bit as well.
Bugs: SDK-18115, SDK-19004
Reviewer: Jason, Glenn, Hans for initialization sequence change and Hans for all PARB changes
tests: checkintests, all mustella tests

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as" copyfrom-rev="4812" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ElementExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/TileLayout.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/development/eclipse/flex/flex4test/src/layouts/WheelLayout.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/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IViewport.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/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/RendererExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/ScrollUnit.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.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/baseClasses/FxScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/mustella.swc</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/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/VScrollBar.as
+++ frameworks/projects/spark/src/spark/components/VScrollBar.as
@@ -12,11 +12,11 @@
 package mx.components
 {
 import mx.components.baseClasses.FxScrollBar;
+import mx.core.ILayoutElement;
 import mx.core.IViewport;
-import mx.core.ScrollUnit;
+import mx.core.ScrollUnit;
 import mx.events.PropertyChangeEvent;
 import mx.events.ResizeEvent;
-import mx.core.ILayoutElement;
 import mx.layout.LayoutElementFactory;

 [IconFile("FxVScrollBar.png")]
@@ -159,9 +159,9 @@
      *
      *  @private
      */
-    private function updateViewportVSP(unit:ScrollUnit):void
-    {
-        var delta:Number = viewport.getVerticalScrollPositionDelta(unit);
+    private function updateViewportVSP(scrollUnit:uint):void
+    {
+        var delta:Number = viewport.getVerticalScrollPositionDelta(scrollUnit);
         setValue(viewport.verticalScrollPosition + delta);
     }


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

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


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

--- frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as
+++ frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


???????? \0 ???? ByteArray ????? bug

???????? \0 ???? ByteArray ????? bug

--- as3/com/netease/protobuf/stringToByteArray.as
+++ as3/com/netease/protobuf/stringToByteArray.as
@@ -11,7 +11,9 @@
 	import flash.utils.ByteArray
 	public function stringToByteArray(s:String):ByteArray {
 		const ba:ByteArray = new ByteArray
-		ba.writeMultiByte(s, "iso-8859-1")
+		for (var i:uint = 0; i < s.length; ++i) {
+			ba.writeByte(s.charCodeAt(i))
+		}
 		return ba
 	}
 }


Change 20081212-maxcarlson-l by maxcarlson@Bank.lan on 2008-12-12 22:46:35 PST
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Prevent warnings for splash in swf8

Bugs Fixed: LPP-7458 - runtime errors when spash view included in nightly build 12036 swf8

Technical Reviewer: bargull@openlaszlo.org
QA Reviewer: promanik

Details: Per Andre's comment, make sure name is null instead of undefined when undeclared.

Tests: Both my-apps/copy-of-hello.lzx?lzr=swf8&debug=true and
<canvas>
    <splash/>
</canvas>

no longer give warnings.

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@12096 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/lzpreloader.as
+++ WEB-INF/lps/lfc/lzpreloader.as
@@ -173,7 +173,7 @@

   var svd = canvas.sprite.__LZsvdepth;
   canvas.sprite.__LZsvdepth = 0;
-  var v = new LzView(canvas, {name:this.name, visible:vis,
+  var v = new LzView(canvas, {name:this.name || null, visible:vis,
                               options: {ignorelayout:true}});
   v.sprite.setMovieClip(this.splashroot);
   canvas.sprite.__LZsvdepth = svd;
@@ -182,7 +182,7 @@
   for (var i = 0; i < this.protoviews.length; i++) {
     var mc = this.protoviews[i];
     var ratio = mc.lastframe / mc._totalframes;
-    var nv = new LzView(v, {name: mc.name, x: mc._x, y: mc._y,
+    var nv = new LzView(v, {name: mc.name || null, x: mc._x, y: mc._y,
                                   width: mc._width, height: mc._height,
                                   totalframes: mc._totalframes, ratio: ratio,
                                   options: {ignorelayout: true}});


fixed compiler warning

fixed compiler warning

Change-Id: I4352fe94b0137e2f663dab51e5f3d9ddbade144d

--- WeaveData/src/weave/data/Transforms/GroupedDataTransform.as
+++ WeaveData/src/weave/data/Transforms/GroupedDataTransform.as
@@ -66,24 +66,20 @@

 		}

-		public function updateUniqueValues()
+		public function updateUniqueValues():void
 		{
-			var values:Array = groupByColumn.keys.map(function(key:IQualifiedKey, ..._):String
-				{ return groupByColumn.getValueFromKey(key, String);});
+			var values:Array = groupByColumn.keys.map(function(key:IQualifiedKey, ..._):String {
+				return groupByColumn.getValueFromKey(key, String);
+			});

 			var keyType:String = userKeyType.value ? userKeyType.value : groupByColumn.getMetadata(ColumnMetadata.DATA_TYPE);

 			_cachedUniqueValues = VectorUtils.union(values).map(
-
 				function(s:String, ..._):IQualifiedKey
 				{
 					return WeaveAPI.QKeyManager.getQKey(keyType, s);
 				}
 			);
-
-
-
-			return;
 		}

 		override protected function initialize():void


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

--- frameworks/projects/rpc/src/mx/rpc/IResponder.as
+++ frameworks/projects/rpc/src/mx/rpc/IResponder.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.rpc
+{
+
+/**
+ *  This interface provides the contract for any service
+ *  that needs to respond to remote or asynchronous calls.
+ */
+public interface IResponder
+{
+	/**
+	 *  This method is called by a service when the return value
+	 *  has been received.
+	 *  While data is typed as Object, it is often
+	 *  (but not always) an mx.rpc.events.ResultEvent.
+	 */
+	function result(data:Object):void;
+
+	/**
+	 *  This method is called by a service when an error has been received.
+	 *  While info is typed as Object it is often
+	 *  (but not always) an mx.rpc.events.FaultEvent.
+	 */
+	function fault(info:Object):void;
+}
+
+}


- change: Removed debugging log

- change: Removed debugging log

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

--- src/reprise/ui/DocumentView.as
+++ src/reprise/ui/DocumentView.as
@@ -354,10 +354,10 @@
 				var path : String = sortedElements[i].path;
 				if (path.indexOf(lastValidatedPath) == 0)
 				{
-//					trace("d skip validation of: " + path);
+//					log("d skip validation of: " + path);
 					continue;
 				}
-				log("d validate " + path);
+//				log("d validate " + path);
 				lastValidatedPath = path + '.';
 				var element : UIObject = UIObject(sortedElements[i].element);
 				element.validation_execute();


All Objects encoded as AMF3.

All Objects encoded as AMF3.

--- sh/saqoo/net/AMFRPC.as
+++ sh/saqoo/net/AMFRPC.as
@@ -1,4 +1,5 @@
 package sh.saqoo.net {
+
 	import sh.saqoo.logging.dump;

 	import flash.events.ErrorEvent;
@@ -54,6 +55,7 @@

 		public function AMFRPC(gateway:String = null) {
 			_gateway = gateway || DEFAULT_GATEWAY;
+			if (!_gateway) throw new ArgumentError('please specify gateway...');
 		}

@@ -65,9 +67,7 @@
 			bodyByte.writeInt(args.length); // length of AMF0 arguments array
 			for each (var arg:* in args) {
 				switch (true) {
-					// TODO: needs to investigate which type should be serialized as AMF3.
-					// currently only ByteArray is serialized as AMF3.
-					case arg is ByteArray: amf3 = true; break;
+					case arg is Object: amf3 = true; break;
 					default: amf3 = false;
 				}
 				if (amf3) {
@@ -105,7 +105,7 @@
 			_loader.load(request);
 		}

-
+
 		private function _onComplete(event:Event):void {
 			try {
 				_parseResponse(_loader.data);
@@ -113,13 +113,13 @@
 				_isError = true;
 				trace(e.getStackTrace());
 			}
-
+
 			_loader.removeEventListener(IOErrorEvent.IO_ERROR, dispatchEvent);
 			_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, dispatchEvent);
 			_loader.removeEventListener(ProgressEvent.PROGRESS, dispatchEvent);
 			_loader.removeEventListener(Event.COMPLETE, _onComplete);
 			_loader = null;
-
+
 			if (_isError) {
 				dispatchEvent(new ErrorEvent(ErrorEvent.ERROR, false, false, _result.description));
 			} else {
@@ -127,7 +127,7 @@
 			}
 		}

-
+
 		protected function _parseResponse(data:ByteArray):void {
 			data.objectEncoding = ObjectEncoding.AMF0;
 			var amfVersion:int = data.readShort();


380 QNameMap bugfix

380 QNameMap bugfix

--- raw/src/org/yellcorp/lib/collections/QNameMap.as
+++ raw/src/org/yellcorp/lib/collections/QNameMap.as
@@ -151,7 +151,19 @@

     private function getLocalNameMapNew(uri:*):Object
     {
-        return uri === null ? nullUri : (uris[uri] = { });
+        if (uri === null)
+        {
+            return nullUri;
+        }
+        else
+        {
+            var map:Object = uris[uri];
+            if (!map)
+            {
+                map = uris[uri] = { };
+            }
+            return map;
+        }
     }

     private function deleteLocalNameMapIfEmpty(uri:*):void


fix icons min size

fix icons min size

--- bin/Data/Scripts/Editor/EditorViewDebugIcons.as
+++ bin/Data/Scripts/Editor/EditorViewDebugIcons.as
@@ -29,6 +29,10 @@
 Vector2 debugIconsSizeBig = debugIconsSize * 1.5;

+Vector2 Max(Vector2 a, Vector2 b)
+{
+    return (a.length > b.length ? a : b);
+}

 void CreateDebugIcons()
 {
@@ -194,7 +198,7 @@
                     bb.position = nodes[i].worldPosition;
                     bb.color = light.effectiveColor;
                     float distance = (camPos - nodes[i].worldPosition).length;
-                    bb.size = debugIconsSize * distance;
+                    bb.size = Max(debugIconsSize * distance, debugIconsSize);
                     bb.enabled = true;
                 }
                 else if (light.lightType == LIGHT_DIRECTIONAL)
@@ -203,7 +207,7 @@
                     bb.position = nodes[i].worldPosition;
                     bb.color = light.effectiveColor;
                     float distance = (camPos - nodes[i].worldPosition).length;
-                    bb.size = debugIconsSize * distance;
+                    bb.size = Max(debugIconsSize * distance, debugIconsSize);
                     bb.enabled = true;
                 }
                 else if (light.lightType == LIGHT_SPOT)
@@ -212,7 +216,7 @@
                     bb.position = nodes[i].worldPosition;
                     bb.color = light.effectiveColor;
                     float distance = (camPos - nodes[i].worldPosition).length;
-                    bb.size = debugIconsSize * distance;
+                    bb.size = Max(debugIconsSize * distance, debugIconsSize);
                     bb.enabled = true;
                 }
             }
@@ -240,7 +244,7 @@

                 // if mainCamera enough closer to selected camera then make bb size relative to distance
                 float distance = (camPos - nodes[i].worldPosition).length;
-                bb.size = debugIconsSize * distance;
+                bb.size = Max(debugIconsSize * distance, debugIconsSize);
                 bb.enabled = true;
             }

@@ -261,7 +265,7 @@
                 Billboard@ bb = debugIconsSetSoundSources.billboards[i];
                 bb.position = nodes[i].worldPosition;
                 float distance = (camPos - nodes[i].worldPosition).length;
-                bb.size = debugIconsSize * distance;
+                bb.size = Max(debugIconsSize * distance, debugIconsSize);
                 bb.enabled = component.enabled;
             }

@@ -282,7 +286,7 @@
                 Billboard@ bb = debugIconsSetSoundSources3D.billboards[i];
                 bb.position = nodes[i].worldPosition;
                 float distance = (camPos - nodes[i].worldPosition).length;
-                bb.size = debugIconsSize * distance;
+                bb.size = Max(debugIconsSize * distance, debugIconsSize);
                 bb.enabled = component.enabled;
             }

@@ -303,7 +307,7 @@
                 Billboard@ bb = debugIconsSetSoundListeners.billboards[i];
                 bb.position = nodes[i].worldPosition;
                 float distance = (camPos - nodes[i].worldPosition).length;
-                bb.size = debugIconsSize * distance;
+                bb.size = Max(debugIconsSize * distance, debugIconsSize);
                 bb.enabled = component.enabled;
             }

@@ -323,7 +327,7 @@
             Billboard@ bb = debugIconsSetZones.billboards[0];
             bb.position = Vector3(0,0,0);
             float distance = (camPos - bb.position).length;
-            bb.size = debugIconsSize * distance;
+            bb.size = Max(debugIconsSize * distance, debugIconsSize);
             //bb.color = zone.ambientColor;
             bb.enabled = zone.enabled;
         }
@@ -337,7 +341,7 @@
                 Billboard@ bb = debugIconsSetZones.billboards[i+1];
                 bb.position = nodes[i].worldPosition;
                 float distance = (camPos - nodes[i].worldPosition).length;
-                bb.size = debugIconsSize * distance;
+                bb.size = Max(debugIconsSize * distance, debugIconsSize);
                 //bb.color = zone.ambientColor;
                 bb.enabled = zone.enabled;
             }
@@ -345,7 +349,6 @@
             debugIconsSetZones.Commit();
         }
     }
-

     if (timeToNextDebugIconsUpdateSplinePath < time.systemTime)
     {
@@ -376,22 +379,21 @@
                             int index = (i * splinePathResolution) + step;
                             Billboard@ bb = debugIconsSetSplinesPoints.billboards[index];
                             bb.position = splinePoint;
-                            bb.size = debugIconsSizeSmall * distance;

                             if (step == 0)
                             {
                                 bb.color = Color(1,1,0);
-                                bb.size = debugIconsSize * distance;
+                                bb.size = Max(debugIconsSize * distance, debugIconsSize);
                             }
                             else if ((step+1) >= (splinePathResolution - splineStep))
                             {
                                 bb.color = Color(0,1,0);
-                                bb.size = debugIconsSize * distance;
+                                bb.size = Max(debugIconsSize * distance, debugIconsSize);
                             }
                             else
                             {
                                 bb.color = Color(1,1,1);
-                                bb.size = debugIconsSizeSmall * distance;
+                                bb.size = Max(debugIconsSizeSmall * distance, debugIconsSizeSmall);
                             }
                             bb.enabled = sp.enabled;
                         }
@@ -418,7 +420,7 @@
                         Billboard@ bb = debugIconsSetTriggers.billboards[i];
                         bb.position = nodes[i].worldPosition;
                         float distance = (camPos - nodes[i].worldPosition).length;
-                        bb.size = debugIconsSize * distance;
+                        bb.size = Max(debugIconsSize * distance, debugIconsSize);
                         bb.enabled = rigidbody.enabled;
                     }
                 }
@@ -442,7 +444,7 @@
                     Billboard@ bb = debugIconsSetCustomGeometry.billboards[i];
                     bb.position = nodes[i].worldPosition;
                     float distance = (camPos - nodes[i].worldPosition).length;
-                    bb.size = debugIconsSize * distance;
+                    bb.size = Max(debugIconsSize * distance, debugIconsSize);
                     bb.enabled = customGeometry.enabled;
                 }

@@ -465,7 +467,7 @@
                     Billboard@ bb = debugIconsSetParticleEmitters.billboards[i];
                     bb.position = nodes[i].worldPosition;
                     float distance = (camPos - nodes[i].worldPosition).length;
-                    bb.size = debugIconsSizeBig * distance;
+                    bb.size = Max(debugIconsSizeBig * distance, debugIconsSizeBig);
                     bb.enabled = particleEmitter.enabled;
                 }


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

--- frameworks/projects/mx/src/mx/effects/Glow.as
+++ frameworks/projects/mx/src/mx/effects/Glow.as
@@ -51,6 +51,11 @@
  *  @see mx.effects.effectClasses.GlowInstance
  *
  *  @includeExample examples/GlowEffectExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class Glow extends TweenEffect
 {
@@ -77,6 +82,11 @@
 	 *  Constructor.
 	 *
 	 *  @param target The Object to animate with this effect.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function Glow(target:Object = null)
 	{
@@ -102,6 +112,11 @@
 	 *  where 0.0 means transparent and 1.0 means fully opaque.
 	 *
 	 *  @default 1
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var alphaFrom:Number = 1;

@@ -116,6 +131,11 @@
 	 *  where 0.0 means transparent and 1.0 means fully opaque.
 	 *
 	 *  @default 0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var alphaTo:Number = 0;

@@ -130,6 +150,11 @@
 	 *  Valid values are from 0.0 to 255.0.
 	 *
 	 *  @default 5
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var blurXFrom:Number = 5;

@@ -144,6 +169,11 @@
 	 *  Valid values are from 0.0 to 255.0.
 	 *
 	 *  @default 0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var blurXTo:Number = 0;

@@ -158,6 +188,11 @@
 	 *  Valid values are from 0.0 to 255.0.
 	 *
 	 *  @default 5
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var blurYFrom:Number = 5;

@@ -172,6 +207,11 @@
 	 *  Valid values are from 0.0 to 255.0.
 	 *
 	 *  @default 0
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var blurYTo:Number = 0;

@@ -192,6 +232,11 @@
 	 *  application.
 	 *
 	 *  @default StyleManager.NOT_A_COLOR
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var color:uint = StyleManager.NOT_A_COLOR;

@@ -209,6 +254,11 @@
 	 *  an outer glow around the outer edges of the object.
 	 *
 	 *  @default false
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var inner:Boolean;

@@ -225,6 +275,11 @@
 	 *  The default value is false to specify no knockout effect.
 	 *
 	 *  @default false
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var knockout:Boolean;

@@ -241,6 +296,11 @@
 	 *  Valid values are from 0 to 255.
 	 *
 	 *  @default 2
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public var strength:Number = 2;


Transferred from the Adobe Open Source Subversion Repository

Revision: 6260
Author:   rfrishbe@adobe.com
Date:     2009-04-24T22:08:41.005574Z

Log Message:
-----------
Automation assumed that a component implemented both IUIComponent and IAutomationObject; however, we'd like to automate FlexNativeMenu and FNM doesn't implement IUIComponent.  The properties automation needed from IUIComponent, were enabled, parent, owner, and visible.  We now have properties on IAutomationObject called automationEnabled, automationParent, automationOwner, and automationVisible for this purpose.  Now automation only needs to rely on IAutomationObject.

QE Notes: -
Doc Notes: -
Bugs: SDK-20488
Reviewer: Evtim
tests: checkintests

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/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/automation/IAutomationObject.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/framework_textLayout/src/mx/core/UITLFTextField.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/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>

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

--- frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as
+++ frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as
@@ -11,34 +11,37 @@

 package mx.controls
 {
-	import flash.display.InteractiveObject;
-	import flash.display.NativeMenu;
-	import flash.display.NativeMenuItem;
-	import flash.display.Stage;
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	import flash.events.TimerEvent;
-	import flash.ui.Keyboard;
-	import flash.utils.Timer;
-	import flash.xml.XMLNode;
-
-	import mx.collections.ArrayCollection;
-	import mx.collections.ICollectionView;
-	import mx.collections.XMLListCollection;
-	import mx.collections.errors.ItemPendingError;
-	import mx.controls.menuClasses.IMenuDataDescriptor;
-	import mx.controls.treeClasses.DefaultDataDescriptor;
-	import mx.core.Application;
-	import mx.core.EventPriority;
-	import mx.core.UIComponent;
-	import mx.core.UIComponentGlobals;
-	import mx.core.mx_internal;
-	import mx.events.CollectionEvent;
-	import mx.events.CollectionEventKind;
-	import mx.events.FlexNativeMenuEvent;
-	import mx.managers.ILayoutManagerClient;
-	import mx.managers.ISystemManager;
-
+
+import flash.display.DisplayObjectContainer;
+import flash.display.InteractiveObject;
+import flash.display.NativeMenu;
+import flash.display.NativeMenuItem;
+import flash.display.Stage;
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import flash.events.TimerEvent;
+import flash.ui.Keyboard;
+import flash.utils.Timer;
+import flash.xml.XMLNode;
+
+import mx.automation.IAutomationObject;
+import mx.collections.ArrayCollection;
+import mx.collections.ICollectionView;
+import mx.collections.XMLListCollection;
+import mx.collections.errors.ItemPendingError;
+import mx.controls.menuClasses.IMenuDataDescriptor;
+import mx.controls.treeClasses.DefaultDataDescriptor;
+import mx.core.Application;
+import mx.core.EventPriority;
+import mx.core.UIComponent;
+import mx.core.UIComponentGlobals;
+import mx.core.mx_internal;
+import mx.events.CollectionEvent;
+import mx.events.CollectionEventKind;
+import mx.events.FlexNativeMenuEvent;
+import mx.managers.ILayoutManagerClient;
+import mx.managers.ISystemManager;
+
 //--------------------------------------
 //  Events
 //--------------------------------------
@@ -241,7 +244,8 @@
  *
  *  @playerversion AIR 1.1
  */
-public class FlexNativeMenu extends EventDispatcher implements ILayoutManagerClient, IFlexContextMenu
+public class FlexNativeMenu extends EventDispatcher implements
+    ILayoutManagerClient, IFlexContextMenu, IAutomationObject
 {
     include "../core/Version.as";

@@ -279,125 +283,372 @@
     //  Variables
     //
     //--------------------------------------------------------------------------
-
+
     //--------------------------------------------------------------------------
-	//
-	//  Properties: ILayoutManagerClient
-	//
-	//--------------------------------------------------------------------------
-
-	//----------------------------------
-	//  initialized
-	//----------------------------------
-
-    /**
-	 *  @private
-	 *  Storage for the initialized property.
-	 */
-	private var _initialized:Boolean = false;
-
-    /**
-	 *  @copy mx.core.UIComponent#initialized
+    //
+    //  Properties: IAutomationObject
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  automationDelegate
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the automationDelegate property.
+     */
+    private var _automationDelegate:IAutomationObject;
+
+    /**
+     *  The delegate object that handles the automation-related functionality.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationDelegate():Object
+    {
+        return _automationDelegate;
+    }
+
+    /**
+     *  @private
+     */
+    public function set automationDelegate(value:Object):void
+    {
+        _automationDelegate = value as IAutomationObject;
+    }
+
+    //----------------------------------
+    //  automationName
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the automationName property.
+     */
+    private var _automationName:String = null;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationName():String
+    {
+        if (_automationName)
+            return _automationName;
+        if (automationDelegate)
+           return automationDelegate.automationName;
+
+        return "";
+    }
+
+    /**
+     *  @private
+     */
+    public function set automationName(value:String):void
+    {
+        _automationName = value;
+    }
+
+    /**
+     *  @copy mx.automation.IAutomationObject#automationValue
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationValue():Array
+    {
+        if (automationDelegate)
+           return automationDelegate.automationValue;
+
+        return [];
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get numAutomationChildren():int
+    {
+        if (automationDelegate)
+            return automationDelegate.numAutomationChildren;
+        return 0;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationTabularData():Object
+    {
+        if (automationDelegate)
+            return automationDelegate.automationTabularData;
+        return null;
+    }
+
+    //----------------------------------
+    //  automationOwner
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _automationOwner:DisplayObjectContainer;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationOwner():DisplayObjectContainer
+    {
+        return _automationOwner ? _automationOwner : automationParent;
+    }
+
+    /**
+     *  @private
+     */
+    public function set automationOwner(value:DisplayObjectContainer):void
+    {
+        _automationOwner = value;
+    }
+
+    //----------------------------------
+    //  automationParent
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _automationParent:DisplayObjectContainer;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationParent():DisplayObjectContainer
+    {
+        return _automationParent;
+    }
+
+    /**
+     *  @private
+     */
+    public function set automationParent(value:DisplayObjectContainer):void
+    {
+        _automationParent = value;
+    }
+
+    //----------------------------------
+    //  automationEnabled
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationEnabled():Boolean
+    {
+        // this is always enabled
+        return true;
+    }
+
+    //----------------------------------
+    //  automationVisible
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get automationVisible():Boolean
+    {
+        // this is always "visible" (may be a context menu and hidden at the time, but
+        // in terms of automation, this is always visible)
+        return true;
+    }
+
+    //----------------------------------
+    //  showInAutomationHierarchy
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the showInAutomationHierarchy property.
+     */
+    private var _showInAutomationHierarchy:Boolean = true;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function get showInAutomationHierarchy():Boolean
+    {
+        return _showInAutomationHierarchy;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showInAutomationHierarchy(value:Boolean):void
+    {
+        _showInAutomationHierarchy = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties: ILayoutManagerClient
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  initialized
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the initialized property.
+     */
+    private var _initialized:Boolean = false;
+
+    /**
+     *  @copy mx.core.UIComponent#initialized
      */
     public function get initialized():Boolean
-	{
-		return _initialized;
-	}
+    {
+        return _initialized;
+    }

     /**
      *  @private
      */
     public function set initialized(value:Boolean):void
-	{
-		_initialized = value;
-	}
+    {
+        _initialized = value;
+    }

     //----------------------------------
     //  nestLevel
     //----------------------------------

     /**
-	 *  @private
-	 *  Storage for the nestLevel property.
-	 */
-	private var _nestLevel:int = 1;
-
-	// no one will likely set nestLevel (but there's a setter in case
-	// someone wants to.  We default nestLevel to 1 as it's a top-level
-	// component that goes in the chrome.
-
-	/**
+     *  @private
+     *  Storage for the nestLevel property.
+     */
+    private var _nestLevel:int = 1;
+
+    // no one will likely set nestLevel (but there's a setter in case
+    // someone wants to.  We default nestLevel to 1 as it's a top-level
+    // component that goes in the chrome.
+
+    /**
      *  @copy mx.core.UIComponent#nestLevel
      */
-	public function get nestLevel():int
-	{
-		return _nestLevel;
-	}
-
-	/**
-     *  @private
-     */
-	public function set nestLevel(value:int):void
-	{
-		_nestLevel = value;
-
-		// After nestLevel is initialized, add this object to the
-		// LayoutManager's queue, so that it is drawn at least once
-		invalidateProperties();
-	}
-
-	//----------------------------------
-	//  processedDescriptors
-	//----------------------------------
-
-    /**
-     *  @private
-	 *  Storage for the processedDescriptors property.
-     */
-	private var _processedDescriptors:Boolean = false;
+    public function get nestLevel():int
+    {
+        return _nestLevel;
+    }
+
+    /**
+     *  @private
+     */
+    public function set nestLevel(value:int):void
+    {
+        _nestLevel = value;
+
+        // After nestLevel is initialized, add this object to the
+        // LayoutManager's queue, so that it is drawn at least once
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  processedDescriptors
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the processedDescriptors property.
+     */
+    private var _processedDescriptors:Boolean = false;

     /**
      *  @copy mx.core.UIComponent#processedDescriptors
      */
     public function get processedDescriptors():Boolean
-	{
-		return _processedDescriptors;
-	}
+    {
+        return _processedDescriptors;
+    }

     /**
      *  @private
      */
     public function set processedDescriptors(value:Boolean):void
-	{
-		_processedDescriptors = value;
-	}
-
-	//----------------------------------
-	//  updateCompletePendingFlag
-	//----------------------------------
-
-    /**
-     *  @private
-	 *  Storage for the updateCompletePendingFlag property.
-     */
-	private var _updateCompletePendingFlag:Boolean = false;
-
-    /**
-	 *  A flag that determines if an object has been through all three phases
-	 *  of layout validation (provided that any were required).
+    {
+        _processedDescriptors = value;
+    }
+
+    //----------------------------------
+    //  updateCompletePendingFlag
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the updateCompletePendingFlag property.
+     */
+    private var _updateCompletePendingFlag:Boolean = false;
+
+    /**
+     *  A flag that determines if an object has been through all three phases
+     *  of layout validation (provided that any were required).
      */
     public function get updateCompletePendingFlag():Boolean
-	{
-		return _updateCompletePendingFlag;
-	}
+    {
+        return _updateCompletePendingFlag;
+    }

     /**
      *  @private
      */
     public function set updateCompletePendingFlag(value:Boolean):void
-	{
-		_updateCompletePendingFlag = value;
-	}
+    {
+        _updateCompletePendingFlag = value;
+    }

     //--------------------------------------------------------------------------
     //
@@ -428,19 +679,19 @@
       *  or null if there is not one.
       *
       *  Any changes made directly to the underlying NativeMenu instance
-	  *  may be lost when changes are made to the menu or the underlying
-	  *  data provider.
+      *  may be lost when changes are made to the menu or the underlying
+      *  data provider.
       */
-	public function get nativeMenu() : NativeMenu
-	{
-		return _nativeMenu;
-	}
-
-	//----------------------------------
+    public function get nativeMenu() : NativeMenu
+    {
+        return _nativeMenu;
+    }
+
+    //----------------------------------
     //  dataDescriptor
     //----------------------------------

-	/**
+    /**
      *  @private
      */
     private var dataDescriptorChanged:Boolean = false;
@@ -492,12 +743,12 @@

         dataDescriptorChanged = true;
     }
-
-	//----------------------------------
+
+    //----------------------------------
     //  dataProvider
     //----------------------------------

-	/**
+    /**
      *  @private
      */
     private var dataProviderChanged:Boolean = false;
@@ -513,11 +764,11 @@

     /**
      *  The hierarchy of objects that are used to define the structure
-	 *  of menu items in the NativeMenu. Individual data objects define
-	 *  menu items, and items with child items become menus and submenus.
+     *  of menu items in the NativeMenu. Individual data objects define
+     *  menu items, and items with child items become menus and submenus.
      *
      *
The FlexNativeMenu control handles the source data object as follows:

-	 *
+     *
      *

      *
A String containing valid XML text is converted to an XML object.

      *
An XMLNode is converted to an XML object.

@@ -625,7 +876,7 @@
     //  keyEquivalentField
     //----------------------------------

-	/**
+    /**
      *  @private
      */
     private var keyEquivalentFieldChanged:Boolean = false;
@@ -641,8 +892,8 @@
     /**
      *  The name of the field in the data provider that determines the
      *  key equivalent for each menu item.  The set of values is defined
-	 *  in the Keyboard class, in the KEYNAME_XXXX constants. For example,
-	 *  consult that list for the value for a control character such as Home, Insert, etc.
+     *  in the Keyboard class, in the KEYNAME_XXXX constants. For example,
+     *  consult that list for the value for a control character such as Home, Insert, etc.
      *
      *
Setting the keyEquivalentFunction property causes this property to be ignored.

      *
@@ -694,7 +945,7 @@
      *
      *
The key equivalent function must take a single argument, which is the item
      *  in the data provider, and must return a String.

-	 *
+     *
      *
myKeyEquivalentFunction(item:Object):String

      *
      *  @default "undefined"
@@ -725,7 +976,7 @@
     //  keyEquivalentModifiersFunction
     //----------------------------------

-	/**
+    /**
      *  @private
      */
     private var keyEquivalentModifiersFunctionChanged:Boolean = false;
@@ -734,47 +985,47 @@
      *  @private
      */
     private var _keyEquivalentModifiersFunction:Function = keyEquivalentModifiersDefaultFunction;
-
+
     private function keyEquivalentModifiersDefaultFunction(data:Object):Array
-	{
-		var modifiers:Array = [];
-		var xmlModifiers:Array = ["@altKey", "@cmdKey", "@ctrlKey",
-		                          "@shiftKey", "@commandKey", "@controlKey"];
-		var objectModifiers:Array = ["altKey", "cmdKey", "ctrlKey",
-		                             "shiftKey", "commandKey", "controlKey"];
+    {
+        var modifiers:Array = [];
+        var xmlModifiers:Array = ["@altKey", "@cmdKey", "@ctrlKey",
+                                  "@shiftKey", "@commandKey", "@controlKey"];
+        var objectModifiers:Array = ["altKey", "cmdKey", "ctrlKey",
+                                     "shiftKey", "commandKey", "controlKey"];
         var keyboardModifiers:Array = [Keyboard.ALTERNATE, Keyboard.COMMAND,
                                        Keyboard.CONTROL, Keyboard.SHIFT,
                                        Keyboard.COMMAND, Keyboard.CONTROL];
-
-		if (data is XML)
-        {
-        	for (var i:int = 0; i < xmlModifiers.length; i++)
-        	{
-        		try
-	            {
-	            	var modifier:* = data[xmlModifiers[i]];
-		            if (modifier[0] == true)
-		                modifiers.push(keyboardModifiers[i]);
-	            }
-	            catch(e:Error)
-	            {
-	            }
-        	}
+
+        if (data is XML)
+        {
+            for (var i:int = 0; i < xmlModifiers.length; i++)
+            {
+                try
+                {
+                    var modifier:* = data[xmlModifiers[i]];
+                    if (modifier[0] == true)
+                        modifiers.push(keyboardModifiers[i]);
+                }
+                catch(e:Error)
+                {
+                }
+            }
         }
         else if (data is Object)
         {
             for (i = 0; i < objectModifiers.length; i++)
-        	{
-        		try
-	            {
-	            	modifier = data[objectModifiers[i]];
-		            if (String(modifier).toLowerCase() == "true")
-		                modifiers.push(keyboardModifiers[i]);
-	            }
-	            catch(e:Error)
-	            {
-	            }
-        	}
+            {
+                try
+                {
+                    modifier = data[objectModifiers[i]];
+                    if (String(modifier).toLowerCase() == "true")
+                        modifiers.push(keyboardModifiers[i]);
+                }
+                catch(e:Error)
+                {
+                }
+            }
         }

         return modifiers;
@@ -788,15 +1039,15 @@
      *
      *  If you omit this property, Flex uses its own default function to determine the
      *  Array of modifiers by looking in the data provider data for the presence of
-	 *  the following (boolean) fields: altKey, commandKey,
-	 *  controlKey, and shiftKey.
+     *  the following (boolean) fields: altKey, commandKey,
+     *  controlKey, and shiftKey.
      *
      *
The keyEquivalentModifiersFunction property is good for handling
      *  formatting, localization, and platform independence.

      *
      *
The key equivalent modifiers function must take a single argument, which
      *  is the item in the data provider, and must return an array of modifier key names.

-	 *
+     *
      *
myKeyEquivalentModifiersFunction(item:Object):Array

      *
      *  @default "undefined"
@@ -826,7 +1077,7 @@
     //  labelField
     //----------------------------------

-	/**
+    /**
      *  @private
      */
     private var labelFieldChanged:Boolean = false;
@@ -845,18 +1096,18 @@
      *  Strings, Flex uses each string value as the label. If the data
      *  provider is an E4X XML object, you must set this property explicitly.
      *  For example, if each XML elementin an E4X XML Object includes a "label"
-	 *  attribute containing the text to display for each menu item, set
-	 *  the labelField to "@label".
+     *  attribute containing the text to display for each menu item, set
+     *  the labelField to "@label".
      *
      *
In a label, you can specify the character to be used as the mnemonic index
      *  by preceding it with an underscore. For example, a label value of "C_ut"
-	 *  sets the mnemonic index to 1. Only the first underscore present is used for this
-	 *  purpose.  To display a literal underscore character in the label, you can escape it
-	 *  using a double underscore. For example, a label value of "C__u_t" would
-	 *  result in a menu item with the label "C_ut" and a mnemonic index of 3 (the "t"
-	 *  character). If the field defined in the mnemonicIndexField property
-	 *  is present and set to a value greater than zero, that value takes precedence over
-	 *  any underscore-specified mnemonic index value.

+     *  sets the mnemonic index to 1. Only the first underscore present is used for this
+     *  purpose.  To display a literal underscore character in the label, you can escape it
+     *  using a double underscore. For example, a label value of "C__u_t" would
+     *  result in a menu item with the label "C_ut" and a mnemonic index of 3 (the "t"
+     *  character). If the field defined in the mnemonicIndexField property
+     *  is present and set to a value greater than zero, that value takes precedence over
+     *  any underscore-specified mnemonic index value.

      *
      *
Setting the labelFunction property causes this property to be ignored.

      *
@@ -910,7 +1161,7 @@
      *
      *
The label function must take a single argument, which is the item
      *  in the data provider, and must return a String.

-	 *
+     *
      *
myLabelFunction(item:Object):String

      *
      *  @default "undefined"
@@ -940,7 +1191,7 @@
     //  mnemonicIndexField
     //----------------------------------

-	/**
+    /**
      *  @private
      */
     private var mnemonicIndexFieldChanged:Boolean = false;
@@ -958,15 +1209,15 @@
      *  mnemonic index for each menu item.
      *
      *
If the field specified by this property contains a number greater
-	 *  than zero, that mnemonic index
+     *  than zero, that mnemonic index
      *  takes precedence over one specified by an underscore in the label.

      *
      *
Setting the mnemonicIndexFunction property causes
-	 *  this property to be ignored.

+     *  this property to be ignored.

      *
      *  @default "mnemonicIndex"
-	 *
-	 *  @see #labelField
+     *
+     *  @see #labelField
      */
     public function get mnemonicIndexField():String
     {
@@ -1010,7 +1261,7 @@
      *  property value.

      *
      *
If this property is defined and the function returns a number greater than
-	 *  zero for a data item, the returned mnemonic index
+     *  zero for a data item, the returned mnemonic index
      *  takes precedence over one specified by an underscore in the label.

      *
      *
The mnemonicIndexFunction property is good for handling formatting,
@@ -1018,7 +1269,7 @@
      *
      *
The mnemonic index function must take a single argument which is the item
      *  in the data provider and return an int.

-	 *
+     *
      *
myMnemonicIndexFunction(item:Object):int

      *
      *  @default "undefined"
@@ -1067,7 +1318,7 @@
      *
      *
If the data provider has a root node, and the showRoot property
      *  is set to false, the top-level menu items displayed by the
-	 *  FlexNativeMenu control correspond to the immediate descendants of the root node.

+     *  FlexNativeMenu control correspond to the immediate descendants of the root node.

      *
      *
This flag has no effect when using a data provider without a root nodes,
      *  such as a List or Array.

@@ -1098,27 +1349,27 @@
     //  Methods
     //
     //--------------------------------------------------------------------------
-
-   	/**
-	 *  @copy mx.core.UIComponent#invalidateProperties()
-	 */
+
+       /**
+     *  @copy mx.core.UIComponent#invalidateProperties()
+     */
     public function invalidateProperties():void
     {
         // Don't try to add the object to the display list queue until we've
-		// been assigned a nestLevel, or we'll get added at the wrong place in
-		// the LayoutManager's priority queue.
-		if (!invalidatePropertiesFlag && nestLevel > 0)
-		{
-			invalidatePropertiesFlag = true;
-			if (UIComponentGlobals.mx_internal::layoutManager)
-				UIComponentGlobals.mx_internal::layoutManager.invalidateProperties(this);
-			else
-			{
-				var myTimer:Timer = new Timer(100, 1);
-				myTimer.addEventListener(TimerEvent.TIMER, validatePropertiesTimerHandler);
-				myTimer.start();
-			}
-		}
+        // been assigned a nestLevel, or we'll get added at the wrong place in
+        // the LayoutManager's priority queue.
+        if (!invalidatePropertiesFlag && nestLevel > 0)
+        {
+            invalidatePropertiesFlag = true;
+            if (UIComponentGlobals.mx_internal::layoutManager)
+                UIComponentGlobals.mx_internal::layoutManager.invalidateProperties(this);
+            else
+            {
+                var myTimer:Timer = new Timer(100, 1);
+                myTimer.addEventListener(TimerEvent.TIMER, validatePropertiesTimerHandler);
+                myTimer.start();
+            }
+        }
     }

     /**
@@ -1157,46 +1408,56 @@
     }

     /**
-	 *  Validates and updates the properties and layout of this object
-	 *  and redraws it, if necessary.
-	 */
-	public function validateNow():void
-	{
-		// Since we don't have commit/measure/layout phases,
-		// all we need to do here is the commit phase
-		if (invalidatePropertiesFlag)
-			validateProperties();
-	}
-
-	/**
-	 *  Sets the context menu of the InteractiveObject to the underlying native menu.
-	 */
-	public function setContextMenu(component:InteractiveObject):void
-	{
-		component.contextMenu = nativeMenu;
-
-		if (component is Application)
-		{
-			var systemManager:ISystemManager = Application(component).systemManager;
-
-			if (systemManager is InteractiveObject)
-        		InteractiveObject(systemManager).contextMenu = nativeMenu;
-		}
-	}
-
-	/**
-	 *  Unsets the context menu of the InteractiveObject that has been set to
-	 *  the underlying native menu.
-	 */
-	public function unsetContextMenu(component:InteractiveObject):void
-	{
-		component.contextMenu = null;
-	}
+     *  Validates and updates the properties and layout of this object
+     *  and redraws it, if necessary.
+     */
+    public function validateNow():void
+    {
+        // Since we don't have commit/measure/layout phases,
+        // all we need to do here is the commit phase
+        if (invalidatePropertiesFlag)
+            validateProperties();
+    }
+
+    /**
+     *  Sets the context menu of the InteractiveObject to the underlying native menu.
+     */
+    public function setContextMenu(component:InteractiveObject):void
+    {
+        component.contextMenu = nativeMenu;
+
+        if (component is Application)
+        {
+            var systemManager:ISystemManager = Application(component).systemManager;
+
+            if (systemManager is InteractiveObject)
+                InteractiveObject(systemManager).contextMenu = nativeMenu;
+        }
+
+        automationParent = component as DisplayObjectContainer;
+        automationOwner = component as DisplayObjectContainer;
+
+        component.dispatchEvent(new Event("flexContextMenuChanged"));
+    }
+
+    /**
+     *  Unsets the context menu of the InteractiveObject that has been set to
+     *  the underlying native menu.
+     */
+    public function unsetContextMenu(component:InteractiveObject):void
+    {
+        component.contextMenu = null;
+
+        automationParent = null;
+        automationOwner = null;
+
+        component.dispatchEvent(new Event("flexContextMenuChanged"));
+    }

     /**
      *  Processes the properties set on the component.
-	 *
-	 *  @see mx.core.UIComponent#commitProperties()
+     *
+     *  @see mx.core.UIComponent#commitProperties()
      */
     protected function commitProperties():void
     {
@@ -1207,7 +1468,7 @@
         }

         if (dataProviderChanged ||showRootChanged ||
-        	labelFieldChanged || dataDescriptorChanged)
+            labelFieldChanged || dataDescriptorChanged)
         {
             var tmpCollection:ICollectionView;

@@ -1247,7 +1508,7 @@
                                                false,
                                                EventPriority.DEFAULT_HANDLER, true);

-             	populateMenu(_nativeMenu, tmpCollection);
+                 populateMenu(_nativeMenu, tmpCollection);
             }

             dispatchEvent(new Event("nativeMenuChange"));
@@ -1276,10 +1537,10 @@
     private function clearMenu(menu:NativeMenu):void
     {
         var numItems:int = menu.numItems;
-    	for (var i:int = 0; i < numItems; i++)
-    	{
-    		menu.removeItemAt(0);
-    	}
+        for (var i:int = 0; i < numItems; i++)
+        {
+            menu.removeItemAt(0);
+        }
     }

     /**
@@ -1319,59 +1580,59 @@
             return;
         }

-		var type:String = dataDescriptor.getType(data).toLowerCase();
-		var isSeparator:Boolean = (type == "separator");
-
-		// label changes later, but separator is read-only so need to know here
-		var nativeMenuItem:NativeMenuItem = new NativeMenuItem("", isSeparator);
-
-		if (!isSeparator)
-		{
-			// enabled
-			nativeMenuItem.enabled = dataDescriptor.isEnabled(data);
-
-			// checked
-			nativeMenuItem.checked = type == "check" && dataDescriptor.isToggled(data);
-
-			// data
-			nativeMenuItem.data = dataDescriptor.getData(data, mx_internal::_rootModel);
-
-			// key equivalent
-			nativeMenuItem.keyEquivalent = itemToKeyEquivalent(data);
-
-			// key equivalent modifiers
-			nativeMenuItem.keyEquivalentModifiers = itemToKeyEquivalentModifiers(data);
-
-			// label and mnemonic index
-			var labelData:String = itemToLabel(data);
-			var mnemonicIndex:int = itemToMnemonicIndex(data);
-
-			if (mnemonicIndex >= 0)
-			{
-				nativeMenuItem.label = parseLabelToString(labelData);
-				nativeMenuItem.mnemonicIndex = mnemonicIndex;
-			}
-			else
-			{
-				nativeMenuItem.label = parseLabelToString(labelData);
-				nativeMenuItem.mnemonicIndex = parseLabelToMnemonicIndex(labelData);
-			}
-
-			// event listeners
-			nativeMenuItem.addEventListener(flash.events.Event.SELECT, itemSelectHandler, false, 0, true);
-
-			// recursive
-			if (dataDescriptor.isBranch(data, mx_internal::_rootModel) &&
-				dataDescriptor.hasChildren(data, mx_internal::_rootModel))
-			{
-				nativeMenuItem.submenu = createMenu();
-				populateMenu(nativeMenuItem.submenu,
-					dataDescriptor.getChildren(data, mx_internal::_rootModel));
-			}
-		}
-
-		// done!
-		menu.addItem(nativeMenuItem);
+        var type:String = dataDescriptor.getType(data).toLowerCase();
+        var isSeparator:Boolean = (type == "separator");
+
+        // label changes later, but separator is read-only so need to know here
+        var nativeMenuItem:NativeMenuItem = new NativeMenuItem("", isSeparator);
+
+        if (!isSeparator)
+        {
+            // enabled
+            nativeMenuItem.enabled = dataDescriptor.isEnabled(data);
+
+            // checked
+            nativeMenuItem.checked = type == "check" && dataDescriptor.isToggled(data);
+
+            // data
+            nativeMenuItem.data = dataDescriptor.getData(data, mx_internal::_rootModel);
+
+            // key equivalent
+            nativeMenuItem.keyEquivalent = itemToKeyEquivalent(data);
+
+            // key equivalent modifiers
+            nativeMenuItem.keyEquivalentModifiers = itemToKeyEquivalentModifiers(data);
+
+            // label and mnemonic index
+            var labelData:String = itemToLabel(data);
+            var mnemonicIndex:int = itemToMnemonicIndex(data);
+
+            if (mnemonicIndex >= 0)
+            {
+                nativeMenuItem.label = parseLabelToString(labelData);
+                nativeMenuItem.mnemonicIndex = mnemonicIndex;
+            }
+            else
+            {
+                nativeMenuItem.label = parseLabelToString(labelData);
+                nativeMenuItem.mnemonicIndex = parseLabelToMnemonicIndex(labelData);
+            }
+
+            // event listeners
+            nativeMenuItem.addEventListener(flash.events.Event.SELECT, itemSelectHandler, false, 0, true);
+
+            // recursive
+            if (dataDescriptor.isBranch(data, mx_internal::_rootModel) &&
+                dataDescriptor.hasChildren(data, mx_internal::_rootModel))
+            {
+                nativeMenuItem.submenu = createMenu();
+                populateMenu(nativeMenuItem.submenu,
+                    dataDescriptor.getChildren(data, mx_internal::_rootModel));
+            }
+        }
+
+        // done!
+        menu.addItem(nativeMenuItem);
     }

     /**
@@ -1387,13 +1648,13 @@
      */
      public function display(stage:Stage, x:int, y:int):void
      {
-     	nativeMenu.display(stage, x, y);
+         nativeMenu.display(stage, x, y);
      }

     /**
      *  Returns the key equivalent for the given data object
      *  based on the keyEquivalentField and keyEquivalentFunction
-	 *  properties. If the method cannot convert the parameter to a String, it returns an
+     *  properties. If the method cannot convert the parameter to a String, it returns an
      *  empty string.
      *
      *  @param data Object to be displayed.
@@ -1468,8 +1729,8 @@

     /**
      *  Returns the String to use as the menu item label for the given data
-	 *  object, based on the labelField and labelFunction
-	 *  properties.
+     *  object, based on the labelField and labelFunction
+     *  properties.
      *  If the method cannot convert the parameter to a String, it returns a
      *  single space.
      *
@@ -1529,7 +1790,7 @@
     /**
      *  Returns the mnemonic index for the given data object
      *  based on the mnemonicIndexField and mnemonicIndexFunction
-	 *  properties. If the method cannot convert the parameter to an integer, it returns -1.
+     *  properties. If the method cannot convert the parameter to an integer, it returns -1.
      *
      *  @param data Object to be displayed.
      *
@@ -1585,50 +1846,116 @@
     /**
      *  Determines the actual label to be used for the NativeMenuItem
      *  by removing underscore characters and converting escaped underscore
-	 *  characters, if there are any.
+     *  characters, if there are any.
      */
     protected function parseLabelToString(data:String):String
     {
-    	const singleCharacter:RegExp = new RegExp(MNEMONIC_INDEX_CHARACTER, "g");
-    	const doubleCharacter:RegExp = new RegExp(MNEMONIC_INDEX_CHARACTER + MNEMONIC_INDEX_CHARACTER, "g");
-    	var dataWithoutEscapedUnderscores:Array = data.split(doubleCharacter);
-
-    	// now need to find lone underscores and remove it
-    	var len:int = dataWithoutEscapedUnderscores.length;
-    	for(var i:int = 0; i < len; i++)
-    	{
-    		var str:String = String(dataWithoutEscapedUnderscores[i]);
-    		dataWithoutEscapedUnderscores[i] = str.replace(singleCharacter, "");
-    	}
-
-    	return dataWithoutEscapedUnderscores.join(MNEMONIC_INDEX_CHARACTER);
+        const singleCharacter:RegExp = new RegExp(MNEMONIC_INDEX_CHARACTER, "g");
+        const doubleCharacter:RegExp = new RegExp(MNEMONIC_INDEX_CHARACTER + MNEMONIC_INDEX_CHARACTER, "g");
+        var dataWithoutEscapedUnderscores:Array = data.split(doubleCharacter);
+
+        // now need to find lone underscores and remove it
+        var len:int = dataWithoutEscapedUnderscores.length;
+        for(var i:int = 0; i < len; i++)
+        {
+            var str:String = String(dataWithoutEscapedUnderscores[i]);
+            dataWithoutEscapedUnderscores[i] = str.replace(singleCharacter, "");
+        }
+
+        return dataWithoutEscapedUnderscores.join(MNEMONIC_INDEX_CHARACTER);
     }

     /**
      *  Extracts the mnemonic index from a label based on the presence of
-	 *  an underscore character. It finds the leading underscore character if
+     *  an underscore character. It finds the leading underscore character if
      *  there is one and uses that as the index.
      */
     protected function parseLabelToMnemonicIndex(data:String):int
     {
-    	const doubleCharacter:RegExp = new RegExp(MNEMONIC_INDEX_CHARACTER + MNEMONIC_INDEX_CHARACTER, "g");
+        const doubleCharacter:RegExp = new RegExp(MNEMONIC_INDEX_CHARACTER + MNEMONIC_INDEX_CHARACTER, "g");
         var dataWithoutEscapedUnderscores:Array = data.split(doubleCharacter);
-
-    	// now need to find first underscore
-    	var len:int = dataWithoutEscapedUnderscores.length;
-    	var strLengthUpTo:int = 0; // length of string accumulator
-    	for(var i:int = 0; i < len; i++)
-    	{
-    		var str:String = String(dataWithoutEscapedUnderscores[i]);
-    		var index:int = str.indexOf(MNEMONIC_INDEX_CHARACTER);
-
-    		if (index >= 0)
-    			return index + strLengthUpTo;
-
-    		strLengthUpTo += str.length + MNEMONIC_INDEX_CHARACTER.length;
-    	}
-
-    	return -1;
+
+        // now need to find first underscore
+        var len:int = dataWithoutEscapedUnderscores.length;
+        var strLengthUpTo:int = 0; // length of string accumulator
+        for(var i:int = 0; i < len; i++)
+        {
+            var str:String = String(dataWithoutEscapedUnderscores[i]);
+            var index:int = str.indexOf(MNEMONIC_INDEX_CHARACTER);
+
+            if (index >= 0)
+                return index + strLengthUpTo;
+
+            strLengthUpTo += str.length + MNEMONIC_INDEX_CHARACTER.length;
+        }
+
+        return -1;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods: IAutomationObject
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function createAutomationIDPart(child:IAutomationObject):Object
+    {
+        if (automationDelegate)
+            return automationDelegate.createAutomationIDPart(child);
+        return null;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function resolveAutomationIDPart(criteria:Object):Array
+    {
+        if (automationDelegate)
+            return automationDelegate.resolveAutomationIDPart(criteria);
+        return [];
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function getAutomationChildAt(index:int):IAutomationObject
+    {
+        if (automationDelegate)
+            return automationDelegate.getAutomationChildAt(index);
+        return null;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function replayAutomatableEvent(event:Event):Boolean
+    {
+        if (automationDelegate)
+            return automationDelegate.replayAutomatableEvent(event);
+        return false;
     }

     //--------------------------------------------------------------------------
@@ -1636,8 +1963,8 @@
     //  Event handlers
     //
     //--------------------------------------------------------------------------
-
- 	/**
+
+     /**
      *  @private
      */
     private function itemSelectHandler(event:Event):void
@@ -1647,11 +1974,11 @@
         var type:String = dataDescriptor.getType(nativeMenuItem.data).toLowerCase();
         if (type == "check")
         {
-        	var checked:Boolean = !dataDescriptor.isToggled(nativeMenuItem.data);
-        	nativeMenuItem.checked = checked;
-        	dataDescriptor.setToggled(nativeMenuItem.data, checked);
-        	// this causes an update event which ends up re-creating
-        	// the whole menu... (SDK-13109)
+            var checked:Boolean = !dataDescriptor.isToggled(nativeMenuItem.data);
+            nativeMenuItem.checked = checked;
+            dataDescriptor.setToggled(nativeMenuItem.data, checked);
+            // this causes an update event which ends up re-creating
+            // the whole menu... (SDK-13109)
         }

         var menuEvent:FlexNativeMenuEvent = new FlexNativeMenuEvent(FlexNativeMenuEvent.ITEM_CLICK);
@@ -1674,8 +2001,8 @@
         menuEvent.nativeMenu = nativeMenu;
         dispatchEvent(menuEvent);
     }
-
- 	/**
+
+     /**
      *  @private
      */
     private function collectionChangeHandler(ce:CollectionEvent):void
@@ -1710,7 +2037,7 @@
         }
         else if (ce.kind == CollectionEventKind.UPDATE)
         {
-         	dataProviderChanged = true;
+            dataProviderChanged = true;
             invalidateProperties();
             // should handle elegantly with better performance
             // but can't right now


Transferred from the Adobe Open Source Subversion Repository

Revision: 20130
Author:   deeptika@adobe.com
Date:     2011-02-04T12:04:21.096832Z

Log Message:
-----------
Handling shift key only when selectionMode is multiple.

QE notes:
Doc notes:
Bugs: FLEXDMV-1952 (PieChart with selectionMode="single" can sometimes have several item selected)
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as

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

--- frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as
@@ -2644,7 +2644,7 @@

         seriesObject = Series(item.element);

-        if (event.shiftKey && _anchorItem)
+        if (_selectionMode == "multiple" && event.shiftKey && _anchorItem)
         {
             handleShift(item);
             bSelectionChanged = true;


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

--- frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as
+++ frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as
@@ -32,6 +32,11 @@
      *  @param font Describes attributes of the font to register.
 	 *
      *  @param moduleFactory The moduleFactory where the font is embedded.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	function registerFont(font:EmbeddedFont,
 						  moduleFactory:IFlexModuleFactory):void;
@@ -45,6 +50,11 @@
      *  @param font Describes attributes of the font to register.
 	 *
      *  @param moduleFactory moduleFactory where the font is embedded.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	function deregisterFont(font:EmbeddedFont,
 							moduleFactory:IFlexModuleFactory):void;
@@ -66,6 +76,11 @@
      *  @return moduleFactory that can be used to create an object
 	 *  in the context of the font.
      *  null if the font is not found in the registry.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	function getAssociatedModuleFactory(
 					font:EmbeddedFont,
@@ -79,6 +94,11 @@
      *  @return Array of EmbeddedFont objects.
 	 *  Fonts that have been registered multiple times will appear
 	 *  multiple times in the array.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	function getFonts():Array;
 }