Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/advancedgrids/src/mx/olap/OLAPSet.as
+++ frameworks/projects/advancedgrids/src/mx/olap/OLAPSet.as
@@ -0,0 +1,506 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.olap
+{
+
+import mx.collections.ArrayCollection;
+import mx.collections.IList;
+import mx.core.mx_internal;
+import mx.resources.ResourceManager;
+
+use namespace mx_internal;
+
+[ResourceBundle("olap")]
+
+/**
+ *  The OLAPSet class represents a set,
+ *  which is used to configure the axis of an OLAP query.
+ *  A set consists of zero or more tuples;
+ *  a set that does not contain any tuples is known as an empty set.
+ *
+ *  @see mx.olap.IOLAPSet
+ *  @see mx.olap.OLAPQueryAxis
+ *  @see mx.olap.IOLAPResultAxis
+ *  @see mx.olap.OLAPResultAxis
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class OLAPSet implements IOLAPSet
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function OLAPSet()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  flag to indicate the mode in which compareMembers should
+     *  return the values.
+     */
+    private var reverseCompare:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    // tuples
+    //----------------------------------
+
+    private var _tuples:Array = [];
+
+    /**
+     *  The tuples contained by this set instance,
+     *  as an Array of IOLAPTuple instances.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get tuples():Array
+    {
+        return _tuples;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function addElement(e:IOLAPElement):void
+    {
+        var members:IList = new ArrayCollection;
+        if (e is IOLAPDimension)
+            members.addItem((e as IOLAPDimension).defaultMember);
+        if (e is IOLAPHierarchy)
+            members.addItem((e as IOLAPHierarchy).defaultMember);
+        if (e is IOLAPLevel)
+            members = (e as IOLAPLevel).members;
+        if (e is IOLAPMember)
+            members.addItem(e);
+
+        var t:OLAPTuple;
+        if (members.length > 0)
+        {
+        	var n:int = members.length;
+            for (var i:int = 0; i < n; ++i)
+            {
+                var m:IOLAPMember = members[i];
+                t = new OLAPTuple();
+                t.addMember(m);
+                _tuples.push(t);
+            }
+        }
+        else
+        {
+            OLAPTrace.traceMsg("Members were not added for " + e.uniqueName, OLAPTrace.TRACE_LEVEL_1);
+        }
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function addElements(members:IList):void
+    {
+        var t:OLAPTuple;
+        var n:int = members.length;
+        for (var i:int = 0; i < n; ++i)
+        {
+            var m:IOLAPMember = members[i];
+            t = new OLAPTuple();
+            t.addMember(m);
+            _tuples.push(t);
+        }
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function addTuple(tuple:IOLAPTuple):void
+    {
+        _tuples.push(tuple);
+    }
+
+    /**
+     * @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function crossJoin(input:IOLAPSet):IOLAPSet
+    {
+        var join:OLAPSet = input as OLAPSet;
+        validateCrossJoin(join);
+        var newSet:OLAPSet = new OLAPSet();
+
+        var tuple:OLAPTuple = new OLAPTuple();
+        for each (var tuple1:OLAPTuple in _tuples)
+        {
+            for each (var tuple2:OLAPTuple in join.tuples)
+            {
+                tuple.addMembers(tuple1.explicitMembers);
+                tuple.addMembers(tuple2.explicitMembers);
+                if (tuple.isValid)
+                {
+                    newSet.addTuple(tuple);
+                    tuple = new OLAPTuple();
+            	}
+            	else
+            	{
+            		tuple.clear();
+            	}
+            }
+        }
+
+        return newSet;
+    }
+
+    /**
+     *  @private
+     *  Validates a crossjoin defined by an IOLAPSet instance.
+     *
+     *  This method throws an error if the crossjoin is invalid.
+     *
+     *  @param input The IOLAPSet instance that contains a crossjoin
+     *  of two IOLAPSet instances.
+     */
+    protected function validateCrossJoin(input:IOLAPSet):void
+    {
+        var join:OLAPSet = input as OLAPSet;
+        for each (var t1:OLAPTuple in _tuples)
+        {
+            for each (var t2:OLAPTuple in join.tuples)
+            {
+                var hierarchy:IOLAPHierarchy = findCommonHierarchy(t1, t2);
+                if (hierarchy)
+                {
+                    var message:String = ResourceManager.getInstance().getString(
+                            "olap", "crossJoinSameHierarchyError", [hierarchy.uniqueName]);
+                    throw Error(message);
+                }
+            }
+        }
+
+    }
+
+    /**
+     *  Returns the common IOLAPHierarchy instance for two tuples,
+     *  or null if the tuples do not share a hierarchy.
+     *
+     *  @param t1 The first tuple.
+     *
+     *  @param t2 The second tuple.
+     *
+     *  @return The common IOLAPHierarchy instance for the two tuples,
+     *  or null if the tuples do not share a hierarchy.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected function findCommonHierarchy(t1:OLAPTuple, t2:OLAPTuple):IOLAPHierarchy
+    {
+        for each (var m1:OLAPMember in t1.explicitMembers)
+        {
+            for each (var m2:OLAPMember in t2.explicitMembers)
+            {
+                if (m1.hierarchy == m2.hierarchy)
+                    return m1.hierarchy;
+            }
+        }
+        //no common hierarchy found
+        return null;
+    }
+
+    /**
+     * @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function hierarchize(post:Boolean=false):IOLAPSet
+    {
+        var newSet:OLAPSet = new OLAPSet;
+
+        reverseCompare = post;
+        // go through all the tuples of the set and arrange them in
+        // their natural order.
+        var arrayIndices:Array = tuples.sort(sortTuple, Array.RETURNINDEXEDARRAY);
+
+        for each (var index:int in arrayIndices)
+            newSet.addTuple(_tuples[index]);
+
+        //reset the flag because union also uses compareMembers function.
+        reverseCompare = false;
+        return newSet;
+    }
+
+    /**
+     *  Returns information about the relative location of
+     *  two members in the set.
+     *
+     *  @param m1 The first member.
+     *
+     *  @param m2 The second member.
+     *
+     *  @return The following:
+     *

+     *
0 if the members are at the same level

+     *
1 if m2 is higher in the hierarchy than m1

+     *
-1 if m1 is higher in the hierarchy than m2

+     *

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected function compareMembers(m1:IOLAPMember, m2:IOLAPMember):int
+    {
+        //trace("Comparing " + m1.name + " " + m2.name);
+        if (m1 == m2)
+            return 0;
+
+        while (true)
+        {
+            if (m1 && !m2)
+                return reverseCompare ? -1 : 1;
+            if (!m1 && m2)
+                return reverseCompare ? 1 : -1;
+
+            if (m1.level.depth < m2.level.depth)
+            {
+                m2 = m2.parent;
+                if (m1 == m2)
+                    return reverseCompare ? 1 : -1;
+            }
+            else if (m1.level.depth > m2.level.depth)
+            {
+                m1 = m1.parent;
+                if (m1 == m2)
+                    return reverseCompare ? -1 : 1;
+            }
+            else
+            {
+                if (m1.parent == m2.parent)
+                {
+                    var compResult:int = m1.name.localeCompare(m2.name);
+
+                    if (compResult == 0)
+                        return 0;
+                    else if (compResult > 0)
+                        return 1;
+                    else
+                        return -1;
+                }
+                m1 = m1.parent;
+                m2 = m2.parent;
+            }
+        }
+
+        return 0;
+    }
+
+    /**
+     *  Returns information about the relative location of
+     *  two tuples in the set.
+     *
+     *  @param t1 The first tuple.
+     *
+     *  @param t2 The second tuple.
+     *
+     *  @return The following:
+     *

+     *
0 if the tuples are at the same level

+     *
1 if t2 is higher than t1

+     *
-1 if t1 is higher than t2

+     *

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    protected function sortTuple(t1:OLAPTuple, t2:OLAPTuple):int
+    {
+        var t1Mems:Array = t1.explicitMembers.toArray();
+        var t2Mems:Array = t2.explicitMembers.toArray();
+
+        var n:int = t1Mems.length;
+        for (var i:int = 0; i < n; ++i)
+        {
+            var m1:IOLAPMember = t1Mems[i];
+            var m2:IOLAPMember = t2Mems[i];
+            var result:int = compareMembers(m1, m2);
+            if (result != 0)
+                break;
+        }
+
+        return result;
+    }
+
+    /**
+    * @private
+    */
+    private function isDuplicate(t1:OLAPTuple, t2:OLAPTuple):Boolean
+    {
+        var m1:IList = t1.explicitMembers;
+        var m2:IList = t2.explicitMembers;
+
+        var n:int = m1.length;
+        for (var i:int = 0; i < n; ++i)
+        {
+            if (m1.getItemAt(i) != m2.getItemAt(i))
+                return false;
+        }
+
+        return true;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function union(secondSet:IOLAPSet):IOLAPSet
+    {
+        //TODO should we handle null sets?
+
+        var input:OLAPSet = secondSet as OLAPSet;
+        var newSet:OLAPSet = new OLAPSet;
+        //check for same hierarchy
+        var ts1:Array = tuples;
+        var ts2:Array = input.tuples;
+
+        //create a hierarchy array which can be used for comparision
+        var hierarchies:Array = [];
+        var t1:IOLAPTuple = ts1[0];
+        var m1:IList = t1.explicitMembers;
+        var explicitMemberLength:int = m1.length;
+        for (var i:int = 0; i < explicitMemberLength; ++i)
+        {
+            hierarchies.push(m1.getItemAt(i).hierarchy);
+        }
+
+        checkTupleHierarchies(this, explicitMemberLength, hierarchies);
+        checkTupleHierarchies(input, explicitMemberLength, hierarchies);
+
+        var newTuples:Array = tuples.concat(input._tuples);
+
+        //TODO remove duplicates
+        var arrayIndices:Array = newTuples.sort(sortTuple, Array.RETURNINDEXEDARRAY);
+
+        var end:int = arrayIndices.length - 1;
+        var duplicates:Array = [];
+        for (i = 0; i < end; ++i)
+        {
+	        if (isDuplicate(newTuples[arrayIndices[i]], newTuples[arrayIndices[i + 1]]))
+	        {
+	            duplicates.push(arrayIndices[i]);
+	        }
+        }
+
+        //we remove items backwards as otherwise indices will change
+        //with each item removal
+        duplicates = duplicates.sort(Array.NUMERIC | Array.DESCENDING);
+        for each (i in duplicates)
+            newTuples.splice(i, 1);
+
+        newSet._tuples = newTuples;
+
+        return newSet;
+    }
+
+    /**
+    * @private
+    */
+    private function checkTupleHierarchies(olapSet:OLAPSet, length:int, hierarchies:Array):void
+    {
+        var tuples:Array = olapSet.tuples;
+        var message:String = ResourceManager.getInstance().getString(
+            "olap", "unionError");
+        //validate input set
+        var n:int = tuples.length;
+        for (var i:int = 0; i < n; ++i)
+        {
+            var tuple:OLAPTuple = tuples[i];
+            var members:IList = tuple.explicitMembers;
+
+            if (members.length != length)
+                throw Error(message);
+
+            for (var j:int = 0; j < length; ++j)
+            {
+                var hierarchy:IOLAPHierarchy = members.getItemAt(j).hierarchy;
+                if (hierarchy != hierarchies[j])
+                    throw Error(message);
+            }
+        }
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 14999
Author:   klin@adobe.com
Date:     2010-03-24T20:33:13.171795Z

Log Message:
-----------
Merge revision 14996 from 4.x to trunk.

Update for implementing ILayoutDirectionElement in BitmapAsset and SpriteAsset. Instead of trying to handle transforming the assets directly, we leverage AdvancedLayoutFeatures to update the transform matrix of the assets. The main difference between the asset implementations and other ones is that width/height and scaleX/Y are tied to each other. The setters of each of those properties will set the backing value of their respective property. Another change is that we use the existence of layoutFeatures to keep track of whether the asset needs to de-mirror instead of using the mirror variable.

Also, I removed a FIXME from AdvancedLayoutFeatures. We already short-circuit this in the classes that own the AdvancedLayoutFeatures. I changed the FIXMEs for the x getters to TODOs.

QE notes: No
Doc notes: No
Bugs: SDK-25879, SDK-25894
Reviewer: Hans, Carol, Evtim
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SpriteAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/BitmapAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/core/SpriteAsset.as
+++ frameworks/projects/framework/src/mx/core/SpriteAsset.as
@@ -15,6 +15,8 @@
 import flash.display.DisplayObjectContainer;
 import flash.events.Event;
 import flash.geom.Matrix;
+
+import mx.core.AdvancedLayoutFeatures;

 /**
  *  SpriteAsset is a subclass of the flash.display.Sprite class which
@@ -129,8 +131,7 @@
     //
     //--------------------------------------------------------------------------

-    private var mirror:Boolean = false;
-    private var origMatrix:Matrix;
+    private var layoutFeatures:AdvancedLayoutFeatures;

     //--------------------------------------------------------------------------
     //
@@ -142,39 +143,33 @@
     //  x
     //----------------------------------

-    private var _x:Number = 0;
-
-    /**
-     *  @private
-     *  In the mirroring case, we restore the old transform matrix,
-     *  call the superclass' setter to recalculate the transform matrix,
-     *  and call validateTransformMatrix to de-mirror the matrix.
-     *  This ensures that the right matrix values are used when
-     *  de-mirroring.
+    /**
+     *  @private
+     */
+    override public function get x():Number
+    {
+        // TODO(hmuller): by default get x returns transform.matrix.tx rounded to the nearest 20th.
+        // should do the same here, if we're returning layoutFeatures.layoutX.
+        return (layoutFeatures == null) ? super.x : layoutFeatures.layoutX;
+    }
+
+    /**
+     *  @private
      */
     override public function set x(value:Number):void
     {
-        if (mirror)
-        {
-            transform.matrix = origMatrix;
+        if (x == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
             super.x = value;
-            _x = value;
-            validateTransformMatrix();
-        }
-        else
-        {
-            super.x = value;
-        }
-    }
-
-    /**
-     *  @private
-     */
-    override public function get x():Number
-    {
-        // FIXME(hmuller): by default get x returns transform.matrix.tx rounded to the nearest 20th.
-        // should do the same here, if we're returning _x.
-        return (mirror) ? _x : super.x;
+        }
+        else
+        {
+            layoutFeatures.layoutX = value;
+            validateTransformMatrix();
+        }
     }

     //----------------------------------
@@ -183,20 +178,59 @@

     /**
      *  @private
-     *  We need to make sure y is saved in our copy of the matrix
-     *  along with the other properties.
+     */
+    override public function get y():Number
+    {
+        return (layoutFeatures == null) ? super.y : layoutFeatures.layoutY;
+    }
+
+    /**
+     *  @private
      */
     override public function set y(value:Number):void
     {
-        if (mirror)
-        {
-            transform.matrix = origMatrix;
+        if (y == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
             super.y = value;
-            validateTransformMatrix();
-        }
-        else
-        {
-            super.y = value;
+        }
+        else
+        {
+            layoutFeatures.layoutY = value;
+            validateTransformMatrix();
+        }
+    }
+
+    //----------------------------------
+    //  z
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function get z():Number
+    {
+        return (layoutFeatures == null) ? super.z : layoutFeatures.layoutZ;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set z(value:Number):void
+    {
+        if (z == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
+            super.z = value;
+        }
+        else
+    {
+            layoutFeatures.layoutZ = value;
+            validateTransformMatrix();
         }
     }

@@ -207,20 +241,31 @@
     /**
      *  @private
      */
+    override public function get width():Number
+    {
+        return (layoutFeatures == null) ? super.width : layoutFeatures.layoutWidth;
+    }
+
+    /**
+     *  @private
+     */
     override public function set width(value:Number):void
     {
-        if (mirror)
-        {
-            transform.matrix = origMatrix;
+        if (width == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
             super.width = value;
-            // Store new scaleX/Y since setting width may modify them
-            _scaleX = super.scaleX;
-            _scaleY = super.scaleY;
-            validateTransformMatrix();
-        }
-        else
-        {
-            super.width = value;
+        }
+        else
+        {
+            layoutFeatures.layoutWidth = value;
+            // Calculate scaleX based on initial width. We set scaleX
+            // here because resizing a BitmapAsset normally would adjust
+            // the scale to match.
+            layoutFeatures.layoutScaleX = measuredWidth != 0 ? value / measuredWidth : 0;
+            validateTransformMatrix();
         }
     }

@@ -228,85 +273,232 @@
     //  height
     //----------------------------------

-    /**
-     *  @private
-     *  We must override height as well because setting
-     *  height will force scaleX to be positive in the transform
-     *  matrix.
+    private var _height:Number;
+
+    /**
+     *  @private
+     */
+    override public function get height():Number
+    {
+        return (layoutFeatures == null) ? super.height : _height;
+    }
+
+    /**
+     *  @private
      */
     override public function set height(value:Number):void
     {
-        if (mirror)
-        {
-            transform.matrix = origMatrix;
+        if (height == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
             super.height = value;
-            // Store new scaleX/Y since setting height may modify them
-            _scaleX = super.scaleX;
-            _scaleY = super.scaleY;
-            validateTransformMatrix();
-        }
-        else
-        {
-            super.height = value;
-        }
+        }
+        else
+        {
+            _height = value;
+            // Calculate scaleY based on initial height. We set scaleY
+            // here because resizing a BitmapAsset normally would adjust
+            // the scale to match.
+            layoutFeatures.layoutScaleY = measuredHeight != 0 ? value / measuredHeight : 0;
+            validateTransformMatrix();
+        }
+    }
+
+    //----------------------------------
+    //  rotation
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function get rotationX():Number
+    {
+        return (layoutFeatures == null) ? super.rotationX : layoutFeatures.layoutRotationX;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set rotationX(value:Number):void
+    {
+        if (rotationX == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
+            super.rotationX = value;
+        }
+        else
+        {
+            layoutFeatures.layoutRotationX = value;
+            validateTransformMatrix();
+        }
+    }
+    /**
+     *  @private
+     */
+    override public function get rotationY():Number
+    {
+        return (layoutFeatures == null) ? super.rotationY : layoutFeatures.layoutRotationY;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set rotationY(value:Number):void
+    {
+        if (rotationY == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
+            super.rotationY = value;
+        }
+        else
+        {
+            layoutFeatures.layoutRotationY = value;
+            validateTransformMatrix();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override public function get rotationZ():Number
+    {
+        return (layoutFeatures == null) ? super.rotationZ : layoutFeatures.layoutRotationZ;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set rotationZ(value:Number):void
+    {
+        if (rotationZ == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
+            super.rotationZ = value;
+        }
+        else
+        {
+            layoutFeatures.layoutRotationZ = value;
+            validateTransformMatrix();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override public function get rotation():Number
+    {
+        return (layoutFeatures == null) ? super.rotation : layoutFeatures.layoutRotationZ;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set rotation(value:Number):void
+    {
+        rotationZ = value;
     }

     //----------------------------------
     //  scaleX
     //----------------------------------

-    private var _scaleX:Number;
+    /**
+     *  @private
+     */
+    override public function get scaleX():Number
+    {
+        return (layoutFeatures == null) ? super.scaleX : layoutFeatures.layoutScaleX;
+    }

     /**
      *  @private
      */
     override public function set scaleX(value:Number):void
     {
-        if (mirror)
-        {
-            transform.matrix = origMatrix;
+        if (scaleX == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
             super.scaleX = value;
-            _scaleX = value;
-            validateTransformMatrix();
-        }
-        else
-        {
-            super.scaleX = value;
-        }
-    }
-
-    override public function get scaleX():Number
-    {
-        return (mirror) ? _scaleX : super.scaleX;
+        }
+        else
+        {
+            layoutFeatures.layoutScaleX = value;
+            layoutFeatures.layoutWidth = value * measuredWidth;
+            validateTransformMatrix();
+        }
     }

     //----------------------------------
     //  scaleY
     //----------------------------------

-    private var _scaleY:Number;
+    /**
+     *  @private
+     */
+    override public function get scaleY():Number
+    {
+        return (layoutFeatures == null) ? super.scaleY : layoutFeatures.layoutScaleY;
+    }

     /**
      *  @private
      */
     override public function set scaleY(value:Number):void
     {
-        if (mirror)
-        {
-            transform.matrix = origMatrix;
+        if (scaleY == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
             super.scaleY = value;
-            _scaleY = value;
-            validateTransformMatrix();
-        }
-        else
-        {
-            super.scaleY = value;
-        }
-    }
-
-    override public function get scaleY():Number
-    {
-        return (mirror) ? _scaleY : super.scaleY;
+        }
+        else
+        {
+            layoutFeatures.layoutScaleY = value;
+            _height = value * measuredHeight;
+            validateTransformMatrix();
+        }
+    }
+
+    //----------------------------------
+    //  scaleZ
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function get scaleZ():Number
+    {
+        return (layoutFeatures == null) ? super.scaleZ : layoutFeatures.layoutScaleZ;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set scaleZ(value:Number):void
+    {
+        if (scaleZ == value)
+            return;
+
+        if (layoutFeatures == null)
+        {
+            super.scaleZ = value;
+        }
+        else
+        {
+            layoutFeatures.layoutScaleZ = value;
+            validateTransformMatrix();
+        }
     }

     //--------------------------------------------------------------------------
@@ -423,7 +615,7 @@
     //  Methods
     //
     //--------------------------------------------------------------------------
-
+
     /**
      *  @inheritDoc
      *
@@ -434,38 +626,35 @@
      */
     public function invalidateLayoutDirection():void
     {
+        var p:DisplayObjectContainer = parent;
+
         // We check the closest parent's layoutDirection property
-        // set our mirror property and update our transform matrix
-        // accordingly.
-        var p:DisplayObjectContainer = parent;
-
+        // to create or destroy layoutFeatures if needed.
         while (p)
         {
             if (p is ILayoutDirectionElement)
             {
-                // If this element's layoutDirection doesn't match its parent's, then
-                // set the mirror flag.
-                const oldMirror:Boolean = mirror;
-                mirror = (_layoutDirection != null) &&
+                // mirror is true if our layoutDirection differs from our parent's.
+                var mirror:Boolean = (_layoutDirection != null) &&
                     (_layoutDirection != ILayoutDirectionElement(p).layoutDirection);

-                if (mirror != oldMirror)
+                // If our layoutDirection is different from our parent's and if it used to
+                // be the same, create layoutFeatures to handle mirroring.
+                if (mirror && layoutFeatures == null)
                 {
-                    if (mirror)
-                    {
-                        // Set backing variables to current state
-                        _scaleX = super.scaleX;
-                        _scaleY = super.scaleY;
-                        _x = super.x;
-                        validateTransformMatrix();
-                    }
-                    else
-                    {
-                        // origMatrix has been initialized in validateTransformMatrix
-                        // because we weren't matching our parent's layoutDirection before.
-                        transform.matrix = origMatrix;
-                    }
+                    initAdvancedLayoutFeatures();
+                    layoutFeatures.mirror = mirror;
+                    validateTransformMatrix();
                 }
+                else if (!mirror && layoutFeatures)
+                {
+                    // If our layoutDirection is not different from our parent's and if
+                    // it used to be different, then recover our matrix and remove layoutFeatures.
+                    layoutFeatures.mirror = mirror;
+                    validateTransformMatrix();
+                    layoutFeatures = null;
+                }
+
                 break;
             }

@@ -511,21 +700,40 @@

     /**
      *  @private
-     *  Modifies the transform matrix so that this bitmap
-     *  will not be mirrored if a parent is mirrored.
+     *  Initializes AdvancedLayoutFeatures for this asset when mirroring.
+     */
+    private function initAdvancedLayoutFeatures():void
+    {
+        var features:AdvancedLayoutFeatures = new AdvancedLayoutFeatures();
+
+        features.layoutScaleX = scaleX;
+        features.layoutScaleY = scaleY;
+        features.layoutScaleZ = scaleZ;
+        features.layoutRotationX = rotationX;
+        features.layoutRotationY = rotationY;
+        features.layoutRotationZ = rotation;
+        features.layoutX = x;
+        features.layoutY = y;
+        features.layoutZ = z;
+        features.layoutWidth = width;  // for the mirror transform
+        _height = height;  // for backing storage
+        layoutFeatures = features;
+    }
+
+    /**
+     *  @private
+     *  Applies the transform matrix calculated by AdvancedLayoutFeatures
+     *  so that this bitmap will not be mirrored if a parent is mirrored.
      */
     private function validateTransformMatrix():void
     {
-        // Save copy of current matrix
-        origMatrix = transform.matrix.clone();
-
-        // Create new de-mirrored transform matrix
-        const mirrorMatrix:Matrix = transform.matrix;
-        mirrorMatrix.translate(-mirrorMatrix.tx, 0);
-        mirrorMatrix.scale(-1, 1);
-        mirrorMatrix.translate(_x + width, 0);
-
-        transform.matrix = mirrorMatrix;
+        if (layoutFeatures != null)
+        {
+            if (layoutFeatures.is3D)
+                super.transform.matrix3D = layoutFeatures.computedMatrix3D;
+            else
+                super.transform.matrix = layoutFeatures.computedMatrix;
+        }
     }
 }


Change 20070323-sallen-0 by sallen@sallen-new on 2007-03-23 13:08:03 PDT
    in /cygdrive/c/laszlo/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: missed from last change (sorry about that)

Bugs Fixed: LPP-3753 (goes with change 4468)

Technical Reviewer: ptw@openlaszlo.orG
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: sorry, I'm still getting the hang of svn

Tests:

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

--- WEB-INF/lps/lfc/services/LzModeManager.as
+++ WEB-INF/lps/lfc/services/LzModeManager.as
@@ -3,7 +3,7 @@
  *****************************************************************************/

 //* A_LZ_COPYRIGHT_BEGIN ******************************************************
-//* Copyright 2001-2004 Laszlo Systems, Inc.  All Rights Reserved.            *
+//* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.            *
 //* Use is subject to license terms.                                          *
 //* A_LZ_COPYRIGHT_END ********************************************************

@@ -109,14 +109,9 @@
 // @param String eventStr: the event string
 //-----------------------------------------------------------------------------
 LzModeManager.handleMouseEvent= function ( view, eventStr ) {
-    //_root.Debug.warn(view + ', ' + eventStr);
-
-     if (eventStr == "onmouseup") _root.LzTrack.__LZmouseup();
-    _root.LzGlobalMouse[ eventStr ].sendEvent( view );
-
-    if ( this.eventsLocked == true ){
-        return;
-    }
+    //_root.Debug.warn("%w, %w", view , eventStr);
+
+    if (eventStr == "onmouseup") _root.LzTrack.__LZmouseup();

     var dosend = true;
     var isinputtext = false;
@@ -124,10 +119,18 @@
     if (view == null ) {  // check if the mouse event is in a inputtext
         var ss = Selection.getFocus();
         if ( ss != null ){
-            var focusview = eval( ss.substring( 0 , ss.lastIndexOf( '.' ) )
-                                  + ".view");
-            if ( focusview ) view = focusview;
+            var focusview = eval(ss + '.__lzview');
+            //_root.Debug.warn("Selection.getFocus: %w, %w, %w", focusview, ss);
+            if ( focusview != undefined ) {
+                view = focusview;
+            }
         }
+    }
+
+    _root.LzGlobalMouse[ eventStr ].sendEvent( view );
+
+    if ( this.eventsLocked == true ){
+        return;
     }

     var i = this.modeArray.length-1;
@@ -160,6 +163,8 @@
                 this.__LZlastClickTime = getTimer();
             }
         }
+
+        //_root.Debug.warn("sending %w, %w", view , eventStr);

         view[ eventStr ].sendEvent( view );
         if ( eventStr == "onmousedown" ){


Transferred from the Adobe Open Source Subversion Repository

Revision: 20843
Author:   mhorn@adobe.com
Date:     2011-03-14T14:36:04.836183Z

Log Message:
-----------
merge

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ISortField.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/StringUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TabBar.as</path>

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

--- frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as
@@ -836,12 +836,7 @@

     /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @private
      */
     override protected function commitProperties():void
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 16596
Author:   cframpto@adobe.com
Date:     2010-06-18T15:50:44.761276Z

Log Message:
-----------
The following changes apply to Spark DataGrid only.   Code reviews have been deferred until the implementation is closer to completion.

More work on ColumnHeaderBar.  It is no longer commented out in the DataGridSkin but if you have problems you can comment it out again.

checkintests pass

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ColumnHeaderBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DefaultColumnHeaderRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/ColumnHeaderBarSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DataGridSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/GridContainerBase.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ColumnHeaderBarLayout.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/utils/MouseEventUtil.as</path>

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

--- frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
+++ frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as
@@ -13,17 +13,17 @@
 {
 import flash.events.Event;
 import flash.events.MouseEvent;
-import flash.geom.Rectangle;
+import flash.geom.Point;

 import mx.collections.IList;
 import mx.core.ClassFactory;
 import mx.core.IFactory;
 import mx.core.IVisualElement;
 import mx.core.mx_internal;
-import mx.events.CollectionEvent;
-import mx.events.CollectionEventKind;
+import mx.managers.CursorManager;
 import mx.managers.IFocusManagerComponent;

+import spark.components.supportClasses.ColumnHeaderBarLayout;
 import spark.components.supportClasses.DefaultColumnHeaderRenderer;
 import spark.components.supportClasses.GridColumn;
 import spark.events.RendererExistenceEvent;
@@ -59,7 +59,8 @@
  *  @playerversion AIR 2.0
  *  @productversion Flex 4.5
  */
-public class ColumnHeaderBar extends SkinnableDataContainer implements IFocusManagerComponent
+public class ColumnHeaderBar extends SkinnableDataContainer
+    implements IFocusManagerComponent
 {
     include "../core/Version.as";

@@ -80,8 +81,23 @@
     public function ColumnHeaderBar()
     {
         super();
-
+
+        layout = new ColumnHeaderBarLayout();
+        layout.useVirtualLayout = true;
+        layout.clipAndEnableScrolling = true;
+
         itemRendererFunction = defaultColumnHeaderBarItemRendererFunction;
+
+        addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+        addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
+        addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
+
+/*
+        MouseEventUtil.addDownDragUpListeners(this,
+                                        mouseDownDragUpHandler,
+                                        mouseDownDragUpHandler,
+                                        mouseDownDragUpHandler);
+*/
     }

     //--------------------------------------------------------------------------
@@ -90,6 +106,16 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  @private
+     */
+    public var overlayGroup:Group;
+
+    /**
+     *  @private
+     */
+    private var resizeCursorID:int = CursorManager.NO_CURSOR;
+
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -135,7 +161,7 @@

         dispatchChangeEvent("firstItemRendererChanged");
     }
-
+
     //----------------------------------
     //  headerSeparator
     //----------------------------------
@@ -168,7 +194,10 @@
             return;

         _headerSeparator = value;
-        dispatchChangeEvent("columnSeparatorChanged");
+
+        invalidateDisplayList();
+
+        dispatchChangeEvent("headerSeparatorChanged");
     }

     //----------------------------------
@@ -348,14 +377,14 @@
      */
     override public function set dataProvider(value:IList):void
     {
-        if (dataProvider)
-            dataProvider.removeEventListener(CollectionEvent.COLLECTION_CHANGE, dataProvider_collectionChangeHandler);
+        //if (dataProvider)
+        //    dataProvider.removeEventListener(CollectionEvent.COLLECTION_CHANGE, dataProvider_collectionChangeHandler);

         // ensure that our listener is added before the dataGroup which adds a listener during
         // the base class setter if the dataGroup already exists.  If the dataGroup isn't
         // created yet, then we still be first.
-        if (value)
-            value.addEventListener(CollectionEvent.COLLECTION_CHANGE, dataProvider_collectionChangeHandler);
+        //if (value)
+        //    value.addEventListener(CollectionEvent.COLLECTION_CHANGE, dataProvider_collectionChangeHandler);

         super.dataProvider = value;
     }
@@ -420,6 +449,10 @@

         if (instance == dataGroup)
         {
+            overlayGroup = new Group();
+            overlayGroup.layout = null;
+            dataGroup.overlay.addDisplayObject(overlayGroup);
+
             dataGroup.horizontalScrollPosition = _horizontalScrollPosition;
             dataGroup.addEventListener(RendererExistenceEvent.RENDERER_ADD, dataGroup_rendererAddHandler);
             dataGroup.addEventListener(RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler);
@@ -436,6 +469,8 @@
             dataGroup.removeEventListener(RendererExistenceEvent.RENDERER_ADD, dataGroup_rendererAddHandler);
             dataGroup.removeEventListener(RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler);
             horizontalScrollPosition = 0;
+
+            overlayGroup = null;
         }

         super.partRemoved(partName, instance);
@@ -482,8 +517,8 @@
      */
     override protected function measure():void
     {
-        super.measure();
-        //trace("ColumnHeaderBar.measure", measuredWidth, measuredHeight, "min", measuredMinWidth, measuredMinHeight);
+        super.measure();
+        //trace("CHB.measure", measuredWidth, measuredHeight, "min", measuredMinWidth, measuredMinHeight);
     }

     /**
@@ -492,8 +527,21 @@
     override protected function updateDisplayList(unscaledWidth:Number,
                                                   unscaledHeight:Number):void
     {
-        //trace("CoulmnHeaderBar.updateDisplayList", this.nestLevel, unscaledWidth, unscaledHeight, dataGroup);
+        //trace("CHB.udl", unscaledWidth, unscaledHeight);
         super.updateDisplayList(unscaledWidth, unscaledHeight);
+    }
+
+    /**
+     *  @private
+     */
+    override public function updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void
+    {
+        // If the CHB has a height set on it, force all the headers to be
+        // that height.
+        if (!isNaN(explicitHeight))
+            renderer.height = explicitHeight;
+
+        super.updateRenderer(renderer, itemIndex, data);
     }

     /**
@@ -523,19 +571,11 @@
     //--------------------------------------------------------------------------

     /**
-     *  @copy spark.components.DataGroup#getElementAt
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function getElementAt(index:int):IVisualElement
-    {
-        if (!dataGroup)
-            return null;
-
-        return dataGroup.getElementAt(index);
+     *  @private
+     */
+    private function get dataGrid():DataGrid
+    {
+        return owner as DataGrid;
     }

     //--------------------------------------------------------------------------
@@ -598,7 +638,9 @@
         if (event.currentTarget is IItemRenderer)
             newIndex = IItemRenderer(event.currentTarget).itemIndex;
         else
-            newIndex = dataGroup.getElementIndex(event.currentTarget as IVisualElement);
+            newIndex = dataGroup.getElementIndex(event.currentTarget as IVisualElement);
+
+        trace("item_clickHandler", newIndex);
     }

     /**
@@ -612,6 +654,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
+    /*
     protected function dataProvider_collectionChangeHandler(event:Event):void
     {
         // ToDo: what should be done if columns change?
@@ -639,6 +682,7 @@
             }
         }
     }
+    */

     /**
      *  @private
@@ -665,7 +709,124 @@
         if (renderer)
             renderer.removeEventListener(MouseEvent.CLICK, item_clickHandler);
     }
+
+    /**
+     *  This method is called when a MOUSE_DOWN event occurs within the
+     *  ColumnHeaderBar and for all subsequent MOUSE_MOVE events until the
+     *  button is released (even if the mouse leaves the chb).  The last event
+     *  in such a "down drag up" gesture is always a MOUSE_UP.  By default this
+     *  method dispatches GRID_MOUSE_DOWN, GRID_MOUSE_DRAG, or a
+     *  GRID_MOUSE_UP event in response to the the corresponding
+     *  mouse event.  The GridEvent's rowIndex, columnIndex, column, item, and itemRenderer
+     *  properties correspond to the grid cell under the mouse.
+     *
+     *  @param event A MOUSE_DOWN, MOUSE_MOVE, or MOUSE_UP MouseEvent from a
+     *  down/move/up gesture initiated within the ColumnHeaderBar.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    protected function mouseDownDragUpHandler(event:MouseEvent):void
+    {
+        const eventStageXY:Point = new Point(event.stageX, event.stageY);
+        const eventColumnHeaderBarXY:Point = globalToLocal(eventStageXY);
+
+        //const gridDimensions:GridDimensions = GridLayout(layout).gridDimensions;
+        //const eventRowIndex:int = gridDimensions.getRowIndexAt(eventColumnHeaderBarXY.x, eventColumnHeaderBarXY.y);
+        //const eventColumnIndex:int = gridDimensions.getColumnIndexAt(eventColumnHeaderBarXY.x, eventColumnHeaderBarXY.y);
+
+        trace("event type", event.type, "chb", eventColumnHeaderBarXY, "stage", eventStageXY);
+
+        var gridEventType:String;
+        switch(event.type)
+        {
+            case MouseEvent.MOUSE_MOVE:
+            {
+                //gridEventType = GridEvent.GRID_MOUSE_DRAG;
+                break;
+            }
+            case MouseEvent.MOUSE_UP:
+            {
+                //gridEventType = GridEvent.GRID_MOUSE_UP;
+                break;
+            }
+            case MouseEvent.MOUSE_DOWN:
+            {
+                //gridEventType = GridEvent.GRID_MOUSE_DOWN;
+                //mouseDownRowIndex = eventRowIndex;
+                //mouseDownColumnIndex = eventColumnIndex;
+                break;
+            }
+        }
+
+        //dispatchGridEvent(event, gridEventType, eventColumnHeaderBarXY, eventRowIndex, eventColumnIndex);
+    }
+
+    /**
+     *  @private
+     */
+    private function mouseDownHandler(event:MouseEvent):void
+    {
+        // ToDo: should there be dataGrid.resizableColumns so you don't have
+        // to set every column to false.
+        if (!enabled /*|| !dataGrid.resizableColumns*/)
+            return;
+
+        trace("mouseDown", event.target);
+
+        // ToDo: figure out which column or separator
+        //if (!column.resizable)
+        //   return;
+    }
+
+    /**
+     *  @private
+     */
+    private function mouseOverHandler(event:MouseEvent):void
+    {
+        // ToDo: should there be dataGrid.resizableColumns so you don't have
+        // to set every column to false.
+        if (!enabled /*|| !dataGrid.resizableColumns*/)
+            return;
+
+        trace("mouseOver", event.target);
+
+        // ToDo: figure out which column or separator
+        //if (!column.resizable)
+        //   return;
+
+        // This goes in columnResizeMouseOutHandler
+       // ToDo: should this be a property rather than a style?
+
+        // Hide the mouse, attach and show the cursor
+        /*
+        var stretchCursorClass:Class = getStyle("stretchCursor");
+        resizeCursorID = cursorManager.setCursor(
+                            stretchCursorClass,
+                            CursorManagerPriority.HIGH, 0, 0);
+        */
+    }
+
+    /**
+     *  @private
+     */
+    private function mouseOutHandler(event:MouseEvent):void
+    {
+        if (!enabled /*|| !dataGrid.resizableColumns*/)
+            return;
+
+        trace("mouseOut", event.target);
+
+        // ToDo: figure out which column or separator
+
+        // ToDo: is this check really right - should the cursor be restored?
+        //if (!column.resizable)
+        //    return;
+
+        // This goes in columnResizeMouseOutHandler
+        //cursorManager.removeCursor(resizeCursorID);
+    }
 }
-
 }
-


Transferred from the Adobe Open Source Subversion Repository

Revision: 12470
Author:   clucier@adobe.com
Date:     2009-12-03T22:07:11.713822Z

Log Message:
-----------
As it turns out, supressing MOVE and RESIZE when we can really helps out performance.  So replacing the hasEventListener check and fixing up DataGrid to avoid the need for capture.

QE notes: None
Doc notes: None
Bugs: None
Reviewer: Alex
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/mx/src/mx/controls/DataGrid.as
+++ frameworks/projects/mx/src/mx/controls/DataGrid.as
@@ -4321,8 +4321,9 @@
             addEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true, 0, true);
         systemManager.getSandboxRoot().
             addEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE, editorMouseDownHandler, false, 0, true);
-        // we disappear if stage is resized
-        systemManager.addEventListener(Event.RESIZE, editorStageResizeHandler, true, 0, true);
+        // we disappear if stage or our grid is resized
+        systemManager.addEventListener(Event.RESIZE, editorAncestorResizeHandler);
+        addEventListener(Event.RESIZE, editorAncestorResizeHandler);

 	// Dispatch our item editor created event
         var event:DataGridEvent =
@@ -4423,7 +4424,8 @@
                 removeEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true);
             systemManager.getSandboxRoot().
                 removeEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE, editorMouseDownHandler);
-            systemManager.removeEventListener(Event.RESIZE, editorStageResizeHandler, true);
+            systemManager.removeEventListener(Event.RESIZE, editorAncestorResizeHandler);
+            removeEventListener(Event.RESIZE, editorAncestorResizeHandler);

             var event:DataGridEvent =
                 new DataGridEvent(DataGridEvent.ITEM_FOCUS_OUT);
@@ -5102,11 +5104,9 @@
     /**
      *  @private
      */
-    private function editorStageResizeHandler(event:Event):void
-    {
-        if (event.target is DisplayObjectContainer &&
-            DisplayObjectContainer(event.target).contains(this))
-            endEdit(DataGridEventReason.OTHER);
+    private function editorAncestorResizeHandler(event:Event):void
+    {
+        endEdit(DataGridEventReason.OTHER);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 6035
Author:   smgilson@adobe.com
Date:     2009-04-08T18:19:39.016902Z

Log Message:
-----------
Add note that the textInput event is not dispatched for the delete and backspace keys

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>

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

--- frameworks/projects/mx/src/mx/controls/TextArea.as
+++ frameworks/projects/mx/src/mx/controls/TextArea.as
@@ -116,6 +116,7 @@

 /**
  *  Dispatched when the user types, deletes, or pastes text into the control.
+ *  No event is dispatched when the user presses the Delete key, or Backspace key.
  *
  *
Even though the default value of the TextEvent.bubbles property
  *  is true, this control dispatches the event with


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/rpc/src/mx/rpc/AsyncRequest.as
+++ frameworks/projects/rpc/src/mx/rpc/AsyncRequest.as
@@ -0,0 +1,141 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.rpc
+{
+
+import mx.core.mx_internal;
+import mx.messaging.Producer;
+import mx.messaging.messages.AcknowledgeMessage;
+import mx.messaging.messages.AsyncMessage;
+import mx.messaging.messages.ErrorMessage;
+import mx.messaging.messages.IMessage;
+import mx.messaging.events.MessageEvent;
+import mx.messaging.events.MessageFaultEvent;
+
+use namespace mx_internal;
+
+/**
+ *  The AsyncRequest class provides an abstraction of messaging for RPC call invocation.
+ *  An AsyncRequest allows multiple requests to be made on a remote destination
+ *  and will call back to the responder specified within the request when
+ *  the remote request is completed.
+ */
+public class AsyncRequest extends mx.messaging.Producer
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Constructs a new asynchronous request.
+	 */
+	public function AsyncRequest()
+	{
+		super();
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    // Public Methods
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Delegates to the results to responder
+	 *  @param    ack Message acknowlegdement of message previously sent
+	 *  @param    msg Message that was recieved the acknowledgement
+	 *  @private
+	 */
+	override public function acknowledge(ack:AcknowledgeMessage, msg:IMessage):void
+	{
+        var error:Boolean = ack.headers[AcknowledgeMessage.ERROR_HINT_HEADER];
+        // super will clean the error hint from the message
+        super.acknowledge(ack, msg);
+        // if acknowledge is *not* for a message that caused an error
+        // dispatch a result event
+        if (!error)
+        {
+			var act:String = ack.correlationId;
+			var resp:IResponder = IResponder(_pendingRequests[act]);
+			if (resp)
+			{
+				delete _pendingRequests[act];
+				resp.result(MessageEvent.createEvent(MessageEvent.RESULT, ack));
+			}
+		}
+	}
+
+	/**
+	 *  Delegates to the fault to responder
+	 *  @param    error message.
+	 *            The error codes and informaton are contained in the
+	 *            headers property
+	 *  @param    msg Message original message that caused the fault.
+	 *  @private
+	 */
+	override public function fault(errMsg:ErrorMessage, msg:IMessage):void
+	{
+	    super.fault(errMsg, msg);
+
+	    if (_ignoreFault)
+	    	return;
+
+        // This used to use the errMsg.correlationId here but
+        // if the server fails to deserialize the message (like if
+        // the body references a non-existent server class)
+        // it cannot supply a correlationId to the error message.
+        var act:String = msg.messageId;
+		var resp:IResponder = IResponder(_pendingRequests[act]);
+		if (resp)
+		{
+			delete _pendingRequests[act];
+			resp.fault(MessageFaultEvent.createEvent(errMsg));
+		}
+	}
+
+   /**
+    * Returns true if there are any pending requests for the passed in message.
+    *
+    * @param msg The message for which the existence of pending requests is checked.
+    */
+	override public function hasPendingRequestForMessage(msg:IMessage):Boolean
+	{
+		var act:String = msg.messageId;
+		return _pendingRequests[act];
+	}
+
+
+	/**
+	 *  Dispatches the asynchronous request and stores the responder to call
+	 *  later.
+	 */
+	public function invoke(msg:IMessage, responder:IResponder):void
+	{
+		_pendingRequests[msg.messageId] = responder;
+		send(msg);
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  manages a list of all pending requests.  each request must implement
+	 *  IResponder
+	 */
+	private var _pendingRequests:Object = {};
+}
+}


version 3.7.6

version 3.7.6

--- kdp3Lib/src/com/kaltura/kdpfl/ApplicationFacade.as
+++ kdp3Lib/src/com/kaltura/kdpfl/ApplicationFacade.as
@@ -32,7 +32,7 @@
 		/**
 		 * The current version of the KDP.
 		 */
-		public var kdpVersion : String = "v3.7.5";
+		public var kdpVersion : String = "v3.7.6";

 		/**
 		 * save any mediator name that is registered to this array in order to delete at any time


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/framework/src/mx/core/IUID.as
+++ frameworks/projects/framework/src/mx/core/IUID.as
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-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.core
+{
+
+/**
+ *  The IUID interface defines the interface for objects that must have
+ *  Unique Identifiers (UIDs) to uniquely identify the object.
+ *  UIDs do not need to be universally unique for most uses in Flex.
+ *  One exception is for messages send by data services.
+ */
+public interface IUID
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  uid
+	//----------------------------------
+
+	/**
+	 *  The unique identifier for this object.
+     */
+    function get uid():String;
+
+    /**
+     *  @private
+     */
+    function set uid(value:String):void;
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 9177
Author:   jimurphy@adobe.com
Date:     2009-08-07T21:15:07.894169Z

Log Message:
-----------
Merged 3.4 revisions 8630,8660,8683,8735,8750,8753,8755,8757,8759,8764,8776,8798,8821,8824,8837,8862,8911,8946,8949,8962,8965,9026,9109,9131,9138-9139,9147 -> trunk

integrates:
player: 10.0.32.18
AIR kit: 1.5.2.8870 (20090721ap)

checkintests: pass

(btw: I'm not happy about doing this on a Friday PM!)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/air/air_version.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/BrowserManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/mac/Install Flash Player 10 UB.dmg</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/player/10/playerglobal.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLDecoder.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/flashplayer.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/libflashplayer.so.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/FlashPlayer.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/mac/Flash Player.app.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/Install Flash Player 10 Plugin.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/Install Flash Player 10 ActiveX.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanceUtils.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageAgent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/mxml/IMXMLSupport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/ISOAPDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/install_flash_player_10_linux.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLSchemaInstance.as</path>

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

--- frameworks/projects/mx/src/mx/controls/Tree.as
+++ frameworks/projects/mx/src/mx/controls/Tree.as
@@ -896,7 +896,10 @@
      */
     public function get firstVisibleItem():Object
     {
-        return listItems[0][0].data;
+        if (listItems.length > 0 && listItems[0].length > 0)
+            return listItems[0][0].data;
+        else
+            return null;
     }

     /**


Curve Line

Curve Line

--- WeaveUISpark/src/weave/visualization/plotters/GeometryRelationPlotter.as
+++ WeaveUISpark/src/weave/visualization/plotters/GeometryRelationPlotter.as
@@ -27,6 +27,7 @@
 	import weave.data.QKeyManager;
 	import weave.primitives.GeneralizedGeometry;
 	import weave.utils.ColumnUtils;
+	import weave.utils.DrawUtils;
 	import weave.visualization.layers.PlotTask;

 	// Refer to Feature #924 for detail description
@@ -214,10 +215,12 @@
 						tempShape.graphics.lineStyle(-Math.round((valueColumn.getValueFromKey(tempRowKeys[j], Number) / max) * lineWidth.value), negLineColor.value);
 					}

-					tempShape.graphics.moveTo(tempSourcePoint.x, tempSourcePoint.y);
+//					tempShape.graphics.moveTo(tempSourcePoint.x, tempSourcePoint.y);
 					getCoordsFromRecordKey(destinationKeyColumn.getValueFromKey(tempRowKeys[j], IQualifiedKey), tempDestinationPoint); // Get destionation coordinate
 					task.dataBounds.projectPointTo(tempDestinationPoint, task.screenBounds);
-					tempShape.graphics.lineTo(tempDestinationPoint.x, tempDestinationPoint.y);
+//					tempShape.graphics.lineTo(tempDestinationPoint.x, tempDestinationPoint.y);
+
+					DrawUtils.drawCurvedLine(tempShape.graphics, tempSourcePoint.x, tempSourcePoint.y, tempDestinationPoint.x, tempDestinationPoint.y, 1);
 				}

 				task.buffer.draw(tempShape);