Transferred from the Adobe Open Source Subversion Repository

Revision: 4490
Author:   matamel@adobe.com
Date:     2009-01-12T22:20:27.365035Z

Log Message:
-----------
Bug: BLZ-300 - NPE in ServerConfig.as
QA: Yes
Doc: No
Checkintests: Pass

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as

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

--- frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as
+++ frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as
@@ -37,9 +37,9 @@
 /**
  *  This class provides access to the server messaging configuration information.
  *  This class encapsulates information from the services-config.xml file on the client
- *  and is used by the messaging system to provide configured ChannelSets and Channels
+ *  and is used by the messaging system to provide configured ChannelSets and Channels
  *  to the messaging framework.
- *
+ *
  *  <p>The XML source is provided during the compilation process.
  *  However, there is currently no internal restriction preventing the
  *  acquisition of this XML data by other means, such as network, local file
@@ -50,7 +50,7 @@
     //--------------------------------------------------------------------------
     //
     // Static Constants
-    //
+    //
     //--------------------------------------------------------------------------

     /**
@@ -68,7 +68,7 @@
     //--------------------------------------------------------------------------
     //
     // Class variables
-    //
+    //
     //--------------------------------------------------------------------------

     /**
@@ -79,7 +79,7 @@
      *  that the Singleton registry has already been initialized.
      */
     private static var _resourceManager:IResourceManager;
-
+
     /**
      *  @private
      *  A reference to the object which manages
@@ -98,7 +98,7 @@
     //--------------------------------------------------------------------------
     //
     // Static Variables
-    //
+    //
     //--------------------------------------------------------------------------

     /**
@@ -106,39 +106,39 @@
      *  The server configuration data.
      */
     public static var serverConfigData:XML;
-
+
     /**
      *  @private
      *  Caches shared ChannelSets, keyed by strings having the format:
-     *  <list of comma delimited channel ids>:[true|false] - where the final
+     *  <list of comma delimited channel ids>:[true|false] - where the final
      *  flag indicates whether the ChannelSet should be used for clustered
      *  destinations or not.
      */
     private static var _channelSets:Object = {};
-
+
     /**
      *  @private
      *  Caches shared clustered Channel instances keyed by Channel id.
      */
     private static var _clusteredChannels:Object = {};
-
-    /**
-     *  @private
+
+    /**
+     *  @private
      *  Caches shared unclustered Channel instances keyed by Channel id.
      */
-    private static var _unclusteredChannels:Object = {};
-
-    /**
+    private static var _unclusteredChannels:Object = {};
+
+    /**
      * @private
-     * Keeps track of Channel endpoint uris whose configuration has been fetched
-     * from the server.
+     * Keeps track of Channel endpoint uris whose configuration has been fetched
+     * from the server.
      */
     private static var _configFetchedChannels:Object;
-
+
     //--------------------------------------------------------------------------
     //
     // Static Properties
-    //
+    //
     //--------------------------------------------------------------------------

     //----------------------------------
@@ -167,11 +167,11 @@
         _clusteredChannels = {};
         _unclusteredChannels = {};
     }
-
+
     //----------------------------------
     //  channelSetFactory
     //----------------------------------
-
+
     /**
      *  @private
      *  A Class factory to use to generate auto-instantiated ChannelSet instances
@@ -179,25 +179,25 @@
      *  Default factory is the base ChannelSet class.
      */
     public static var channelSetFactory:Class = ChannelSet;
-
+
     //--------------------------------------------------------------------------
     //
     // Static Methods
-    //
-    //--------------------------------------------------------------------------
-
+    //
+    //--------------------------------------------------------------------------
+
     /**
      *  This method ensures that the destinations specified contain identical
      *  channel definitions.
      *  If the channel definitions between the two destinations specified are
      *  not identical this method will throw an ArgumentError.
-     *
+     *
      *  @param   destinationA:String first destination to compare against
      *  @param   destinationB:String second destination to compare channels with
-     *  @throw   ArgumentError if the channel definitions of the specified
+     *  @throw   ArgumentError if the channel definitions of the specified
      *           destinations aren't identical.
      */
-    public static function checkChannelConsistency(destinationA:String,
+    public static function checkChannelConsistency(destinationA:String,
                                                    destinationB:String):void
     {
         var channelIdsA:Array = getChannelIdList(destinationA);
@@ -205,20 +205,20 @@
         if (ObjectUtil.compare(channelIdsA, channelIdsB) != 0)
             throw new ArgumentError("Specified destinations are not channel consistent");
     }
-
+
     /**
      *  Returns a shared instance of the configured Channel.
      *
      *  @param id The id of the desired Channel.
-     *
+     *
      *  @param clustered True if the Channel will be used in a clustered
      *                   fashion; otherwise false.
-     *
+     *
      *  @return The Channel instance.
-     *
+     *
      *  @throws mx.messaging.errors.InvalidChannelError If no Channel has the specified id.
      */
-    public static function getChannel(id:String,
+    public static function getChannel(id:String,
                                       clustered:Boolean = false):Channel
     {
         var channel:Channel;
@@ -227,7 +227,7 @@
         {
             if (id in _unclusteredChannels)
             {
-                return _unclusteredChannels[id];
+                return _unclusteredChannels[id];
             }
             else
             {
@@ -250,38 +250,38 @@
             }
         }
     }
-
+
     /**
      *  Returns a shared ChannelSet for use with the specified destination
      *  belonging to the service that handles the specified message type.
-     *
-     *  @param destinationId The target destination id.
-     *
+     *
+     *  @param destinationId The target destination id.
+     *
      *  @return The ChannelSet.
-     *
+     *
      *  @throws mx.messaging.errors.InvalidDestinationError If the specified destination
      *                                  does not have channels and the application
      *                                  did not define default channels.
      */
     public static function getChannelSet(destinationId:String):ChannelSet
-    {
-        var destinationConfig:XML = getDestinationConfig(destinationId);
+    {
+        var destinationConfig:XML = getDestinationConfig(destinationId);
         return internalGetChannelSet(destinationConfig, destinationId);
     }
-
+
     /**
      *  Returns the property information for the specified destination
      *
      *  @param destinationId The id of the desired destination.
-     *
+     *
      *  @return XMLList containing the <property> tag information.
-     *
+     *
      *  @throws mx.messaging.errors.InvalidDestinationError If the specified destination is not found.
      */
     public static function getProperties(destinationId:String):XMLList
     {
         var destination:XMLList = xml..destination.(@id == destinationId);
-
+
         if (destination.length() > 0)
         {
             return destination.properties;
@@ -292,16 +292,16 @@
                 "messaging", "unknownDestination", [ destinationId ]);
             throw new InvalidDestinationError(message);
         }
-
+
         return destination;
     }
-
+
     //--------------------------------------------------------------------------
     //
     // Static Internal Methods
-    //
-    //--------------------------------------------------------------------------
-
+    //
+    //--------------------------------------------------------------------------
+
     /**
      *  This method returns true iff the channelset specified has channels with
      *  ids or uris that match those found in the destination specified.
@@ -313,15 +313,15 @@
         {
             if (ObjectUtil.compare(channelSet.channelIds, getChannelIdList(destination)) == 0)
                 return true;
-
-            // if any of the specified channelset channelIds do not match then
+
+            // if any of the specified channelset channelIds do not match then
             // we have to move to comparing the uris, as the ids could be null
             // in the specified channelset.
             var csUris:Array = [];
             var csChannels:Array = channelSet.channels;
             for (var i:uint = 0; i<csChannels.length; i++)
                 csUris.push(csChannels[i].uri);
-
+
             var ids:Array = getChannelIdList(destination);
             var dsUris:Array = [];
             var dsChannels:XMLList;
@@ -329,16 +329,16 @@
             for (var j:uint = 0; j<ids.length; j++)
             {
                 dsChannels = xml.channels.channel.(@id == ids[j]);
-                channelConfig = dsChannels[0];
+                channelConfig = dsChannels[0];
                 dsUris.push(channelConfig.endpoint[0].attribute(URI_ATTR).toString());
             }
-
+
             return ObjectUtil.compare(csUris, dsUris) == 0;
-
+
         }
         return false;
     }
-
+
     /**
      * @private
      * returns if the specified endpoint has been fetched already
@@ -347,27 +347,27 @@
     {
         return _configFetchedChannels != null && _configFetchedChannels[endpoint] != null;
     }
-
+
     /**
      *  @private
      *  This method returns a list of the channel ids for the given destination
-     *  configuration. If no channels exist for the destination, it returns a
+     *  configuration. If no channels exist for the destination, it returns a
      *  list of default channel ids for the applcation
      */
     mx_internal static function getChannelIdList(destination:String):Array
-    {
-         var destinationConfig:XML = getDestinationConfig(destination);
-        return destinationConfig? getChannelIds(destinationConfig)
+    {
+         var destinationConfig:XML = getDestinationConfig(destination);
+        return destinationConfig? getChannelIds(destinationConfig)
                                         : getDefaultChannelIds();
     }

     /**
-     *  @private
-     *  Used by the Channels to determine whether the Channel should request
-     *  dynamic configuration from the server for its MessageAgents.
-     */
+     *  @private
+     *  Used by the Channels to determine whether the Channel should request
+     *  dynamic configuration from the server for its MessageAgents.
+     */
     mx_internal static function needsConfig(channel:Channel):Boolean
-    {
+    {
         // Configuration for the endpoint has not been fetched by some other channel.
         if (_configFetchedChannels == null || _configFetchedChannels[channel.endpoint] == null)
         {
@@ -377,55 +377,55 @@
             {
                 // If the channel belongs to an advanced ChannelSet, always fetch runtime config.
                 if (getQualifiedClassName(channelSets[i]).indexOf("Advanced") != -1)
-                    return true;
-
+                    return true;
+
                 // Otherwise, only fetch if a connected MessageAgent requires it.
                 var messageAgents:Array = ChannelSet(channelSets[i]).messageAgents;
                 var n:int = messageAgents.length;
                 for (var j:int = 0; j < n; j++)
                 {
                     if (MessageAgent(messageAgents[j]).needsConfig)
-                        return true;
-                }
-            }
-        }
-        return false;
-    }
-
+                        return true;
+                }
+            }
+        }
+        return false;
+    }
+
     /**
      *  @private
      *  This method updates the xml with serverConfig object returned from the
      *  server during initial client connect
      */
      mx_internal static function updateServerConfigData(serverConfig:ConfigMap, endpoint:String = null):void
