Transferred from the Adobe Open Source Subversion Repository

Revision: 88
Author:   open-source-svn-admin@adobe.com
Date:     2008-01-03T22:47:56.499469Z

Log Message:
-----------
Perforce Change 191925 by proberts@proberts-laptop-flex on 2008/01/03 16:47:12 Severity: ignore Details: doc additions/clean up for FlexNativeMenu. Also FLEXDOCS-320 (update documentation for FlexNativeMenuEvent.MENU_SHOW to explain that the index, label, and item properties are null) Affected files ...

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/air/air_version.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Consumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/NoChannelAvailableError.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/rpc/src/mx/messaging/channels/DirectHTTPChannel.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/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/MessagingError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/InvalidChannelError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/MessageSerializationError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.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/rpc/src/mx/messaging/channels/SecureStreamingAMFChannel.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/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.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/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXContext.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.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/rpc/src/mx/messaging/channels/PollingChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/NetConnectionChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/Grammar.jj</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ConsumerMessageDispatcher.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/InvalidDestinationError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXResult.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractMessageStore.as</path>

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

--- frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as
+++ frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as
@@ -46,27 +46,189 @@
 /**
  *  Dispatched before a menu or submenu is displayed.
  *
- *  @eventType mx.events.FlexNativeMenuEvent.MENU_SHOW
+ *  @eventType mx.events.FlexNativeMenuEvent.MENU_SHOW
  */
 [Event(name="menuShow", type="mx.events.FlexNativeMenuEvent")]

 /**
- *  Dispatched when a menu item is selected.
+ *  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.
- *
+ *  The FlexNativeMenu component provides a wrapper for AIR's NativeMenu class. The FlexNativeMenu
+ *  provides a way to define native operating system menus (such as window, application, and
+ *  context menus) using techniques that are familiar to Flex developers and consistent with
+ *  other Flex menu components, such as using MXML and data providers to specify menu structure.
+ *  However, unlike Flex menu components, the menus that are defined by a FlexNativeMenu
+ *  component are rendered by the host operating system as part of an AIR application, rather
+ *  than being created as visual components by Flex.
+ *
+ *
Like other Flex menu components, to define the structure of a menu represented by a
+ *  FlexNativeMenu component, you create a data provider such as an XML hierarchy or an array
+ *  of objects containing data to be used to define the menu. Several properties can be set to
+ *  define how the data provider data is interpreted, such as the labelField property
+ *  to specify the data field that is used for the menu item label, the keyEquivalentField
+ *  property to specify the field that defines a keyboard equivalent shortcut for the menu item,
+ *  and the mnemonicIndexField property to specify the field that defines the index
+ *  position of the character in the label that is used as the menu item's mnemonic.

+ *
+ *
The data provider for FlexNativeMenu items can specify several attributes that determine how
+ *  the item is displayed and behaves, as the following XML data provider shows:

+ *

+ *   <mx:XML format="e4x" id="myMenuData">
+ *     <root>
+ *        <menuitem label="MenuItem A">
+ *            <menuitem label="SubMenuItem A-1" enabled="False"/>
+ *            <menuitem label="SubMenuItem A-2"/>
+ *        </menuitem>
+ *        <menuitem label="MenuItem B" type="check" toggled="true"/>
+ *        <menuitem label="MenuItem C" type="check" toggled="false"/>
+ *        <menuitem type="separator"/>
+ *        <menuitem label="MenuItem D">
+ *            <menuitem label="SubMenuItem D-1"/>
+ *            <menuitem label="SubMenuItem D-2"/>
+ *            <menuitem label="SubMenuItem D-3"/>
+ *        </menuitem>
+ *    </root>
+ * </mx:XML>

+ *
+ *
The following table lists the attributes you can specify,
+ *  their data types, their purposes, and how the data provider must represent
+ *  them if the menu uses the DefaultDataDescriptor class to parse the data provider:

+ *
+ *

+ *

+ *    Attribute
+ *    Type
+ *    Description
+ *

+ *

+ *    altKey
+ *    Boolean
+ *    Specifies whether the Alt key is required as part of the key equivalent for the item.
+ *

+ *

+ *    cmdKey
+ *    Boolean
+ *    Specifies whether the Command key is required as part of the key equivalent for the item.
+ *

+ *

+ *    ctrlKey
+ *    Boolean
+ *    Specifies whether the Control key is required as part of the key equivalent for the item.
+ *

+ *

+ *    enabled
+ *    Boolean
+ *    Specifies whether the user can select the menu item (true),
+ *      or not (false). If not specified, Flex treats the item as if
+ *      the value were true.
+ *      If you use the default data descriptor, data providers must use an enabled
+ *      XML attribute or object field to specify this characteristic.
+ *

+ *

+ *    keyEquivalent
+ *    String
+ *    Specifies a keyboard character which, when pressed, triggers an event as though
+ *        the menu item was selected. The menu's keyEquivalentField or
+ *        keyEquivalentFunction property determines the name of the field
+ *        in the data that specifies the key equivalent, or a function for determining
+ *        the key equivalents. (If the data provider is in E4X XML format, you must specify
+ *        one of these properties to assign a key equivalent.)
+ *

+ *

+ *    label
+ *    String
+ *    Specifies the text that appears in the control. This item is used for all
+ *      menu item types except separator.
+ *      The menu's labelField or labelFunction property
+ *      determines the name of the field in the data that specifies the label,
+ *      or a function for determining the labels. (If the data provider is in E4X XML format,
+ *      you must specify one of these properties to display a label.)
+ *      If the data provider is an Array of Strings, Flex uses the String value as the label.
+ *

+ *

+ *    mnemonicIndex
+ *    Integer
+ *    Specifies the index position of the character in the label that is used as the
+ *        mnemonic for the menu item. The menu's mnemonicIndexField or
+ *        mnemonicIndexFunction property determines the name of the field
+ *        in the data that specifies the mnemonic index, or a function for determining
+ *        mnemonic index. (If the data provider is in E4X XML format, you must specify
+ *        one of these properties to specify a mnemonic index in the data.) Alternatively,
+ *        you can indicate that a character in the label is the menu item's mnemonic by
+ *        including an underscore immediately to the left of that character.
+ *

+ *

+ *    shiftKey
+ *    Boolean
+ *    Specifies whether the Shift key is required as part of the key equivalent for the item.
+ *

+ *

+ *    toggled
+ *    Boolean
+ *    Specifies whether a check item is selected.
+ *      If not specified, Flex treats the item as if the value were false
+ *      and the item is not selected.
+ *      If you use the default data descriptor, data providers must use a toggled
+ *      XML attribute or object field to specify this characteristic.
+ *

+ *

+ *    type
+ *    String
+ *    Specifies the type of menu item. Meaningful values are separator and
+ *      check. Flex treats all other values,
+ *      or nodes with no type entry, as normal menu entries.
+ *      If you use the default data descriptor, data providers must use a type
+ *      XML attribute or object field to specify this characteristic.
+ *

+ *

+ *
+ *
To create a window menu, set the FlexNativeMenu as the menu property of the
+ *  Window or WindowedApplication instance on which the menu should appear. To create an application
+ *  menu, assign the FlexNativeMenu as the menu property of the application's
+ *  WindowedApplication. To assign a FlexNativeMenu as the context menu for a portion of the user interface,
+ *  call the FlexNativeMenu instance's setContextMenu() method, passing the UI object
+ *  as an argument. Call the FlexNativeMenu component's display() method to display the
+ *  menu as a pop-up menu anywhere on one of the application's windows.

+ *
+ *
To detect when menu items commands are triggered, register a listener for the itemClick
+ *  event. You can also register a listener for the menuShow event to determine when
+ *  any menu or submenu is opened.

+ *
+ *  @mxml
+ *
The <mx:FlexNativeMenu&gt tag supports the following tag attributes:

+ *
+ *

+ *  <mx:MenuBar
+ *    Properties
+ *    dataDescriptor="mx.controls.treeClasses.DefaultDataDescriptor"
+ *    dataProvider="undefined"
+ *    keyEquivalentField="keyEquivalent"
+ *    keyEquivalentFunction="undefined"
+ *    keyEquivalentModifiersFunction="undefined"
+ *    labelField="label"
+ *    labelFunction="undefined"
+ *    mnemonicIndexField="mnemonicIndex"
+ *    mnemonicIndexFunction="undefined"
+ *    showRoot="true"
+ *
+ *    Events
+ *    itemClick="No default"
+ *    menuShow="No default"
+ *  />
+ *

+ *
  *  @see flash.display.NativeMenu
+ *  @see mx.events.FlexNativeMenuEvent
  */
