Transferred from the Adobe Open Source Subversion Repository

Revision: 19231
Author:   jszeto@adobe.com
Date:     2010-12-09T19:25:51.943016Z

Log Message:
-----------
Mobile Skin Fixes

Merging in revisions 18989-19158 from hero_skin_sandbox.

The following component skins have been updated and 320 DPI skins added:

Button
CheckBox
RadioButton
TextInput
TextArea
ActionBar
HSlider

Updating MobileSkins test project

QE notes: baseline regen
Doc notes: none
Bugs: none
Reviewer: Jason San Jose, Tom Krakit
Tests run: full cyclone
Is noteworthy for integration: yes, updated skins!

Modified Paths:
--------------
129 paths were modified

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as
@@ -17,9 +17,13 @@
 import flash.geom.Matrix;

 import mx.core.DeviceDensity;
+import mx.core.mx_internal;
 import mx.utils.ColorUtil;

+import spark.skins.mobile.ActionBarSkin;
 import spark.skins.mobile.ButtonSkin;
+
+use namespace mx_internal;

 /**
  *  Base skin class for ActionBar buttons. Adds flat-look button border and
@@ -40,11 +44,6 @@

     private static var matrix:Matrix = new Matrix();

-    // Used for gradient background
-    private static const alphas:Array = [1, 1, 1];
-
-    private static const ratios:Array = [0, 127.5, 255];
-
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -56,10 +55,22 @@

         switch (authorDensity)
         {
+            case DeviceDensity.PPI_320:
+            {
+                layoutBorderSize = 1;
+                layoutPaddingTop = 12;
+                layoutPaddingBottom = 10;
+                layoutPaddingLeft = 20;
+                layoutPaddingRight = 20;
+                layoutMeasuredWidth = 106;
+                layoutMeasuredHeight = 86;
+
+                break;
+            }
             case DeviceDensity.PPI_240:
             {
                 layoutBorderSize = 1;
-                layoutPaddingTop = 8;
+                layoutPaddingTop = 9;
                 layoutPaddingBottom = 8;
                 layoutPaddingLeft = 16;
                 layoutPaddingRight = 16;
@@ -72,17 +83,33 @@
             {
                 // default PPI160
                 layoutBorderSize = 1;
-                layoutPaddingTop = 7
-                layoutPaddingBottom = 7;
+                layoutPaddingTop = 6;
+                layoutPaddingBottom = 5;
                 layoutPaddingLeft = 10;
                 layoutPaddingRight = 10;
-                layoutMeasuredWidth = 55;
-                layoutMeasuredHeight = 44;
+                layoutMeasuredWidth = 53;
+                layoutMeasuredHeight = 43;

                 break;
             }
         }
     }
+
+    /**
+     * @private
+     * Disabled state for ActionBar buttons only applies to label and icon
+     */
+    override protected function commitDisabled(isDisabled:Boolean):void
+    {
+        labelDisplay.alpha = (isDisabled) ? 0.5 : 1;
+        labelDisplayShadow.alpha = (isDisabled) ? 0.5 : 1;
+
+        var icon:DisplayObject = getIconDisplay();
+
+        if (icon != null)
+            icon.alpha = (isDisabled) ? 0.5 : 1;
+    }
+

     //--------------------------------------------------------------------------
     //
@@ -100,34 +127,33 @@
         measuredHeight =  Math.max(layoutMeasuredHeight, measuredHeight);
     }

-    override protected function layoutBorder(bgImg:DisplayObject, unscaledWidth:Number, unscaledHeight:Number):void
+    override protected function beginChromeColorFill(chromeColorGraphics:Graphics):void
     {
-        // extend 1px outside measured width to overlap highlight borders
-        setElementSize(bgImg, unscaledWidth + layoutBorderSize, unscaledHeight);
-        setElementPosition(bgImg, 0, 0);
+        var chromeColor:uint = getChromeColor();
+
+        // solid color fill in down state
+        if (currentState == "down")
+        {
+            chromeColorGraphics.beginFill(chromeColor);
+            return;
+        }
+
+        var colors:Array = [];
+
+        // FIXME (jasonsj): overlayMode alpha on background only or entire ActionBar?
+        var backgroundAlphas:Array = [1, 1];
+
+        // Draw the gradient background
+        matrix.createGradientBox(unscaledWidth - layoutBorderSize, unscaledHeight, Math.PI / 2, 0, 0);
+        colors[0] = ColorUtil.adjustBrightness2(chromeColor, 20);
+        colors[1] = chromeColor;
+
+        chromeColorGraphics.beginGradientFill(GradientType.LINEAR, colors, backgroundAlphas, ActionBarSkin.ACTIONBAR_CHROME_COLOR_RATIOS, matrix);
     }

     override protected function drawChromeColor(chromeColorGraphics:Graphics, unscaledWidth:Number, unscaledHeight:Number):void
     {
-        drawBackgroundOffset(chromeColorGraphics, 0, unscaledWidth, unscaledHeight);
-    }
-
-    protected function drawBackgroundOffset(chromeColorGraphics:Graphics, xOffset:Number, backgroundWidth:Number, backgroundHeight:Number):void
-    {
-        var colors:Array = [];
-
-        // Draw the gradient background
-        matrix.createGradientBox(backgroundWidth, backgroundHeight, Math.PI / 2, 0, 0);
-        var chromeColor:uint = getChromeColor();
-        colors[0] = ColorUtil.adjustBrightness2(chromeColor, 20);
-        colors[1] = chromeColor;
-        colors[2] = ColorUtil.adjustBrightness2(chromeColor, -20);
-
-        chromeColorGraphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matrix);
-
-        // adjust for separator
-        chromeColorGraphics.drawRect(xOffset, 0, backgroundWidth, backgroundHeight);
-        chromeColorGraphics.endFill();
+        chromeColorGraphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5097
Author:   gauravj@adobe.com
Date:     2009-02-27T02:06:23.424936Z

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:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/fileSystemClasses/FileSystemTreeDataDescriptor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemHistoryButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemTree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumeration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/AIREvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/StatusBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FileEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/WindowExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/ApplicationTitleBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/fileSystemClasses/FileSystemControlHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemRawChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMinimizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMaximizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/StatusBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/IWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemSizeDisplayMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeWindowBoundsEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemChildrenList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowCloseButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>

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

--- frameworks/projects/airframework/src/mx/controls/FileSystemTree.as
+++ frameworks/projects/airframework/src/mx/controls/FileSystemTree.as
@@ -40,6 +40,10 @@
  *  for any reason.
  *
  *  @eventType mx.events.FileEvent.DIRECTORY_CHANGE
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="directoryChange", type="mx.events.FileEvent")]

@@ -48,6 +52,10 @@
  *  using the mouse of keyboard.
  *
  *  @eventType mx.events.FileEvent.DIRECTORY_CLOSING
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="directoryClosing", type="mx.events.FileEvent")]

@@ -62,6 +70,10 @@
  *  double-clicked.

  *
  *  @eventType mx.events.FileEvent.DIRECTORY_OPENING
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="directoryOpening", type="mx.events.FileEvent")]

