Transferred from the Adobe Open Source Subversion Repository

Revision: 18438
Author:   chiedozi@adobe.com
Date:     2010-11-03T22:09:03.321654Z

Log Message:
-----------
Added comments to MobileApplication and MobileApplicationBase

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
@@ -51,27 +51,81 @@
 //--------------------------------------

 /**
+ *  Dispatched after the application state data has been written
+ *  to the application's persistence manager.  This event is only
+ *  dispatched if the sessionCachingEnabled
+ *  property is set to true on the application.
+ *
+ *  @eventType mx.events.FlexEvent.APPLICATION_PERSIST
  *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.1
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
  */
 [Event(name="applicationPersist", type="mx.events.FlexEvent")]

 /**
+ *  This cancelable event dispatched before the application attempts
+ *  to persist its state when the application being suspended or exitted.
+ *  Calling preventDefault on this event will prevent the
+ *  application state from being saved.
+ *
+ *  @eventType mx.events.FlexEvent.APPLICATION_PERSISTING
  *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.1
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
  */
 [Event(name="applicationPersisting", type="mx.events.FlexEvent")]

 /**
+ *  Dispatched after the application state data has been restored
+ *  from disk by the application's persistence manager.  At the point
+ *  this event is dispatched, all data related to the application state
+ *  should be valid.  This event is only dispatched if the
+ *  sessionCachingEnabled property is set to true when
+ *  the application is initialized.
+ *
+ *  @eventType mx.events.FlexEvent.APPLICATION_RESTORE
  *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.1
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
  */
 [Event(name="applicationRestore", type="mx.events.FlexEvent")]

 /**
+ *  This cancelable event dispatched before the application attempts
+ *  to restore its previously saved state when the application is being
+ *  launched.  Calling preventDefault on this event will
+ *  prevent the application state from being restored.
+ *
+ *  @eventType mx.events.FlexEvent.APPLICATION_RESTORING
  *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.1
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
  */
 [Event(name="applicationRestoring", type="mx.events.FlexEvent")]

 /**
+ *  The base application class used for all view based application types.
+ *  This includes MobileApplication and TabbedMobileApplication.  This class
+ *  provides the basic infrastructure for providing these types of applications
+ *  access to the device application menu, hardware keys, orientation status
+ *  and application session persistence.
+ *
+ *  @see spark.components.MobileApplication
+ *  @see spark.components.TabbedMobileApplication
  *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.1
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
  */
 public class MobileApplicationBase extends Application
 {
@@ -80,8 +134,14 @@
     //  Constructor
     //
     //--------------------------------------------------------------------------
-    /**
-     *
+
+    /**
+     *  Constructor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function MobileApplicationBase()
     {
@@ -107,6 +167,17 @@
     //  Variables
     //
     //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Provides access to the active view of the current navigator. This was
+     *  added to provide the ViewMenu access to the active view's viewMenuItems
+     *  property.
+     */
+    mx_internal function get activeView():View
+    {
+        return null;
+    }

     /**
      *  @private
@@ -117,59 +188,41 @@

     /**
      *  @private
+     */
+    private var currentViewMenu:ViewMenu;
+
+    /**
+     *  @private
+     *  This property is used to determine whether the application should
+     *  exit when the back key is pressed.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    mx_internal function get exitApplicationOnBackKey():Boolean
+    {
+        return true;
+    }
+
+    /**
+     *  @private
+     */
+    private var lastFocus:InteractiveObject;
+
+    /**
+     *  @private
      *  This flag indicates when a user has called preventDefault on the
      *  KeyboardEvent dispatched when the menu key is pressed.
      */
     private var menuKeyEventPreventDefaulted:Boolean = false;

-    private var currentViewMenu:ViewMenu;
-    private var lastFocus:InteractiveObject;
-
-    //----------------------------------
-    //  activeView
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    mx_internal function get activeView():View
-    {
-        return null;
-    }
-
     //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------
-
-    private var _viewMenuOpen:Boolean = false;
-
-    /**
-     *  Opens the view menu if set to true and closes it if set to false.
-     *
-     *  @default false
-     */
-    public function get viewMenuOpen():Boolean
-    {
-        return _viewMenuOpen;
-    }
-
-    public function set viewMenuOpen(value:Boolean):void
-    {
-        if (value == _viewMenuOpen)
-            return;
-
-        if (!viewMenu || !activeView.viewMenuItems || activeView.viewMenuItems.length == 0)
-            return;
-
-        _viewMenuOpen = value;
-
-        if (_viewMenuOpen)
-            openViewMenu();
-        else
-            closeViewMenu();
-    }

     //----------------------------------
     //  persistenceManager
@@ -177,9 +230,30 @@
     private var _persistenceManager:IPersistenceManager;

     /**
+     *  The persistenceManager for the application.  The persistence
+     *  manager is automatically created on demand when accessed for the
+     *  first time.  Override the createPersistenceManager()
+     *  method to change the type of persistence manager that is created.
+     *
+     *
The persistence manager will automatically save and restore
+     *  the main navigator's persistence stack if the
+     *  sessionCachingEnabled flag is set to true. Data stored
+     *  in the persistence manager will automatically be flushed to disk
+     *  when the application is suspended or exited.

      *
+     *
The default implementation of the persistence manager uses
+     *  a shared object as it's backing data store.  All information that is
+     *  saved to this object must adhere to flash AMF rules for object encoding.
+     *  This means that custom classes will need to be registered through the use
+     *  of flash.net.registerClassAlias

+     *
+     *  @default Instance of a spark.core.managers.PersistenceManager
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
-    // FIXME (chiedozi): PARB whether this should be a method or a getter because of side effect
     public function get persistenceManager():IPersistenceManager
     {
         if (!_persistenceManager)
@@ -198,7 +272,34 @@
     private var _sessionCachingEnabled:Boolean = false;

     /**
-     *
+     *  Toggles the application session caching feature for the application.  When
+     *  enabled, the application will automatically save the main navigator's view
+     *  data and navigation history to the persistence manager.  When the application
+     *  is relaunched, this data will automatically be read from the persistence store
+     *  and applied to the application's navigator.
+     *
+     *
When enabled, the application version and time the persistence data was
+     *  generated will also be added to the persistence object.  These can be
+     *  accessed by using the persistence manager's getProperty() method
+     *  using either the applicationVersion or timestamp key.

+     *
+     *
When the persistence object is being created, the application will dispatch
+     *  a cancelable FlexEvent.APPLICATION_PERSISTING event when the process
+     *  begins and a FlexEvent.APPLICATION_PERSIST event when it completes.
+     *  If the APPLICATION_PERSISTING event is canceled, the persistence object is not created.
+     *  Similarily, when this information is being restored to the application, a cancelable
+     *  FlexEvent.APPLICATION_RESTORING is dispatched followed by a
+     *  FlexEvent.APPLICATION_RESTORE event.  Canceling the APPLICATION_RESTORING
+     *  event will prevent the navigation data from being restored.

+     *
+     *
The sessionCachingEnabled flag must be set to true before
+     *  the application initializes itself for the navigator's state to be automatically
+     *  restored.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get sessionCachingEnabled():Boolean
     {
@@ -213,42 +314,45 @@
         _sessionCachingEnabled = value;
     }

+    //----------------------------------
+    //  viewMenuOpen
+    //----------------------------------
+    private var _viewMenuOpen:Boolean = false;
+
+    /**
+     *  Opens the view menu if set to true and closes it if set to false.
+     *
+     *  @default false
+     */
+    public function get viewMenuOpen():Boolean
+    {
+        return _viewMenuOpen;
+    }
+
+    /**
+     *  @private
+     */
+    public function set viewMenuOpen(value:Boolean):void
+    {
+        if (value == _viewMenuOpen)
+            return;
+
+        if (!viewMenu || !activeView.viewMenuItems || activeView.viewMenuItems.length == 0)
+            return;
+
+        _viewMenuOpen = value;
+
+        if (_viewMenuOpen)
+            openViewMenu();
+        else
+            closeViewMenu();
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Methods
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    private function addApplicationListeners():void
-    {
-        // Add device event listeners
-        systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN, deviceKeyDownHandler);
-        systemManager.stage.addEventListener(KeyboardEvent.KEY_UP, deviceKeyUpHandler);
-        systemManager.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE,
-                                             orientationChangeHandler);
-        NativeApplication.nativeApplication.
-            addEventListener(InvokeEvent.INVOKE, nativeApplication_invokeHandler);
-
-        // We need to listen to different events on desktop and mobile because
-        // on desktop, the deactivate event is dispatched whenever the window loses
-        // focus.  This could cause persistence to run when the developer doesn't
-        // expect it to on desktop.
-        var os:String = Capabilities.os;
-
-        if (os.indexOf("Windows") != -1 || os.indexOf("Mac OS") != -1)
-            NativeApplication.nativeApplication.
-                addEventListener(Event.EXITING, nativeApplication_deactivateHandler);
-        else
-            NativeApplication.nativeApplication.
-                addEventListener(Event.DEACTIVATE, nativeApplication_deactivateHandler);
-    }

     /**
      *  This method is called when the application is invoked by the
@@ -268,8 +372,8 @@

     /**
      *  This method is called when the application is exiting or being
-     *  sent to the background by the OS.  If sessionCachingEnabled is
-     *  set to true, the application will begin the state saving process
+     *  sent to the background by the OS.  If sessionCachingEnabled
+     *  is set to true, the application will begin the state saving process
      *  here.
      *
      *  @langversion 3.0
@@ -305,7 +409,9 @@
     }

     /**
-     *
+     *  This method is called when the Application's hardware back key is pressed
+     *  by the user.
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5
@@ -314,21 +420,6 @@
     protected function backKeyHandler():void
     {

-    }
-
-    /**
-     *  @private
-     *  This property is used to determine whether the application should
-     *  exit when the back key is pressed.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    mx_internal function get exitApplicationOnBackKey():Boolean
-    {
-        return true;
     }

     /**
@@ -346,15 +437,169 @@
     }

     /**
-     *  @private
+     *  Method is responsible for create the persistence manager for the application.
+     *  This method will automatically be called when the persistence manager is
+     *  accessed for the first time or if the sessionCachingEnabled flag
+     *  is set to true on the application.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
-    // FIXME (chiedozi): Maybe use a singleton for persistence, PARB (GLENN)
     protected function createPersistenceManager():IPersistenceManager
     {
         return new PersistenceManager();
     }

     /**
+     *  Responsible for persisting the application state to the persistence manager.
+     *  This method is automatically called when sessionCachingEnabled
+     *  is set to true.  By default, this method will save the application version
+     *  and the time the persistence object was created to the "timestamp" and
+     *  "applicationVersion" keys.
+     *
+     *
This method will only be called if the FlexEvent.APPLICATION_PERSISTING
+     *  event is not canceled.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function persistApplicationState():void
+    {
+        // Save version number of application
+        var appDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
+        var ns:Namespace = appDescriptor.namespace();
+
+        // TODO (chiedozi): See if reserving these keys is bad
+        persistenceManager.setProperty("timestamp", new Date().getTime());
+        persistenceManager.setProperty("applicationVersion",
+                                        appDescriptor.ns::versionNumber.toString());
+    }
+
+    /**
+     *  Method is responsible for registering the class types that may be
+     *  saved to a persistence manager that uses a shared object as its data store.
+     *  Since shared objects use the standard AMF encoding rules, custom class types
+     *  must be registered with the runtime so that they are properly read in.  This
+     *  method is called before the persistence manager is initialized so that the
+     *  application has a chance to use flash.net.registerClassAlias()
+     *  before the persistence data is loaded.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function registerPersistenceClassAliases():void
+    {
+    }
+
+    /**
+     *  Responsible for restoring the application's state when the
+     *  sessionCachingEnabled flag is set to true.
+     *
+     *
This method will only be called if the FlexEvent.APPLICATION_RESTORING
+     *  event is not canceled.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function restoreApplicationState():void
+    {
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Private Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    private function addApplicationListeners():void
+    {
+        // Add device event listeners
+        systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN, deviceKeyDownHandler);
+        systemManager.stage.addEventListener(KeyboardEvent.KEY_UP, deviceKeyUpHandler);
+        systemManager.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE,
+            orientationChangeHandler);
+        NativeApplication.nativeApplication.
+            addEventListener(InvokeEvent.INVOKE, nativeApplication_invokeHandler);
+
+        // We need to listen to different events on desktop and mobile because
+        // on desktop, the deactivate event is dispatched whenever the window loses
+        // focus.  This could cause persistence to run when the developer doesn't
+        // expect it to on desktop.
+        var os:String = Capabilities.os;
+
+        if (os.indexOf("Windows") != -1 || os.indexOf("Mac OS") != -1)
+            NativeApplication.nativeApplication.
+                addEventListener(Event.EXITING, nativeApplication_deactivateHandler);
+        else
+            NativeApplication.nativeApplication.
+                addEventListener(Event.DEACTIVATE, nativeApplication_deactivateHandler);
+    }
+
+    /**
+     *  @private
+     */
+    private function deviceKeyDownHandler(event:KeyboardEvent):void
+    {
+        var key:uint = event.keyCode;
+
+        // We want to prevent the default down behavior for back key if
+        // the navigator has a view to pop back to
+        if (key == Keyboard.BACK)
+        {
+            backKeyEventPreventDefaulted = event.isDefaultPrevented();
+
+            if (!exitApplicationOnBackKey)
+                event.preventDefault();
+        }
+        else if (key == Keyboard.MENU)
+        {
+            menuKeyEventPreventDefaulted = event.isDefaultPrevented();
+
+            if (menuKeyEventPreventDefaulted)
+                event.preventDefault();
+        }
+
+    }
+
+    /**
+     *  @private
+     */
+    private function deviceKeyUpHandler(event:KeyboardEvent):void
+    {
+        var key:uint = event.keyCode;
+
+        // If preventDefault() wasn't called on the initial keyDown event
+        // and the application thinks it can cancel the native back behavior,
+        // call the backKeyHandler() method.  Otherwise, the runtime will
+        // handle the back key function.
+
+        // The backKeyEventPreventDefaulted key is always set in the
+        // deviceKeyDownHandler method and so doesn't need to be reset.
+        if (key == Keyboard.BACK && !backKeyEventPreventDefaulted && !exitApplicationOnBackKey)
+            backKeyHandler();
+        else if (key == Keyboard.MENU && !menuKeyEventPreventDefaulted)
+            menuKeyHandler(event);
+    }
+
+
+    /**
+     *  @private
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -378,109 +623,34 @@
     }

     /**
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    protected function persistApplicationState():void
-    {
-        // Save version number of application
-        var appDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
-        var ns:Namespace = appDescriptor.namespace();
-
-        // TODO (chiedozi): See if reserving these keys is bad
-        persistenceManager.setProperty("timestamp", new Date().getTime());
-        persistenceManager.setProperty("applicationVersion",
-                                        appDescriptor.ns::versionNumber.toString());
-    }
-
-    /**
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    protected function registerPersistenceClassAliases():void
-    {
-    }
-
-    /**
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    protected function restoreApplicationState():void
-    {
-    }
-
-    /**
-     *  @private
-     */
-    private function deviceKeyDownHandler(event:KeyboardEvent):void
-    {
-        var key:uint = event.keyCode;
-
-        // We want to prevent the default down behavior for back key if
-        // the navigator has a view to pop back to
-        if (key == Keyboard.BACK)
-        {
-            backKeyEventPreventDefaulted = event.isDefaultPrevented();
-
-            if (!exitApplicationOnBackKey)
-                event.preventDefault();
-        }
-        else if (key == Keyboard.MENU)
-        {
-            menuKeyEventPreventDefaulted = event.isDefaultPrevented();
-
-            if (menuKeyEventPreventDefaulted)
-                event.preventDefault();
-        }
-
-    }
-
-    /**
-     *  @private
-     */
-    private function deviceKeyUpHandler(event:KeyboardEvent):void
-    {
-        var key:uint = event.keyCode;
-
-        // If preventDefault() wasn't called on the initial keyDown event
-        // and the application thinks it can cancel the native back behavior,
-        // call the backKeyHandler() method.  Otherwise, the runtime will
-        // handle the back key function.
-
-        // The backKeyEventPreventDefaulted key is always set in the
-        // deviceKeyDownHandler method and so doesn't need to be reset.
-        if (key == Keyboard.BACK && !backKeyEventPreventDefaulted && !exitApplicationOnBackKey)
-            backKeyHandler();
-        else if (key == Keyboard.MENU && !menuKeyEventPreventDefaulted)
-            menuKeyHandler(event);
-    }
-
+     *  @private
+     */
     private function viewMenu_clickHandler(event:MouseEvent):void
     {
         if (event.target is ViewMenuItem)
             viewMenuOpen = false;
     }