-public class FlexNativeMenu extends EventDispatcher implements ILayoutManagerClient, IFlexContextMenu
+public class FlexNativeMenu extends EventDispatcher implements ILayoutManagerClient, IFlexContextMenu
 {
     include "../core/Version.as";
-
+
     //--------------------------------------------------------------------------
     //
     //  Class variables
@@ -74,12 +236,12 @@
     //--------------------------------------------------------------------------

     /**
-     *  The character to use to indicate the mnemonic index in a label.  By
+     *  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
@@ -92,19 +254,19 @@
     public function FlexNativeMenu()
     {
         super();
-
+
         _nativeMenu.addEventListener(Event.DISPLAYING, menuDisplayHandler, false, 0, true);
     }
-
+
     //--------------------------------------------------------------------------
     //
     //  Variables
     //
     //--------------------------------------------------------------------------
-
+
     //--------------------------------------------------------------------------
 	//
-	//  Properties: ILayoutManagerClient
+	//  Properties: ILayoutManagerClient
 	//
 	//--------------------------------------------------------------------------

@@ -144,10 +306,10 @@
 	 */
 	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
+	// 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
      */
@@ -220,7 +382,7 @@
 	{
 		_updateCompletePendingFlag = value;
 	}
-
+
     //--------------------------------------------------------------------------
     //
     //  Variables: Invalidation
@@ -233,24 +395,25 @@
      *  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,
+
+    /**
+      *  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.
+      *  Any changes made directly to the underlying NativeMenu instance
+	  *  may be lost when changes are made to the menu or the underlying
+	  *  data provider.
       */
 	public function get nativeMenu() : NativeMenu
 	{
@@ -275,12 +438,12 @@
     [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
+     *  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.
-     *
+     *  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:

@@ -310,7 +473,7 @@
     public function set dataDescriptor(value:IMenuDataDescriptor):void
     {
         _dataDescriptor = value;
-
+
         dataDescriptorChanged = true;
     }

@@ -322,7 +485,7 @@
      *  @private
      */
     private var dataProviderChanged:Boolean = false;
-
+
     /**
      *  @private
      *  Storage variable for the original dataProvider
@@ -333,30 +496,29 @@
     [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:
-     *

+     *  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.
+     *
+     *
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.

+     *
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;
@@ -369,10 +531,10 @@
     {
         if (mx_internal::_rootModel)
         {
-            mx_internal::_rootModel.removeEventListener(CollectionEvent.COLLECTION_CHANGE,
+            mx_internal::_rootModel.removeEventListener(CollectionEvent.COLLECTION_CHANGE,
                                            collectionChangeHandler);
         }
-
+
         // handle strings and xml
         if (typeof(value)=="string")
             value = new XML(value);
@@ -380,7 +542,7 @@
             value = new XML(XMLNode(value).toString());
         else if (value is XMLList)
             value = new XMLListCollection(value as XMLList);
-
+
         if (value is XML)
         {
             _hasRoot = true;
@@ -418,18 +580,18 @@
         //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
      */
@@ -442,7 +604,7 @@
     {
         return _hasRoot;
     }
-
+
     //----------------------------------
     //  keyEquivalentField
     //----------------------------------
@@ -461,12 +623,12 @@
     [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.
+     *  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.
+     *
+     *
Setting the keyEquivalentFunction property causes this property to be ignored.

      *
      *  @default "keyEquivalent"
      *  @see flash.ui.Keyboard
@@ -485,9 +647,9 @@
         {
             _keyEquivalentField = value;
             keyEquivalentFieldChanged = true;
-
+
             invalidateProperties();
-
+
             dispatchEvent(new Event("keyEquivalentFieldChanged"));
         }
     }
@@ -506,21 +668,18 @@

     /**
      *  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

+     *
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 must return a String.

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

      *
      *  @default "undefined"
      *  @see flash.ui.Keyboard
@@ -539,13 +698,13 @@
         {
             _keyEquivalentFunction = value;
             keyEquivalentFieldChanged = true;
-
+
             invalidateProperties();
-
+
             dispatchEvent(new Event("keyEquivalentFunctionChanged"));
         }
     }
-
+
     //----------------------------------
     //  keyEquivalentModifiersFunction
     //----------------------------------
@@ -597,7 +756,7 @@
 	            }
         	}
         }
-
+
         return modifiers;
     }

@@ -606,18 +765,19 @@

     /**
      *  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

+     *  Array of modifiers by looking in the data provider data for the presence of
+	 *  the following (boolean) fields: altKey, cmdKey,
+	 *  ctrlKey, 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"
      */
@@ -635,13 +795,13 @@
         {
             _keyEquivalentModifiersFunction = value;
             keyEquivalentModifiersFunctionChanged = true;
-
+
             invalidateProperties();
-
+
             dispatchEvent(new Event("keyEquivalentModifiersFunctionChanged"));
         }
     }
-
+
     //----------------------------------
     //  labelField
     //----------------------------------
@@ -660,22 +820,25 @@
     [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.
+     *  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, 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".
+     *
+     *
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.

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

      *
      *  @default "label"
      */
@@ -693,9 +856,9 @@
         {
             _labelField = value;
             labelFieldChanged = true;
-
+
             invalidateProperties();
-
+
             dispatchEvent(new Event("labelFieldChanged"));
         }
     }
@@ -714,29 +877,21 @@

     /**
      *  The function that determines the text to display for each menu item.
-     *  The label function must find the appropriate field or fields in the
+     *  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
+     *
+     *
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

+     *  property value.

+     *
+     *
The labelFunction property can be helpful for handling formatting,
+     *  localization, and platform-independence.

+     *
+     *
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"
      */
@@ -754,13 +909,13 @@
         {
             _labelFunction = value;
             labelFieldChanged = true;
-
+
             invalidateProperties();
-
+
             dispatchEvent(new Event("labelFunctionChanged"));
         }
     }
-
+
     //----------------------------------
     //  mnemonicIndexField
     //----------------------------------
@@ -779,15 +934,19 @@
     [Inspectable(category="Data", defaultValue="mnemonicIndex")]

     /**
-     *  The name of the field in the data provider that determines the
+     *  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.
+     *
+     *
If the field specified by this property contains a number greater
+	 *  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.

      *
      *  @default "mnemonicIndex"
+	 *
+	 *  @see #labelField
      */
     public function get mnemonicIndexField():String
     {
@@ -803,9 +962,9 @@
         {
             _mnemonicIndexField = value;
             mnemonicIndexFieldChanged = true;
-
+
             invalidateProperties();
-
+
             dispatchEvent(new Event("mnemonicIndexFieldChanged"));
         }
     }
@@ -824,22 +983,23 @@

     /**
      *  The function that determines the mnemonic index for each menu item.
-     *
-     *  If you omit this property, Flex uses the contents of the field or
+     *
+     *
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.
+     *  property value.

+     *
+     *
If this property is defined and the function returns a number greater than
+	 *  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,
+     *  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

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

      *
      *  @default "undefined"
      */
@@ -857,13 +1017,13 @@
         {
             _mnemonicIndexFunction = value;
             mnemonicIndexFieldChanged = true;
-
+
             invalidateProperties();
-
+
             dispatchEvent(new Event("mnemonicIndexFunctionChanged"));
         }
     }