-     {
-        if (serverConfig != null)
-        {
+     {
+        if (serverConfig != null)
+        {
             if (endpoint != null)
             {
-                // Add the endpoint uri to the list of uris whose configuration
+                // Add the endpoint uri to the list of uris whose configuration
                 // has been fetched.
                 if (_configFetchedChannels == null)
                     _configFetchedChannels = {};
-
+
                 _configFetchedChannels[endpoint] = true;
             }
-
-            var newServices:XML = <services></services>;
+
+            var newServices:XML = <services></services>;
             convertToXML(serverConfig, newServices);
-
-            // Update default-channels of the application
-            xml["default-channels"] = newServices["default-channels"];
-
+
+            // Update default-channels of the application
+            xml["default-channels"] = newServices["default-channels"];
+
             // Update the services
             for each (var newService:XML in newServices..service)
-            {
+            {
                 var oldServices:XMLList = xml.service.(@id == newService.@id);
                 if (oldServices.length() != 0)
-                {
+                {
                     // Assuming only one service exists with the id
                     var oldService:XML = oldServices[0];
-
+
                     // Update destinations
                     for each (var newDestination:XML in newService..destination)
                     {
@@ -433,28 +433,28 @@
                         if (oldDestinations.length() != 0)
                         {
                             // Assuming only one destination exists with the id
-                            delete oldDestinations[0];
+                            delete oldDestinations[0];
                         }
                         oldService.appendChild(newDestination);
                     }
                 }
                 else
                 {
-                    xml.appendChild(newService);
-                }
-            }
-
+                    xml.appendChild(newService);
+                }
+            }
+
             // Update the channels
             var newChannels:XMLList = newServices.channels;
             if (newChannels.length() > 0)
-            {
-                   var oldChannels:XML = xml.channels[0];
-                if (oldChannels == null || oldChannels.length() == 0)
+            {
+                   var oldChannels:XML = xml.channels[0];
+                if (oldChannels == null || oldChannels.length() == 0)
                 {
                     xml.appendChild(newChannels);
                 }
                 // Commenting this section out as there is no real use case
-                // for updating channel definitions.
+                // for updating channel definitions.
                 /*
                 else
                 {
@@ -464,37 +464,37 @@
                         if (oldChannel.length() > 0)
                         {
                             // Assuming only one channel exists with the same id.
-                            delete oldChannel[0];
+                            delete oldChannel[0];
                         }
-                        oldChannels.appendChild(newChannel);
+                        oldChannels.appendChild(newChannel);
                     }
                 }
                 */
-            }
+            }
         }
      }
-
+
     //--------------------------------------------------------------------------
     //
     // Static Private Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  Helper method that builds a new Channel instance based on the
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Helper method that builds a new Channel instance based on the
      *  configuration for the specified id.
-     *
+     *
      *  @param id The id for the configured Channel to build.
-     *
+     *
      *  @return The Channel instance.
-     *
+     *
      *  @throws mx.messaging.errors.InvalidChannelError If no configuration data for the specified
      *                             id exists.
      */
     private static function createChannel(channelId:String):Channel
     {
         var message:String;
-
+
         var channels:XMLList = xml.channels.channel.(@id == channelId);
         if (channels.length() == 0)
         {
@@ -502,8 +502,8 @@
                 "messaging", "unknownChannelWithId", [ channelId ]);
             throw new InvalidChannelError(message);
         }
-
-        var channelConfig:XML = channels[0];
+
+        var channelConfig:XML = channels[0];
         var className:String = channelConfig.attribute(CLASS_ATTR).toString();
         var uri:String = channelConfig.endpoint[0].attribute(URI_ATTR).toString();
         var channel:Channel = null;
@@ -512,15 +512,11 @@
             var channelClass:Class = getDefinitionByName(className) as Class;
             channel = new channelClass(channelId, uri);
             channel.applySettings(channelConfig);
-
-            // WSRP support
-            // If we have an WSRP_ENCODED_CHANNEL in FlashVars,
+
+            // If we have an WSRP_ENCODED_CHANNEL in FlashVars,
             // use that instead of uri configured in the config file
-            if (LoaderConfig.parameters.WSRP_ENCODED_CHANNEL != null)
-            {
+            if (LoaderConfig.parameters != null && LoaderConfig.parameters.WSRP_ENCODED_CHANNEL != null)
                 channel.url = LoaderConfig.parameters.WSRP_ENCODED_CHANNEL;
-                //trace("Using WSRP_ENCODED_CHANNEL: " + channel.url);
-            }
         }
         catch(e:ReferenceError)
         {
@@ -530,21 +526,21 @@
         }
         return channel;
     }
-
+
        /**
         * Converts the ConfigMap of properties into XML
         */
     private static function convertToXML(config:ConfigMap, configXML:XML):void
-    {
+    {
         for (var propertyKey:Object in config)
-        {
+        {
             var propertyValue:Object = config[propertyKey];
-
+
             if (propertyValue is String)
             {
                 if (propertyKey == "")
                 {
-                    // Add as a value
+                    // Add as a value
                     var name:Object = configXML.localName();
                     var parent:XML = configXML.parent();
                     parent[name] = propertyValue;
@@ -553,60 +549,60 @@
                 {
                     // Add as an attribute
                     configXML.@[propertyKey] = propertyValue;
-                }
-            }
+                }
+            }
             else if (propertyValue is ArrayCollection || propertyValue is Array)
-            {
-                var propertyValueList:Array;
+            {
+                var propertyValueList:Array;
                 if (propertyValue is ArrayCollection)
                     propertyValueList = ArrayCollection(propertyValue).toArray();
                 else
                     propertyValueList = propertyValue as Array;
-
-                for (var i:int = 0; i < propertyValueList.length; i++)
-                {
-                       var propertyXML1:XML = <{propertyKey}></{propertyKey}>
+
+                for (var i:int = 0; i < propertyValueList.length; i++)
+                {
+                       var propertyXML1:XML = <{propertyKey}></{propertyKey}>
                     configXML.appendChild(propertyXML1);
                     convertToXML(propertyValueList[i] as ConfigMap, propertyXML1);
-                }
+                }
             }
             else // assuming that it is ConfigMap
             {
-                   var propertyXML2:XML = <{propertyKey}></{propertyKey}>
+                   var propertyXML2:XML = <{propertyKey}></{propertyKey}>
                 configXML.appendChild(propertyXML2);
-                convertToXML(propertyValue as ConfigMap, propertyXML2);
-            }
-        }
-    }
-
+                convertToXML(propertyValue as ConfigMap, propertyXML2);
+            }
+        }
+    }
+
     private static function getChannelIds(destinationConfig:XML):Array
     {
         var result:Array = [];
         var channels:XMLList = destinationConfig.channels.channel;
         var n:int = channels.length();
-        for (var i:int = 0; i < n; i++)
+        for (var i:int = 0; i < n; i++)
         {
             result.push(channels[i].@ref.toString());
         }
         return result;
     }