+    /**
+     *  @private
+     */
     private function viewMenu_mouseDownOutsideHandler(event:FlexMouseEvent):void
     {
         viewMenuOpen = false;
     }

+    /**
+     *  @private
+     */
     private function viewMenu_resizeHandler(event:ResizeEvent):void
     {
         // Reposition the view menu?
         currentViewMenu.y = Math.ceil(getLayoutBoundsHeight() - currentViewMenu.getLayoutBoundsHeight());
     }

+    /**
+     *  @private
+     */
     private function openViewMenu():void
     {
         currentViewMenu = ViewMenu(viewMenu.newInstance());
@@ -509,6 +679,9 @@
             activeView.dispatchEvent(new Event("viewMenuOpen"));
     }

+    /**
+     *  @private
+     */
     private function closeViewMenu():void
     {
         currentViewMenu.removeEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, viewMenu_mouseDownOutsideHandler);


Change 20081210-bargull-BWb by bargull@dell--p4--2-53 on 2008-12-10 23:12:37
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: swf9 textformat, again

New Features:

Bugs Fixed: LPP-7333

Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
The last changeset made things a bit worse:
default text format was respected, but html formatting got lost...
So here's the next approach: apparently is only necessary to reset "defaultTextFormat" before setting the new htmlText, that's all.