-
+
     //----------------------------------
     //  showRoot
     //----------------------------------
@@ -878,19 +1038,19 @@
      *  @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
+     *  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.
+     *
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.

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

      *
      *  @default true
      *  @see #hasRoot
@@ -940,7 +1100,7 @@
 			}
 		}
     }
-
+
     /**
      *  @private
      */
@@ -948,7 +1108,7 @@
     {
         validateProperties();
     }
-
+
     /**
      *  @inheritDoc
      */
@@ -961,24 +1121,24 @@
             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.
+
+    /**
+	 *  Validates and updates the properties and layout of this object
+	 *  and redraws it, if necessary.
 	 */
 	public function validateNow():void
 	{
@@ -989,7 +1149,7 @@
 	}

 	/**
-	 *  Sets the native menu on the underlying InteractiveObject to the AIR menu
+	 *  Sets the context menu of the InteractiveObject to the underlying native menu.
 	 */
 	public function setContextMenu(component:InteractiveObject):void
 	{
@@ -1005,37 +1165,38 @@
 	}

 	/**
-	 *  Unsets the native menu on the underlying InteractiveObject to the AIR menu
+	 *  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;
 	}
-
+
     /**
      *  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 ||
+                showRootChanged = false;
+        }
+
+        if (dataProviderChanged ||showRootChanged ||
         	labelFieldChanged || dataDescriptorChanged)
         {
             var tmpCollection:ICollectionView;
-
-            //reset flags
+
+            //reset flags
             dataProviderChanged = false;
             showRootChanged = false;
             labelFieldChanged = false;
             dataDescriptorChanged = false;
-
+
             // are we swallowing the root?
             if (mx_internal::_rootModel && !_showRoot && _hasRoot)
             {
@@ -1045,37 +1206,37 @@
                     _dataDescriptor.hasChildren(rootItem, mx_internal::_rootModel))
                 {
                     // then get rootItem children
-                    tmpCollection =
+                    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
+
+            // make top level items
             if (mx_internal::_rootModel)
             {
                 if (!tmpCollection)
                     tmpCollection = mx_internal::_rootModel;
-                // not really a default handler, but we need to
+                // 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);
+
+             	populateMenu(_nativeMenu, tmpCollection);
             }
-
+
             dispatchEvent(new Event("nativeMenuChange"));
         }
     }
-
+
     /**
      *  Creates a menu and adds appropriate listeners
-     *
+     *
      *  @private
      */
     private function createMenu():NativeMenu