-
+
     /**
      * @private
-     * This method returns a list of default channel ids for the application
-     */
+     * This method returns a list of default channel ids for the application
+     */
     private static function getDefaultChannelIds():Array
     {
         var result:Array = [];
         var channels:XMLList = xml["default-channels"].channel;
-        var n:int = channels.length();
+        var n:int = channels.length();
         for (var i:int = 0; i < n; i++)
         {
             result.push(channels[i].@ref.toString());
-        }
-        return result;
-    }
-
+        }
+        return result;
+    }
+
     /**
      *  Returns the destination XML data specific to the destination and message
      *  type specified. Returns null if the destination is not found.
@@ -615,55 +611,55 @@
     {
         var destinations:XMLList = xml..destination.(@id == destinationId);
         var destinationCount:int = destinations.length();
-        if (destinationCount == 0)
-        {
-            return null;
-        }
-        else
+        if (destinationCount == 0)
+        {
+            return null;
+        }
+        else
         {
             // Destination ids are unique among services
-            return destinations[0];
-        }
-    }
-
+            return destinations[0];
+        }
+    }
+
     /**
      *  Helper method to look up and return a cached ChannelSet (and build and
      *  cache an instance if necessary).
-     *
+     *
      *  @param destinationConfig The configuration for the target destination.
      *  @param destinatonId The id of the target destination.
-     *
+     *
      *  @return The ChannelSet.
      */
     private static function internalGetChannelSet(
-                                        destinationConfig:XML,
+                                        destinationConfig:XML,
                                         destinationId:String):ChannelSet
     {
         var channelIds:Array;
         var clustered:Boolean;
-
+
         if (destinationConfig == null)
         {
-            channelIds = getDefaultChannelIds();
+            channelIds = getDefaultChannelIds();
             if (channelIds.length == 0)
             {
                 var message:String = resourceManager.getString(
                     "messaging", "noChannelForDestination", [ destinationId ]);
-                throw new InvalidDestinationError(message);
-            }
-            clustered = false;
+                throw new InvalidDestinationError(message);
+            }
+            clustered = false;
         }
         else
         {
             channelIds = getChannelIds(destinationConfig);
-            clustered = (destinationConfig.properties.network.cluster.length() > 0) ? true : false;
-        }
-
+            clustered = (destinationConfig.properties.network.cluster.length() > 0) ? true : false;
+        }
+
         var channelSetId:String = channelIds.join(",") + ":" + clustered;
-
+
         if (channelSetId in _channelSets)
         {
-            return _channelSets[channelSetId];
+            return _channelSets[channelSetId];
         }
         else
         {
@@ -675,8 +671,8 @@
             _channelSets[channelSetId] = channelSet;
             return channelSet;
         }
-    }
-
+    }
+
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 6840
Author:   jimurphy@adobe.com
Date:     2009-05-12T13:22:49.674709Z

Log Message:
-----------
Merged 3.x revisions 6344,6766 -> trunk

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</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/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as
+++ frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as
@@ -20,7 +20,6 @@
 import mx.messaging.Channel;
 import mx.messaging.ChannelSet;
 import mx.messaging.MessageAgent;
-import mx.messaging.config.LoaderConfig;
 import mx.messaging.errors.InvalidChannelError;
 import mx.messaging.errors.InvalidDestinationError;
 import mx.resources.IResourceManager;
@@ -459,33 +458,44 @@
             var newServices:XML = <services></services>;
             convertToXML(serverConfig, newServices);

-            // Update default-channels of the application
+            // Update default-channels of the application.
             xml["default-channels"] = newServices["default-channels"];

-            // Update the services
+            // Update the service destinations.
             for each (var newService:XML in newServices..service)
             {
                 var oldServices:XMLList = xml.service.(@id == newService.@id);
+                var oldDestinations:XMLList;
+                var newDestination:XML;
+                // The service already exists, update its destinations.
                 if (oldServices.length() != 0)
                 {
-                    // Assuming only one service exists with the id
-                    var oldService:XML = oldServices[0];
-
-                    // Update destinations
-                    for each (var newDestination:XML in newService..destination)
+                    var oldService:XML = oldServices[0]; // Service ids are unique.
+                    for each (newDestination in newService..destination)
                     {
-                        var oldDestinations:XMLList = oldService.destination.(@id == newDestination.@id);
+                        oldDestinations = oldService.destination.(@id == newDestination.@id);
                         if (oldDestinations.length() != 0)
-                        {
-                            // Assuming only one destination exists with the id
-                            delete oldDestinations[0];
-                        }
-                        oldService.appendChild(newDestination);
+                            delete oldDestinations[0]; // Destination ids are unique.
+                        oldService.appendChild(newDestination.copy());
                     }
                 }
+                // The service does not exist which means that this is either a new
+                // service with its destinations, or a proxy service (eg. GatewayService)
+                // with configuration for existing destinations for other services.
                 else
                 {
-                    xml.appendChild(newService);
+                    for each (newDestination in newService..destination)
+                    {
+                        oldDestinations = xml..destination.(@id == newDestination.@id);
+                        if (oldDestinations.length() != 0) // Replace the existing destination.
+                        {
+                            oldDestinations[0] = newDestination[0].copy(); // Destination ids are unique.
+                            delete newService..destination.(@id == newDestination.@id)[0];
+                        }
+                    }
+
+                    if (newService.children().length() > 0) // Add the new service.
+                        xml.appendChild(newService);
                 }
             }


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

--- frameworks/projects/rpc/src/mx/messaging/events/ChannelEvent.as
+++ frameworks/projects/rpc/src/mx/messaging/events/ChannelEvent.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.messaging.events
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 9852
Author:   clucier@adobe.com
Date:     2009-08-31T21:16:51.572424Z

Log Message:
-----------
Adding support for Flex filters in SpriteVisualElement.  We will eventually consolidate the duplicated logic that UIC and SVE share when we revisit refactoring UIC to derive from SVE.

QE notes: None.
Doc notes:  None.
Bugs:  SDK-22869
Reviewer: Evtim
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as

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

--- frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
+++ frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
@@ -14,6 +14,7 @@

 import flash.display.DisplayObjectContainer;
 import flash.events.Event;
+import flash.events.IEventDispatcher;
 import flash.geom.ColorTransform;
 import flash.geom.Matrix;
 import flash.geom.Matrix3D;
@@ -29,6 +30,8 @@
 import mx.core.IVisualElement;
 import mx.core.mx_internal;
 import mx.events.PropertyChangeEvent;
+import mx.filters.BaseFilter;
+import mx.filters.IBitmapFilter;
 import mx.geom.Transform;
 import mx.geom.TransformOffsets;
 import mx.utils.MatrixUtil;
@@ -415,6 +418,69 @@

         _bottom = value;
         invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  filters
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the filters property.
+     */
+    private var _filters:Array;
+
+    /**
+     *  @private
+     */
+    override public function get filters():Array
+    {
+        return _filters ? _filters : super.filters;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set filters(value:Array):void
+    {
+        var n:int;
+        var i:int;
+        var e:IEventDispatcher;
+
+        if (_filters)
+        {
+            n = _filters.length;
+            for (i = 0; i < n; i++)
+            {
+                e = _filters[i] as IEventDispatcher;
+                if (e)
+                    e.removeEventListener(BaseFilter.CHANGE, filterChangeHandler);
+            }
+        }
+
+        _filters = value;
+
+        var clonedFilters:Array = [];
+        if (_filters)
+        {
+            n = _filters.length;
+            for (i = 0; i < n; i++)
+            {
+                if (_filters[i] is IBitmapFilter)
+                {
+                    e = _filters[i] as IEventDispatcher;
+                    if (e)
+                        e.addEventListener(BaseFilter.CHANGE, filterChangeHandler);
+                    clonedFilters.push(IBitmapFilter(_filters[i]).clone());
+                }
+                else
+                {
+                    clonedFilters.push(_filters[i]);
+                }
+            }
+        }
+
+        super.filters = clonedFilters;
     }

     //----------------------------------
@@ -1435,6 +1501,14 @@
                 break;
             }
         }