As a bonus, I've added the implementation for "setPattern" ;-)

Tests:
testcases at bugreport

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

--- WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
@@ -306,10 +306,9 @@

             this.text = t;
             var df:TextFormat = this.textfield.defaultTextFormat;
+            // reset textformat to workaround flash player bug (FP-77)
+            this.textfield.defaultTextFormat = df;
             this.textfield.htmlText = t;
-            // reset textformat to workaround flash player bug (FP-77)
-            this.textfield.setTextFormat(df);
-            this.textfield.defaultTextFormat = df;

             if (this.resize && (this.multiline == false)) {
                 // single line resizable fields adjust their width to match the text
@@ -460,7 +459,15 @@
     this.textfield.maxChars = val;
 }

-function setPattern ( val ){}
+function setPattern (val:String) :void {
+    if (val == null || val == "") {
+        this.textfield.restrict = null;
+    } else if (new RegExp("^\\[.*\\]\\*$").test( val )) {
+        this.textfield.restrict = val.substring(1, val.length - 2);
+    } else if ($debug) {
+        Debug.warn('LzTextSprite.setPattern argument %w must be of the form "[...]*"', val);
+    }
+}

 function setSelection(start:Number, end:Number) {
     this.textfield.setSelection(start, end);


DataBindings.setProperty() is now protected and one should use DataBindings.add(IDataProvider) to add/set properties

--- src/aerys/minko/type/data/DataBindings.as
+++ src/aerys/minko/type/data/DataBindings.as
@@ -80,8 +80,8 @@
 			return _properties[index];
 		}

-		public function setProperty(propertyName	: String,
-									newValue		: Object) : DataBindings
+		private function setProperty(propertyName	: String,
+									 newValue		: Object) : DataBindings
 		{
 			if (newValue === null)
 				throw new Error("The argument 'newValue' cannot be null.");
@@ -175,37 +175,19 @@
 			return this;
 		}