@@ -1083,13 +1244,13 @@
         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
@@ -1100,10 +1261,10 @@
     		menu.removeItemAt(0);
     	}
     }
-
+
     /**
      *  Populates a menu and the related submenus given a collection
-     *
+     *
      *  @private
      */
     private function populateMenu(menu:NativeMenu, collection:ICollectionView):NativeMenu
@@ -1120,14 +1281,14 @@
                 //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
@@ -1180,11 +1341,11 @@
 			nativeMenuItem.addEventListener(flash.events.Event.SELECT, itemSelectHandler, false, 0, true);

 			// recursive
-			if (dataDescriptor.isBranch(data, mx_internal::_rootModel) &&
+			if (dataDescriptor.isBranch(data, mx_internal::_rootModel) &&
 				dataDescriptor.hasChildren(data, mx_internal::_rootModel))
 			{
 				nativeMenuItem.submenu = createMenu();
-				populateMenu(nativeMenuItem.submenu,
+				populateMenu(nativeMenuItem.submenu,
 					dataDescriptor.getChildren(data, mx_internal::_rootModel));
 			}
 		}
@@ -1192,7 +1353,7 @@
 		// done!
 		menu.addItem(nativeMenuItem);
     }
-
+
     /**
      *  @copy flash.display.NativeMenu#display()
      */