+    }
+
+    /**
+     *  @private
+     */
+    private function filterChangeHandler(event:Event):void
+    {
+        filters = _filters;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

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

 package mx.controls.olapDataGridClasses
 {


Added some documentation to ComboBox. Also previous commit added "opening" and "closing" events.

--- src/org/openPyro/controls/ComboBox.as
+++ src/org/openPyro/controls/ComboBox.as
@@ -73,11 +73,17 @@
 		private var _bttn:UIControl;
 		private var listHolder:Sprite;
 		private var _list:List;
-
+
+		/**
+		 * Constructor
+		 */
 		public function ComboBox() {
 			super();
 		}

+		/**
+		 * @inheritDoc
+		 */
 		override public function initialize():void
 		{
 			super.initialize();
@@ -107,6 +113,9 @@
 			}
 		}

+		/**
+		 * @inheritDoc
+		 */
 		override public function set skin(skinImpl:ISkin):void
 		{
 			super.skin = skinImpl;
@@ -132,7 +141,14 @@
 		}

 		public var _bttnLabelFunction:Function = StringUtil.toStringLabel;
-
+
+		/**
+		 * Sets the button that will be used to listen to trigger the drop down.
+		 * This is optional. If no button is set, an instance of
+		 * org.openPyro.controls.Button will be created and used.
+		 * If the button assigned has not been added as a child to a displayObject,
+		 * it will be attached to the ComboBox instance whereever that is placed.
+		 */
 		public function set button(bttn:UIControl):void{
 			if(_bttn){
 				_bttn.removeEventListener(MouseEvent.MOUSE_DOWN, onButtonDown);
@@ -144,6 +160,11 @@
 			_bttn.addEventListener(MouseEvent.MOUSE_DOWN, onButtonDown)
 		}

+		/**
+		 * Sets the list that will be used to display the options in the dataProvider.
+		 * This is optional and if no list is provided, an instance of
+		 *  org.openPyro.controls.List will be created and used.
+		 */
 		public function set list(l:List):void{
 			if(_list){
 				_list.removeEventListener(ListEvent.ITEM_CLICK,onListItemClick);
@@ -157,6 +178,9 @@
 			_list.addEventListener(ListEvent.CHANGE, onListChange);
 		}

+		/**
+		 * @private
+		 */
 		protected var _isOpen:Boolean = false;

 		/**
@@ -167,7 +191,12 @@
 			return _isOpen;
 		}

-		private function onButtonDown(event:Event):void{
+		/**
+		 * Dispatches the org.openPyro.controls.events.DropDownEvent with type
+		 * "opening" or "closing". If that event is cancelled by calling event.stopImmediatePropagation,
+		 * the drop down will not open or close.
+		 */
+		protected function onButtonDown(event:Event):void{
 			if(_isOpen)
 			{
 				dispatchEvent( new DropDownEvent(DropDownEvent.CLOSING));
@@ -318,8 +347,6 @@
 			});
 		}

-
-
 		override public function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
 		{
 			super.updateDisplayList(unscaledWidth, unscaledHeight);


Fix some bugs causing occupant updates to get lost.

git-svn-id: a3e1eb16dde062992de22c830ed8045c8013209a@945 c613c5cb-e716-0410-b11b-feb51c14d237

--- src/as/com/threerings/stage/client/CrowdStageScenePanel.as
+++ src/as/com/threerings/stage/client/CrowdStageScenePanel.as
@@ -180,8 +180,10 @@
         // if they're within one screen diagonal of us, they're proximate
         var myLoc :StageLocation = StageLocation(mySceneLoc.loc);
         var loc :StageLocation = StageLocation(sceneLoc.loc);
-        var pos :Point = _isoView.isoToLocal(new Pt(loc.x, loc.y, 0));
-        var myPos :Point = _isoView.isoToLocal(new Pt(myLoc.x, myLoc.y, 0));
+        var pos :Point = _isoView.isoToLocal(new Pt(MisoUtil.fullToTile(loc.x),
+            MisoUtil.fullToTile(loc.y), 0));
+        var myPos :Point = _isoView.isoToLocal(new Pt(MisoUtil.fullToTile(myLoc.x),
+            MisoUtil.fullToTile(myLoc.y), 0));
         return int(MathUtil.distance(pos.x, pos.y, myPos.x, myPos.y)) < _proxrad;
     }

@@ -662,7 +664,10 @@

     protected function occupantEntryUpdated (event :EntryUpdatedEvent) :void
     {
-        occupantMoved(SceneLocation(event.getOldEntry()), SceneLocation(event.getEntry()), true);
+        if (event.getName() == SpotSceneObject.OCCUPANT_LOCS) {
+            occupantMoved(SceneLocation(event.getOldEntry()),
+                SceneLocation(event.getEntry()), true);
+        }
     }

     protected var _occupantListener :SetListener = new SetAdapter(null, occupantEntryUpdated, null);


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

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

 package mx.printing
 {


FLEX-34837 Added two more test functions to make sure that sorting with a custom compare function works well despite using a SortField with a complex field for its name. They do pass, indeed.

--- frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
+++ frameworks/projects/framework/tests/ListCollectionView_FLEX_34837_Tests.as
@@ -23,6 +23,7 @@
     import mx.collections.ListCollectionView;
     import mx.collections.Sort;
     import mx.collections.SortField;
+    import mx.utils.ObjectUtil;

     import org.flexunit.asserts.assertEquals;

@@ -60,6 +61,61 @@
         }

         [Test]
+        public function test_simple_sort_by_complex_fields_with_custom_compare_function_for_sort():void
+        {
+            function compareByStreet(a:ListCollectionView_FLEX_34837_VO, b:ListCollectionView_FLEX_34837_VO, fields:Array):int
+            {
+                var streetA:String = a.address ? a.address.street : null;
+                var streetB:String = b.address ? b.address.street : null;
+
+                return ObjectUtil.stringCompare(streetA, streetB, true);
+            }
+
+            //given
+            var from4To0:IList = generateVOs(5, true);
+            _sut.addAll(from4To0); //values["address.street"]: Street4, Street3, Street2, Street1, Street0
+
+            const sortByStreetAscending:Sort = new Sort();
+            sortByStreetAscending.fields = [new SortField("address.street", false, false, false)]; //should make no difference
+            sortByStreetAscending.compareFunction = compareByStreet;
+            _sut.sort = sortByStreetAscending;
+
+            //when
+            _sut.refresh(); //should be: Street0, Street1, Street2, Street3, Street4
+
+            //then
+            assertIndexesAre([0, 1, 2, 3, 4]);
+        }
+
+        [Test]
+        public function test_simple_sort_by_complex_fields_with_custom_compare_function_for_sort_field():void
+        {
+            function compareByStreet(a:ListCollectionView_FLEX_34837_VO, b:ListCollectionView_FLEX_34837_VO):int
+            {
+                var streetA:String = a.address ? a.address.street : null;
+                var streetB:String = b.address ? b.address.street : null;
+
+                return ObjectUtil.stringCompare(streetA, streetB, true);
+            }
+
+            //given
+            var from4To0:IList = generateVOs(5, true);
+            _sut.addAll(from4To0); //values["address.street"]: Street4, Street3, Street2, Street1, Street0
+
+            const sortByStreetAscending:Sort = new Sort();
+            var sortField:SortField = new SortField("address.street", false, false, false);
+            sortField.compareFunction = compareByStreet;
+            sortByStreetAscending.fields = [sortField];
+            _sut.sort = sortByStreetAscending;
+
+            //when
+            _sut.refresh(); //should be: Street0, Street1, Street2, Street3, Street4
+
+            //then
+            assertIndexesAre([0, 1, 2, 3, 4]);
+        }
+
+        [Test]
         public function test_changing_simple_sort_field_value_places_it_correctly_according_to_collection_sort():void
         {
             //given
@@ -68,7 +124,7 @@
             _sut.addAll(from1To4);

             const sortByNameAscending:Sort = new Sort();
-            sortByNameAscending.fields = [new SortField("name", false, false)];
+            sortByNameAscending.fields = [new SortField("name", false, false, false)];
             _sut.sort = sortByNameAscending;
             _sut.refresh(); //values: Object1, Object2, Object3, Object4

@@ -91,7 +147,7 @@
             _sut.addAll(from1To4);

             const sortByNameAscending:Sort = new Sort();
-            sortByNameAscending.fields = [new SortField("address.street", false, false)];
+            sortByNameAscending.fields = [new SortField("address.street", false, false, false)];
             _sut.sort = sortByNameAscending;
             _sut.refresh(); //values: Object1, Object2, Object3, Object4


Transferred from the Adobe Open Source Subversion Repository

Revision: 20026
Author:   tkraikit@adobe.com
Date:     2011-02-01T00:22:04.442468Z

Log Message:
-----------
bug 29286: implement workaround to avoid FXG clipping issue at the ends of the HSlider

QE notes: none
Doc notes: none
Bugs: 29324
Reviewer: Jason San Jose
Tests run: checkintests, cyclone (no tests)
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/HSliderTrack.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/HSliderTrack.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/HSliderTrack.fxg</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as
@@ -55,7 +55,7 @@
         {
             case DPIClassification.DPI_320:
             {
-                trackWidth = 320;
+                trackWidth = 640;
                 trackHeight = 18;

                 visibleTrackWidth = 280;
@@ -67,7 +67,7 @@
             }
             case DPIClassification.DPI_240:
             {
-                trackWidth = 192;
+                trackWidth = 768;
                 trackHeight = 13;

                 visibleTrackWidth = 160;
@@ -80,10 +80,10 @@
             default:
             {
                 // default PPI160
-                trackWidth = 160;
+                trackWidth = 640;
                 trackHeight = 10;

-                visibleTrackWidth = 140;
+                visibleTrackWidth = 300;
                 visibleTrackLeftOffset = 10;

                 trackClass = spark.skins.mobile160.assets.HSliderTrack;


Transferred from the Adobe Open Source Subversion Repository

Revision: 19807
Author:   tkraikit@adobe.com
Date:     2011-01-19T19:58:47.383455Z

Log Message:
-----------
missed a semi-colon. the horror! the horror! :-)

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -1807,7 +1807,7 @@
         while (element)
         {
             if (element == this)
-                return true
+                return true;

             if (element.parent is IVisualElement)
                 element = IVisualElement(element.parent);


Transferred from the Adobe Open Source Subversion Repository

Revision: 7274
Author:   chaase@adobe.com
Date:     2009-05-26T17:35:32.210331Z

Log Message:
-----------
Fixed several feature-complete effects bugs, plus one ScrollBar bug.

QE Notes: None
Doc Notes: None
Bugs: sdk-21093, sdk-21130, sdk-21243, sdk-21128, sdk-20698, sdk-20125, sdk-21138
Reviewer: Jason
tests: checkintests mustella effects cyclone

Modified Paths:
--------------
<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/effects/supportClasses/AnimateInstance.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/animation/IAnimationTarget.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/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/AnimationTarget.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/effects/AnimateTransform.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
@@ -13,13 +13,14 @@
 {
 import flash.events.Event;

+import mx.effects.effectClasses.PropertyChanges;
+import mx.events.FlexEvent;
+import mx.managers.LayoutManager;
+
 import spark.components.Group;
+import spark.effects.SimpleMotionPath;
 import spark.effects.animation.Animation;
-import spark.effects.SimpleMotionPath;
-import mx.events.FlexEvent;
 import spark.primitives.supportClasses.GraphicElement;
-import mx.managers.LayoutManager;
-import mx.effects.effectClasses.PropertyChanges;

 /**
  *  The FadeInstance class implements the instance class
@@ -101,6 +102,20 @@
      */
     public var alphaTo:Number;

+    //----------------------------------
+    //  affectVisibility
+    //----------------------------------
+
+    /**
+     *  @copy spark.effects.Fade#affectVisibility
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var affectVisibility:Boolean;
+
     /**
      *  @private
      */
@@ -168,8 +183,9 @@
         // to be fading it in
         if ("visible" in target && !target.visible &&
             alphaFrom == 0 && alphaTo != 0 &&
-            propChanges && propChanges.end["visible"] !== undefined &&
-            propertyChanges.end["visible"] != propertyChanges.start["visible"])
+            ((propChanges && propChanges.end["visible"] !== undefined &&
+              propertyChanges.end["visible"] != propertyChanges.start["visible"]) ||
+             affectVisibility))
         {
             target.alpha = 0;
             target.visible = true;
@@ -180,8 +196,9 @@
         // side-effecting and what we should reset at the end
         if ("visible" in target && target.visible &&
             alphaFrom != 0 && alphaTo == 0 &&
-            propChanges && propChanges.end["visible"] !== undefined &&
-            propertyChanges.end["visible"] != propertyChanges.start["visible"])
+            ((propChanges && propChanges.end["visible"] !== undefined &&
+              propertyChanges.end["visible"] != propertyChanges.start["visible"]) ||
+             affectVisibility))
         {
             makeInvisible = true;
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3516
Author:   jimurphy@adobe.com
Date:     2008-10-08T00:32:26.683603Z

Log Message:
-----------
various fixes caused during the rename:
-gumbo manifest,fixed typo
-halo-manifest.xml, fixed flex 4 graphics section with updated mx.graphics package names
-mxml-2009-manifest.xml, fixed FxVGroup to be VGroup
-removed flex directory
-fixed bad rename of AnimationEvent and updated with FlexEvent

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextInput.as</path>
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxFadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/halo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
@@ -20,7 +20,7 @@
 import mx.graphics.graphicsClasses.GraphicElement;

 import mx.effects.effectClasses.PropertyChanges;
-import mx.events.AnimationEvent;
+import mx.events.FlexEvent;
 import mx.managers.LayoutManager;

 public class FxFadeInstance extends FxAnimateInstance


fixed bug where CSVDataSource wasn't filling missing titles with
name/year values.

Change-Id: I4bccb096be312732acda25c68814598b70afe461

--- WeaveData/src/weave/data/DataSources/CSVDataSource.as
+++ WeaveData/src/weave/data/DataSources/CSVDataSource.as
@@ -386,12 +386,19 @@
 			{
 				for each (var tag:XML in _attributeHierarchy.value.descendants('attribute'))
 				{
-					if (!String(tag.@title))
+					var title:String = String(tag.@title);
+					if (!title)
 					{
-						var newTitle:String = String(tag.@csvColumn);
-						if (!newTitle && String(tag.@name) && String(tag.@year))
-							newTitle = String(tag.@name) + ' (' + tag.@year + ')';
-						tag.@title = newTitle || 'untitled';
+						var name:String = String(tag.@name);
+						var year:String = String(tag.@year);
+						if (name && year)
+							title = name + ' (' + year + ')';
+						else if (name)
+							title = name;
+						else
+							title = String(tag.@csvColumn) || 'untitled';
+
+						tag.@title = title;
 					}
 				}
 			}


Change 20080917-bargull-2fS by bargull@dell--p4--2-53 on 2008-09-17 15:58:00
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: round resource sizes

New Features:

Bugs Fixed: LPP-6135

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

Documentation:

Release Notes:

Details:
Call Math.round() to avoid fractional resource-dimensions.

Tests:
attached at bugreport

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

--- WEB-INF/lps/lfc/kernel/swf/LzSprite.as
+++ WEB-INF/lps/lfc/kernel/swf/LzSprite.as
@@ -319,7 +319,6 @@
   */
 LzSprite.prototype.setMovieClip = function ( mc , mcID) {
     this.__LZmovieClipRef = mc;
-    //mc.tabIndex = tabindexcounter++;
     if (this.masked) {
       this.applyMask();
     }
@@ -377,8 +376,6 @@
         }
         var instName = ("$m" + this.__LZsubUniqueNum );
     }
-
-    //mc.tabIndex = tabindexcounter++;

     //Debug.write('Sprite.depth', this.FIRST_SUBVIEW_DEPTH, childsprite.owner.sprite.__LZdepth, this.CLIPS_PER_SUBVIEW, this.FOREGROUND_DEPTH_OFFSET)
     var depth = this.FIRST_SUBVIEW_DEPTH +
@@ -665,8 +662,8 @@
         this.resourceheight = rt.height;
     } else {
         // Get the true size by unscaling. Note: clip scale is in percent
-        this.resourcewidth = mc._width/(mc._xscale/100);
-        this.resourceheight = mc._height/(mc._yscale/100);
+        this.resourcewidth = Math.round(mc._width/(mc._xscale/100));
+        this.resourceheight = Math.round(mc._height/(mc._yscale/100));
     }

     if (! skipsend && ! this.__LZhaser) this.owner.resourceload({width: this.resourcewidth, height: this.resourceheight, resource: this.resource, skiponload: true});


now refreshing column info after updating existing table

Change-Id: I4d4cfdc598f0367d098c2751fce4c5667bb25548

--- WeaveAdmin/src/weave/services/Admin.as
+++ WeaveAdmin/src/weave/services/Admin.as
@@ -287,62 +287,9 @@
 			);
 			////////////////
 			// Data import
-			service.addHook(
-				service.importSQL,
-				null,
-				function(event:ResultEvent, token:Object):void
-				{
-					var id:int = int(event.result);
-					reportTableImport(id);
-					focusEntityId = id;
-					// request children
-					entityCache.invalidate(id, true);
-					// refresh list
-					service.getKeyTypes();
-				}
-			);
-			service.addHook(
-				service.importCSV,
-				null,
-				function(event:ResultEvent, token:Object):void
-				{
-					var id:int = int(event.result);
-					reportTableImport(id);
-					focusEntityId = id;
-					// request children
-					entityCache.invalidate(id, true);
-					// refresh list
-					service.getKeyTypes();
-				}
-			);
-			service.addHook(
-				service.importSHP,
-				null,
-				function(event:ResultEvent, token:Object):void
-				{
-					var id:int = int(event.result);
-					reportTableImport(id);
-					focusEntityId = id;
-					// request children
-					entityCache.invalidate(id, true);
-					// refresh list
-					service.getKeyTypes();
-				}
-			);
-			/*
-			service.addHook(
-				service.importDBF,
-				null,
-				function(event:ResultEvent, token:Object = null):void
-				{
-					focusEntityId = int(event.result);
-					// request children
-					entityCache.invalidate(int(event.result), true);
-					// refresh list
-					service.getKeyTypes();
-				}
-			);
-			*/
+			service.addHook(service.importSQL, null, handleTableImportResult);
+			service.addHook(service.importCSV, null, handleTableImportResult);
+			service.addHook(service.importSHP, null, handleTableImportResult);
 			//////////////////
 			// Miscellaneous
 			service.addHook(
@@ -371,13 +318,22 @@
 			service.checkDatabaseConfigExists();
 		}

-		private function reportTableImport(tableId:int):void
-		{
+		private function handleTableImportResult(event:ResultEvent, token:Object):void
+		{
+			var tableId:int = int(event.result);
 			var info:EntityHierarchyInfo = entityCache.getBranchInfo(tableId);
 			if (info)
 				weaveTrace(lang('Existing data table "{0}" was updated successfully.', info.title));
 			else
 				weaveTrace(lang("New data table created successfully."));
+
+			focusEntityId = tableId;
+			// request children
+			entityCache.invalidate(tableId, true);
+			for each (var id:int in entityCache.getEntity(tableId).childIds)
+				entityCache.invalidate(id);
+			// refresh list
+			service.getKeyTypes();
 		}

 		[Bindable] public function get activeConnectionName():String


FlexibleLayout.setSessionState() now eliminates redundant levels of divided boxes

--- WeaveUI/src/weave/ui/FlexibleLayout.as
+++ WeaveUI/src/weave/ui/FlexibleLayout.as
@@ -10,6 +10,7 @@
 	import mx.containers.dividedBoxClasses.BoxDivider;
 	import mx.core.mx_internal;
 	import mx.events.ChildExistenceChangedEvent;
+	import mx.utils.ObjectUtil;

 	import avmplus.getQualifiedClassName;

@@ -34,9 +35,16 @@
 		private static const FLEX:String = 'flex';
 		private static const DIRECTION:String = 'direction';
 		private static const CHILDREN:String = 'children';
+		private static var LinkableDynamicDisplayObject_QName:String;
+		private static var FlexibleLayout_QName:String;

 		public function FlexibleLayout()
 		{
+			if (!LinkableDynamicDisplayObject_QName)
+				LinkableDynamicDisplayObject_QName = getQualifiedClassName(LinkableDynamicDisplayObject);
+			if (!FlexibleLayout_QName)
+				FlexibleLayout_QName = getQualifiedClassName(FlexibleLayout);
+
 			setStyle('horizontalGap', 8);
 			setStyle('verticalGap', 8);
 			minWidth = 16;
@@ -52,7 +60,6 @@
 		private const _flex:LinkableNumber = registerLinkableChild(this, new LinkableNumber(1));
 		private const _direction:LinkableString = registerLinkableChild(this, new LinkableString(BoxDirection.VERTICAL, verifyDirection), adjustChildFlexValues, true);
 		private const _children:LinkableHashMap = registerLinkableChild(this, new LinkableHashMap(), adjustChildFlexValues, true);
-		private var _childNamesForMapChildInput:Array;
 		private const _originalParents:Dictionary = new Dictionary(true);

 		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
@@ -132,13 +139,6 @@
 		private function _mapChildOutput(dynamicState:Object, i:int, a:Array):Object
 		{
 			return dynamicState[DynamicState.SESSION_STATE];
-		}
-
-		private function _mapChildInput(state:Object, i:int, a:Array):Object
-		{
-			var objectName:String = _childNamesForMapChildInput[i] || 'child' + i;
-			var className:String = getQualifiedClassName(state is Array ? LinkableDynamicDisplayObject : FlexibleLayout);
-			return DynamicState.create(objectName, className, state);
 		}

 		public function getSessionState():Object
@@ -162,10 +162,38 @@
 			var id:Array = state[ID] is String ? [state[ID] as String] : state[ID] as Array;
 			var flex:Number = state[FLEX];
 			var direction:String = state[DIRECTION] as String;
-			var children:Array = id ? [id] : (state[CHILDREN] as Array || []);
-
-			_childNamesForMapChildInput = _children.getNames();
-			children = children.map(_mapChildInput);
+			var children:Array = id ? [id] : (state[CHILDREN] as Array || []).concat();
+
+			if (children.length == 1 && !id)
+			{
+				setSessionState(children[0]);
+				return;
+			}
+
+			for (var i:int = 0; i < children.length; i++)
+			{
+				var objectName:String = 'child' + i;
+				var child:Object = children[i];
+				if (child is Array)
+				{
+					children[i] = DynamicState.create(objectName, LinkableDynamicDisplayObject_QName, child);
+				}
+				else if (child[DIRECTION] == direction && child[CHILDREN] is Array)
+				{
+					var spliceArgs:Array = [i--, 1];
+					for each (var obj:Object in child[CHILDREN])
+					{
+						var newObj:Object = ObjectUtil.copy(obj);
+						newObj[FLEX] *= child[FLEX];
+						spliceArgs.push(newObj);
+					}
+					children.splice.apply(children, spliceArgs);
+				}
+				else
+				{
+					children[i] = DynamicState.create(objectName, FlexibleLayout_QName, children[i]);
+				}
+			}

 			getCallbackCollection(this).delayCallbacks();


[FWR-m3Riri1Z] MicrophonePermissionPanel: Broken unit test - another attempt to get it to work.

--- src/test/flashwavrecorder/MicrophonePermissionPanelTest.as
+++ src/test/flashwavrecorder/MicrophonePermissionPanelTest.as
@@ -3,16 +3,16 @@
   import flash.events.Event;
   import flash.events.StatusEvent;

+  import flashwavrecorder.wrappers.MicrophoneWrapper;
+  import flashwavrecorder.wrappers.SecurityWrapper;
+
   import mockolate.mock;
   import mockolate.received;
   import mockolate.runner.MockolateRule;

-  import mx.logging.Log;
-
-  import org.flexunit.asserts.assertTrue;
+  import org.flexunit.Assert;

   import org.flexunit.async.Async;
-
   import org.hamcrest.assertThat;

   public class MicrophonePermissionPanelTest {
@@ -24,13 +24,15 @@
     public var microphone:MicrophoneWrapper;
     [Mock]
     public var panelObserver:SettingsPanelObserver;
+    [Mock]
+    public var security:SecurityWrapper;

     private var _permissionPanel:MicrophonePermissionPanel;

     [Before]
     public function setUp():void {
       mock(microphone).asEventDispatcher();
-      _permissionPanel = new MicrophonePermissionPanel(microphone, panelObserver);
+      _permissionPanel = new MicrophonePermissionPanel(microphone, panelObserver, security);
     }

     [Test]
@@ -49,14 +51,18 @@
       mock(microphone).method('isMuted').returns(true);
       var statusEvent:StatusEvent = new StatusEvent(StatusEvent.STATUS, true, false, "Microphone.Unmuted");
       _permissionPanel.showSimple();
-      // expect
-      Async.handleEvent(this, _permissionPanel, MicrophonePermissionPanel.MICROPHONE_ALLOWED, onMicrophoneAllowed);
+      var asyncHandler:Function = Async.asyncHandler(this, onMicrophoneAllowed, 500, null, handleTimeout);
       // when
+      _permissionPanel.addEventListener(MicrophonePermissionPanel.MICROPHONE_ALLOWED, asyncHandler, false, 0, true);
       microphone.dispatchEvent(statusEvent);
     }

     protected function onMicrophoneAllowed(event:Event):void {
     }

+    protected function handleTimeout():void {
+      Assert.fail("Timeout reached before event");
+    }
+
   }
 }


Transferred from the Adobe Open Source Subversion Repository

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

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/events/FlexMouseEvent.as
+++ frameworks/projects/framework/src/mx/events/FlexMouseEvent.as
@@ -19,6 +19,11 @@
 /**
  *  The FlexMouseEvent class represents the event object passed to
  *  the event listener for Flex-specific mouse activity.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class FlexMouseEvent extends MouseEvent
 {
@@ -79,6 +84,11 @@
 	 *  </table>
 	 *
      *  @eventType mouseDownOutside
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const MOUSE_DOWN_OUTSIDE:String = "mouseDownOutside";

@@ -132,6 +142,11 @@
 	 *  </table>
 	 *
      *  @eventType mouseWheelOutside
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const MOUSE_WHEEL_OUTSIDE:String = "mouseWheelOutside";

@@ -168,6 +183,11 @@
 	 *
 	 *  @param delta How many lines should be scrolled for each notch the
 	 *  user scrolls the mouse wheel.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function FlexMouseEvent(type:String, bubbles:Boolean = false,
 								   cancelable:Boolean = false,


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

--- frameworks/projects/spark/src/spark/layouts/FormItemLayout.as
+++ frameworks/projects/spark/src/spark/layouts/FormItemLayout.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: 6403
Author:   dsubrama@adobe.com
Date:     2009-04-29T23:52:29.565854Z

Log Message:
-----------
-Single selection support hooked up to keyboard navigation
-We no longer listen to keyboard events at the capture phase
-We now delegate to layout to tell us which item to navigate to next - implemented for Vertical, Horizontal and Tile layouts. A List with BasicLayout/ScrollerLayout doesn't really make sense.
-Selection and keyboard navigation stay in lockstep correctly.

QA: Yes
Doc: No
Checkintests: Pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -16,6 +16,7 @@
 import flash.events.EventDispatcher;
 import flash.geom.Point;
 import flash.geom.Rectangle;
+import flash.ui.Keyboard;

 import mx.containers.utilityClasses.Flex;
 import mx.core.ILayoutElement;
@@ -1199,6 +1200,30 @@
     }

     /**
+     *  @private
+     *  For a VerticalLayout, returns the index of the next item to
+     *  navigate to given the current index and keyCode passed in.
+     */
+     override public function nextItemIndex(keyCode:uint, currentIndex:int, maxIndex:int):int
+     {
+         var retVal:int = super.nextItemIndex(keyCode, currentIndex, maxIndex);
+         switch (keyCode)
+         {
+             case Keyboard.UP:
+             {
+                retVal = Math.max(currentIndex - 1, 0);
+                break;
+             }
+             case Keyboard.DOWN:
+             {
+                retVal = Math.min(currentIndex + 1, maxIndex);
+                break;
+             }
+         }
+         return retVal;
+     }
+
+    /**
      *  @private
      *
      *  Used only for virtual layout.


Transferred from the Adobe Open Source Subversion Repository

Revision: 16709
Author:   clucier@adobe.com
Date:     2010-06-29T00:18:43.782826Z

Log Message:
-----------
Added a READY event to BitmapImage that is fired for both Loader and non-Loader based source types. This provides a consisent event that implies 'ready' regardless of source type.

QE notes: None
Doc notes: None
Bugs: SDK-26724
Reviewer: Glenn
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -34,6 +34,7 @@
 import flash.utils.ByteArray;

 import mx.core.mx_internal;
+import mx.events.FlexEvent;
 import mx.graphics.BitmapFillMode;
 import mx.graphics.BitmapScaleMode;
 import mx.graphics.BitmapSmoothingQuality;
@@ -52,7 +53,14 @@
 //--------------------------------------

 /**
- *  Dispatched when content loading is complete.
+ *  Dispatched when content loading is complete. This
+ *  event is only dispatched for url and ByteArray based
+ *  sources (those sources requiring a Loader).
+ *
+ *
Note that for content loaded via Loader, both
+ *  ready and complete events
+ *  are dispatched.
  For other source types such as
+ *  embeds, only ready is dispatched.
  *
  *  @eventType flash.events.Event.COMPLETE
  *
@@ -106,6 +114,25 @@
  *  @productversion Flex 4.5
  */
 [Event(name="progress", type="flash.events.ProgressEvent")]
+
+/**
+ *  Dispatched when content loading is complete.  Unlike the
+ *  complete event, this event is dispatched for
+ *  all source types.
+ *
+ *
Note that for content loaded via Loader, both
+ *  ready and complete events
+ *  are dispatched.
  For other source types such as
+ *  embeds, only ready is dispatched.
+ *
+ *  @eventType mx.events.FlexEvent.READY
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+[Event(name="ready", type="mx.events.FlexEvent")]

 /**
  *  Dispatched when a security error occurs.
@@ -1160,6 +1187,9 @@
             // Flush the cached scale grid points
             cachedSourceGrid = null;
             cachedDestGrid = null;
+
+            // Dispatch ready event
+            dispatchEvent(new FlexEvent(FlexEvent.READY));
         }

         invalidateSize();
@@ -1419,6 +1449,9 @@
                 // features requiring access to the bitmap data will no longer
                 // function.
                 _trustedSource = false;
+
+                // Dispatch ready event
+                dispatchEvent(new FlexEvent(FlexEvent.READY));
             }
         }
         else


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

--- frameworks/projects/advancedgrids/src/mx/olap/IOLAPQuery.as
+++ frameworks/projects/advancedgrids/src/mx/olap/IOLAPQuery.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: 6379
Author:   dloverin@adobe.com
Date:     2009-04-29T15:10:56.313247Z

Log Message:
-----------
Clean up Spark Window and Spark WindowedApplication.

Spark Window:
Remove unused skins, “border” and “chromeAndContent”.

Spark WindowedApplication:
Add a few comments.

QE Notes: None.
Doc Notes: None.
Bugs:
Reviewer: Ryan
tests: checkintests

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

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

--- frameworks/projects/airspark/src/spark/components/Window.as
+++ frameworks/projects/airspark/src/spark/components/Window.as
@@ -588,25 +588,9 @@
     //
     //--------------------------------------------------------------------------

-    /**
-     *  The SkinPart that displays the border.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    [SkinPart (required = "false")]
-    public var border:Group;
-
-    /**
-     *  The SkinPart that contains the titlebar, the content, and the status bar.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    [SkinPart (required = "false")]
-    public var chromeAndContent:Group;
+    //----------------------------------
+    //  gripper
+    //----------------------------------

     /**
      *  A skin part that defines the gripper button used to resize the window.
@@ -619,6 +603,10 @@
     [SkinPart (required="false")]
     public var gripper:Button;

+    //----------------------------------
+    //  statusBar
+    //----------------------------------
+
     /**
      *  The SkinPart that displays the status bar.
      *
@@ -643,6 +631,10 @@
     [SkinPart (required="false")]
     public var statusText:SimpleText;

+    //----------------------------------
+    //  titleBar
+    //----------------------------------
+
     /**
      *  The UIComponent that displays the title bar.
      *
@@ -652,6 +644,10 @@
      */
     [SkinPart (required="false")]
     public var titleBar:TitleBar;
+
+    //----------------------------------
+    //  titleBarBackgroundRect
+    //----------------------------------

     /**
      *  The background behind the title bar. A white background
@@ -665,7 +661,6 @@
      */
     [SkinPart (required="false")]
     public var titleBarBackgroundRect:Rect;
-

     //--------------------------------------------------------------------------
     //
@@ -1820,11 +1815,6 @@
         {
             gripper.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
         }
-        else if (instance == border)
-        {
-        	// listen for mouse hits so we can reside the window
-            border.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
-        }
     }

     /**
@@ -1837,11 +1827,6 @@
         if (instance == gripper)
         {
             gripper.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
-        }
-        else if (instance == border)
-        {
-        	// listen for mouse hits so we can reside the window
-            border.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
         }
     }


Transferred from the Adobe Open Source Subversion Repository

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

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

A couple updates in the framework project as well.

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

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

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

--- frameworks/projects/framework/src/mx/styles/IStyleModule.as
+++ frameworks/projects/framework/src/mx/styles/IStyleModule.as
@@ -13,7 +13,7 @@
 {

 /**
- * Simple interface that defines an unload() method.
+ * Simple interface to manipulate style modules.
  * You can cast an object to an IStyleModule type so that there is no dependency on the StyleModule
  * type in the loading application.
  *
@@ -32,7 +32,7 @@

     /**
      *  Creates and sets style declarations from the styles modules into the given
-     *  style manager.
+     *  style manager. This should be called after the style modules is created.
      *
      *  @param styleManager The style manager where the style declarations will be
      *  loaded into. The style declarations will be created relative to the this


Transferred from the Adobe Open Source Subversion Repository

Revision: 20642
Author:   smgilson@adobe.com
Date:     2011-03-07T17:53:01.854031Z

Log Message:
-----------
ASDoc updates

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/components/examples/TraceSelectionRanges.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBarButton.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/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/FormHeading.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -683,11 +683,16 @@
     }

     /**
-     *  @inheritDoc
-     *
-     *  Given a data item, return the toString() representation
-     *  of the data item for an item renderer to display. Null
-     *  data items return the empty string.
+     *
Given a data item, return the toString() representation
+     *  of the data item for an item renderer to display.
+     *  Null data items return the empty string.

+     *
+     *  @copy spark.components.IItemRendererOwner#itemToLabel()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function itemToLabel(item:Object):String
     {
@@ -699,23 +704,34 @@
     /**
      *  Return the indices of the item renderers visible within this DataGroup.
      *
-     *
If clipAndEnableScrolling=true, return the indices of the visible=true
-     *  ItemRenderers that overlap this DataGroup's scrollRect, i.e. the ItemRenders
-     *  that are at least partially visible relative to this DataGroup.  If
-     *  clipAndEnableScrolling=false, return a list of integers from
-     *  0 to dataProvider.length - 1.  Note that if this DataGroup's owner is a
-     *  Scroller, then clipAndEnableScrolling has been set to true.

+     *
If clipAndEnableScrolling is true,
+     *  return the indices of the visible = true
+     *  ItemRenderers that overlap this DataGroup's scrollRect.
+     *  That is, the ItemRenders
+     *  that are at least partially visible relative to this DataGroup.
+     *  If clipAndEnableScrolling is false,
+     *  return a list of integers from
+     *  0 to dataProvider.length - 1.
+     *  Note that if this DataGroup's owner is a
+     *  Scroller, then clipAndEnableScrolling has been
+     *  set to true.

      *
      *
The corresponding item renderer for each returned index can be
-     *  retrieved with getElementAt(), even if the layout is virtual

+     *  retrieved with the getElementAt() method,
+     *  even if the layout is virtual

      *
      *
The order of the items in the returned Vector is not guaranteed.

      *
      *
Note that the VerticalLayout and HorizontalLayout classes provide bindable
-     *  firstIndexInView and lastIndexInView properties which convey the same information
-     *  as this method.

+     *  firstIndexInView and lastIndexInView properties
+     *  which contain the same information as this method.

      *
      *  @return The indices of the visible item renderers.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function getItemIndicesInView():Vector.<int>
     {
@@ -1004,6 +1020,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void
     {


Issue #153: Simplify widget resizing logic.

--- src/com/esri/viewer/WidgetTemplate.as
+++ src/com/esri/viewer/WidgetTemplate.as
@@ -353,6 +353,10 @@
     }

     private var widgetMoveStarted:Boolean = false;
+    private var xResizeStart:Number;
+    private var yResizeStart:Number;
+    private var xResizeEnd:Number;
+    private var yResizeEnd:Number;

     private function mouse_moveHandler(event:MouseEvent):void
     {
@@ -481,6 +485,9 @@
     {
         if (_resizable)
         {
+            xResizeStart = event.stageX
+            yResizeStart = event.stageY;
+
             /*TODO: for now, it can't be resized when is not basic layout*/
             stage.addEventListener(MouseEvent.MOUSE_MOVE, resize_moveHandler);
             stage.addEventListener(MouseEvent.MOUSE_UP, resize_upHandler);
@@ -506,6 +513,10 @@
         // clear constraints
         var widget:UIComponent = parent as UIComponent;
         widget.left = widget.right = widget.top = widget.bottom = undefined;
+
+        xResizeEnd = event.stageX
+        yResizeEnd = event.stageY;
+
         if (isRtl())
         {
             resize_moveHandler_rtl();
@@ -524,13 +535,19 @@

         if ((stage.mouseX < stage.width - 20) && (stage.mouseY < stage.height - 20))
         {
-            if ((stage.mouseX - parent.x) > minimumResizeWidth)
-            {
-                width = (stage.mouseX - (stage.stageWidth - parent.parent.width + parent.x));
-            }
-            if ((stage.mouseY - parent.y) > minimumResizeHeight)
-            {
-                height = (stage.mouseY - parent.y);
+            var deltaX:Number = xResizeEnd - xResizeStart;
+            var deltaY:Number = yResizeEnd - yResizeStart;
+
+            var futureWidth:Number = widgetWidth + deltaX;
+            var futureHeight:Number = widgetHeight + deltaY;
+
+            if (futureWidth > minimumResizeWidth)
+            {
+                width = futureWidth;
+            }
+            if (futureHeight > minimumResizeHeight)
+            {
+                height = futureHeight;
             }
         }
     }
@@ -541,18 +558,21 @@
         const minimumResizeWidth:Number = minWidth ? minWidth : 200;
         const minimumResizeHeight:Number = minHeight ? minHeight : 100;

-        var nextWidth:Number = stage.stageWidth - (stage.mouseX + parent.x);
-        var nextHeight:Number = (stage.mouseY - parent.y);
-
         if (stage.mouseX > 20 && (stage.mouseY < stage.height - 20))
         {
-            if (nextWidth > minimumResizeWidth)
-            {
-                width = nextWidth;
-            }
-            if (nextHeight > minimumResizeHeight)
-            {
-                height = nextHeight;
+            var deltaX:Number = xResizeEnd - xResizeStart;
+            var deltaY:Number = yResizeEnd - yResizeStart;
+
+            var calculatedWidth:Number = widgetWidth + deltaX;
+            var calculatedHeight:Number = widgetHeight + deltaY;
+
+            if (calculatedWidth > minimumResizeWidth)
+            {
+                width = calculatedWidth;
+            }
+            if (calculatedHeight > minimumResizeHeight)
+            {
+                height = calculatedHeight;
             }
         }
     }


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

--- frameworks/projects/advancedgrids/src/mx/olap/SummaryNode.as
+++ frameworks/projects/advancedgrids/src/mx/olap/SummaryNode.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: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

--- frameworks/projects/mx/src/mx/accessibility/ButtonAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/ButtonAccImpl.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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.accessibility
 {