-		public function clone(exclude : Vector.<String>) : DataBindings
+		public function clone(exclude : Vector.<String> = null) : DataBindings
 		{
 			var clone 			: DataBindings 	= new DataBindings();
 			var clonedBindings	: Dictionary	= clone._bindings;

 			for (var source : Object in _bindings)
 			{
-				var bindingTable 	: Object 	= _bindings[source];
-				var clonedTable		: Object	= {};
-				var excluded		: Boolean	= true;
+				var dataProvider	: IDataProvider	= source as IDataProvider;
+				var bindingTable 	: Object 		= _bindings[source];

 				for (var key : String in bindingTable)
-				{
-					if (exclude.indexOf(bindingTable[key]) < 0)
-					{
-						clonedTable[key] = bindingTable[key];
-						excluded = false;
-					}
-				}
-
-				if (!excluded)
-					clonedBindings[source] = clonedTable;
-			}
-
-			for (var propertyName : String in _values)
-			{
-				if (exclude.indexOf(propertyName) < 0)
-				{
-					clone._values[propertyName] = _values[propertyName];
-					clone._properties.push(propertyName);
-				}
+					if (exclude != null && exclude.indexOf(bindingTable[key]) < 0)
+						clone.addProperty(bindingTable[key], dataProvider, key);
 			}

 			return clone;


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 7743
Author:   clucier@adobe.com
Date:     2009-06-11T13:53:10.203664Z

Log Message:
-----------
Moving away from using namespace qualifiers in most cases in the SDK.  We've run into a few cases now where the use of qualifiers in code that is called excessively can slow things down.
Bugs: SDK-21337
Reviewer: Ryan, Paul
QE Notes: None
Tests: Ran several random Mustella test groups, checkintests.

Modified Paths:
--------------
106 paths were modified

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

--- frameworks/projects/airframework/src/mx/controls/fileSystemClasses/FileSystemDataGridNameColumnRenderer.as
+++ frameworks/projects/airframework/src/mx/controls/fileSystemClasses/FileSystemDataGridNameColumnRenderer.as
@@ -91,7 +91,7 @@
      */
     override public function get baselinePosition():Number
     {
-        if (!mx_internal::validateBaselinePosition())
+        if (!validateBaselinePosition())
             return NaN;

         return label.y + label.baselinePosition;


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

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

 package mx.validators
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 20240
Author:   smgilson@adobe.com
Date:     2011-02-09T18:21:17.142943Z

Log Message:
-----------
Because of an issue in ASDoc for handling <h2> tags, replace the <h2> with <p> and <b> tags

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

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as
@@ -70,7 +70,7 @@
  *
Transitions in DataGrid item renderers aren't supported. The GridItemRenderer class
  *  has disabled its transitions property so setting it will have no effect.

  *
- *
Efficiency Considerations

+ *
Efficiency Considerations

  *
  *
DataGrid scrolling and startup performance are directly linked
  *  to item renderer complexity and the number of item renderers that
@@ -137,11 +137,11 @@
 {
     include "../../core/Version.as";

-	//--------------------------------------------------------------------------
-	//
-	//  Static Methods
-	//
-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Static Methods
+    //
+    //--------------------------------------------------------------------------

     /**
      * If the effective value of showDataTips has changed for this column, then
@@ -162,39 +162,39 @@
         else if (dataTip && !showDataTips)
             toolTipClient.toolTip = null;
     }
-
-	/**
-	 *  Shows the tooltip for one of the grid's item renderers.
-	 *  This is the handler for the ToolTipEvent.TOOL_TIP_SHOW
-	 *  event in GridItemRenderer, DefaultGridItemRenderer, and
-	 *  UITextFieldGridItemRenderer which are installed by the corresponding
-	 *  constructors.
-	 *  The item renderer's tool tip is computed just before it is shown.
-	 *
-	 *  If the item renderer's column showDataTips property is true,
-	 *  a placeholder tool tip is registered with the tool tip manager so that
-	 *  mouse handlers are put in place to detect when the tool tip should be
-	 *  shown by calling this handler.
-	 *
-	 *  This handler replaces the placeholder text with the actual text and
-	 *  resizes the tooltip before moving it into position.
-	 *  The tip is positioned over the item renderer with the origin of the tip
-	 *  at 0, 0, after accounting for the layoutDirection of the grid.
-	 *
-	 *  The current target is expected to implement IGridItemRenderer and
-	 *  IUIComponent.
-	 */
-	static mx_internal function toolTipShowHandler(event:ToolTipEvent):void
-	{
-		var toolTip:IToolTip = event.toolTip;
-
-		const renderer:IGridItemRenderer = event.currentTarget as IGridItemRenderer;
-		if (!renderer)
-			return;
-
-		const uiComp:IUIComponent = event.currentTarget as IUIComponent;
-		if (!uiComp)
-			return;
+
+    /**
+     *  Shows the tooltip for one of the grid's item renderers.
+     *  This is the handler for the ToolTipEvent.TOOL_TIP_SHOW
+     *  event in GridItemRenderer, DefaultGridItemRenderer, and
+     *  UITextFieldGridItemRenderer which are installed by the corresponding
+     *  constructors.
+     *  The item renderer's tool tip is computed just before it is shown.
+     *
+     *  If the item renderer's column showDataTips property is true,
+     *  a placeholder tool tip is registered with the tool tip manager so that
+     *  mouse handlers are put in place to detect when the tool tip should be
+     *  shown by calling this handler.
+     *
+     *  This handler replaces the placeholder text with the actual text and
+     *  resizes the tooltip before moving it into position.
+     *  The tip is positioned over the item renderer with the origin of the tip
+     *  at 0, 0, after accounting for the layoutDirection of the grid.
+     *
+     *  The current target is expected to implement IGridItemRenderer and
+     *  IUIComponent.
+     */
+    static mx_internal function toolTipShowHandler(event:ToolTipEvent):void
+    {
+        var toolTip:IToolTip = event.toolTip;
+
+        const renderer:IGridItemRenderer = event.currentTarget as IGridItemRenderer;
+        if (!renderer)
+            return;
+
+        const uiComp:IUIComponent = event.currentTarget as IUIComponent;
+        if (!uiComp)
+            return;

         // If the renderer is partially obscured because the Grid has been
         // scrolled, we'll put the tooltip in the center of the exposed portion
@@ -213,13 +213,13 @@
         if ((rendererR.height == 0) || (rendererR.width == 0))
             return;

-		// Determine if the toolTip needs to be adjusted for RTL layout.
-		const mirror:Boolean = renderer.layoutDirection == LayoutDirection.RTL;
-
-		// Lazily compute the tooltip text and recalculate its width.
-		toolTip.text = renderer.column.itemToDataTip(renderer.data);
-		ToolTipManager.sizeTip(toolTip);
-
+        // Determine if the toolTip needs to be adjusted for RTL layout.
+        const mirror:Boolean = renderer.layoutDirection == LayoutDirection.RTL;
+
+        // Lazily compute the tooltip text and recalculate its width.
+        toolTip.text = renderer.column.itemToDataTip(renderer.data);
+        ToolTipManager.sizeTip(toolTip);
+
         // We need to position the tooltip at same x coordinate,
         // center vertically and make sure it doesn't overlap the screen.
         // Call the helper function to handle this for us.
@@ -237,7 +237,7 @@
                                                        null,
                                                        new Point(x, y));
         toolTip.move(pt.x, pt.y);
-	}
+    }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 17734
Author:   hmuller@adobe.com
Date:     2010-09-16T16:59:27.262520Z

Log Message:
-----------
Added support for explicitWidth,Height to DefaultGridItemRenderer and UITextFieldGridItemRenderer.

Although UITextField and UIFTETextField both sport explicitWidth,Height properties (but not a common class or interface that defines them) they don't automatically set these properties when you set their width,height and they reset width,height when you call setActualSize().     Since GridLayout only uses setlLayoutBounds() to resize a renderer, I set a flag there so that the concomitant calls to 'set width,height' don't also set explicitWidth,Height.

Removed the renderer constructor code that initialized the renderers actual width to 4096.   We're already dealing with that in createTypicalItemRenderer(), so the constructor code isn't needed.

QE notes: Mustella test case DataGrid_Properties_IR_WidthAll100Height needs to be updated
Doc notes:
Bugs:
Reviewer: Carol, Kevin
Tests run: checkin, mustella cyclone
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/skins/spark/UITextFieldGridItemRenderer.as
+++ frameworks/projects/spark/src/spark/skins/spark/UITextFieldGridItemRenderer.as
@@ -72,13 +72,6 @@
         wordWrap = true;
         autoSize = TextFieldAutoSize.NONE;

-        // The default width of a TextField is 100.  If autoWrap is true, and
-        // multiline is true, the measured text will wrap if it is wider than
-        // the TextField's width. This is not what we want when measuring the
-        // width of typicalItem columns that lack an explicit GridColumn width.
-
-        setActualSize(4096, NaN);  // 4096 is just an arbitrarily large value
-
         addEventListener(ToolTipEvent.TOOL_TIP_SHOW, toolTipShowHandler);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18937
Author:   deeptika@adobe.com
Date:     2010-12-02T05:19:39.830094Z

Log Message:
-----------
Adding handler only for grid click events on columnHeaderGroup and omitting events on grid.

QE notes:
Doc notes:
Bugs: FLEXENT-1379 ([BurritoFSO]Clicks on spark DG header are not getting recorded properly.)
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDataGridAutomationImpl.as

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDataGridAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDataGridAutomationImpl.as
@@ -101,7 +101,7 @@
             obj.addEventListener(GridEvent.GRID_DOUBLE_CLICK, recordAutomatableEvent, false, 0 , true);
             obj.grid.addEventListener(GridEvent.GRID_MOUSE_UP, gridMouseUpHandler, false, 1001, true);
             obj.addEventListener(GridEvent.SEPARATOR_MOUSE_UP, columnStretchHandler, false, 0, true);
-            obj.addEventListener(GridEvent.GRID_CLICK, gridClickHandler, false, 0 , true);
+            obj.columnHeaderGroup.addEventListener(GridEvent.GRID_CLICK, gridClickHandler, false, 0 , true);
             obj.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false, 0, true);
         }