@@ -1200,12 +1361,12 @@
      {
      	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
+     *  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.
      *
@@ -1255,12 +1416,12 @@

         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
+     *  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.
      *
@@ -1276,11 +1437,12 @@

         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
+
+    /**
+     *  Returns the String to use as the menu item label 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.
@@ -1335,12 +1497,11 @@

         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.
+     *  based on the mnemonicIndexField and mnemonicIndexFunction
+	 *  properties. If the method cannot convert the parameter to an integer, it returns -1.
      *
      *  @param data Object to be displayed.
      *
@@ -1350,7 +1511,7 @@
     {
         if (data == null)
             return -1;
-
+
         var mnemonicIndex:int;

         if (mnemonicIndexFunction != null)
@@ -1392,11 +1553,11 @@

         return -1;
     }
-
-    /**
-     *  Returns the actual label sent to the NativeMenuItem.
-     *  It takes out the leading underscore character if
-     *  there is one
+
+    /**
+     *  Determines the actual label to be used for the NativeMenuItem
+     *  by removing underscore characters and converting escaped underscore
+	 *  characters, if there are any.
      */
     protected function parseLabelToString(data:String):String
     {
@@ -1414,10 +1575,10 @@

     	return dataWithoutEscapedUnderscores.join(MNEMONIC_INDEX_CHARACTER);
     }
-
-    /**
-     *  Returns the mnemonic index sent to the NativeMenuItem.
-     *  It finds the leading underscore character if
+
+    /**
+     *  Extracts the mnemonic index from a label based on the presence of
+	 *  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
@@ -1454,17 +1615,17 @@
     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
+        	// 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);
@@ -1473,14 +1634,14 @@
         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);


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 4040
Author:   gosmith@adobe.com
Date:     2008-11-07T02:08:56.069851Z

Log Message:
-----------
Improved text hiliting.

Text selections in TextView now hilite using three CSS-settable colors. And you can control whether the selection is shown when the component doesn't have focus, and when the window isn't active.

The visibility of the selection is determined by a new 'selectionVisibility' property on TextView and FxTextBase. The allowed values -- "whenFocused", "whenActive", and "always" -- are available in the new TextSelectionVisibility enum class. This is similar to TextField's 'alwaysShowSelection' property but more general.

The hilite color in each of the three states is determined by the three styles selectionColor, unfocusedSelectionColor, and inactiveSelectionColor. The latter two are new in Gumbo. Note that the existing selectionColor style now applies to selected text as well as to selected list items, etc. We may decide to have unfocusedSelectionColor and inactiveSelectionColor apply to things like list items as well, but that isn't part of this checkin.

QE Notes: The blinking insertion point is now barely visible because it is the selection hilite color. I'll work with the TLF team to get it drawn in a highly-visible way. Also, the selectionColor is not getting properly computed based on the themeColor for FxApplications.
Doc Notes: None
Bugs: None
Reviewer: Deepa

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextSelectionVisibility.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/SelectionFormatTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.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/components/baseClasses/GroupBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -12,6 +12,7 @@
 package mx.components
 {

+import flash.display.BlendMode;
 import flash.display.Graphics;
 import flash.events.Event;
 import flash.geom.Rectangle;
@@ -32,6 +33,7 @@
 import flashx.textLayout.conversion.ConversionType;
 import flashx.textLayout.edit.EditManager;
 import flashx.textLayout.edit.ISelectionManager;
+import flashx.textLayout.edit.SelectionFormat;
 import flashx.textLayout.elements.Configuration;
 import flashx.textLayout.elements.FlowElement;
 import flashx.textLayout.elements.ParagraphElement;
@@ -110,6 +112,7 @@
 include "../styles/metadata/AdvancedParagraphFormatTextStyles.as"
 include "../styles/metadata/BasicCharacterFormatTextStyles.as"
 include "../styles/metadata/AdvancedCharacterFormatTextStyles.as"
+include "../styles/metadata/SelectionFormatTextStyles.as"

 //--------------------------------------
 //  Other metadata
@@ -701,6 +704,45 @@
     }

     //----------------------------------
+    //  selectionVisibility
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _selectionVisibility:String =
+        TextSelectionVisibility.WHEN_FOCUSED;
+
+    /**
+     *  @private
+     */
+    private var selectionVisibilityChanged:Boolean = false;
+
+    /**
+     *  Documentation is not currently available.
+     *
+     *  @default null
+     */
+    public function get selectionVisibility():String
+    {
+        return _selectionVisibility;
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectionVisibility(value:String):void
+    {
+        if (value == _selectionVisibility)
+            return;
+
+        _selectionVisibility = value;
+        selectionVisibilityChanged = true;
+
+        invalidateProperties();
+    }
+
+    //----------------------------------
     //  text
     //----------------------------------

@@ -978,7 +1020,27 @@
             textFlow.flowComposer = flowComposer;

             // Give it an EditManager to make it editable.
-            textFlow.interactionManager = new TextViewEditManager();
+            var editManager:TextViewEditManager = new TextViewEditManager();
+            // TODO! Temporary workaround because selectionColor
+            // isn't getting set for FxApplications.
+            var selectionColor:* = getStyle("selectionColor");
+            if (selectionColor === undefined)
+                selectionColor = 0xB5D5FF;
+            var unfocusedAlpha:Number =
+                selectionVisibility != TextSelectionVisibility.WHEN_FOCUSED ?
+                1.0 : 0.0;
+            var inactiveAlpha:Number =
+                selectionVisibility == TextSelectionVisibility.ALWAYS ?
+                1.0 : 0.0;
+            editManager.focusSelectionFormat = new SelectionFormat(
+                selectionColor, 1.0, BlendMode.NORMAL);
+            editManager.noFocusSelectionFormat = new SelectionFormat(
+                getStyle("unfocusedSelectionColor"), unfocusedAlpha,
+                BlendMode.NORMAL);
+            editManager.inactiveSelectionFormat = new SelectionFormat(
+                getStyle("inactiveSelectionColor"), inactiveAlpha,
+                BlendMode.NORMAL);
+            textFlow.interactionManager = editManager;

             // Listen to events from the TextFlow and its EditManager.
             addListeners(textFlow);
@@ -1181,7 +1243,7 @@
             }
             else
             {
-                throw new Error("invalid content");
+                textFlow = createTextFlowFromMarkup(_content.toString());
             }
             textInvalid = true;
             dispatchEvent(new Event("textInvalid"));


Transferred from the Adobe Open Source Subversion Repository

Revision: 4050
Author:   chaase@adobe.com
Date:     2008-11-07T16:07:03.316527Z

Log Message:
-----------
Fixed a problem in the synchronization of startDelayed animations. on every frame, we walk the list of currently sleeping animations to see if it's time to wake them up. If so, we start() each one. However, the start() function modifies this same list by removing the started animation, so our list-walking loop essentially skips the following item on the list. When two animations have the same startDelay, this means that there may be an intervening frame before the second one is started, potentially causing an artifact like that seen in the bug example.

QE Notes: None
Doc Notes: None
Bugs: sdk-17933
Reviewer: Evtim
Tests: checkintests, Mustella (Effects, gumbo/effects, ListDataEffects)

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.as

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

--- frameworks/projects/spark/src/spark/effects/animation/Animation.as
+++ frameworks/projects/spark/src/spark/effects/animation/Animation.as
@@ -560,9 +560,14 @@
         }

         // Check to see whether it's time to start any delayed animations