@@ -70,6 +82,10 @@
  *  or by selecting it and pressing Enter.
  *
  *  @eventType mx.events.FileEvent.FILE_CHOOSE
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 [Event(name="fileChoose", type="mx.events.FileEvent")]

@@ -153,6 +169,10 @@
  *
  *  @see flash.filesystem.File
  *
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class FileSystemTree extends Tree
 {
@@ -166,6 +186,10 @@

     /**
      *  @copy mx.controls.FileSystemList#COMPUTER
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static const COMPUTER:File = FileSystemControlHelper.COMPUTER;

@@ -177,6 +201,10 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function FileSystemTree()
     {
@@ -238,6 +266,10 @@
      *  the root directories, such as C: and D: on Windows.

      *
      *  @default COMPUTER
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get directory():File
     {
@@ -262,6 +294,10 @@
      *  @default FileSystemEnumerationMode.DIRECTORIES_FIRST
      *
      *  @see mx.controls.FileSystemEnumerationMode
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get enumerationMode():String
     {
@@ -284,6 +320,10 @@
      *  @copy mx.controls.FileSystemList#extensions
      *
      *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get extensions():Array /* of String */
     {
@@ -306,6 +346,10 @@
      *  @copy mx.controls.FileSystemList#filterFunction
      *
      *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get filterFunction():Function
     {
@@ -328,6 +372,10 @@
      *  @copy mx.controls.FileSystemList#nameCompareFunction
      *
      *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get nameCompareFunction():Function
     {
@@ -352,6 +400,10 @@
      *  This Array is empty if no subdirectories are open.
      *
      *  @default []
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get openPaths():Array /* of String */
     {
@@ -380,6 +432,10 @@
      *
      *  @see mx.controls.listClasses.ListBase#selectedIndex
      *  @see mx.controls.listClasses.ListBase#selectedItem
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get selectedPath():String
     {
@@ -408,6 +464,10 @@
      *
      *  @see mx.controls.listClasses.ListBase#selectedIndex
      *  @see mx.controls.listClasses.ListBase#selectedItem
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get selectedPaths():Array /* of String */
     {
@@ -430,6 +490,10 @@
      *  @copy mx.controls.FileSystemList#showExtensions
      *
      *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get showExtensions():Boolean
     {
@@ -452,6 +516,10 @@
      *  @copy mx.controls.FileSystemList#showHidden
      *
      *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get showHidden():Boolean
     {
@@ -474,6 +542,10 @@
      *  @copy mx.controls.FileSystemList#showIcons
      *
      *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get showIcons():Boolean
     {
@@ -563,6 +635,10 @@

     /**
      *  @copy mx.controls.FileSystemList#findIndex()
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function findIndex(nativePath:String):int
     {
@@ -571,6 +647,10 @@

     /**
      *  @copy mx.controls.FileSystemList#findItem()
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function findItem(nativePath:String):File
     {
@@ -587,6 +667,10 @@
      *  After the enumeration, the dataProvider property
      *  contains an ArrayCollection of File instances
      *  for the directory's contents.

+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function refresh():void
     {
@@ -599,6 +683,10 @@
      *
This method sets the dataProvider to null
      *  but leaves the directory property unchanged.
      *  You can call refresh to populate the list again.

+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function clear():void
     {
@@ -618,6 +706,10 @@
      *
      *  @param file A String specifying the nativePath
      *  of a File item.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function openSubdirectory(nativePath:String):void
     {
@@ -686,6 +778,10 @@
      *
      *  @param file A String specifying the nativePath
      *  of a File item.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function closeSubdirectory(nativePath:String):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@1249725 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as
+++ frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as
@@ -0,0 +1,1533 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 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.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;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched before a menu or submenu is displayed.
+ *
+ *  @eventType mx.events.FlexNativeMenuEvent.MENU_SHOW
+ */
+[Event(name="menuShow", type="mx.events.FlexNativeMenuEvent")]
+
+/**
+ *  Dispatched when a menu item is selected.
+ *
+ *  @eventType mx.events.FlexNativeMenuEvent.ITEM_CLICK
+ */
+[Event(name="itemClick", type="mx.events.FlexNativeMenuEvent")]
+
+/**
+ *  FlexNativeMenu is a wrapper class for AIR's NativeMenu.  It presents a Flex
+ *  interface by allowing you to use dataProviders to specify your menu content.
+ *
+ *  @see flash.display.NativeMenu
+ */
+public class FlexNativeMenu extends EventDispatcher implements ILayoutManagerClient, IFlexContextMenu
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The character to use to indicate the mnemonic index in a label.  By
+     *  default, it is the underscore character, so in "C_ut", u would become
+     *  the character for the mnemonic index.
+     */
+    private static var MNEMONIC_INDEX_CHARACTER:String = "_";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function FlexNativeMenu()
+    {
+        super();
+
+        _nativeMenu.addEventListener(Event.DISPLAYING, menuDisplayHandler, false, 0, true);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    //--------------------------------------------------------------------------
+	//
+	//  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;
+	}
+
+    /**
+     *  @private
+     */
+    public function set initialized(value:Boolean):void
+	{
+		_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.
+
+	/**
+     *  @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;
+
+    /**
+     *  @copy mx.core.UIComponent#processedDescriptors
+     */
+    public function get processedDescriptors():Boolean
+	{
+		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).
+     */
+    public function get updateCompletePendingFlag():Boolean
+	{
+		return _updateCompletePendingFlag;
+	}
+
+    /**
+     *  @private
+     */
+    public function set updateCompletePendingFlag(value:Boolean):void
+	{
+		_updateCompletePendingFlag = value;
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables: Invalidation
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Whether this component needs to have its
+     *  commitProperties() method called.
+     */
+    private var invalidatePropertiesFlag:Boolean = false;
+
+    /**
+     * @private
+     */
+    private var _nativeMenu:NativeMenu = new NativeMenu();
+
+    [Bindable("nativeMenuUpdate")]
+
+    //----------------------------------
+    //  nativeMenu
+    //----------------------------------
+
+    /**
+      *  Returns the flash.display.NativeMenu managed by this object,
+      *  or null if there is not one.
+      *
+      *  Modifications to the underlying nativeMenu may be lost when changes
+      *  to the menu or the underlying dataProvider are made.
+      */
+	public function get nativeMenu() : NativeMenu
+	{
+		return _nativeMenu;
+	}
+
+	//----------------------------------
+    //  dataDescriptor
+    //----------------------------------
+
+	/**
+     *  @private
+     */
+    private var dataDescriptorChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var _dataDescriptor:IMenuDataDescriptor =
+        new DefaultDataDescriptor();
+
+    [Inspectable(category="Data")]
+
+    /**
+     *  The object that accesses and manipulates data in the data provider.
+     *  The FlexNativeMenu control delegates to the data descriptor for information
+     *  about its data. This data is then used to parse and move about the
+     *  data source. The data descriptor defined for the FlexNativeMenu is used for
+     *  all child menus and submenus.
+     *
+     *
When you specify this property as an attribute in MXML, you must
+     *  use a reference to the data descriptor, not the string name of the
+     *  descriptor. Use the following format for setting the property:

+     *
+     *
<mx:FlexNativeMenu id="flexNativeMenu" dataDescriptor="{new MyCustomDataDescriptor()}"/>

+     *
+     *
Alternatively, you can specify the property in MXML as a nested
+     *  subtag, as the following example shows:

+     *
+     *
<mx:FlexNativeMenu>
+     *  <mx:dataDescriptor>
+     *     <myCustomDataDescriptor>
+     *  </mx:dataDescriptor>
+     *  ...

+     *
+     *
The default value is an internal instance of the
+     *  DefaultDataDescriptor class.

+     */
+    public function get dataDescriptor():IMenuDataDescriptor
+    {
+        return IMenuDataDescriptor(_dataDescriptor);
+    }
+
+    /**
+     *  @private
+     */
+    public function set dataDescriptor(value:IMenuDataDescriptor):void
+    {
+        _dataDescriptor = value;
+
+        dataDescriptorChanged = true;
+    }
+
+	//----------------------------------
+    //  dataProvider
+    //----------------------------------
+
+	/**
+     *  @private
+     */
+    private var dataProviderChanged:Boolean = false;
+
+    /**
+     *  @private
+     *  Storage variable for the original dataProvider
+     */
+    mx_internal var _rootModel:ICollectionView;
+
+    [Bindable("collectionChange")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  The hierarchy of objects that are displayed as NativeMenu items.
+     *  The top-level children all become NativeMenu items, and their children
+     *  become the items in the 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.

+     *
An XMLList is converted to an XMLListCollection.

+     *
Any object that implements the ICollectionView interface is cast to
+     *  an ICollectionView.

+     *
An Array is converted to an ArrayCollection.

+     *
Any other type object is wrapped in an Array with the object as its sole
+     *  entry.

+     *

+     *

+     *
+     *  @default "undefined"
+     */
+    public function get dataProvider():Object
+    {
+        if (mx_internal::_rootModel)
+        {
+            return mx_internal::_rootModel;
+        }
+        else return null;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dataProvider(value:Object):void
+    {
+        if (mx_internal::_rootModel)
+        {
+            mx_internal::_rootModel.removeEventListener(CollectionEvent.COLLECTION_CHANGE,
+                                           collectionChangeHandler);
+        }
+
+        // handle strings and xml
+        if (typeof(value)=="string")
+            value = new XML(value);
+        else if (value is XMLNode)
+            value = new XML(XMLNode(value).toString());
+        else if (value is XMLList)
+            value = new XMLListCollection(value as XMLList);
+
+        if (value is XML)
+        {
+            _hasRoot = true;
+            var xl:XMLList = new XMLList();
+            xl += value;
+            mx_internal::_rootModel = new XMLListCollection(xl);
+        }
+        //if already a collection dont make new one
+        else if (value is ICollectionView)
+        {
+            mx_internal::_rootModel = ICollectionView(value);
+            if (mx_internal::_rootModel.length == 1)
+                _hasRoot = true;
+        }
+        else if (value is Array)
+        {
+            mx_internal::_rootModel = new ArrayCollection(value as Array);
+        }
+        //all other types get wrapped in an ArrayCollection
+        else if (value is Object)
+        {
+            _hasRoot = true;
+            // convert to an array containing this one item
+            var tmp:Array = [];
+            tmp.push(value);
+            mx_internal::_rootModel = new ArrayCollection(tmp);
+        }
+        else
+        {
+            mx_internal::_rootModel = new ArrayCollection();
+        }
+        //add listeners as weak references
+        mx_internal::_rootModel.addEventListener(CollectionEvent.COLLECTION_CHANGE,
+                                    collectionChangeHandler, false, 0, true);
+        //flag for processing in commitProps
+        dataProviderChanged = true;
+        invalidateProperties();
+
+        var event:CollectionEvent = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
+        event.kind = CollectionEventKind.RESET;
+        collectionChangeHandler(event);
+        dispatchEvent(event);
+    }
+
+    //----------------------------------
+    //  hasRoot
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Flag to indicate if the model has a root
+     */
+    private var _hasRoot:Boolean = false;
+
+    /**
+     *  @copy mx.controls.Menu#hasRoot
+     */
+    public function get hasRoot():Boolean
+    {
+        return _hasRoot;
+    }
+
+    //----------------------------------
+    //  keyEquivalentField
+    //----------------------------------
+
+	/**
+     *  @private
+     */
+    private var keyEquivalentFieldChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var _keyEquivalentField:String = "keyEquivalent";
+
+    [Bindable("keyEquivalentChanged")]
+    [Inspectable(category="Data", defaultValue="keyEquivalent")]
+
+    /**
+     *  The name of the field in the data provider that determines the
+     *  key equivalent for each menu item.  For the proper name, especially
+     *  for control characters, such as Home, Insert, etc..., look at the
+     *  Keyboard API KEYNAME_XXX constants.
+     *
+     *  Setting the keyEquivalentFunction property overrides this property.
+     *
+     *  @default "keyEquivalent"
+     *  @see flash.ui.Keyboard
+     */
+    public function get keyEquivalentField():String
+    {
+        return _keyEquivalentField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set keyEquivalentField(value:String):void
+    {
+        if (_keyEquivalentField != value)
+        {
+            _keyEquivalentField = value;
+            keyEquivalentFieldChanged = true;
+
+            invalidateProperties();
+
+            dispatchEvent(new Event("keyEquivalentFieldChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  keyEquivalentFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _keyEquivalentFunction:Function;
+
+    [Bindable("keyEquivalentFunctionChanged")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  The function that determines the key equivalent for each menu item.
+     *  For the proper name, especially for control characters, such as
+     *  Home, Insert, etc..., look at the Keyboard API KEYNAME_XXX constants.
+     *
+     *  If you omit this property, Flex uses the contents of the field or
+     *  attribute specified by the keyEquivalentField property.
+     *  If you specify this property, Flex ignores any keyEquivalentField
+     *  property value.
+     *
+     *  The keyEquivalentFunction property is good for handling formatting,
+     *  localization, and platform independence.
+     *
+     *
The key equivalent function must take a single argument which is the item
+     *  in the data provider and return a String.

+     *

+     *  myKeyEquivalentFunction(item:Object):String

+     *
+     *  @default "undefined"
+     *  @see flash.ui.Keyboard
+     */
+    public function get keyEquivalentFunction():Function
+    {
+        return _keyEquivalentFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set keyEquivalentFunction(value:Function):void
+    {
+        if (_keyEquivalentFunction != value)
+        {
+            _keyEquivalentFunction = value;
+            keyEquivalentFieldChanged = true;
+
+            invalidateProperties();
+
+            dispatchEvent(new Event("keyEquivalentFunctionChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  keyEquivalentModifiersFunction
+    //----------------------------------
+
+	/**
+     *  @private
+     */
+    private var keyEquivalentModifiersFunctionChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var _keyEquivalentModifiersFunction:Function = keyEquivalentModifiersDefaultFunction;
+
+    private function keyEquivalentModifiersDefaultFunction(data:Object):Array
+	{
+		var modifiers:Array = [];
+		var xmlModifiers:Array = ["@altKey", "@cmdKey", "@ctrlKey", "@shiftKey"];
+		var objectModifiers:Array = ["altKey", "cmdKey", "ctrlKey", "shiftKey"];
+        var keyboardModifiers:Array = [Keyboard.ALTERNATE, Keyboard.COMMAND, Keyboard.CONTROL, Keyboard.SHIFT];
+
+		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)
+	            {
+	            }
+        	}
+        }
+
+        return modifiers;
+    }
+
+    [Bindable("keyEquivalentModifiersFunctionChanged")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  The function that determines the key equivalent modifiers for each menu item.
+     *
+     *  If you omit this property, Flex uses its own default function to determine the
+     *  Array of modifiers.  It looks for boolean fields, altKey, ctrlKey, shiftKey,
+     *  and cmdKey.
+     *
+     *  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 return an array of modifiers.

+     *

+     *  myKeyEquivalentModifiersFunction(item:Object):Array

+     *
+     *  @default "undefined"
+     */
+    public function get keyEquivalentModifiersFunction():Function
+    {
+        return _keyEquivalentModifiersFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set keyEquivalentModifiersFunction(value:Function):void
+    {
+        if (_keyEquivalentModifiersFunction != value)
+        {
+            _keyEquivalentModifiersFunction = value;
+            keyEquivalentModifiersFunctionChanged = true;
+
+            invalidateProperties();
+
+            dispatchEvent(new Event("keyEquivalentModifiersFunctionChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  labelField
+    //----------------------------------
+
+	/**
+     *  @private
+     */
+    private var labelFieldChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var _labelField:String = "label";
+
+    [Bindable("labelFieldChanged")]
+    [Inspectable(category="Data", defaultValue="label")]
+
+    /**
+     *  The name of the field in the data provider that determines the
+     *  text to display for each menu item. If the data provider is an Array of
+     *  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, use @label to specify the label attribute in an E4X XML Object
+     *  as the text to display for each menu item.
+     *
+     *  In a label, you can specify the character to be used as the mnemonic index
+     *  by preceding it with an underscore (Example: C_ut sets mnemonic index to 1).
+     *  Only the first underscore present is used for this purpose.  To get an
+     *  underscore to display in the label, you need to escape it with another
+     *  underscore.  So for example: (C__u_t) would show up as (C_ut) with a mnemonic
+     *  index of 3 (on the "t" character). The mnemonicIndex
+     *  property, if greater than zero, takes precedence over this value.
+     *
+     *  Setting the labelFunction property overrides this property.
+     *
+     *  @default "label"
+     */
+    public function get labelField():String
+    {
+        return _labelField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set labelField(value:String):void
+    {
+        if (_labelField != value)
+        {
+            _labelField = value;
+            labelFieldChanged = true;
+
+            invalidateProperties();
+
+            dispatchEvent(new Event("labelFieldChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  labelFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _labelFunction:Function;
+
+    [Bindable("labelFunctionChanged")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  The function that determines the text to display for each menu item.
+     *  The label function must find the appropriate field or fields in the
+     *  data provider and return a displayable string.
+     *
+     *  If you omit this property, Flex uses the contents of the field or
+     *  attribute specified by the labelField property.
+     *  If you specify this property, Flex ignores any labelField
+     *  property value.
+     *
+     *  In a label, you can specify the character to be used as the mnemonic index
+     *  by preceding it with an underscore (Example: C_ut sets mnemonic index to 1).
+     *  Only the first underscore present is used for this purpose.  To get an
+     *  underscore to display in the label, you need to escape it with another
+     *  underscore.  So for example: (C__u_t) would show up as (C_ut) with a mnemonic
+     *  index of 3 (on the "t" character). The mnemonicIndex
+     *  property, if greater than zero, takes precedence over this value.
+     *
+     *  The labelFunction property is good for handling formatting,
+     *  localization, and platform-independence.
+     *
+     *
The label function must take a single argument which is the item
+     *  in the data provider and return a String.

+     *

+     *  myLabelFunction(item:Object):String

+     *
+     *  @default "undefined"
+     */
+    public function get labelFunction():Function
+    {
+        return _labelFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set labelFunction(value:Function):void
+    {
+        if (_labelFunction != value)
+        {
+            _labelFunction = value;
+            labelFieldChanged = true;
+
+            invalidateProperties();
+
+            dispatchEvent(new Event("labelFunctionChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  mnemonicIndexField
+    //----------------------------------
+
+	/**
+     *  @private
+     */
+    private var mnemonicIndexFieldChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var _mnemonicIndexField:String = "mnemonicIndex";
+
+    [Bindable("mnemonicIndexChanged")]
+    [Inspectable(category="Data", defaultValue="mnemonicIndex")]
+
+    /**
+     *  The name of the field in the data provider that determines the
+     *  mnemonic index for each menu item.
+     *
+     *  If this field returns a number greater than zero, this mnemonic index
+     *  takes precedence over the one specified by an underscore in the label.
+     *
+     *  Setting the mnemonicIndexFunction property overrides this property.
+     *
+     *  @default "mnemonicIndex"
+     */
+    public function get mnemonicIndexField():String
+    {
+        return _mnemonicIndexField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set mnemonicIndexField(value:String):void
+    {
+        if (_mnemonicIndexField != value)
+        {
+            _mnemonicIndexField = value;
+            mnemonicIndexFieldChanged = true;
+
+            invalidateProperties();
+
+            dispatchEvent(new Event("mnemonicIndexFieldChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  mnemonicIndexFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _mnemonicIndexFunction:Function;
+
+    [Bindable("mnemonicIndexFunctionChanged")]
+    [Inspectable(category="Data")]
+
+    /**
+     *  The function that determines the mnemonic index for each menu item.
+     *
+     *  If you omit this property, Flex uses the contents of the field or
+     *  attribute specified by the mnemonicIndexField property.
+     *  If you specify this property, Flex ignores any mnemonicIndexField
+     *  property value.
+     *
+     *  If this returns a number greater than zero, this mnemonic index
+     *  takes precedence over the one specified by an underscore in the label.
+     *
+     *  The mnemonicIndexFunction property is good for handling formatting,
+     *  localization, and platform independence.
+     *
+     *
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"
+     */
+    public function get mnemonicIndexFunction():Function
+    {
+        return _mnemonicIndexFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set mnemonicIndexFunction(value:Function):void
+    {
+        if (_mnemonicIndexFunction != value)
+        {
+            _mnemonicIndexFunction = value;
+            mnemonicIndexFieldChanged = true;
+
+            invalidateProperties();
+
+            dispatchEvent(new Event("mnemonicIndexFunctionChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  showRoot
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage variable for showRoot flag.
+     */
+    private var _showRoot:Boolean = true;
+
+    /**
+     *  @private
+     */
+    private var showRootChanged:Boolean = false;
+
+    [Inspectable(category="Data", enumeration="true,false", defaultValue="false")]
+
+    /**
+     *  A Boolean flag that specifies whether to display the data provider's
+     *  root node.
+     *
+     *  If the data provider has a root node, and the showRoot property
+     *  is set to false, the items on the FlexNativeMenu control correspond to
+     *  the immediate descendants of the root node.
+     *
+     *  This flag has no effect on data providers without root nodes,
+     *  like Lists and Arrays.
+     *
+     *  @default true
+     *  @see #hasRoot
+     */
+    public function get showRoot():Boolean
+    {
+        return _showRoot;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showRoot(value:Boolean):void
+    {
+        if (_showRoot != value)
+        {
+            showRootChanged = true;
+            _showRoot = value;
+            invalidateProperties();
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+   	/**
+	 *  @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();
+			}
+		}
+    }
+
+    /**
+     *  @private
+     */
+    public function validatePropertiesTimerHandler(event:TimerEvent):void
+    {
+        validateProperties();
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function validateProperties():void
+    {
+        if (invalidatePropertiesFlag)
+        {
+            commitProperties();
+
+            invalidatePropertiesFlag = false;
+        }
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function validateSize(recursive:Boolean = false):void
+    {
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function validateDisplayList():void
+    {
+    }
+
+    /**
+	 *  Validate and update the properties and layout of this object
+	 *  and redraw 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 native menu on the underlying InteractiveObject to the AIR 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 native menu on the underlying InteractiveObject to the AIR menu
+	 */
+	public function unsetContextMenu(component:InteractiveObject):void
+	{
+		component.contextMenu = null;
+	}
+
+    /**
+     *  Processes the properties set on the component.
+	 *
+	 *  @see mx.core.UIComponent#commitProperties()
+     */
+    protected function commitProperties():void
+    {
+        if (showRootChanged)
+        {
+            if (!_hasRoot)
+                showRootChanged = false;
+        }
+
+        if (dataProviderChanged ||showRootChanged ||
+        	labelFieldChanged || dataDescriptorChanged)
+        {
+            var tmpCollection:ICollectionView;
+
+            //reset flags
+            dataProviderChanged = false;
+            showRootChanged = false;
+            labelFieldChanged = false;
+            dataDescriptorChanged = false;
+
+            // are we swallowing the root?
+            if (mx_internal::_rootModel && !_showRoot && _hasRoot)
+            {
+                var rootItem:* = mx_internal::_rootModel.createCursor().current;
+                if (rootItem != null &&
+                    _dataDescriptor.isBranch(rootItem, mx_internal::_rootModel) &&
+                    _dataDescriptor.hasChildren(rootItem, mx_internal::_rootModel))
+                {
+                    // then get rootItem children
+                    tmpCollection =
+                        _dataDescriptor.getChildren(rootItem, mx_internal::_rootModel);
+                }
+            }
+
+            // remove all items first.  This is better than creating a new NativeMenu
+            // as the root since we have the same reference
+            clearMenu(_nativeMenu);
+
+            // make top level items
+            if (mx_internal::_rootModel)
+            {
+                if (!tmpCollection)
+                    tmpCollection = mx_internal::_rootModel;
+                // not really a default handler, but we need to
+                // be later than the wrapper
+                tmpCollection.addEventListener(CollectionEvent.COLLECTION_CHANGE,
+                                               collectionChangeHandler,
+                                               false,
+                                               EventPriority.DEFAULT_HANDLER, true);
+
+             	populateMenu(_nativeMenu, tmpCollection);
+            }
+
+            dispatchEvent(new Event("nativeMenuChange"));
+        }
+    }
+
+    /**
+     *  Creates a menu and adds appropriate listeners
+     *
+     *  @private
+     */
+    private function createMenu():NativeMenu
+    {
+        var menu:NativeMenu = new NativeMenu();
+        // need to do this in the constructor for the root nativeMenu
+        menu.addEventListener(Event.DISPLAYING, menuDisplayHandler, false, 0, true);
+
+        return menu;
+    }
+
+    /**
+     *  Clears out all items in a given menu
+     *
+     *  @private
+     */
+    private function clearMenu(menu:NativeMenu):void
+    {
+        var numItems:int = menu.numItems;
+    	for (var i:int = 0; i < numItems; i++)
+    	{
+    		menu.removeItemAt(0);
+    	}
+    }
+
+    /**
+     *  Populates a menu and the related submenus given a collection
+     *
+     *  @private
+     */
+    private function populateMenu(menu:NativeMenu, collection:ICollectionView):NativeMenu
+    {
+        var collectionLength:int = collection.length;
+        for (var i:int = 0; i < collectionLength; i++)
+        {
+            try
+            {
+                insertMenuItem(menu, i, collection[i]);
+            }
+            catch(e:ItemPendingError)
+            {
+                //we probably dont need to actively recover from here
+            }
+        }
+
+        return menu;
+    }
+
+    /**
+     *  Adds the NativeMenuItem to the NativeMenu.  This methods looks at the
+     *  properties of the data sent in and sets them properly on the NativeMenuItem.
+     *
+     *  @private
+     */
+    private function insertMenuItem(menu:NativeMenu, index:int, data:Object):void
+    {
+        if (dataProviderChanged)
+        {
+            commitProperties();
+            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);
+    }
+
+    /**
+     *  @copy flash.display.NativeMenu#display()
+     */
+     public function display(stage:Stage, x:int, y:int):void
+     {
+     	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
+     *  empty string
+     *
+     *  @param data Object to be displayed.
+     *
+     *  @return The key equivalent based on the data.
+     */
+    protected function itemToKeyEquivalent(data:Object):String
+    {
+        if (data == null)
+            return "";
+
+        if (keyEquivalentFunction != null)
+            return keyEquivalentFunction(data);
+
+        if (data is XML)
+        {
+            try
+            {
+                if (data[keyEquivalentField].length() != 0)
+                {
+                    data = data[keyEquivalentField];
+                    return data.toString();
+                }
+
+                //if (XMLList(data.@keyEquivalent).length() != 0)
+                //{
+                //  data = data.@keyEquivalent;
+                //}
+            }
+            catch(e:Error)
+            {
+            }
+        }
+        else if (data is Object)
+        {
+            try
+            {
+                if (data[keyEquivalentField] != null)
+                {
+                    data = data[keyEquivalentField];
+                    return data.toString();
+                }
+            }
+            catch(e:Error)
+            {
+            }
+        }
+
+        return "";
+    }
+
+    /**
+     *  Returns the key equivalent modifiers for the given data object
+     *  based on the keyEquivalentModifiersFunction property.
+     *  If the method cannot convert the parameter to an array of modifiers,
+     *  it returns an empty array
+     *
+     *  @param data Object to be displayed.
+     *
+     *  @return The array of key equivalent modifiers based on the data
+     */
+    protected function itemToKeyEquivalentModifiers(data:Object):Array
+    {
+        if (data == null)
+            return [];
+
+        if (keyEquivalentModifiersFunction != null)
+            return keyEquivalentModifiersFunction(data);
+
+        return [];
+    }
+
+    /**
+     *  Returns the string to display for the given data object
+     *  based on the labelField and labelFunction properties.
+     *  If the method cannot convert the parameter to a string, it returns a
+     *  single space.
+     *
+     *  @param data Object to be displayed.
+     *
+     *  @return The string to be displayed based on the data.
+     */
+    protected function itemToLabel(data:Object):String
+    {
+        if (data == null)
+            return " ";
+
+        if (labelFunction != null)
+            return labelFunction(data);
+
+        if (data is XML)
+        {
+            try
+            {
+                if (data[labelField].length() != 0)
+                    data = data[labelField];
+
+                //if (XMLList(data.@label).length() != 0)
+                //{
+                //  data = data.@label;
+                //}
+            }
+            catch(e:Error)
+            {
+            }
+        }
+        else if (data is Object)
+        {
+            try
+            {
+                if (data[labelField] != null)
+                    data = data[labelField];
+            }
+            catch(e:Error)
+            {
+            }
+        }
+        else if (data is String)
+            return String(data);
+
+        try
+        {
+            return data.toString();
+        }
+        catch(e:Error)
+        {
+        }
+
+        return " ";
+    }
+
+    /**
+     *  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 an
+     *  -1.
+     *
+     *  @param data Object to be displayed.
+     *
+     *  @return The mnemonic index based on the data.
+     */
+    protected function itemToMnemonicIndex(data:Object):int
+    {
+        if (data == null)
+            return -1;
+
+        var mnemonicIndex:int;
+
+        if (mnemonicIndexFunction != null)
+            return mnemonicIndexFunction(data);
+
+        if (data is XML)
+        {
+            try
+            {
+                if (data[mnemonicIndexField].length() != 0)
+                {
+                    mnemonicIndex = data[mnemonicIndexField]; // no need for parseInt??
+                    return mnemonicIndex;
+                }
+
+                //if (XMLList(data.@mnemonicIndex).length() != 0)
+                //{
+                //  data = data.@mnemonicIndex;
+                //}
+            }
+            catch(e:Error)
+            {
+            }
+        }
+        else if (data is Object)
+        {
+            try
+            {
+                if (data[mnemonicIndexField] != null)
+                {
+                    mnemonicIndex = data[mnemonicIndexField];
+                    return mnemonicIndex;
+                }
+            }
+            catch(e:Error)
+            {
+            }
+        }
+
+        return -1;
+    }
+
+    /**
+     *  Returns the actual label sent to the NativeMenuItem.
+     *  It takes out the leading underscore character if
+     *  there is one
+     */
+    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);
+    }
+
+    /**
+     *  Returns the mnemonic index sent to the NativeMenuItem.
+     *  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");
+        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;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+ 	/**
+     *  @private
+     */
+    private function itemSelectHandler(event:Event):void
+    {
+        var nativeMenuItem:NativeMenuItem = event.target as NativeMenuItem;
+
+        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 menuEvent:FlexNativeMenuEvent = new FlexNativeMenuEvent(FlexNativeMenuEvent.ITEM_CLICK);
+        menuEvent.nativeMenu = nativeMenuItem.menu;
+        menuEvent.index = nativeMenuItem.menu.getItemIndex(nativeMenuItem);
+        menuEvent.nativeMenuItem = nativeMenuItem;
+        menuEvent.label = nativeMenuItem.label;
+        menuEvent.item = nativeMenuItem.data;
+        dispatchEvent(menuEvent);
+    }
+
+    /**
+     *  @private
+     */
+    private function menuDisplayHandler(event:Event):void
+    {
+        var nativeMenu:NativeMenu = event.target as NativeMenu;
+
+        var menuEvent:FlexNativeMenuEvent = new FlexNativeMenuEvent(FlexNativeMenuEvent.MENU_SHOW);
+        menuEvent.nativeMenu = nativeMenu;
+        dispatchEvent(menuEvent);
+    }
+
+ 	/**
+     *  @private
+     */
+    private function collectionChangeHandler(ce:CollectionEvent):void
+    {
+        //trace("[FlexNativeMenu] caught Model changed");
+        if (ce.kind == CollectionEventKind.ADD)
+        {
+            dataProviderChanged = true;
+            invalidateProperties();
+            // should handle elegantly with better performance
+            //trace("[FlexNativeMenu] add event");
+        }
+        else if (ce.kind == CollectionEventKind.REMOVE)
+        {
+            dataProviderChanged = true;
+            invalidateProperties();
+            // should handle elegantly with better performance
+            //trace("[FlexNativeMenu] remove event at:", ce.location);
+        }
+        else if (ce.kind == CollectionEventKind.REFRESH)
+        {
+            dataProviderChanged = true;
+            dataProvider = dataProvider; //start over
+            invalidateProperties();
+            //trace("[FlexNativeMenu] refresh event");
+        }
+        else if (ce.kind == CollectionEventKind.RESET)
+        {
+            dataProviderChanged = true;
+            invalidateProperties();
+            //trace("[FlexNativeMenu] reset event");
+        }
+        else if (ce.kind == CollectionEventKind.UPDATE)
+        {
+         	dataProviderChanged = true;
+            invalidateProperties();
+            // should handle elegantly with better performance
+            // but can't right now
+            //trace("[FlexNativeMenu] update event");
+        }
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12971
Author:   cframpto@adobe.com
Date:     2009-12-15T22:01:01.993302Z

Log Message:
-----------
Remove obsolete code.  We no longer need the override in RichEditableTextEditManager to force remeasure when one or both of the width and height is auto-sizing and we are typing.  Each insert will trigger the damageHandler which now invalidates the size and if "auto-sizing" will remeasure the text and the update the display.

QE notes:
Doc notes:
Bugs:
Reviewer: Gordon
Tests run: checkintests, TextArea, TextInput, NumericStepper, ComboBox
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -753,12 +753,6 @@
      *  contents.
      */
     mx_internal var autoSize:Boolean = false;
-
-    /**
-     *  @private
-     *  True if need to scroll after updating the container.
-     */
-    mx_internal var scrollAfterUpdate:Boolean = false;

     //--------------------------------------------------------------------------
     //
@@ -2587,18 +2581,6 @@
         }

         _textContainerManager.updateContainer();
-
-        // Because our EditManager override of updateAllControllers() does
-        // not call the composer's flowComposer.updateAllControllers()
-        // immediately, when an editing operation occurs, scrollToRange() in
-        // EditManager.finalizeDo() may be a no-op and will need to be done
-        // after the container is really updated.
-        if (scrollAfterUpdate)
-        {
-            _textContainerManager.scrollToRange(_selectionAnchorPosition,
-                                                _selectionActivePosition);
-            scrollAfterUpdate = false;
-        }
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 9181
Author:   cframpto@adobe.com
Date:     2009-08-07T22:15:38.583672Z

Log Message:
-----------
Per Hans, if TextArea and lineBreak=”toFit”, set the scroller’s horinzontalScrollPolicy to “off”.  Added a “styleChanged” event to RET so that TextArea.  If lineBreak="toFit" the scroller's horizontalScrollPolicy style is set to off.  If lineBreak="explicit" the scroller's horizontalScrollPolicy style is set auto if it off.  RET's horizontalScrollPolicy is auto in both of these cases.

Modified getEditManager() and endEditManager() so that all the edits for each API call are grouped together as a composite operation on the undo queue.  Ctrl-z should undo the entire API call.

QE notes:
Doc notes:
Bugs: SDK-22469 and SDK-22529
Reviewer: Gordon
Tests run:
Is noteworthy for integration: possibly - the RET api calls insertText(), appendText() and setFormatOfRange() add a single composite operation do TLF's undo queue

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -63,6 +63,7 @@
 import flashx.textLayout.operations.InsertTextOperation;
 import flashx.textLayout.operations.PasteOperation;
 import flashx.textLayout.tlf_internal;
+import flashx.undo.IOperation;
 import flashx.undo.IUndoManager;

 import mx.core.IEmbeddedFontRegistry;
@@ -1744,6 +1745,9 @@
             // the fontLookup format is set to either
             // "device" or "embedded" depending on whether
             // embeddedFontContext is null or non-null.
+
+            if (hasEventListener("styleChanged"))
+                dispatchEvent(new Event("styleChanged"));
         }

         if (selectionFormatsChanged)
@@ -2448,7 +2452,15 @@
         if (editingMode != EditingMode.READ_WRITE)
             editingMode = EditingMode.READ_WRITE;

-        return EditManager(_textContainerManager.beginInteraction());
+        var editManager:IEditManager =
+            EditManager(_textContainerManager.beginInteraction());
+
+        // Combine all the edits from one API call into one operation so it
+        // can be undone as a single operation.  It will also prevent this from
+        // possibibly being combined with the last operation.
+        editManager.beginCompositeOperation();
+
+        return editManager;
     }

     /**
@@ -2457,6 +2469,8 @@
      */
     private function releaseEditManager():void
     {
+        EditManager(textFlow.interactionManager).endCompositeOperation();
+
         _textContainerManager.endInteraction();

         editingMode = priorEditingMode;


Pass call original token to fault handler

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/client/RemoteCallQueueProcessor.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/client/RemoteCallQueueProcessor.as
@@ -74,10 +74,11 @@
 			var call:RemoteCallWrapper = getHeadElement();
 			if(call.attempts >= _maxAttempts){
 				call.reset();
+				var callToken:Object = call.token;
 				if(_faultHandler != null) {
-					_faultHandler(event, token);
+					_faultHandler(event, callToken);
 					if(call.faultHandler != null) {
-						call.faultHandler(event, token);
+						call.faultHandler(event, callToken);
 					}
 				}
 			} else {


Transferred from the Adobe Open Source Subversion Repository

Revision: 20028
Author:   deeptika@adobe.com
Date:     2011-02-01T09:14:44.133814Z

Log Message:
-----------
Adding delegate for Spark VideoDisplay
QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/manifest_automation_spark.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/AutomationSparkClasses.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkVideoDisplayAutomationImpl.as</path>

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkVideoDisplayAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkVideoDisplayAutomationImpl.as
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.automation.delegates.components
+{
+	import flash.display.DisplayObject;
+
+	import mx.automation.Automation;
+	import mx.automation.delegates.core.UIComponentAutomationImpl;
+	import spark.components.VideoDisplay;
+
+		[Mixin]
+		/**
+		 *
+		 *  Defines methods and properties required to perform instrumentation for the
+		 *  VideoDisplay control.
+		 *
+		 *  @see spark.components.VideoDisplay
+		 *
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4.5
+		 */
+		public class SparkVideoDisplayAutomationImpl extends UIComponentAutomationImpl
+		{
+			include "../../../core/Version.as";
+
+			//--------------------------------------------------------------------------
+			//
+			//  Class methods
+			//
+			//--------------------------------------------------------------------------
+
+			/**
+			 *  Registers the delegate class for a component class with automation manager.
+			 *
+			 *  @param root The SystemManger of the application.
+			 *
+			 *  @langversion 3.0
+			 *  @playerversion Flash 10
+			 *  @playerversion AIR 1.1
+			 *  @productversion Flex 4.5
+			 */
+			public static function init(root:DisplayObject):void
+			{
+				Automation.registerDelegateClass(spark.components.VideoDisplay, SparkVideoDisplayAutomationImpl);
+			}
+
+			//--------------------------------------------------------------------------
+			//
+			//  Constructor
+			//
+			//--------------------------------------------------------------------------
+
+			/**
+			 *  Constructor.
+			 * @param obj VideoDisplay object to be automated.
+			 *
+			 *  @langversion 3.0
+			 *  @playerversion Flash 10
+			 *  @playerversion AIR 1.1
+			 *  @productversion Flex 4.5
+			 */
+			public function SparkVideoDisplayAutomationImpl(obj:spark.components.VideoDisplay)
+			{
+				super(obj);
+
+				recordClick = true;
+			}
+
+		}
+
+}


move inject_html

move inject_html

--- frameworks/projects/JQuery/as/src/org/apache/flex/jquery/Application.as
+++ frameworks/projects/JQuery/as/src/org/apache/flex/jquery/Application.as
@@ -21,20 +21,20 @@
     import org.apache.flex.core.Application;
 	import org.apache.flex.core.IFlexInfo;

-	/*
-	FalconJX will inject html into the index.html file.  Surround with
-	"inject_html" tag as follows:
-
-	<inject_html>
-	<link rel="stylesheet"
-	href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
-	<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
-	<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
-	</inject_html>
-	*/

 	public class Application extends org.apache.flex.core.Application implements IFlexInfo
 	{
+		/**
+		 * FalconJX will inject html into the index.html file.  Surround with
+		 * "inject_html" tag as follows:
+		 *
+		 * <inject_html>
+		 * <link rel="stylesheet"
+		 * href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
+		 * <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
+		 * <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
+		 * </inject_html>
+		 */
 		public function Application()
 		{
 			super();


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

--- frameworks/projects/charts/src/mx/charts/series/items/PlotSeriesItem.as
+++ frameworks/projects/charts/src/mx/charts/series/items/PlotSeriesItem.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//  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
+//
+//      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: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

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

 package spark.skins.mobile
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17447
Author:   gruehle@adobe.com
Date:     2010-08-23T20:37:36.438457Z

Log Message:
-----------
Text skin bug fixes:
* TextAreaSkin - add commitStyles() to the beginning of measure(). Fixes problem where changing a size-related style wasn't measuring correctly.
* TextInputSkin - center the textDisplay vertically

Add new (empty) spark.css to the Mobile theme directory, and change airmobile-config.xml to use this one instead of the one in the Spark theme directory. This fixes a pile of CSS warnings. This is a temporary fix until we have scrubbed all of our style metadata to add theme="mobile" (planned for post-beta).

QE notes: none
Doc notes: none
Bugs: SDK-26826, SDK-27522, SDK-27496
Reviewer: Jason Szeto
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/themes/Mobile</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/themes/Mobile/spark.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/airmobile-config.xml</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
@@ -143,8 +143,10 @@
         textDisplay.commitStyles();
         textDisplay.x = HORIZONTAL_PADDING;
         textDisplay.width = unscaledWidth - (HORIZONTAL_PADDING * 2);
-        textDisplay.y = VERTICAL_PADDING;
-        textDisplay.height = unscaledHeight - (VERTICAL_PADDING * 2);
+
+		var textHeight:Number = textDisplay.textHeight + TEXT_HEIGHT_PADDING;
+		textDisplay.height = textHeight;
+        textDisplay.y = Math.round((unscaledHeight - textHeight) / 2);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListItemDragProxy.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListItemDragProxy.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2004-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.listClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17165
Author:   cframpto@adobe.com
Date:     2010-08-03T14:10:22.792682Z

Log Message:
-----------
Fix pile of bugs.

- ASdoc is not happy if there is a private variable/getter and a mx_internal variable/getter with the same name in the same class because of bug ASC-4110.  Fix instances of this in UICompoments and Grid.
- SDK-27169. Update the metadata for DG selectionMode.
- SDK-26840.  Turn off the column resize icon until the resize functionality is implemented.
- SDK-26548.  When TI is disabled, also disable RET.
- SDK-26858.  Fix off-by-1 bug in RET.adjustContentBoundsForScroller().  Comment in header was correct, code was not.
- SDK-26951 - For cell mode, preserve selection when REFRESH collection change event.  There is the restriction that if the collection if filtered, the preservedSelection becomes whatever is selected in the filtered collection.  If the filter is then removed, the original selection is not preserved.

QE notes: see restriction on SDK-26951 above
Doc notes:
Bugs: SDK-27169, SDK-26840, SDK-26548, SDK-26868, SDK-26951
Reviewer: Hans
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ColumnHeaderBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
+++ frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
@@ -274,6 +274,7 @@
             addEventListener(GridEvent.GRID_ROLL_OUT, header_rollOutHandler);

             addEventListener(GridEvent.SEPARATOR_MOUSE_DOWN, sep_mouseDownHandler);
+            addEventListener(GridEvent.SEPARATOR_MOUSE_UP, sep_mouseUpHandler);
             addEventListener(GridEvent.SEPARATOR_ROLL_OVER, sep_rollOverHandler);
             addEventListener(GridEvent.SEPARATOR_ROLL_OUT, sep_rollOutHandler);
         }
@@ -577,33 +578,7 @@
         //  Overridden Properties
         //
         //--------------------------------------------------------------------------
-
-        //----------------------------------
-        //  dataProvider
-        //----------------------------------
-
-        /**
-         *  TBD: this is for the column headers
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        override public function set dataProvider(value:IList):void
-        {
-            //if (dataProvider)
-            //    dataProvider.removeEventListener(CollectionEvent.COLLECTION_CHANGE, dataProvider_collectionChangeHandler);
-
-            // ensure that our listener is added before the dataGroup which adds a listener during
-            // the base class setter if the dataGroup already exists.  If the dataGroup isn't
-            // created yet, then we still be first.
-            //if (value)
-            //    value.addEventListener(CollectionEvent.COLLECTION_CHANGE, dataProvider_collectionChangeHandler);
-
-            super.dataProvider = value;
-        }
-
+
         //----------------------------------
         //  itemRenderer
         //----------------------------------
@@ -860,65 +835,7 @@
         //  Event Handlers
         //
         //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         *  Called when the mouse is clicked.
-         */
-        /*
-        private function item_clickHandler(event:MouseEvent):void
-        {
-            var newIndex:int;
-            if (event.currentTarget is IItemRenderer)
-                newIndex = IItemRenderer(event.currentTarget).itemIndex;
-            else
-                newIndex = dataGroup.getElementIndex(event.currentTarget as IVisualElement);
-
-            trace("item_clickHandler", newIndex);
-        }
-    ``` */
-
-        /**
-         *  @private
-         *  Called when contents within the dataProvider changes.
-         *
-         *  @param event The collection change event
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        /*
-        protected function dataProvider_collectionChangeHandler(event:Event):void
-        {
-            // ToDo: what should be done if columns change?
-
-            if (event is CollectionEvent)
-            {
-                var ce:CollectionEvent = CollectionEvent(event);

-                if (ce.kind == CollectionEventKind.ADD)
-                {
-                }
-                else if (ce.kind == CollectionEventKind.REMOVE)
-                {
-                }
-                else if (ce.kind == CollectionEventKind.RESET)
-                {
-                }
-                else if (ce.kind == CollectionEventKind.REFRESH)
-                {
-                }
-                else if (ce.kind == CollectionEventKind.REPLACE ||
-                        ce.kind == CollectionEventKind.MOVE)
-                {
-                    //These cases are handled by the DataGroup skinpart
-                }
-            }
-        }
-        */
-
         /**
          *  @private
          */
@@ -1032,23 +949,34 @@
         /**
          *  @private
          */
-        private function sep_rollOverHandler(event:GridEvent):void
+        private function sep_mouseUpHandler(event:GridEvent):void
         {
             if (!enabled || !grid.resizableColumns)
                 return;
+        }
+
+        /**
+         *  @private
+         */
+        private function sep_rollOverHandler(event:GridEvent):void
+        {
+            if (!enabled || !grid.resizableColumns)
+                return;

             var column:GridColumn = event.column;

-            //trace("sep_rollOver", event.columnIndex);
-
             if (!column.resizable)
                 return;

-            // Hide the mouse, attach and show the cursor
+            // Uncomment when resize is implemented.
+
+            // Hide the mouse, attach and show the cursor
+            /*
             var stretchCursorClass:Class = getStyle("stretchCursor");
             resizeCursorID = cursorManager.setCursor(
                                     stretchCursorClass,
                                     CursorManagerPriority.HIGH, 0, 0);
+            */
         }

         /**
@@ -1059,9 +987,8 @@
             if (!enabled)
                 return;

-            //trace("sep_rollOut", event.columnIndex);
-
-            cursorManager.removeCursor(resizeCursorID);
+            // Uncomment when resize is implemented.
+            //cursorManager.removeCursor(resizeCursorID);
         }

         //--------------------------------------------------------------------------
@@ -1082,7 +1009,7 @@
          *  always a MOUSE_UP.  By default this method dispatches GRID_MOUSE_DOWN,
          *  GRID_MOUSE_DRAG, or a GRID_MOUSE_UP event in response to the the corresponding
          *  mouse event on a column header or SEPARATOR_MOUSE_DOWN, SEPARATOR_MOUSE_DRAG,
-         *  or a SEPARATOR__MOUSE_UP event in response to the the corresponding
+         *  or a SEPARATOR_MOUSE_UP event in response to the the corresponding
          *  mouse event on a column header separator.
          *
          * .The GridEvent's columnIndex, column, item, and itemRenderer
@@ -1109,7 +1036,7 @@
             {
                 case MouseEvent.MOUSE_MOVE:
                     if (dragSeparator)
-                        gridEventType = GridEvent.SEPARATOR_MOUSE_DRAG;
+                        gridEventType = GridEvent.SEPARATOR_MOUSE_DRAG;
                     else
                         gridEventType = GridEvent.GRID_MOUSE_DRAG;
                     break;
@@ -1117,7 +1044,7 @@
                     if (dragSeparator)
                         gridEventType = GridEvent.SEPARATOR_MOUSE_UP;
                     else
-                        gridEventType = GridEvent.GRID_MOUSE_UP;
+                        gridEventType = GridEvent.GRID_MOUSE_UP;
                     break;
                 case MouseEvent.MOUSE_DOWN:
                     // Is the mouseDown on a separator or a header?
@@ -1136,7 +1063,7 @@
                     }
                     break;
             }
-
+
             dispatchGridEvent(event, gridEventType, eventHeaderBarXY, eventColumnIndex);
         }