@@ -867,22 +867,9 @@
             if (!Automation.automationManager || !Automation.automationManager.automationEnvironment
                 || !Automation.automationManager.recording)
                 return;
-            var gbPt:Point = event.target.localToGlobal(new Point(event.localX, event.localY));
-            var locPt:Point = grid.grid.globalToLocal(gbPt);
-
-            var item:IGridItemRenderer = grid.grid.getItemRendererAt(grid.grid.getRowIndexAt(locPt.x, locPt.y),
-                grid.grid.getColumnIndexAt(locPt.x, locPt.y)) as IGridItemRenderer;
-            if (!item)      //This means user clicked on header
-            {
-                item = grid.columnHeaderGroup.getHeaderRendererAt(event.columnIndex);
-                //DataGrid overrides displayObjectToItemRenderer to return
-                //null if the item is the active item editor, so that's
-                //not a reliable way of determining if the user clicked on a blank
-                //row or now, so use mouseEventToItemRendererOrEditor instead
-                //if (grid.mouseEventToItemRendererOrEditor(event) == null)
-                recordAutomatableEvent(event, true)
-                /*return;*/
-            }
+
+			var item:IGridItemRenderer = grid.columnHeaderGroup.getHeaderRendererAt(event.columnIndex);
+            recordAutomatableEvent(event, true);
         }

         /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/advancedgrids/src/mx/styles/metadata/FocusStyles.as