-        for (i = 0; i < delayedStartAnims.length; ++i)
-        {
-            var anim:Animation = Animation(delayedStartAnims[i]);
+        while (delayedStartAnims.length > 0)
+        {
+            // This loop will either start() an animation, which removes it
+            // from delayedStartAnims, or it will break out. In either case,
+            // we only check against the first item in the list each time
+            // through because any previous iteration will have removed the
+            // item that was at index 0
+            var anim:Animation = Animation(delayedStartAnims[0]);
             var animStartTime:Number = delayedStartTimes[anim];
             // Keep starting animations unless our sorted lists return
             // animations that start past the current time


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

--- frameworks/projects/mobilecomponents/src/spark/layouts/VerticalSpinnerLayout.as
+++ frameworks/projects/mobilecomponents/src/spark/layouts/VerticalSpinnerLayout.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2011 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.
 //
 ////////////////////////////////////////////////////////////////////////////////
 package spark.layouts


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

--- frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
@@ -1,10 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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: 7866
Author:   jszeto@adobe.com
Date:     2009-06-15T23:11:45.128254Z

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

- Deprecated mx.graphics.RoundedRectangle
- Added mx.geom.RoundedRectangle
- Removed GraphicElement.getStroke
- Moved code from GraphicElement.getStrokeExtents into StrokedElement.
- Updated the dependency checker

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/RoundedRectangle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/DownloadProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RoundedRectangle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/DissolveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Dissolve.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -3889,14 +3889,6 @@
     {
     	return performCheck && hasComplexLayoutMatrix ? layoutFeatures.layoutMatrix : null;
     }
-
-    /**
-     *  @private
-     */
-    protected function getStroke():IStroke
-    {
-        return null;
-    }

     static private var _strokeExtents:Point = new Point();

@@ -3905,65 +3897,7 @@
     // now we assume they are the same on both sides.
     protected function getStrokeExtents(postLayoutTransform:Boolean = true):Point
     {
-        // TODO EGeorgie: currently we take only scale into account,
-        // but depending on joint style, cap style, etc. we need to take
-        // the whole matrix into account as well as examine every line segment...
-        var stroke:IStroke = getStroke();
-        if (!stroke)
-        {
-            _strokeExtents.x = 0;
-            _strokeExtents.y = 0;
-            return _strokeExtents;
-        }
-
-        // Stroke with weight 0 or scaleMode "none" is always drawn
-        // at "hairline" thickness, which is exactly one pixel.
-        var weight:Number = stroke.weight;
-        if (weight == 0)
-        {
-            _strokeExtents.x = 1;
-            _strokeExtents.y = 1;
-            return _strokeExtents;
-        }
-
-        var scaleMode:String = stroke.scaleMode;
-        if (!scaleMode || scaleMode == LineScaleMode.NONE || !postLayoutTransform)
-        {
-            _strokeExtents.x = weight;
-            _strokeExtents.y = weight;
-            return _strokeExtents;
-        }
-
-        var sX:Number = scaleX;
-        var sY:Number = scaleY;
-
-        // TODO EGeorgie: stroke thickness depends on all matrix components,
-        // not only on scale.
-        if (scaleMode == LineScaleMode.NORMAL)
-        {
-            if (sX  == sY)
-                weight *= sX;
-            else
-                weight *= Math.sqrt(0.5 * (sX * sX + sY * sY));
-
-            _strokeExtents.x = weight;
-            _strokeExtents.y = weight;
-            return _strokeExtents;
-        }
-        else if (scaleMode == LineScaleMode.HORIZONTAL)
-        {
-            _strokeExtents.x = weight * sX;
-            _strokeExtents.y = weight;
-            return _strokeExtents;
-        }
-        else if (scaleMode == LineScaleMode.VERTICAL)
-        {
-            _strokeExtents.x = weight;
-            _strokeExtents.y = weight * sY;
-            return _strokeExtents;
-        }
-
-        return null;
+		return _strokeExtents;
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8031
Author:   egeorgie@adobe.com
Date:     2009-06-20T01:10:03.288554Z

Log Message:
-----------
Scrub the TODOs in the framework, convert to FIXMEs in the new convention and assigning an owner.

Doc Notes: N/A
Bugs: N/A
Reviewer: Deepa
tests: build, checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.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/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Timeline.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/VolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ModifiedCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ErrorSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectTargetFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/BitmapUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/StreamingVideoSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RemoveActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/pathSegments/LineSegment.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/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -1071,7 +1071,7 @@
      */
     public function get maxHeight():Number
     {
-        // TODO!!! Examine this logic, Make this arbitrarily large (use UIComponent max)
+        // FIXME (egeorgie): Examine this logic, Make this arbitrarily large (use UIComponent max)
         return !isNaN(_maxHeight) ? _maxHeight : DEFAULT_MAX_HEIGHT;
     }

@@ -1111,7 +1111,7 @@
      */
     public function get maxWidth():Number
     {
-        // TODO!!! Examine this logic, Make this arbitrarily large (use UIComponent max)
+        // FIXME (egeorgie): Examine this logic, Make this arbitrarily large (use UIComponent max)
         return !isNaN(_maxWidth) ? _maxWidth : DEFAULT_MAX_WIDTH;
     }

@@ -1275,7 +1275,7 @@
      */
     public function get minHeight():Number
     {
-        // TODO!!! Examine this logic
+        // FIXME (egeorgie): Examine this logic
         return !isNaN(_minHeight) ? _minHeight : DEFAULT_MIN_HEIGHT;
     }

@@ -1315,7 +1315,7 @@
      */
     public function get minWidth():Number
     {
-        // TODO!!! Examine this logic
+        // FIXME (egeorgie): Examine this logic
         return !isNaN(_minWidth) ? _minWidth : DEFAULT_MIN_WIDTH;
     }

@@ -1748,7 +1748,7 @@
      */
     public function set transform(value:flash.geom.Transform):void
     {
-    	// TODO jszeto Add perspectiveProjection support
+    	// FIXME (jszeto): Add perspectiveProjection support

     	var matrix:Matrix = value && value.matrix ? value.matrix.clone() : null;
     	var matrix3D:Matrix3D = value && value.matrix3D ? value.matrix3D.clone() : null;
@@ -1839,7 +1839,7 @@
                                     postLayoutRotation:Vector3D = null,
                                     postLayoutTranslation:Vector3D = null):void
     {
-        //TODO: optimize for simple translations
+        // FIXME (egreenfi): optimize for simple translations
         allocateLayoutFeatures();
         var previous:Boolean = needsDisplayObject;
         layoutFeatures.transformAround(transformCenter,scale,rotation,translation,postLayoutScale,postLayoutRotation,postLayoutTranslation);
@@ -2530,7 +2530,7 @@

     private var _alwaysCreateDisplayObject:Boolean;

-    // TODO (jszeto) Remove once we have a better solution for a design tool
+    // FIXME (jszeto): Remove once we have a better solution for a design tool
     // to captureBitmapData for hit testing.
     mx_internal function set alwaysCreateDisplayObject(value:Boolean):void
     {
@@ -3270,7 +3270,7 @@
      */
     public function validateDisplayList():void
     {
-        // TODO!!! Turn this off for now because we need to clear all of the DisplayObject
+        // FIXME (egeorgie): Turn this off for now because we need to clear all of the DisplayObject
         // graphics and thus need to redraw each graphic element
         // Put this back in once we implement drawingAPI2
         /* if (!invalidateDisplayListFlag)
@@ -3286,13 +3286,13 @@
             applyComputedTransform();
         }

-        // TODO EGeorgie: don't clear the graphics if the GraphicElement is invisible and explicitly owns the DO?
+        // FIXME (egeorgie): don't clear the graphics if the GraphicElement is invisible and explicitly owns the DO?
         // If we are the first in the sequence, clear the graphics:
         if (displayObjectSharingMode != DisplayObjectSharingMode.USES_SHARED_OBJECT)
         {
             if (drawnDisplayObject is Sprite)
                 Sprite(drawnDisplayObject).graphics.clear();
-            // TODO (rfrishbe): We don't really support shapes, but we should
+            // FIXME (rfrishbe): We don't really support shapes, but we should
             //else if (drawnDisplayObject is Shape)
                 //Shape(drawnDisplayObject).graphics.clear();
         }
@@ -3526,7 +3526,7 @@
     public function getLayoutBoundsX(postLayoutTransform:Boolean = true):Number
     {
         // Take stroke into account:
-        // TODO EGeorgie: We assume that the stroke extents are even on both sides.
+        // FIXME (egeorgie): We assume that the stroke extents are even on both sides.
         // and that's not necessarily true.
         var stroke:Number = -getStrokeExtents(postLayoutTransform).x * 0.5;

@@ -3550,7 +3550,7 @@
     public function getLayoutBoundsY(postLayoutTransform:Boolean = true):Number
     {
         // Take stroke into account:
-        // TODO EGeorgie: We assume that the stroke extents are even on both sides.
+        // FIXME (egeorgie): We assume that the stroke extents are even on both sides.
         // and that's not necessarily true.
         var stroke:Number = -getStrokeExtents(postLayoutTransform).y * 0.5;

@@ -3899,7 +3899,7 @@

     static private var _strokeExtents:Point = new Point();

-    // TODO EGeorgie: return rectangle instead so that the function can
+    // FIXME (egeorgie): return rectangle instead so that the function can
     // correctly indicate the left, right, top and bottom extents. Right
     // now we assume they are the same on both sides.
     protected function getStrokeExtents(postLayoutTransform:Boolean = true):Point


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

--- frameworks/projects/framework/src/mx/binding/ArrayElementWatcher.as
+++ frameworks/projects/framework/src/mx/binding/ArrayElementWatcher.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.binding
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19060
Author:   harishs@adobe.com
Date:     2010-12-06T17:34:15.020965Z

Log Message:
-----------
QE notes: Did checkintests, performed full cyclone run. There were 19 failures in mustella report. QE Judy (Mingzhou Gao and Joann Chung Anderson) confirmed that they are known problems.
Doc notes: As part of Sort and Sortfield updates, the asdoc comments were updated to reflect globalization changes.
Bugs: Fixed sdk-28493, 28691,28494, 28345, 28320, 28387, 28314, 28145
Reviewer: Gordon Smith
Tests run: cyclone, checkintests, bugs testfiles
Is noteworthy for integration: Sort and Sortfield updated with globalization support using the new spark globalization sort classes.
Number and CurrencyValidators support national digits and unicode minus symbols.
groupingPattern property dropped for Number and Currency Validators.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/SortField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/NumberValidatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ICollectionView.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ISort.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ISortField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/collections/Sort.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/NumberValidator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/olap/OLAPCube.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/CurrencyValidator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/collections/SortField.as</path>
<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/framework/bundles/en_US/validators.properties</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/collections</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalCollectionView.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationUtils.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/SortTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionView.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/Sort.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ModifiedCollectionView.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/SortTests.mxml</path>

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

--- frameworks/projects/framework/src/mx/collections/ICollectionView.as
+++ frameworks/projects/framework/src/mx/collections/ICollectionView.as
@@ -120,7 +120,7 @@
 	//----------------------------------

     /**
-     *  The Sort that will be applied to the ICollectionView.
+     *  The ISort that will be applied to the ICollectionView.
 	 *  Setting the sort does not automatically refresh the view,
 	 *  so you must call the refresh() method
 	 *  after setting this property.
@@ -139,12 +139,12 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function get sort():Sort;
+    function get sort():ISort;

 	/**
 	 *  @private
 	 */
-    function set sort(value:Sort):void;
+    function set sort(value:ISort):void;

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 6352
Author:   smgilson@adobe.com
Date:     2009-04-28T20:04:17.982098Z

Log Message:
-----------
ASDoc edits for containers

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/IItemRendererOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/IItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/RendererExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/IItemRendererOwner.as
+++ frameworks/projects/spark/src/spark/components/IItemRendererOwner.as
@@ -16,26 +16,56 @@

 /**
  *  The IItemRendererOwner interface defines the basic set of APIs
- *  that you must implement to create a component that can
- *  communicate with renderers implementing the IItemRenderer
- *  interface.
+ *  that a class must to  support items renderers.
+ *  A class  that implements the IItemRendererOwner interface
+ *  is called the host component of the item renderer.
+ *
+ *
The class defining the item renderer must implement the
+ *  IItemRenderer interface.

+ *
+ *  @see spark.components.IItemRenderer
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  *
  */
 public interface IItemRendererOwner
 {

     /**
-     *  Method that returns the label an item renderer displays.
+     *  Returns the String for display in an item renderer.
+     *  The String is written to the labelText
+     *  property of the item renderer.
+     *
+     *  @param item The date item to display.
+     *
+     *  @return The String for display in an item renderer.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     function itemToLabel(item:Object):String;
-
+
     /**
-     *  Method that updates renderer-specific properties like
-     *  data, labelText and owner. This is a convenience method which
-     *  funnels all updates to the renderer properties owned by
-     *  the owner.
+     *  Updates renderer-specific properties of the item renderer, such as
+     *  data, labelText and owner.
+     *  This is a convenience method that you can implement to
+     *  update all of the renderer properties from the host component.
+     *
+     *  @param renderer The item renderer.
+     *
+     *  @param data The date item to display.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     function updateRendererInformation(renderer:IVisualElement, data:Object=null):void;

-}
+}
 }


Removed Unused Variable Deleted an unused variable found after self review, and changed the description of variable retryAttemptCounter to reflect its entire purpose.

--- HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
+++ HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
@@ -1268,7 +1268,6 @@
 					{
 						setState(HTTPStreamingState.WAIT);
 						isWaitingForData = true;
-						retryAttemptStartCount = _mainTimer.currentCount;
 						return;
 					}

@@ -1900,12 +1899,11 @@

 			private var streamIsGood:Boolean = false;// true if we have gotten some data from the stream
 			private var isWaitingForData:Boolean = false;// true if we can't find our data but have already started a valid stream
-			private var retryAttemptStartCount:Number;// this is timer's count at the moment we start the timer
 			private var retryAttemptWaitTime:Number = 2.0;// this is how long we will wait after a URL error in seconds before trying to get the segment again
 			private var retryAttemptMaxTime:Number = 10;// this is how long in seconds we will try to reset after a URL error before we start moving forward in the stream
 			private var recognizeBadStreamTime:Number = 20;// this is how long in seconds we will attempt to recover after a URL error before we give up completely
 			private var timeSinceWait:Number = 0;// this is how long we have currently been waiting for a retry attempt. Used to determine when we should retry again
-			private var retryAttemptCount:Number = 0;// this is how many times we have tried to recover from a URL error in a row. Used to assist in retry timing
+			private var retryAttemptCount:Number = 0;// this is how many times we have tried to recover from a URL error in a row. Used to assist in retry timing and scrubbing

 			private static const HIGH_PRIORITY:int = int.MAX_VALUE;


Remove the feature where you could pause the player in advance.

--- src/goplayer/Player.as
+++ src/goplayer/Player.as
@@ -307,17 +307,13 @@

     public function set paused(value : Boolean) : void
     {
-      // Allow pausing before the stream has been created.
-      _paused = value
-
-      if (stream)
-        stream.paused = value
+      if (stream != null)
+        _paused = value, stream.paused = value
     }

     public function togglePaused() : void
     {
-      // Forbid pausing before the stream has been created.
-      if (stream)
+      if (stream != null)
         paused = !paused
     }