+++ frameworks/projects/advancedgrids/src/mx/styles/metadata/FocusStyles.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  Specifies the alpha transparency value of the focus skin.
+ *
+ *  @default 0.4
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="focusAlpha", type="Number", inherit="no")]
+
+/**
+ *  Specifies which corners of the focus rectangle should be rounded.
+ *  This value is a space-separated String that can contain any
+ *  combination of "tl", "tr", "bl"
+ *  and "br".
+ *  For example, to specify that the right side corners should be rounded,
+ *  but the left side corners should be square, use "tr br".
+ *  The cornerRadius style property specifies
+ *  the radius of the rounded corners.
+ *  The default value depends on the component class; if not overridden for
+ *  the class, default value is "tl tr bl br".
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="focusRoundedCorners", type="String", inherit="no")]


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

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

 package mx.managers
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

Merging in revisions 18989-19158 from hero_skin_sandbox.

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

Button
CheckBox
RadioButton
TextInput
TextArea
ActionBar
HSlider

Updating MobileSkins test project

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

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

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
@@ -17,21 +17,19 @@
 import flash.text.TextFormatAlign;

 import mx.core.DeviceDensity;
-import mx.core.UIComponent;
-import mx.core.UITextField;
 import mx.core.mx_internal;
 import mx.utils.ColorUtil;

 import spark.components.ActionBar;
 import spark.components.Group;
 import spark.components.supportClasses.StyleableTextField;
-import spark.core.IDisplayText;
 import spark.core.SpriteVisualElement;
 import spark.layouts.HorizontalAlign;
 import spark.layouts.HorizontalLayout;
 import spark.layouts.VerticalAlign;
 import spark.skins.mobile.assets.ActionBarBackground;
 import spark.skins.mobile.supportClasses.MobileSkin;
+import spark.skins.mobile320.assets.ActionBarBackground;

 use namespace mx_internal;

@@ -49,6 +47,14 @@
 {
     //--------------------------------------------------------------------------
     //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    mx_internal static const ACTIONBAR_CHROME_COLOR_RATIOS:Array = [0, 80];
+
+    //--------------------------------------------------------------------------
+    //
     //  Constructor
     //
     //--------------------------------------------------------------------------
@@ -59,11 +65,19 @@

         useChromeColor = true;

-        // common
-        borderClass = ActionBarBackground;
-
         switch (authorDensity)
         {
+            case DeviceDensity.PPI_320:
+            {
+                layoutBorderHeight = 2;
+                layoutShadowHeight = 6;
+                layoutContentGroupHeight = 86;
+                layoutTitleGroupHorizontalPadding = 26;
+
+                borderClass = spark.skins.mobile320.assets.ActionBarBackground;
+
+                break;
+            }
             case DeviceDensity.PPI_240:
             {
                 layoutBorderHeight = 1;
@@ -71,6 +85,8 @@
                 layoutContentGroupHeight = 65;
                 layoutTitleGroupHorizontalPadding = 20;

+                borderClass = spark.skins.mobile.assets.ActionBarBackground;
+
                 break;
             }
             default:
@@ -78,8 +94,10 @@
                 // default PPI160
                 layoutBorderHeight = 1;
                 layoutShadowHeight = 3;
-                layoutContentGroupHeight = 44;
+                layoutContentGroupHeight = 43;
                 layoutTitleGroupHorizontalPadding = 13;
+
+                borderClass = spark.skins.mobile.assets.ActionBarBackground;

                 break;
             }
@@ -262,8 +280,8 @@
             navigationGroupWidth = navigationGroup.getPreferredBoundsWidth();
             titleCompX += navigationGroupWidth;

-            navigationGroup.setLayoutBoundsSize(navigationGroupWidth, contentGroupsHeight);
-            navigationGroup.setLayoutBoundsPosition(0, layoutBorderHeight);
+            setElementSize(navigationGroup, navigationGroupWidth, contentGroupsHeight);
+            setElementPosition(navigationGroup, 0, layoutBorderHeight);
         }

         if (_actionVisible)
@@ -272,11 +290,12 @@
             actionGroupWidth = actionGroup.getPreferredBoundsWidth();
             actionGroupX = unscaledWidth - actionGroupWidth;

-            actionGroup.setLayoutBoundsSize(actionGroupWidth, contentGroupsHeight);
-            actionGroup.setLayoutBoundsPosition(actionGroupX, layoutBorderHeight);
+            setElementSize(actionGroup, actionGroupWidth, contentGroupsHeight);
+            setElementPosition(actionGroup, actionGroupX, layoutBorderHeight);
         }

         titleCompWidth = unscaledWidth - navigationGroupWidth - actionGroupWidth;
+
         if (titleCompWidth <= 0)
         {
             titleDisplay.visible = false;
@@ -288,8 +307,8 @@
             titleGroup.visible = true;

             // use titleGroup for titleContent
-            titleGroup.setLayoutBoundsSize(titleCompWidth, contentGroupsHeight);
-            titleGroup.setLayoutBoundsPosition(titleCompX, layoutBorderHeight);
+            setElementSize(titleGroup, titleCompWidth, contentGroupsHeight);
+            setElementPosition(titleGroup, titleCompX, layoutBorderHeight);
         }
         else
         {
@@ -303,7 +322,7 @@

             // vertical align center by subtracting the descent and top gutter
             titleHeight = titleDisplay.getExplicitOrMeasuredHeight();
-            titleCompY = Math.round((contentGroupsHeight - titleHeight - UITextField.TEXT_HEIGHT_PADDING + titleDisplay.descent) / 2);
+            titleCompY = Math.round((contentGroupsHeight - titleHeight + titleDisplay.descent - StyleableTextField.TEXT_HEIGHT_PADDING) / 2);

             // align titleDisplay to the absolute center
             var titleAlign:String = getStyle("titleAlign");
@@ -370,8 +389,8 @@
             // check for negative width
             titleCompWidth = (titleCompWidth < 0) ? 0 : titleCompWidth;

-            titleDisplay.setLayoutBoundsSize(titleCompWidth, titleHeight);
-            titleDisplay.setLayoutBoundsPosition(titleCompX, titleCompY);
+            setElementSize(titleDisplay, titleCompWidth, titleHeight);
+            setElementPosition(titleDisplay, titleCompX, titleCompY);

             titleDisplay.visible = true;
         }
@@ -388,16 +407,15 @@

         // apply alpha to border and chromeColor
         border.alpha = backgroundAlphaValue;
-        var backgroundAlphas:Array = [backgroundAlphaValue, backgroundAlphaValue, backgroundAlphaValue];
+        var backgroundAlphas:Array = [backgroundAlphaValue, backgroundAlphaValue];

         // exclude top and bottom 1px borders
         matrix.createGradientBox(unscaledWidth, unscaledHeight - (layoutBorderHeight * 2), Math.PI / 2, 0, 0);

         colors[0] = ColorUtil.adjustBrightness2(chromeColor, 20);
         colors[1] = chromeColor;
-        colors[2] = ColorUtil.adjustBrightness2(chromeColor, -20);
-
-        chromeColorGraphics.beginGradientFill(GradientType.LINEAR, colors, backgroundAlphas, ratios, matrix);
+
+        chromeColorGraphics.beginGradientFill(GradientType.LINEAR, colors, backgroundAlphas, ACTIONBAR_CHROME_COLOR_RATIOS, matrix);
     }

     override protected function drawChromeColor(chromeColorGraphics:Graphics, unscaledWidth:Number, unscaledHeight:Number):void
@@ -412,7 +430,6 @@
 import flash.text.TextLineMetrics;

 import mx.core.UIComponent;
-import mx.core.UITextField;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;

@@ -507,7 +524,7 @@
             // ignore text width...we just need textHeight, but we need to use
             // measureText("Wj") to figure this out
             var lineMetrics:TextLineMetrics = measureText("Wj");
-            textHeight = measureText("Wj").height + UITextField.TEXT_HEIGHT_PADDING;
+            textHeight = lineMetrics.height + StyleableTextField.TEXT_HEIGHT_PADDING;
             descent = lineMetrics.descent;
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12664
Author:   mhorn@adobe.com
Date:     2009-12-08T20:39:06.119601Z

Log Message:
-----------
asdoc updates; new examples; updated examples; bug fixes

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/primitives/examples/RectangularDropShadowExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/primitives/examples/LineExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Graphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/StrokedElement.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as
+++ frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as
@@ -28,10 +28,12 @@
      *
Once those 8 values have been set,
      *  this class pre-computes the drop shadow in an offscreen Bitmap.
      *  When the drawShadow() method is called, pieces of the
-     *  precomputed drop shadow are  copied onto the passed-in Graphics object.

+     *  precomputed drop shadow are copied onto the passed-in Graphics object.

      *
-     *  @see flash.filters.DropShadowFilter
+     *  @see spark.filters.DropShadowFilter
      *  @see flash.display.DisplayObject
+     *
+     *  @includeExample examples/RectangularDropShadowExample.mxml
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -92,7 +94,7 @@
         [Inspectable]

         /**
-         *  @copy flash.filters.DropShadowFilter#alpha
+         *  @copy spark.filters.DropShadowFilter#alpha
          *
          *  @langversion 3.0
          *  @playerversion Flash 10
@@ -129,7 +131,7 @@
         [Inspectable]

         /**
-         *  @copy flash.filters.DropShadowFilter#angle
+         *  @copy spark.filters.DropShadowFilter#angle
          *
          *  @langversion 3.0
          *  @playerversion Flash 10
@@ -166,7 +168,7 @@
         [Inspectable]

         /**
-         *  @copy flash.filters.DropShadowFilter#color
+         *  @copy spark.filters.DropShadowFilter#color
          *
          *  @langversion 3.0
          *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

Revision: 13139
Author:   deeptika@adobe.com
Date:     2009-12-22T05:23:01.140202Z

Log Message:
-----------
Removing warnings. Returning false now instead of null for a method where boolean return type is expected.

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/automation_flashflexkit/src/mx/automation/delegates/flashflexkit/UIMovieClipAutomationImpl.as

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

--- frameworks/projects/automation_flashflexkit/src/mx/automation/delegates/flashflexkit/UIMovieClipAutomationImpl.as
+++ frameworks/projects/automation_flashflexkit/src/mx/automation/delegates/flashflexkit/UIMovieClipAutomationImpl.as
@@ -148,31 +148,33 @@
 		//---------------------------------
 		public function get automationEnabled():Boolean
 		{
+			trace("Reading should not be done here");
+			return false;
+		}
+
+		//---------------------------------
+		//  automationOwner
+		//---------------------------------
+		public function get automationOwner():DisplayObjectContainer
+		{
 			return null;
 		}

 		//---------------------------------
-		//  automationOwner
-		//---------------------------------
-		public function get automationOwner():DisplayObjectContainer
+		//  automationParent
+		//---------------------------------
+		public function get automationParent():DisplayObjectContainer
 		{
 			return null;
 		}

 		//---------------------------------
-		//  automationParent
-		//---------------------------------
-		public function get automationParent():DisplayObjectContainer
-		{
-			return null;
-		}
-
-		//---------------------------------
 		//  automationVisible
 		//---------------------------------
 		public function get automationVisible():Boolean
 		{
-			return null;
+			trace("Reading should not be done here");
+			return false;
 		}

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


Code clean

Code clean

--- collect-client/src/main/flex/org/openforis/collect/presenter/DetailPresenter.as
+++ collect-client/src/main/flex/org/openforis/collect/presenter/DetailPresenter.as
@@ -83,10 +83,10 @@
 			var canReject:Boolean = !preview && user.canReject(activeRecord);
 			var canSave:Boolean = !preview && Application.activeRecordEditable;

+			_view.header.visible = _view.header.includeInLayout = !preview;
 			_view.submitButton.visible = _view.submitButton.includeInLayout = canSubmit;
 			_view.rejectButton.visible = _view.rejectButton.includeInLayout = canReject;
 			_view.saveButton.visible = canSave;
-			_view.backToListButton.enabled = !preview;

 			var form:FormContainer = null;
 			if (_view.formsContainer.contatinsForm(version,rootEntityDefn)){
@@ -251,7 +251,9 @@
 		}

 		protected function stageKeyDownHandler(event:KeyboardEvent):void {
-			if ( Application.activeRecordEditable && event.ctrlKey && event.keyCode == Keyboard.S ) {
+			//save record pressing CTRL + s
+			if ( !Application.preview && Application.activeRecordEditable &&
+					event.ctrlKey && event.keyCode == Keyboard.S ) {
 				performSaveActiveRecord();
 			}
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19786
Author:   clucier@adobe.com
Date:     2011-01-17T21:50:08.259241Z

Log Message:
-----------
AnimateTransform based effects now overlay properly in parallel effects.

QE notes: None
Doc notes: None
Bugs: SDK-29032
Reviewer: Jason S.
Tests run: Cyclone Server
Is noteworthy for integration: None

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Scale.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Move3D.as
+++ frameworks/projects/spark/src/spark/effects/Move3D.as
@@ -328,19 +328,20 @@
      * @private
      */
    override protected function initInstance(instance:IEffectInstance):void
-    {
-        if (!applyChangesPostLayout)
-        {
-            addMotionPath("translationX", xFrom, xTo, xBy);
-            addMotionPath("translationY", yFrom, yTo, yBy);
-            addMotionPath("translationZ", zFrom, zTo, zBy);
-        }
-        else
-        {
-            addMotionPath("postLayoutTranslationX", xFrom, xTo, xBy);
-            addMotionPath("postLayoutTranslationY", yFrom, yTo, yBy);
-            addMotionPath("postLayoutTranslationZ", zFrom, zTo, zBy);
-        }
+    {
+        var xProp:String = applyChangesPostLayout ? "postLayoutTranslationX" : "translationX";
+        var yProp:String = applyChangesPostLayout ? "postLayoutTranslationY" : "translationY";
+        var zProp:String = applyChangesPostLayout ? "postLayoutTranslationZ" : "translationZ";
+
+        if (!(isNaN(xFrom) && isNaN(xTo) && isNaN(xBy)))
+            addMotionPath(xProp, xFrom, xTo, xBy);
+
+        if (!(isNaN(yFrom) && isNaN(yTo) && isNaN(yBy)))
+            addMotionPath(yProp, yFrom, yTo, yBy);
+
+        if (!(isNaN(zFrom) && isNaN(zTo) && isNaN(zBy)))
+            addMotionPath(zProp, zFrom, zTo, zBy);
+
         super.initInstance(instance);
     }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12363
Author:   cframpto@adobe.com
Date:     2009-12-02T14:40:10.582696Z

Log Message:
-----------
Add back support for mask, luminosityClip, and luminosityInvert which was lost when RichText was changed from a GraphicElement to a UIComponent.

QE notes:
Doc notes:
Bugs: SDK-23930
Reviewer: Deepa
Tests run: checkintests, fxg, primitives
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/MaskUtil.as</path>

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

--- frameworks/projects/spark/src/spark/utils/MaskUtil.as
+++ frameworks/projects/spark/src/spark/utils/MaskUtil.as
@@ -0,0 +1,192 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.utils
+{
+
+import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.filters.ShaderFilter;
+
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.graphics.shaderClasses.LuminosityMaskShader;
+import mx.graphics.shaderClasses.LuminosityShader;
+
+import spark.core.MaskType;
+
+use namespace mx_internal;
+
+/**
+ *  This class provides mask-related utility functions
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class MaskUtil
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Apply the luminosity settings to the mask.
+     */
+       mx_internal static function applyLuminositySettings(
+                        mask:DisplayObject, maskType:String,
+                        luminosityInvert:Boolean, luminosityClip:Boolean):void
+    {
+        if (!mask || maskType != MaskType.LUMINOSITY || mask.filters.length == 0)
+            return;
+
+        // Grab the shader filter
+        var shaderFilterIndex:int;
+        var shaderFilter:ShaderFilter;
+        var len:int = mask.filters.length;
+        for (shaderFilterIndex = 0; shaderFilterIndex < len;
+             shaderFilterIndex++)
+        {
+            if (mask.filters[shaderFilterIndex] is ShaderFilter &&
+                ShaderFilter(mask.filters[shaderFilterIndex]).shader
+                    is LuminosityMaskShader)
+            {
+                shaderFilter = mask.filters[shaderFilterIndex];
+                break;
+            }
+        }
+
+        if (shaderFilter)
+        {
+            // Reset the mode property
+            LuminosityMaskShader(shaderFilter.shader).mode =
+                calculateLuminositySettings(luminosityInvert, luminosityClip);
+
+            // Re-apply the filter to the mask
+            mask.filters[shaderFilterIndex] = shaderFilter;
+            mask.filters = mask.filters;
+        }
+    }
+
+    /**
+     *  @private
+     *  Make sure the mask has a parent and force the mask to size itself.
+     */
+    mx_internal static function applyMask(mask:DisplayObject,
+                                          parent:DisplayObjectContainer):void
+    {
+        if (!mask)
+            return;
+
+        // If the mask is not parented, then we need to parent it.
+        if (!mask.parent)
+        {
+            var maskComp:UIComponent = mask as UIComponent;
+            if (maskComp)
+            {
+                if (parent)
+                {
+                    // Add the mask to the UIComponent document tree.
+                    // This is required to properly render the mask.
+                    UIComponent(parent).addingChild(maskComp);
+                    UIComponent(parent).childAdded(maskComp);
+                }
+
+                // Size the mask so that it actually renders
+                maskComp.validateProperties();
+                maskComp.validateSize();
+
+                // Call this to force the mask to complete initialization
+                maskComp.invalidateDisplayList();
+                maskComp.setActualSize(maskComp.getExplicitOrMeasuredWidth(),
+                    maskComp.getExplicitOrMeasuredHeight());
+            }
+        }
+    }
+
+    /**
+     *  @private
+     *  Enables clipping, alpha or luminosity, depending on the
+     *  type of mask being applied.
+     */
+    mx_internal static function applyMaskType(
+                                    mask:DisplayObject,
+                                    maskType:String,
+                                    luminosityInvert:Boolean,
+                                    luminosityClip:Boolean,
+                                    drawnDisplayObject:DisplayObject):void
+    {
+        if (!mask)
+            return;
+
+        if (maskType == MaskType.CLIP)
+        {
+            // Turn off caching on mask
+            mask.cacheAsBitmap = false;
+            mask.filters = [];
+        }
+        else if (maskType == MaskType.ALPHA)
+        {
+            mask.cacheAsBitmap = true;
+            drawnDisplayObject.cacheAsBitmap = true;
+        }
+        else if (maskType == MaskType.LUMINOSITY)
+        {
+            mask.cacheAsBitmap = true;
+            drawnDisplayObject.cacheAsBitmap = true;
+
+            // Create the shader wrapper class which wraps the pixel bender
+            // filter.
+            var luminosityMaskShader:LuminosityMaskShader =
+                new LuminosityMaskShader();
+
+            // Sets up the shader's mode property based on
+            // whether the luminosityClip and
+            // luminosityInvert properties are on or off.
+            luminosityMaskShader.mode =
+                calculateLuminositySettings(luminosityInvert, luminosityClip);
+
+            // Create the shader filter
+            var shaderFilter:ShaderFilter =
+                new ShaderFilter(luminosityMaskShader);
+
+            // Apply the shader filter to the mask
+            mask.filters = [shaderFilter];
+        }
+    }
+
+    /**
+     *  @private
+     *  Calculates the luminosity mask shader's mode property which
+     *  determines how the shader is drawn.
+     */
+    private static function calculateLuminositySettings(
+                                            luminosityInvert:Boolean,
+                                            luminosityClip:Boolean):int
+    {
+        var mode:int = 0;
+
+        if (luminosityInvert)
+            mode += 1;
+
+        if (luminosityClip)
+            mode += 2;
+
+        return mode;
+    }
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 22564
Author:   tkraikit@adobe.com
Date:     2011-09-14T19:50:07.656843Z

Log Message:
-----------
Update ASDoc "@productversion Flex 4.5.2" => "@productversion Flex 4.6"

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/OnDemandDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ContentBackgroundAppearance.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/FlexVersion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ArrowDirection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/FormatPattern.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentNavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/core/ISoftKeyboardHintClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/CalloutArrow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/YearProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/calendarClasses/DateSelectorDisplayMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListScrollerSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/ScrollSnappingMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImageSource.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/NumericDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateSpinnerItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/CalendarDate.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
@@ -38,7 +38,7 @@
  *
  *  @langversion 3.0
  *  @playerversion AIR 3
- *  @productversion Flex 4.5.2
+ *  @productversion Flex 4.6
  */
 [SkinState("portrait")]

@@ -48,7 +48,7 @@
  *
  *  @langversion 3.0
  *  @playerversion AIR 3
- *  @productversion Flex 4.5.2
+ *  @productversion Flex 4.6
  */
 [SkinState("landscape")]


Transferred from the Adobe Open Source Subversion Repository

Revision: 12368
Author:   dsubrama@adobe.com
Date:     2009-12-02T16:37:28.078960Z

Log Message:
-----------
Rename spark.components.supportClasses.Slider to spark.components.supportClasses.SliderBase as well as spark.components.supportClasses.ScrollBar to spark.components.supportClasses.ScrollBarBase. This means the spark manifest entries have also changed (for CSS styling purposes, not for use as mxml tags) (Slider -> SliderBase, ScrollBar -> ScrollBarBase).

Change is PARB approved.

QE notes: Please check-in the updated tests
Doc notes: ASDoc has been updated. If any updates need to happen in livedocs, please do so.
Bugs: SDK-24401
Reviewer: Ryan/Jason
Tests run: Jacob ran a cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as" copyfrom-rev="12283" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SliderAccImpl.as" copyfrom-rev="12283" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SliderBaseAccImpl.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as" copyfrom-rev="12283" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SliderAccImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/sparkTest/src/components/CircularScrollBar.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
@@ -86,7 +86,7 @@
      */
     private function get hsbVisible():Boolean
     {
-        var hsb:ScrollBar = getScroller().horizontalScrollBar;
+        var hsb:ScrollBarBase = getScroller().horizontalScrollBar;
         return hsb && hsb.visible;
     }

@@ -98,7 +98,7 @@
      */
     private function set hsbVisible(value:Boolean):void
     {
-        var hsb:ScrollBar = getScroller().horizontalScrollBar;
+        var hsb:ScrollBarBase = getScroller().horizontalScrollBar;
         if (!hsb)
             return;

@@ -134,7 +134,7 @@
     {
         var scroller:Scroller = getScroller();
         var minViewportInset:Number = scroller.minViewportInset;
-        var hsb:ScrollBar = scroller.horizontalScrollBar;
+        var hsb:ScrollBarBase = scroller.horizontalScrollBar;
         var sy:Number = (hsbVisible) ? 1 : hsbScaleY;
         return Math.max(minViewportInset, hsb.getPreferredBoundsHeight(hsbVisible) * sy);
     }
@@ -152,11 +152,11 @@
     {
         if (vsbVisible && includeVSB)
         {
-            var vsb:ScrollBar = getScroller().verticalScrollBar;
+            var vsb:ScrollBarBase = getScroller().verticalScrollBar;
             w -= vsb.getPreferredBoundsWidth();
             h -= vsb.getMinBoundsHeight();
         }
-        var hsb:ScrollBar = getScroller().horizontalScrollBar;
+        var hsb:ScrollBarBase = getScroller().horizontalScrollBar;
         return (w >= hsb.getMinBoundsWidth()) && (h >= hsb.getPreferredBoundsHeight());
     }

@@ -172,7 +172,7 @@
      */
     private function get vsbVisible():Boolean
     {
-        var vsb:ScrollBar = getScroller().verticalScrollBar;
+        var vsb:ScrollBarBase = getScroller().verticalScrollBar;
         return vsb && vsb.visible;
     }

@@ -182,7 +182,7 @@
      */
     private function set vsbVisible(value:Boolean):void
     {
-        var vsb:ScrollBar = getScroller().verticalScrollBar;
+        var vsb:ScrollBarBase = getScroller().verticalScrollBar;
         if (!vsb)
             return;

@@ -218,7 +218,7 @@
     {
         var scroller:Scroller = getScroller();
         var minViewportInset:Number = scroller.minViewportInset;
-        var vsb:ScrollBar = scroller.verticalScrollBar;
+        var vsb:ScrollBarBase = scroller.verticalScrollBar;
         var sx:Number = (vsbVisible) ? 1 : vsbScaleX;
         return Math.max(minViewportInset, vsb.getPreferredBoundsWidth(vsbVisible) * sx);
     }
@@ -236,11 +236,11 @@
     {
         if (hsbVisible && includeHSB)
         {
-            var hsb:ScrollBar = getScroller().horizontalScrollBar;
+            var hsb:ScrollBarBase = getScroller().horizontalScrollBar;
             w -= hsb.getMinBoundsWidth();
             h -= hsb.getPreferredBoundsHeight();
         }
-        var vsb:ScrollBar = getScroller().verticalScrollBar;
+        var vsb:ScrollBarBase = getScroller().verticalScrollBar;
         return (w >= vsb.getPreferredBoundsWidth()) && (h >= vsb.getMinBoundsHeight());
     }

@@ -267,7 +267,7 @@
         var measuredW:Number = minViewportInset;
         var measuredH:Number = minViewportInset;

-        const hsb:ScrollBar = scroller.horizontalScrollBar;
+        const hsb:ScrollBarBase = scroller.horizontalScrollBar;
         var showHSB:Boolean = false;
         var hAuto:Boolean = false;
         if (measuredSizeIncludesScrollBars)
@@ -282,7 +282,7 @@
                     break;
             }

-        const vsb:ScrollBar = scroller.verticalScrollBar;
+        const vsb:ScrollBarBase = scroller.verticalScrollBar;
         var showVSB:Boolean = false;
         var vAuto:Boolean = false;
         if (measuredSizeIncludesScrollBars)
@@ -384,8 +384,8 @@
             return;

         var viewport:IViewport = scroller.viewport;
-        var hsb:ScrollBar = scroller.horizontalScrollBar;
-        var vsb:ScrollBar = scroller.verticalScrollBar;
+        var hsb:ScrollBarBase = scroller.horizontalScrollBar;
+        var vsb:ScrollBarBase = scroller.verticalScrollBar;
         var minViewportInset:Number = scroller.minViewportInset;

         var contentW:Number = 0;


Transferred from the Adobe Open Source Subversion Repository

Revision: 14421
Author:   cframpto@adobe.com
Date:     2010-02-25T17:58:57.809794Z

Log Message:
-----------
Merge from 4.x mirroring PARB changes 14331, 14337, 14338.
Merge 14401 to fix clipping issue for right-aligned RichEditableText which had x < 0.
Merge 14402 to fix textAlignment issues for text with direction="rtl" for UIFTETextField and UITextField.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/FTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -2855,14 +2855,14 @@
 	//  layoutDirection
 	//----------------------------------

-	private var _layoutDirection:String = "inherit";
+	private var _layoutDirection:String = null;

     /**
      *  @inheritDoc
      */
     public function get layoutDirection():String
 	{
-        if (_layoutDirection != "inherit")
+        if (_layoutDirection != null)
             return _layoutDirection;

         const parentElt:IVisualElement = parent as IVisualElement;
@@ -2894,7 +2894,7 @@
         // set the layoutFeatures.mirror flag.  Similarly, if mirroring isn't
         // required, then clear the layoutFeatures.mirror flag.

-        const mirror:Boolean = (_layoutDirection != "inherit") && (_layoutDirection != parentElt.layoutDirection);
+        const mirror:Boolean = (_layoutDirection != null) && (_layoutDirection != parentElt.layoutDirection);
         if ((layoutFeatures) ? (mirror != layoutFeatures.mirror) : mirror)
         {
             if (layoutFeatures == null)