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

--- frameworks/projects/advancedgrids/src/mx/olap/QueryCubeBuilder.as
+++ frameworks/projects/advancedgrids/src/mx/olap/QueryCubeBuilder.as
@@ -0,0 +1,757 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flash.utils.Dictionary;
+
+import mx.collections.IList;
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+/**
+* @private
+*/
+public class QueryCubeBuilder
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    private var prevNodeAtLevel:Array; //of CubeNodes
+    private var allNodeAtLevel:Array;  // of CubeNodes
+    private var prevValueAtLevel:Array; // type depends on data (mostly string)
+
+    // the level at which the new property is going to be placed
+    private var currentLevel:int;
+    private var prevLevel:int;
+    private var nextLevel:int;
+
+    //the nodes whose values are going to be aggregated as the above node
+    //value has changed.
+    private var closingNodesBelow:Array;
+    private var closingValues:Array;
+
+    //list of measures in the cube
+    private var measureMembers:IList;
+
+    // the maps holding nodes which are used to finalize the aggregation
+
+    // simple aggregation map
+    private var computeEndMap:Dictionary = new Dictionary(false);
+
+    //aggregation of aggregations map
+    private var computeObjEndMap:Dictionary = new Dictionary(false);
+
+    private var measureMap:Object = {};
+
+    private var allLevelNames:Array;
+
+    private var nodesToClose:Array = [];
+    private var nodesToAggregate:Array;
+    private var dataToAggregate:Array;
+    private var measureToAggregate:Array;
+    private var valueToAggregate:Array;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    // cube
+    //----------------------------------
+
+    private var _cube:OLAPCube;
+
+    public function set cube(c:IOLAPCube):void
+    {
+        _cube = c as OLAPCube;
+    }
+
+    //----------------------------------
+    // rootNode
+    //----------------------------------
+
+    /**
+    *  Top most node which can be used to access the query cube.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var rootNode:CubeNode;
+
+    //----------------------------------
+    // allNodePropertyName
+    //----------------------------------
+
+    /**
+    * The property name used to refer to the property
+    * pointing at the aggregation of nodes below a CubeNode
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
+    */
+    public var allNodePropertyName:String ="(QAll)";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    public function initNodeBuilding():void
+    {
+        prevNodeAtLevel = [];
+        allNodeAtLevel = [];
+        prevValueAtLevel = [];
+        measureMap = {};
+
+        //compute for all the measures
+        measureMembers = _cube.findDimension("Measures").members;
+
+        for each (var measure:OLAPMeasure in measureMembers)
+        {
+            computeEndMap[measure] = [];
+            computeObjEndMap[measure] = [];
+            measureMap[measure.name] = measure;
+        }
+
+        nodesToClose = [];
+
+        nodesToAggregate = [];
+        dataToAggregate = [];
+        measureToAggregate = [];
+        valueToAggregate = [];
+
+
+        //prepare a dictionary of all level names
+        allLevelNames = [];
+
+        for each (var d:OLAPDimension in _cube.dimensions)
+        {
+        	if (d.isMeasure)
+        		continue;
+            for each (var a:OLAPAttribute in d.attributes)
+            {
+                allLevelNames.push(a.findMember(a.allMemberName).uniqueName);
+            }
+
+            for each (var h:OLAPHierarchy in d.hierarchies)
+            {
+                allLevelNames.push(h.findMember(h.allMemberName).uniqueName);
+            }
+        }
+    }
+
+    public function moveToNextRound():void
+    {
+        currentLevel = 0;
+        prevLevel = -1;
+        nextLevel = 1;
+    }
+
+    private function sortCubeNodes(p1:CubeNode, p2:CubeNode):int
+    {
+        if (p1.level == p2.level)
+            return 0;
+        if (p1.level < p2.level)
+            return 1;
+        return -1;
+    }
+
+    /**
+     *  @private
+     *  Check whether the cubeNode has any entry for a (All) field
+     *  from any level.
+     */
+    private function allPropertyPresent(node:CubeNode):Boolean
+    {
+        for (var p:String in node)
+        {
+            if (allLevelNames.indexOf(p) > -1)
+            	return true;
+        }
+        return false;
+    }
+
+    public function completeNodeBuilding():void
+    {
+        //TODO initializing rootNode twice
+        rootNode = prevNodeAtLevel[0];
+        closingNodesBelow = prevNodeAtLevel.reverse();
+        closingValues = prevValueAtLevel.reverse();
+
+        var tempLevel:int = closingNodesBelow.length-1;
+        var p:String;
+        var n:int = closingNodesBelow.length;
+        for (var i:int = 0; i < n; ++i)
+        {
+            if (tempLevel < 1)
+                continue;
+            var closingValue:Object = closingValues[i];
+            //OLAPTrace.traceMsg("Closing value:" + closingValues[i], //OLAPTrace.TRACE_LEVEL_2);
+            var closingNode:Object = closingNodesBelow[i];
+            if (closingNode[closingValue] is CubeNode)
+            {
+                if (closingNode[allNodePropertyName] is CubeNode)
+                {
+                    var index:int = nodesToClose.indexOf(closingNode);
+                    if (index == -1)
+                        nodesToClose.push(closingNode);
+                }
+            }
+
+            --tempLevel;
+        }
+
+        n = nodesToAggregate.length;
+        for (i = 0; i < n; ++ i)
+        {
+            var prevNode:Object = nodesToAggregate[i];
+            if (prevNode.numCells > 2 && allLevelNames.indexOf(valueToAggregate[i]) > -1)
+                continue;
+            var tempAllNode:Object;
+
+			if (prevNode.numCells == 2)
+        	{
+        		if (prevNode.hasOwnProperty(allNodePropertyName))
+	        	{
+		        	for (p in prevNode)
+			        {
+			        	if (p == allNodePropertyName)
+			        		continue;
+			        	if (prevNode[allNodePropertyName] != prevNode[p])
+			        		prevNode[allNodePropertyName] = prevNode[p];
+			        	break;
+			        }
+			        continue;
+			    }
+		   }
+
+            if (prevNode[allNodePropertyName] is CubeNode || prevNode[allNodePropertyName] is Number)
+                tempAllNode = prevNode[allNodePropertyName] = new SummaryNode;
+            else
+                tempAllNode = prevNode[allNodePropertyName];
+            aggregateAllValue(tempAllNode, dataToAggregate[i], measureToAggregate[i]);
+        }
+
+        // we sort the nodes in their order of level to do aggregation
+        // bottom up to get correct results
+        nodesToClose.sort(sortCubeNodes);
+
+        // close all nodes pending
+        for each (var node:CubeNode in nodesToClose)
+        {
+        	var allPropPresent:Boolean = allPropertyPresent(node);
+            for (p in node)
+            {
+                if (p == allNodePropertyName)
+                    continue;
+                // if there are other paths leading to the nodes below
+                // do not include the all property in aggregation because that would
+                // lead to multiple aggregations of same values
+                if (node.numCells > 2 && allLevelNames.indexOf(p) > -1)
+                    continue;
+
+            	// if we have only one extra entry in the node other than allNodeProperty
+                // then we can optimize.
+                if (allPropPresent && node.numCells == 3)
+            		node[allNodePropertyName] = node[p];
+				else
+                	accumValuesFromNode(node[allNodePropertyName], node[p]);
+            }
+        }
+
+        for (p in rootNode)
+        {
+            if (p == allNodePropertyName || (rootNode.numCells > 2 && allLevelNames.indexOf(p) > -1))
+                continue;
+            // can we accumulate everything from the tree to the all tree here?
+            accumValuesFromNode(rootNode[allNodePropertyName], rootNode[p]);
+        }
+
+        var temp:Array;
+        var y:Object;
+        var measure:OLAPMeasure;
+        var aggregator:IOLAPCustomAggregator;
+        for (var x:Object in computeEndMap)
+        {
+            measure = x as OLAPMeasure;
+            aggregator = measure.aggregator as IOLAPCustomAggregator;
+            temp = computeEndMap[x];
+            for each (y in temp)
+                y[measure.name] = aggregator.computeEnd(y[measure.name], measure.dataField);
+        }
+
+        for (x in computeObjEndMap)
+        {
+            measure = x as OLAPMeasure;
+            aggregator = measure.aggregator as IOLAPCustomAggregator;
+            temp = computeObjEndMap[x];
+            for each (y in temp)
+                y[measure.name] = aggregator.computeObjectEnd(y[measure.name], measure.dataField);
+        }
+    }
+
+    public function addValueToNodeBuilder(value:Object, currentData:Object):void
+    {
+        // decide whether to create a new node or use the previous node
+        var prevNode:CubeNode = prevNodeAtLevel[currentLevel];
+        var prevValue:Object = prevValueAtLevel[currentLevel];
+        var closingValue:Object;
+        var closingNode:Object
+
+        if (prevValue)
+        {
+            if (prevValue == value)
+            {
+                // continue to process the same value
+                // update nodes
+                //OLAPTrace.traceMsg("Continue with value:" + prevValue, OLAPTrace.TRACE_LEVEL_2);
+            }
+            else
+            {
+                // no more processing of this value.
+                // time to compute update all nodes etc
+
+                // close all nodes below this node
+                closingNodesBelow = prevNodeAtLevel.splice(nextLevel).reverse();
+                closingValues = prevValueAtLevel.splice(nextLevel).reverse();
+                var tempLevel:int = currentLevel + closingNodesBelow.length;
+                var n:int = closingNodesBelow.length;
+                for (var i:int = 0; i < n; ++i)
+                {
+                    closingValue = closingValues[i];
+                    //OLAPTrace.traceMsg("Closing value:" + closingValues[i], OLAPTrace.TRACE_LEVEL_2);
+                    closingNode = closingNodesBelow[i];
+                    if (closingNode[closingValue] is CubeNode)
+                    {
+                        if (tempLevel != 0)
+                        {
+                            if (closingNode[allNodePropertyName] is CubeNode)
+                            {
+                                if (nodesToClose.indexOf(closingNode) == -1)
+                                    nodesToClose.push(closingNode);
+                            }
+                        }
+                    }
+
+                    --tempLevel;
+                }
+
+                //OLAPTrace.traceMsg("Closing value:" + prevValue, //OLAPTrace.TRACE_LEVEL_2);
+                closingValue = prevValue;
+                closingNode = prevNode;
+                if (closingNode[closingValue] is CubeNode)
+                {
+                    if (currentLevel != 0)
+                    {
+                        if (closingNode[allNodePropertyName] is CubeNode)
+                        {
+                            if (nodesToClose.indexOf(closingNode) == -1)
+                                nodesToClose.push(closingNode);
+                        }
+                    }
+                }
+
+                //OLAPTrace.traceMsg("New value:" + value, //OLAPTrace.TRACE_LEVEL_2);
+            }
+        }
+
+        var allNode:CubeNode = allNodeAtLevel[currentLevel];
+
+        if (!prevNode)
+        {
+            //OLAPTrace.traceMsg("Creating new node: " + value, //OLAPTrace.TRACE_LEVEL_2);
+            // - create a new node, put the pointer to the ALL node, add new key to the ALL node
+            var newNode:CubeNode = new CubeNode(currentLevel);
+
+            // create a all node to summaries the cells of this node
+            newNode[allNodePropertyName] = new CubeNode(currentLevel+1);
+            ++newNode.numCells;
+            //TODO initializing rootNode twice
+            if (currentLevel == 0 && prevNodeAtLevel.length == 0)
+                rootNode = newNode;
+
+            prevNodeAtLevel[currentLevel] = newNode;
+            if (!allNode)
+            {
+                // for the top most level we would have only one node
+                // which is also the all node
+                // for other levels we have one node which is a all node
+                // containing aggr value of all cells in the nodes at that level
+                if (currentLevel > 0)
+                {
+                    allNodeAtLevel[currentLevel] = allNode = new CubeNode(currentLevel+1);
+                    allNode[allNodePropertyName] = {};
+                    allNodeAtLevel[prevLevel][allNodePropertyName] = allNode;
+                    ++allNode.numCells;
+                }
+                else
+                {
+                    // special case of zero level
+                    allNodeAtLevel[currentLevel] = newNode;
+                }
+            }
+
+            prevNode = newNode;
+        }
+        else
+        {
+            // add a new cell/property to the previous node if it doesn't exist
+            if (!prevNode.hasOwnProperty(value))
+            {
+                //prevNode[value] = 0;
+                prevNodeAtLevel.splice(nextLevel);
+                prevValueAtLevel.splice(nextLevel);
+            }
+            else
+            {
+                if (!prevNodeAtLevel[nextLevel])
+                {
+                    //assigning a summary node was causing a issue(1096)
+                    if (prevNode[value] is CubeNode)
+                    {
+                        // a node already seems to be present for this value
+                        prevNodeAtLevel[nextLevel] = prevNode[value];
+                        // we cannot set what the previous value for next level should be
+                        // because we have already cleared it and lost it.
+                    }
+                }
+            }
+        }
+
+        // make the node at previous level point to the node
+        if (currentLevel > 0)
+        {
+            var prevLevelNode:Object = prevNodeAtLevel[prevLevel];
+            if (!prevLevelNode.hasOwnProperty(prevValueAtLevel[prevLevel]))
+            {
+                var prevLevelValue:Object = prevValueAtLevel[prevLevel];
+                prevLevelNode[prevLevelValue] = newNode;
+                ++prevLevelNode.numCells;
+            }
+        }
+
+        prevValueAtLevel[currentLevel] = value;
+        ++prevLevel;
+        ++currentLevel;
+        ++nextLevel;
+
+    }
+
+    public function addMeasureValueToNode(value:Object, currentData:Object, measureToUpdate:OLAPMeasure):void
+    {
+        var prevNode:CubeNode = prevNodeAtLevel[currentLevel-1];
+        var prevValue:Object = prevValueAtLevel[currentLevel-1];
+
+        if (!prevNode.hasOwnProperty(value))
+        {
+            prevNode[value] = new SummaryNode;
+            ++prevNode.numCells;
+        }
+
+        aggregateAllValue(prevNode[value], currentData, measureToUpdate);
+
+        nodesToAggregate.push(prevNode);
+        dataToAggregate.push(currentData);
+        measureToAggregate.push(measureToUpdate);
+        valueToAggregate.push(value);
+    }
+
+    private function addValueToNode(node:Object, name:String,
+                        value:Object, measure:OLAPMeasure):void
+    {
+        var aggregator:IOLAPCustomAggregator;
+        if (value is Number)
+        {
+            aggregator = measure.aggregator as IOLAPCustomAggregator;
+            if (!node.hasOwnProperty(name))
+            {
+                node[name] = aggregator.computeBegin(name);
+                computeEndMap[measure].push(node);
+                //if (node is SummaryNode)
+                //  node["measures"][name] = measure;
+                aggregator.computeLoop(node[name], name, value);
+            }
+            else
+            {
+                aggregator.computeLoop(node[name], name, value);
+            }
+        }
+        else
+        {
+            var temp:Object;
+            if (!node.hasOwnProperty(name))
+            {
+                node[name] = temp = new SummaryNode;
+                ++node.numCells;
+                for (var p:String in value)
+                {
+                    if (value is SummaryNode)
+                        measure = measureMap[p];
+
+                    if (measure)
+                    {
+                        aggregator = measure.aggregator as IOLAPCustomAggregator;
+                        if (value[p] is Number)
+                        {
+                            temp[name] = aggregator.computeBegin(p);
+                            computeEndMap[measure].push(temp);
+                            aggregator.computeLoop(temp[name], p, value[p]);
+                        }
+                        else
+                        {
+                            if (temp.hasOwnProperty(p))
+                            {
+                                aggregator.computeObjectLoop(temp[p], value[p]);
+                            }
+                            else
+                            {
+                                temp[p] = aggregator.computeObjectBegin(value[p]);
+                                computeObjEndMap[measure].push(temp);
+                            }
+
+                        }
+                    }
+                }
+            }
+            else
+            {
+                if (value is SummaryNode && !(node[name] is SummaryNode))
+                {
+                	var incr:Boolean = false;
+                	if (!node.hasOwnProperty(name))
+	                	incr = true;
+                    temp = node[name] = new SummaryNode;
+                	if (incr)
+                		++node.numCells;
+                }
+                else
+                {
+                    temp = node[name];
+                }
+
+                for (p in value)
+                {
+                    if (temp.hasOwnProperty(p))
+                    {
+                        measure = measureMap[p];
+                        aggregator = measure.aggregator as IOLAPCustomAggregator;
+                        aggregator.computeObjectLoop(temp[p], value[p]);
+                    }
+                    else
+                    {
+                        if (temp is SummaryNode)
+                            measure = measureMap[p];
+
+                        if (measure)
+                        {
+                            aggregator = measure.aggregator as IOLAPCustomAggregator;
+                            if (value[p] is Number)
+                            {
+                                temp[p] = aggregator.computeBegin(p);
+                                aggregator.computeLoop(temp[p], p, value[p]);
+                            }
+                            else
+                            {
+                                temp[p] = aggregator.computeObjectBegin(value[p]);
+                                computeObjEndMap[measure].push(temp);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    private function accumValuesFromNode(target:Object,
+                                source:Object):void
+    {
+        for (var p:String in source)
+        {
+	    	if (p == allNodePropertyName)
+				continue;
+
+            // if there are other paths leading to the nodes below
+            // do not include the all property in aggregation because that would
+            // lead to multiple aggregations of same values
+            if (source.numCells > 2 && allLevelNames.indexOf(p) > -1)
+                continue;
+
+            var value:Object = source[p];
+            if (value is CubeNode)
+            {
+                var newNode:CubeNode;
+                if (target[p] is CubeNode)
+                {
+                    newNode = target[p];
+                }
+                else
+                {
+                    target[p] = newNode = new CubeNode(value.level);
+                	++target.numCells;
+                }
+                accumValuesFromNode(newNode, value);
+            }
+            else
+            {
+                addValueToNode(target, p, value, null);
+            }
+        }
+
+        if (target.numCells == 1)
+        {
+        	for (p in target)
+	        {
+	        	target[allNodePropertyName] = target[p];
+	        	break;
+	        }
+	        ++target.numCells;
+        }
+        else if (target.numCells == 2 && target.hasOwnProperty(allNodePropertyName))
+        {
+        	for (p in target)
+	        {
+	        	if (p == allNodePropertyName)
+	        		continue;
+	        	if (target[allNodePropertyName] != target[p])
+	        		target[allNodePropertyName] = target[p];
+	        	break;
+	        }
+        }
+        else
+        {
+        	var done:Boolean = false;
+        	var otherProperty:String;
+        	for (p in target)
+	        {
+	        	if (p == allNodePropertyName)
+	        		continue;
+	        	if (target[allNodePropertyName] == target[p])
+	        	{
+	        		value = target[p];
+	        		if (value is CubeNode)
+                	{
+                		target[allNodePropertyName] = newNode = new CubeNode(value.level);
+	        			accumValuesFromNode(newNode, value);
+						for (otherProperty in target)
+                		{
+                			if (otherProperty == allNodePropertyName ||
+                				otherProperty == p)
+                				continue;
+                			//now we have the other property.
+			            	accumValuesFromNode(newNode, source[otherProperty]);
+                		}
+                		done = true;
+                	}
+                	else
+                	{
+                		target[allNodePropertyName] = null;
+		            	addValueToNode(target, allNodePropertyName, value, null);
+						for (otherProperty in target)
+                		{
+                			if (otherProperty == allNodePropertyName ||
+                				otherProperty == p)
+                				continue;
+                			//now we have the other property.
+			            	addValueToNode(target, allNodePropertyName, target[otherProperty], null);
+                		}
+                		done = true;
+                	}
+	        		break;
+	        	}
+	        }
+
+	        if (!done)
+        	{
+	        	p = allNodePropertyName;
+	            value = source[p];
+	        	if (value is CubeNode)
+	        	{
+	                if (target[p] is CubeNode)
+	                {
+	                    newNode = target[p];
+	                }
+	                else
+	                {
+	                	target[p] = newNode = new CubeNode(value.level);
+	                	++target.numCells;
+	                }
+	                accumValuesFromNode(newNode, value);
+	            }
+	            else
+	            {
+	            	addValueToNode(target, p, value, null);
+	            }
+	        }
+        }
+    }
+
+    public function aggregateAllValue(node:Object,/* name:String,*/
+                        value:Object, measure:OLAPMeasure):void
+    {
+        var measureName:String = measure.name;
+        var aggregator:IOLAPCustomAggregator = measure.aggregator as IOLAPCustomAggregator;
+        var prop:String = "saved_" + measureName;
+        var temp:Object;
+        if (!node.hasOwnProperty(measureName))
+        {
+            temp = node;
+            if (measure)
+            {
+                if (temp.hasOwnProperty(measureName))
+                {
+                    aggregator.computeObjectLoop(temp[measureName], value[prop]);
+                }
+                else
+                {
+                    temp[measureName] = aggregator.computeObjectBegin(value[prop]);
+                    computeObjEndMap[measure].push(temp);
+                }
+            }
+        }
+        else
+        {
+            temp = node;
+            if (temp.hasOwnProperty(measureName))
+            {
+                aggregator.computeObjectLoop(temp[measureName], value[prop]);
+            }
+            else
+            {
+                if (value[prop] is Number)
+                {
+                    temp[prop] = aggregator.computeBegin(prop);
+                    aggregator.computeLoop(temp[prop], prop, value[prop]);
+                }
+                else
+                {
+                    temp[measureName] = aggregator.computeObjectBegin(value[prop]);
+                    computeObjEndMap[measure].push(temp);
+                }
+           }
+       }
+   }
+}
+
+}


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

--- frameworks/projects/framework/src/mx/collections/ItemResponder.as
+++ frameworks/projects/framework/src/mx/collections/ItemResponder.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2007 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Enhanced support for embedded config XML documents

--- src/laml/display/Component.as
+++ src/laml/display/Component.as
@@ -105,15 +105,25 @@

 		protected function createChildren():void {
 			view = new Sprite();
-			if(hasOwnProperty('Config') && this['Config'] is Class) {
-				var ba:ByteArrayAsset = ByteArrayAsset( new this['Config']() );
-				var xml:XML = new XML( ba.readUTFBytes( ba.length ) );
-				addChild(parser.parseLayoutable(xml));
-			}
-
+
 			if(backgroundImage) {
 				backgroundImage.name = 'background';
 				view.addChild(backgroundImage);
+			}
+
+			// TODO: This implementation will not allow subclasses
+			// to easily define layouts that have already been
+			// defined by superclasses
+			if(hasOwnProperty('Config')) {
+				var xml:XML;
+				if(this['Config'] is Class) {
+					var ba:ByteArrayAsset = ByteArrayAsset( new this['Config']() );
+					xml = new XML( ba.readUTFBytes( ba.length ) );
+				}
+				if(this['Config'] is XML) {
+					xml = this['Config'];
+				}
+				addChild(parser.parseLayoutable(xml));
 			}
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 8230
Author:   dloverin@adobe.com
Date:     2009-06-25T14:05:58.366381Z

Log Message:
-----------
Fix minimizing a window.

Updated a previous workaround so it doesn’t kick in when a window is minimized. The problem was caused by setting the height of a nativeWindow when the application was minimized. This caused AIR to restore the application. You would see a window minimize and then immediately restore.

QE Notes: none.
Doc Notes: none.
Bugs: SDK-22013

Reviewer: Glenn
tests: checkintests

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

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

--- frameworks/projects/airspark/src/spark/components/WindowedApplication.as
+++ frameworks/projects/airspark/src/spark/components/WindowedApplication.as
@@ -1611,10 +1611,16 @@
         {
             // Work around an AIR issue setting the stageHeight to zero when
             // using system chrome. The set of the stage.stageHeight property
-            // is rejected unless the nativeWindow is first set to the proper height.
-            if (_bounds.height == 0 && systemChrome == NativeWindowSystemChrome.STANDARD)
+            // is rejected unless the nativeWindow is first set to the proper
+            // height.
+            // Don't perform this workaround if the window has zero height due
+            // to being minimized. Setting the nativeWindow height to non-zero
+            // causes AIR to restore the window.
+            if (_bounds.height == 0 &&
+                nativeWindow.displayState != NativeWindowDisplayState.MINIMIZED &&
+                systemChrome == NativeWindowSystemChrome.STANDARD)
                 nativeWindow.height = chromeHeight() + _bounds.height;
-
+
             systemManager.stage.stageWidth = _width = _bounds.width;
             systemManager.stage.stageHeight = _height =  _bounds.height;


Transferred from the Adobe Open Source Subversion Repository

Revision: 22172
Author:   jszeto@adobe.com
Date:     2011-08-23T23:58:28.507994Z

Log Message:
-----------
SpinnerList Bug Fixes (fontColor / disabled items)

DateSpinner now supports fontSize. SpinnerList and DateSpinner now use the global fontSize instead of specify a larger default size.

SDK-31014 - Inconsistent behavior when all items in a SpinnerList are disabled

When useVirtualLayout is true, the element might not exist. We check the data directly instead asking the element if it is enabled.

SDK-30990 - SpinnerList does not respect text color

Both DateSpinner and SpinnerList should now support the color style. Changed the accentColor and disabled logic for setting the color. Now we set the colorName property so StyleableTextField knows which style to use. Disabled items are set to an alpha of .5.

QE notes: baselines will need updating
Doc notes: none
Bugs: SDK-30990, SDK-31014
Reviewer: Tom K
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateSpinnerItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/layouts/VerticalSpinnerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/YearProvider.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as
+++ frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as
@@ -230,6 +230,9 @@
     private static const MIN_DATE_DEFAULT:Date = new Date(DateTimeFormatterEx.MIN_YEAR, 0, 1);
     private static const MAX_DATE_DEFAULT:Date = new Date(9999, 11, 31, 23, 59, 59, 999);

+    // Emphasized constant
+    mx_internal static const EMPHASIZED_PROPERTY_NAME:String = "_emphasized_";
+
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -994,7 +997,7 @@
         if (yearList && populateYearDataProvider)
         {
             yearList.dataProvider = new YearProvider(localeStr, minDate.fullYear,
-                maxDate.fullYear, today, getStyle("accentColor"));
+                maxDate.fullYear, today);

             // set size to longest string
             if (!longestYearItem)
@@ -1014,7 +1017,7 @@
             if (displayMode == DateSelectorDisplayMode.DATE_AND_TIME)
             {
                 dateList.dataProvider = new DateAndTimeProvider(localeStr, minDate, maxDate,
-                    today, getStyle("accentColor"));
+                    today);

                 // set size to longest string
                 if (!longestDateItem)
@@ -1088,7 +1091,7 @@
             var item:Object = generateDateItemObject(monthNames[i], i);

             if (i == todayMonth)
-                item["accentColor"] = getStyle("accentColor");
+                item[EMPHASIZED_PROPERTY_NAME] = true;

             ac.addItem(item);
         }
@@ -1113,7 +1116,7 @@
             var item:Object = generateDateItemObject(dateTimeFormatter.format(dateObj), i);

             if (i == todayDate)
-                item["accentColor"] = getStyle("accentColor");
+                item[EMPHASIZED_PROPERTY_NAME] = true;

             ac.addItem(item);
         }
@@ -1290,7 +1293,7 @@
                     if (curObj[SpinnerList.ENABLED_PROPERTY_NAME] != newEnabledValue)
                     {
                         var o:Object = generateDateItemObject(curObj.label, curObj.data, newEnabledValue);
-                        o["accentColor"] = curObj["accentColor"];
+                        o[EMPHASIZED_PROPERTY_NAME] = curObj[EMPHASIZED_PROPERTY_NAME];
                         listData[i] = o;
                     }
                 }
@@ -1319,7 +1322,7 @@
                 if (curObj[SpinnerList.ENABLED_PROPERTY_NAME] != newEnabledValue)
                 {
                     o = generateDateItemObject(curObj.label, curObj.data, newEnabledValue);
-                    o["accentColor"] = curObj["accentColor"];
+                    o[EMPHASIZED_PROPERTY_NAME] = curObj[EMPHASIZED_PROPERTY_NAME];
                     listData[i] = o;
                 }
             }
@@ -1360,7 +1363,7 @@
                 if (curObj[SpinnerList.ENABLED_PROPERTY_NAME] != newEnabledValue)
                 {
                     o = generateDateItemObject(curObj.label, curObj.data, newEnabledValue);
-                    o["accentColor"] = curObj["accentColor"];
+                    o[EMPHASIZED_PROPERTY_NAME] = curObj[EMPHASIZED_PROPERTY_NAME];
                     listData[i] = o;
                 }
             }
@@ -1399,7 +1402,7 @@
                 if (curObj[SpinnerList.ENABLED_PROPERTY_NAME] != newEnabledValue)
                 {
                     o = generateDateItemObject(curObj.label, curObj.data, newEnabledValue);
-                    o["accentColor"] = curObj["accentColor"];
+                    o[EMPHASIZED_PROPERTY_NAME] = curObj[EMPHASIZED_PROPERTY_NAME];
                     listData[i] = o;
                 }
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 11027
Author:   dloverin@adobe.com
Date:     2009-10-20T15:50:09.018295Z

Log Message:
-----------
Changes to enable using multiple style managers.

Multiple style managers are not the default yet. Can be enabled by compiling with -create-style-manager.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex, Paul
Tests run: checkintests, all mustella
Is noteworthy for integration: Yes.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</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/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceGenerator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexChangeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java</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/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</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/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSMergedStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.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/modules/compiler/src/java/flex2/compiler/css/StyleDef.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>

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

--- frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as
+++ frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as
@@ -1939,7 +1939,7 @@
         {
             if (headerStyleName is String)
             {
-                headerStyleName = owner.styleManager.getStyleDeclaration(String(headerStyleName));
+                headerStyleName = owner.styleManager.getMergedStyleDeclaration(String(headerStyleName));
             }
         }
         if (headerStyleName)
@@ -1962,7 +1962,7 @@
         {
             if (headerStyleName is String)
             {
-                headerStyleName = owner.styleManager.getStyleDeclaration(String(headerStyleName));
+                headerStyleName = owner.styleManager.getMergedStyleDeclaration(String(headerStyleName));
             }
         }

@@ -2006,7 +2006,7 @@
             if (styleNames[c].length)
             {
                 var declaration:CSSStyleDeclaration =
-                    owner.styleManager.getStyleDeclaration("." + styleNames[c]);
+                    owner.styleManager.getMergedStyleDeclaration("." + styleNames[c]);

                 if (declaration)
                     chain = declaration.addStyleToProtoChain(chain, target);


Transferred from the Adobe Open Source Subversion Repository

Revision: 22608
Author:   smgilson@adobe.com
Date:     2011-09-16T17:19:03.985309Z

Log Message:
-----------
- Add ViewMenu example, add image to ViewMenu.as

- fix typos in ASDoc comments

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

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/asdoc/en_US/spark/components/examples/ViewMenuExampleHome.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/asdoc/en_US/spark/components/examples/ViewMenuExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewMenuItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as
+++ frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as
@@ -80,7 +80,7 @@
  *  The CalloutButton specifies the layout and child components
  *  of the Callout container.
  *
- *
The following images shows a Callout container under the CalloutButton
+ *
The following image shows a Callout container under the CalloutButton
  *  labeled 'Open callout':

  *
  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 21769
Author:   jasonsj@adobe.com
Date:     2011-08-02T17:22:14.710585Z

Log Message:
-----------
CalloutButton
- CalloutButton extends Button (previously SkinnableContainer)
- New Callout proxy properties for calloutContent and calloutLayout
- read-only callout property SDK-30838
- New calloutDestructionPolicy
- closeOnResize added to DropDownController to prevent automatically closing when the system manager resizes SDK-30857

Callout
- Callout visual review changes
- Callout properties for actualHorizontalPosition and actualVerticalPosition
- Removed gap style, replaced with mx_internal margin property
- New auto-close behavior when the owner is removed from the stage SDK-30582
- New reposition behavior when the system manager resizes SDK-30857

ASDoc updates

QE notes: Please add tests for bug fixes listed below. Changes to calloutDestructionPolicy and closeOnResize should also be tested while the Callout is open.
Doc notes:
Bugs:
SDK-30860 arrow direction when "start" or"after" and"auto" is not correct
SDK-30838 New APIs required to resize CalloutButton's Callout before it is opened
SDK-30582 android : callout stays visible when the view changes via device's back button
SDK-30857 callout should stay visible on orientation change
Reviewer: evtim
Tests run: checkintests, mustella
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="D">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/mobile/scripts/CalloutButtonTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SplitViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/mobile/views/TestCalloutButton.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/CalloutContentBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as
+++ frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as
@@ -11,15 +11,17 @@

 package spark.components
 {
+import mx.core.ClassFactory;
 import mx.core.IFactory;
 import mx.core.mx_internal;
-import mx.events.FlexEvent;
 import mx.utils.BitFlagUtil;

 import spark.components.supportClasses.ButtonBase;
 import spark.components.supportClasses.DropDownController;
+import spark.core.ContainerDestructionPolicy;
 import spark.events.DropDownEvent;
 import spark.events.PopUpEvent;
+import spark.layouts.supportClasses.LayoutBase;

 use namespace mx_internal;

@@ -27,23 +29,8 @@
 //  Styles
 //--------------------------------------

-include "../styles/metadata/StyleableTextFieldTextStyles.as"
-
-/**
- *  Class or instance to use as the icon for the openButton skin part.
- *  The icon can render from various graphical sources, including the following:
- *

- *
A Bitmap or BitmapData instance.

- *
A class representing a subclass of DisplayObject. The BitmapFill
- *       instantiates the class and creates a bitmap rendering of it.

- *
An instance of a DisplayObject. The BitmapFill copies it into a
- *       Bitmap for filling.

- *
The name of an external image file.

- *

- *
- *  @default null
- */
-[Style(name="icon", type="Object", inherit="no")]
+[Exclude(name="repeatDelay", kind="style")]
+[Exclude(name="repeatInterval", kind="style")]

 //--------------------------------------
 //  Events
@@ -60,6 +47,10 @@
  *

  *
  *  @eventType spark.events.DropDownEvent.CLOSE
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 3
+ *  @productversion Flex 4.5.2
  */
 [Event(name="close", type="spark.events.DropDownEvent")]

@@ -68,19 +59,83 @@
  *  to display the drop-down.
  *
  *  @eventType spark.events.DropDownEvent.OPEN
- */
-[Event(name="open", type="spark.events.DropDownEvent")]
-
-/**
- *  TODO (jasonsj): write class description
  *
  *  @langversion 3.0
  *  @playerversion AIR 3
  *  @productversion Flex 4.5.2
  */
-public class CalloutButton extends SkinnableContainer
+[Event(name="open", type="spark.events.DropDownEvent")]
+
+[DefaultProperty("calloutContent")]
+
+/**
+ *  The CalloutButton class is a drop down component that defines a button to
+ *  open and close a pop-up Callout component. CalloutButton is a component
+ *  whose layout and contents are proxied to the Callout when opened.
+ *
+ *
When the callout list is open:

+ *

+ *
Clicking the button closes the callout

+ *
Clicking outside of the callout closes the callout.

+ *

+ *
+ *
The CalloutButton component has the following default characteristics:

+ *

+ *

+ *           Characteristic
+ *           Description
+ *

+ *

+ *           Default size
+ *           Wide enough to display the text label of the control
+ *

+ *

+ *           Minimum size
+ *           32 pixels wide and 43 pixels high
+ *

+ *

+ *           Maximum size
+ *           10000 pixels wide and 10000 pixels high
+ *

+ *

+ *           Default skin class
+ *           spark.skins.mobile.CalloutButtonSkin
+ *

+ *

+ *
+ *  @mxml
+ *
+ *
The <s:CalloutButton> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <s:CalloutButton
+ *   Properties
+ *    horizontalPosition="auto"
+ *    verticalPosition="auto
+ *    label=""
+ *    calloutDestructionPolicy="auto"
+ *
+ *   Events
+ *    open="No default"
+ *    close="No default"
+ *      ...
+ *      child tags
+ *      ...
+ *  </s:CalloutButton>
+ *

+ *
+ *  @see spark.components.Callout
+ *  @see spark.components.Button
+ *  @see spark.skins.mobile.CalloutButtonSkin
+ *  @see spark.components.supportClasses.DropDownController
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 3
+ *  @productversion Flex 4.5.2
+ */
+public class CalloutButton extends Button
 {
-
     //--------------------------------------------------------------------------
     //
     //  Class constants
@@ -90,12 +145,22 @@
     /**
      *  @private
      */
-    mx_internal static const HORIZONTAL_POSITION_PROPERTY_FLAG:uint = 1 << 0;
-
-    /**
-     *  @private
-     */
-    mx_internal static const VERTICAL_POSITION_PROPERTY_FLAG:uint = 1 << 1;
+    mx_internal static const CALLOUT_CONTENT_PROPERTY_FLAG:uint = 1 << 0;
+
+    /**
+     *  @private
+     */
+    mx_internal static const CALLOUT_LAYOUT_PROPERTY_FLAG:uint = 1 << 1;
+
+    /**
+     *  @private
+     */
+    mx_internal static const HORIZONTAL_POSITION_PROPERTY_FLAG:uint = 1 << 2;
+
+    /**
+     *  @private
+     */
+    mx_internal static const VERTICAL_POSITION_PROPERTY_FLAG:uint = 1 << 3;

     //--------------------------------------------------------------------------
     //
@@ -122,26 +187,18 @@
     [SkinPart(required="false")]

     /**
-     *  A skin part that defines the drop-down area. When the DropDownPopUpAnchorContainer is open,
-     *  clicking anywhere outside of the dropDown skin part closes the
-     *  drop-down.
+     *  A skin part that defines the drop-down factory which creates a Callou
+     *  instance.
+     *
+     *  If dropDown is not defined on the skin, a
+     *  ClassFactory is created to generate a default Callout
+     *  instance.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
     public var dropDown:IFactory;
-
-    [SkinPart(required="true")]
-
-    /**
-     *  A skin part that defines the anchor button.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    public var openButton:ButtonBase;

     //--------------------------------------------------------------------------
     //
@@ -156,8 +213,8 @@
      *  stores those values.  If callout is around, the values are stored
      *  on the callout directly.  However, we need to know what values
      *  have been set by the developer on the CalloutButton (versus set on
-     *  the controlBarGroup or defaults of the controlBarGroup) as those are values
-     *  we want to carry around if the controlBarGroup changes (via a new skin).
+     *  the callout or defaults of the callout) as those are values
+     *  we want to carry around if the callout changes (via a new skin).
      *  In order to store this info effeciently, calloutProperties becomes
      *  a uint to store a series of BitFlags.  These bits represent whether a
      *  property has been explicitely set on this CalloutButton.  When the
@@ -175,6 +232,79 @@
     //--------------------------------------------------------------------------

     //----------------------------------
+    //  calloutContent
+    //----------------------------------
+
+    [ArrayElementType("mx.core.IVisualElement")]
+
+    /**
+     *  The set of components to include in the Callout's content.
+     *
+     *  @default null
+     *
+     *  @see spark.components.Callout
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public function get calloutContent():Array
+    {
+        if (callout && callout.contentGroup)
+            return callout.contentGroup.getMXMLContent();
+        else
+            return calloutProperties.calloutContent;
+    }
+
+    /**
+     *  @private
+     */
+    public function set calloutContent(value:Array):void
+    {
+        if (callout)
+        {
+            callout.mxmlContent = value;
+            calloutProperties = BitFlagUtil.update(calloutProperties as uint,
+                CALLOUT_CONTENT_PROPERTY_FLAG, value != null);
+        }
+        else
+            calloutProperties.calloutContent = value;
+    }
+
+    //----------------------------------
+    //  calloutLayout
+    //----------------------------------
+
+    /**
+     *  Defines the layout of the Callout.
+     *
+     *  @default BasicLayout
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public function get calloutLayout():LayoutBase
+    {
+        return (callout)  ? callout.layout : calloutProperties.calloutLayout;
+    }
+
+    /**
+     *  @private
+     */
+    public function set calloutLayout(value:LayoutBase):void
+    {
+        if (callout)
+        {
+            callout.layout = value;
+            calloutProperties = BitFlagUtil.update(calloutProperties as uint,
+                CALLOUT_LAYOUT_PROPERTY_FLAG, true);
+        }
+        else
+            calloutProperties.calloutLayout = value;
+    }
+
+    //----------------------------------
     //  horizontalPosition
     //----------------------------------

@@ -254,36 +384,29 @@
     private var _callout:Callout;

     /**
-     *  TODO (jasonsj): PARB
-     */
-    mx_internal function get callout():Callout
+     *  The Callout instance created after the DropDownEvent.OPEN
+     *  is fired. The instance is created using the dropDown
+     *  IFactory skin part.
+     *
+     *  @see #calloutDestructionPolicy
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public function get callout():Callout
     {
         return _callout;
     }

     /**
-     *  TODO (jasonsj): PARB
-     *
-     *  Allow users to set their own Callout instead of the one defined by the
-     *  skin. This allows properties and styles to be set in MXML instead of
-     *  either passthrough styles in CalloutButton or CSS styles.
-     *
-     *  The getter allows direct access to the callout. Unlike DropDownList,
-     *  CalloutButton's dropDown skin part is a class factory and not the
-     *  Callout instance.
-     */
-    mx_internal function set callout(value:Callout):void
+     *  @private
+     */
+    mx_internal function setCallout(value:Callout):void
     {
         if (_callout == value)
             return;

-        if (_callout && _callout.isOpen)
-        {
-            // TODO (jasonsj): cleanup?
-            _callout.close();
-        }
-
-        // FIXME (jasonsj): re-init
         _callout = value;
     }

@@ -322,11 +445,12 @@

         _dropDownController = value;

+        _dropDownController.closeOnResize = false;
         _dropDownController.addEventListener(DropDownEvent.OPEN, dropDownController_openHandler);
         _dropDownController.addEventListener(DropDownEvent.CLOSE, dropDownController_closeHandler);

-        if (openButton)
-            _dropDownController.openButton = openButton;
+        _dropDownController.openButton = this;
+
         if (callout)
             _dropDownController.dropDown = callout;
     }
@@ -347,34 +471,46 @@
     }

     //----------------------------------
-    //  label
-    //----------------------------------
-
-    private var _label:String = "";
-
-    /**
-     *  Text to appear on the openButton skin part.
-     *
-     *  @default ""
+    //  calloutDestructionPolicy
+    //----------------------------------
+
+    private var _calloutDestructionPolicy:String = ContainerDestructionPolicy.AUTO;
+
+    [Inspectable(category="General", enumeration="auto,never", defaultValue="auto")]
+
+    /**
+     *  Defines the destruction policy the callout button should use
+     *  when the callout is closed. If set to "auto", the button will
+     *  destroy the callout when it is closed.  If set to "never", the
+     *  callout will be cached in memory.
+     *
+     *  @default auto
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
-    public function get label():String
-    {
-        return _label;
-    }
-
-    /**
-     *  @private
-     */
-    public function set label(value:String):void
-    {
-        _label = value;
-
-        if (openButton)
-            openButton.label = label;
+    public function get calloutDestructionPolicy():String
+    {
+        return _calloutDestructionPolicy;
+    }
+
+    /**
+     *  @private
+     */
+    public function set calloutDestructionPolicy(value:String):void
+    {
+        if (_calloutDestructionPolicy == value)
+            return;
+
+        _calloutDestructionPolicy = value;
+
+        // destroy the callout immediately if currently closed
+        if (!isDropDownOpen &&
+            (calloutDestructionPolicy == ContainerDestructionPolicy.AUTO))
+        {
+            destroyCallout();
+        }
     }

     //--------------------------------------------------------------------------
@@ -383,6 +519,15 @@
     //
     //--------------------------------------------------------------------------

+    override protected function attachSkin():void
+    {
+        super.attachSkin();
+
+        // create dropDown if it was not found in the skin
+        if (!dropDown && !("dropDown" in skin))
+            dropDown = new ClassFactory(Callout);
+    }
+
     /**
      *  @private
      */
@@ -390,14 +535,7 @@
     {
         super.partAdded(partName, instance);

-        if (instance == openButton)
-        {
-            openButton.label = label;
-
-            if (dropDownController)
-                dropDownController.openButton = openButton;
-        }
-        else if (partName == "dropDown")
+        if (partName == "dropDown")
         {
             // copy proxied values from calloutProperties (if set) to callout
             var newCalloutProperties:uint = 0;
@@ -408,9 +546,22 @@
                 calloutInstance.id = "callout";
                 dropDownController.dropDown = calloutInstance;

-//                calloutInstance.addEventListener(FlexEvent.CREATION_COMPLETE, callout_creationCompleteHandler);
                 calloutInstance.addEventListener(PopUpEvent.OPEN, callout_openHandler);
                 calloutInstance.addEventListener(PopUpEvent.CLOSE, callout_closeHandler);
+
+                if (calloutProperties.calloutContent !== undefined)
+                {
+                    calloutInstance.mxmlContent = calloutProperties.calloutContent;
+                    newCalloutProperties = BitFlagUtil.update(newCalloutProperties,
+                        CALLOUT_CONTENT_PROPERTY_FLAG, true);
+                }
+
+                if (calloutProperties.calloutLayout !== undefined)
+                {
+                    calloutInstance.layout = calloutProperties.calloutLayout;
+                    newCalloutProperties = BitFlagUtil.update(newCalloutProperties,
+                        CALLOUT_LAYOUT_PROPERTY_FLAG, true);
+                }

                 if (calloutProperties.horizontalPosition !== undefined)
                 {
@@ -427,12 +578,6 @@
                 }

                 calloutProperties = newCalloutProperties;
-
-                // FIXME (jasonsj): find a correct way to initialize the contentGroup
-                if (layout)
-                    calloutInstance.layout = layout;
-
-                calloutInstance.mxmlContent = currentContentGroup.getMXMLContent();
             }
         }
     }
@@ -442,36 +587,40 @@
      */
     override protected function partRemoved(partName:String, instance:Object):void
     {
-        if (dropDownController)
-        {
-            if (instance == openButton)
-                dropDownController.openButton = null;
+        if (dropDownController && (instance == callout))
+        {
+            dropDownController.dropDown = null;
+        }
+
+        if (partName == "dropDown")
+        {
+            callout.removeEventListener(PopUpEvent.OPEN, callout_openHandler);
+            callout.removeEventListener(PopUpEvent.CLOSE, callout_closeHandler);

-            if (instance == callout)
-                dropDownController.dropDown = null;
-        }
-
-        // TODO (jasonsj): destroy option?
-//        if (instance == callout)
-//        {
-//            callout.removeEventListener(FlexEvent.CREATION_COMPLETE, callout_creationCompleteHandler);
-//            callout.removeEventListener(PopUpEvent.OPEN, callout_openHandler);
-//            callout.removeEventListener(PopUpEvent.CLOSE, callout_closeHandler);
-//
-//            // copy proxied values from callout (if explicitely set) to calloutProperties
-//            var newCalloutProperties:Object = {};
-//
-//            if (BitFlagUtil.isSet(calloutProperties as uint, HORIZONTAL_POSITION_PROPERTY_FLAG))
-//                newCalloutProperties.calloutProperties = callout.horizontalPosition;
-//
-//            if (BitFlagUtil.isSet(calloutProperties as uint, VERTICAL_POSITION_PROPERTY_FLAG))
-//                newCalloutProperties.verticalPosition = callout.verticalPosition;
-//
-//            calloutProperties = newCalloutProperties;
-//
-//            super.partRemoved("contentGroup", callout.contentGroup);
-//            contentGroup = null;
-//        }
+            // copy proxied values from callout (if explicitely set) to calloutProperties
+            var newCalloutProperties:Object = {};
+
+            if (BitFlagUtil.isSet(calloutProperties as uint, CALLOUT_CONTENT_PROPERTY_FLAG) &&
+                (callout.contentGroup))
+            {
+                newCalloutProperties.calloutContent = callout.contentGroup.getMXMLContent();
+                callout.contentGroup.mxmlContent = null;
+            }
+
+            if (BitFlagUtil.isSet(calloutProperties as uint, CALLOUT_LAYOUT_PROPERTY_FLAG))
+            {
+                newCalloutProperties.calloutLayout = callout.layout;
+                callout.layout = null;
+            }
+
+            if (BitFlagUtil.isSet(calloutProperties as uint, HORIZONTAL_POSITION_PROPERTY_FLAG))
+                newCalloutProperties.horizontalPosition = callout.horizontalPosition;
+
+            if (BitFlagUtil.isSet(calloutProperties as uint, VERTICAL_POSITION_PROPERTY_FLAG))
+                newCalloutProperties.verticalPosition = callout.verticalPosition;
+
+            calloutProperties = newCalloutProperties;
+        }

         super.partRemoved(partName, instance);
     }
@@ -507,6 +656,16 @@
         dropDownController.closeDropDown(false);
     }

+    /**
+     *  @private
+     *  Destroys the callout
+     */
+    private function destroyCallout():void
+    {
+        removeDynamicPartInstance("dropDown", callout);
+        setCallout(null);
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Event handlers
@@ -516,14 +675,12 @@
     /**
      *  @private
      *  Event handler for the dropDownController
-     *  DropDownEvent.OPEN event. Updates the skin's state and
-     *  ensures that the selectedItem is visible.
+     *  DropDownEvent.OPEN event. Creates and opens the Callout.
      */
     mx_internal function dropDownController_openHandler(event:DropDownEvent):void
     {
-        // TODO (jasonsj): destroy?
         if (!callout)
-            callout = createDynamicPartInstance("dropDown") as Callout;
+            setCallout(createDynamicPartInstance("dropDown") as Callout);

         if (callout)
             callout.open(this, false);
@@ -532,25 +689,20 @@
     /**
      *  @private
      *  Event handler for the dropDownController
-     *  DropDownEvent.CLOSE event. Updates the skin's state.
+     *  DropDownEvent.CLOSE event. Closes the Callout.
      */
     mx_internal function dropDownController_closeHandler(event:DropDownEvent):void
     {
-        // TODO (jasonsj): close params?
-        // dispatch the close event after the callout's PopUpEvent.CLOSE fires
-        callout.close();
-
-        // TODO (jasonsj): destroy option?
-//        removeDynamicPartInstance("dropDown", callout);
-//        callout = null;
-    }
-
-//    private function callout_creationCompleteHandler(event:FlexEvent):void
-//    {
-//        // initialize contentGroup skin part
-//        contentGroup = callout.contentGroup;
-//        partAdded("contentGroup", callout.contentGroup);
-//    }
+        // If the callout was closed directly, then callout could already be
+        // destroyed by calloutDestructionPolicy
+        if (callout)
+        {
+            // TODO (jasonsj): close params?
+
+            // Dispatch the close event after the callout's PopUpEvent.CLOSE fires
+            callout.close();
+        }
+    }

     /**
      *  @private
@@ -565,6 +717,9 @@
      */
     private function callout_closeHandler(event:PopUpEvent):void
     {
+        if (calloutDestructionPolicy == ContainerDestructionPolicy.AUTO)
+            destroyCallout();
+
         dispatchEvent(new DropDownEvent(DropDownEvent.CLOSE));
     }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 16737
Author:   rfrishbe@adobe.com
Date:     2010-06-30T05:59:18.451053Z

Log Message:
-----------
Fixing a few bugs around list selection and improving the user interaction.

FXM-59:  we weren't properly selecting an item after the first one was selected.

FXM-43: if selecting the item causes a view transition that the first view gets validated before the transition occurs.

Improved user interaction by visually de-selecting the selected item if another one is possibly selected (we don't know if it's a scroll or a selection until mouseup, but we provide visual clues along the way for the user)

QE notes: None
Doc notes: None
Bugs: FXM-43, FXM-59
Reviewer: Chiedo code reviewed the view transition issue--the rest will be code reviewed later
Tests run: checkintests, mustella List/ListDND (some mustella failed for me but the same failed on a clean build on my machine)
Is noteworthy for integration: No

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -1047,6 +1047,11 @@
             currentView = currentViewData.instance;
             currentView.active = false;
             currentView.includeInLayout = false;
+
+            // Need to validateNow() to make sure our old screen is currently
+            // up to date before starting the transition and possibly storing a bitmap
+            // for the transition
+            currentView.validateNow();
         }

         // Store new view


Transferred from the Adobe Open Source Subversion Repository

Revision: 17887
Author:   chiedozi@adobe.com
Date:     2010-09-27T23:26:49.901993Z

Log Message:
-----------
Fixed a bug where restoring the navigation stack of a ViewNavigator that lives inside a TabbedViewNavigator would result in a RTE

QE notes:
Doc notes:
Bugs: SDK-28000
Reviewer: Ryan
Tests run:
Is noteworthy for integration:

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -1724,6 +1724,10 @@
             view = createViewInstance(currentViewData);
             view.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, view_propertyChangeHandler);
         }
+
+        // Cancel any view change requests that occurred prior to this call
+        // since the top most view was just created.
+        viewChangeRequested = false;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 20257
Author:   chiedozi@adobe.com
Date:     2011-02-10T01:07:15.268272Z

Log Message:
-----------
Fixed small error in last checkin

QE notes:
Doc notes:
Bugs: SDK-29443
Reviewer: Ryan
Tests run:
Is noteworthy for integration: No

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -1790,12 +1790,11 @@
         }
     }

-    UPDATE COMEMENT
     /**
      *  @private
      *  Activates the current view.  Called on the frame following the
-     *  navigator commit so that the player can render before the activate events
-     *  are dispatched.
+     *  navigator commit or when a TabbedViewNavigator activates a new
+     *  view.
      */
     private function completeViewCommitProcess(event:Event = null):void
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12733
Author:   smgilson@adobe.com
Date:     2009-12-09T18:19:48.608649Z

Log Message:
-----------
ASDoc l10n prep

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/treeClasses/MXTreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IRepeater.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/listClasses/MXItemRenderer.as</path>

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

--- frameworks/projects/framework/src/mx/core/ILayoutElement.as
+++ frameworks/projects/framework/src/mx/core/ILayoutElement.as
@@ -19,7 +19,7 @@

 /**
  *  The ILayoutElement interface is used primarily by the layout classes to query,
- *  size and position the elements of the GroupBase based containers.
+ *  size and position the elements of GroupBase containers.
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -32,14 +32,14 @@
      *  The horizontal distance in pixels from the left edge of the component to the
      *  anchor target's left edge.
      *
-     *  By default the anchor target is the container's content area. In layouts
-     *  with advanced constraints, the target can be a constraint column.
-     *
-     *  Setting the property to a number or to a numerical string like "10"
-     *  specifies use of the default anchor target.
-     *
-     *  To specify an anchor target, set the property value to a string in the format
-     *  "anchorTargetName:value" e.g. "col1:10".
+     *
By default the anchor target is the container's content area. In layouts
+     *  with advanced constraints, the target can be a constraint column.

+     *
+     *
Setting the property to a number or to a numerical string like "10"
+     *  specifies use of the default anchor target.

+     *
+     *
To specify an anchor target, set the property value to a string in the format
+     *  "anchorTargetName:value". For example, "col1:10".

      *
      *  @default null
      *
@@ -59,14 +59,14 @@
      *  The horizontal distance in pixels from the right edge of the component to the
      *  anchor target's right edge.
      *
-     *  By default the anchor target is the container's content area. In layouts
-     *  with advanced constraints, the target can be a constraint column.
-     *
-     *  Setting the property to a number or to a numerical string like "10"
-     *  specifies use of the default anchor target.
-     *
-     *  To specify an anchor target, set the property value to a string in the format
-     *  "anchorTargetName:value" e.g. "col1:10".
+     *
By default the anchor target is the container's content area. In layouts
+     *  with advanced constraints, the target can be a constraint column.

+     *
+     *
Setting the property to a number or to a numerical string like "10"
+     *  specifies use of the default anchor target.

+     *
+     *
To specify an anchor target, set the property value to a string in the format
+     *  "anchorTargetName:value". For example, "col1:10".

      *
      *  @default null
      *
@@ -86,14 +86,14 @@
      *  The vertical distance in pixels from the top edge of the component to the
      *  anchor target's top edge.
      *
-     *  By default the anchor target is the container's content area. In layouts
-     *  with advanced constraints, the target can be a constraint row.
-     *
-     *  Setting the property to a number or to a numerical string like "10"
-     *  specifies use of the default anchor target.
-     *
-     *  To specify an anchor target, set the property value to a string in the format
-     *  "anchorTargetName:value" e.g. "row1:10".
+     *
By default the anchor target is the container's content area. In layouts
+     *  with advanced constraints, the target can be a constraint row.

+     *
+     *
Setting the property to a number or to a numerical string like "10"
+     *  specifies use of the default anchor target.

+     *
+     *
To specify an anchor target, set the property value to a string in the format
+     *  "anchorTargetName:value". For example, "row1:10".

      *
      *  @default null
      *
@@ -113,14 +113,14 @@
      *  The vertical distance in pixels from the bottom edge of the component to the
      *  anchor target's bottom edge.
      *
-     *  By default the anchor target is the container's content area. In layouts
-     *  with advanced constraints, the target can be a constraint row.
-     *
-     *  Setting the property to a number or to a numerical string like "10"
-     *  specifies use of the default anchor target.
-     *
-     *  To specify an anchor target, set the property value to a string in the format
-     *  "anchorTargetName:value" e.g. "row1:10".
+     *
By default the anchor target is the container's content area. In layouts
+     *  with advanced constraints, the target can be a constraint row.

+     *
+     *
Setting the property to a number or to a numerical string like "10"
+     *  specifies use of the default anchor target.

+     *
+     *
To specify an anchor target, set the property value to a string in the format:
+     *  "anchorTargetName:value". For example, "row1:10".

      *
      *  @default null
      *
@@ -140,17 +140,17 @@
      *  The horizontal distance in pixels from the center of the component to the
      *  center of the anchor target's content area.
      *
-     *  The default anchor target is the container itself.
-     *
-     *  In layouts with advanced constraints, the anchor target can be a constraint column.
+     *
The default anchor target is the container itself.

+     *
+     *
In layouts with advanced constraints, the anchor target can be a constraint column.
      *  Then the content area is the space between the preceding column
-     *  (or container side) and the target column.
-     *
-     *  Setting the property to a number or to a numerical string like "10"
-     *  specifies use of the default anchor target.
-     *
-     *  To specify an anchor target, set the property value to a string in the format
-     *  "constraintColumnId:value" e.g. "col1:10".
+     *  (or container side) and the target column.

+     *
+     *
Setting the property to a number or to a numerical string like "10"
+     *  specifies use of the default anchor target.

+     *
+     *
To specify an anchor target, set the property value to a string in the format
+     *  "constraintColumnId:value". For example, "col1:10".

      *
      *  @default null
      *
@@ -170,17 +170,17 @@
      *  The vertical distance in pixels from the center of the component to the
      *  center of the anchor target's content area.
      *
-     *  The default anchor target is the container itself.
-     *
-     *  In layouts with advanced constraints, the anchor target can be a constraint row.
+     *
The default anchor target is the container itself.

+     *
+     *
In layouts with advanced constraints, the anchor target can be a constraint row.
      *  Then the content area is the space between the preceding row
-     *  (or container side) and the target row.
-     *
-     *  Setting the property to a number or to a numerical string like "10"
-     *  specifies use of the default anchor target.
-     *
-     *  To specify an anchor target, set the property value to a string in the format
-     *  "constraintColumnId:value" e.g. "row1:10".
+     *  (or container side) and the target row.

+     *
+     *
Setting the property to a number or to a numerical string like "10"
+     *  specifies use of the default anchor target.

+     *
+     *
To specify an anchor target, set the property value to a string in the format
+     *  "constraintColumnId:value". For example, "row1:10".

      *
      *  @default null
      *
@@ -200,15 +200,15 @@
      *  The vertical distance in pixels from the anchor target to
      *  the control's baseline position.
      *
-     *  By default the anchor target is the top edge of the container's
+     *
By default the anchor target is the top edge of the container's
      *  content area. In layouts with advanced constraints, the target can be
-     *  a constraint row.
-     *
-     *  Setting the property to a number or to a numerical string like "10"
-     *  specifies use of the default anchor target.
-     *
-     *  To specify an anchor target, set the property value to a string in the format
-     *  "anchorTargetName:value" e.g. "row1:10".
+     *  a constraint row.

+     *
+     *
Setting the property to a number or to a numerical string like "10"
+     *  specifies use of the default anchor target.

+     *
+     *
To specify an anchor target, set the property value to a string in the format:
+     *  "anchorTargetName:value". For example, "row1:10".

      *
      *  @default null
      *
@@ -308,14 +308,16 @@
     /**
      *  Returns the element's preferred width.
      *
-     *  @param postLayoutTransform When postLayoutTransform is true the method returns
-     *  the element's bounding box width.  Bounding box is in element's parent
+     *  @param postLayoutTransform When postLayoutTransform is true,
+     *  the method returns the element's bounding box width.
+     *  Bounding box is in element's parent
      *  coordinate space and is calculated from  the element's preferred size and
      *  layout transform matrix.
      *
      *  @return Returns the element's preferred width.  Preferred width is
      *  usually based on the default element size and any explicit overrides.
-     *  For UIComponent this is the same as getExplicitOrMeasuredWidth().
+     *  For UIComponent this is the same value as returned by
+     *  the getExplicitOrMeasuredWidth() method.
      *
      *  @see #getPreferredHeight
      *  @see #getLayoutMatrix
@@ -331,14 +333,16 @@
     /**
      *  Returns the element's preferred height.
      *
-     *  @param postLayoutTransform When postLayoutTransform is true the method returns
-     *  the element's bounding box height.  Bounding box is in element's parent
+     *  @param postLayoutTransform When postLayoutTransform is true,
+     *  the method returns the element's bounding box height.
+     *  Bounding box is in element's parent
      *  coordinate space and is calculated from  the element's preferred size and
      *  layout transform matrix.
      *
      *  @return Returns the element's preferred height.  Preferred height is
      *  usually based on the default element size and any explicit overrides.
-     *  For UIComponent this is the same as getExplicitOrMeasuredHeight().
+     *  For UIComponent this is the same value as returned by
+     *  the getExplicitOrMeasuredHeight() method.
      *
      *  @see #getPreferredWidth
      *  @see #getLayoutMatrix
@@ -354,8 +358,9 @@
     /**
      *  Returns the element's minimum width.
      *
-     *  @param postLayoutTransform When postLayoutTransform is true the method returns
-     *  the element's bounding box width. Bounding box is in element's parent
+     *  @param postLayoutTransform When postLayoutTransform is true,
+     *  the method returns the element's bounding box width.
+     *  Bounding box is in element's parent
      *  coordinate space and is calculated from the element's minimum size and
      *  layout transform matrix.
      *
@@ -373,8 +378,9 @@
     /**
      *  Returns the element's minimum height.
      *
-     *  @param postLayoutTransform When postLayoutTransform is true the method returns
-     *  the element's bounding box height. Bounding box is in element's parent
+     *  @param postLayoutTransform When postLayoutTransform is true,
+     *  the method returns the element's bounding box height.
+     *  Bounding box is in element's parent
      *  coordinate space and is calculated from the element's minimum size and
      *  layout transform matrix.
      *
@@ -430,7 +436,8 @@
     /**
      *  Returns the x coordinate of the element's bounds at the specified element size.
      *
-     *  This method is typically used by layouts during measure() to predict what
+     *  This method is typically used by layouts during a call to the
+     *  measure() method to predict what
      *  the element position will be, if the element is resized to particular dimensions.
      *
      *  @param width The element's bounds width, or NaN to use the preferred width.
@@ -455,7 +462,8 @@
     /**
      *  Returns the y coordinate of the element's bounds at the specified element size.
      *
-     *  This method is typically used by layouts during measure() to predict what
+     *  This method is typically used by layouts during a call to
+     *  the measure() to predict what
      *  the element position will be, if the element is resized to particular dimensions.
      *
      *  @param width The element's bounds width, or NaN to use the preferred width.
@@ -558,13 +566,13 @@
     /**
      *  Sets the coordinates that the element uses to draw on screen.
      *
-     *  @param postLayoutTransform When postLayoutTransform is true, the element is positioned
-     *  in such a way that the top-left corner of its bounding box is (x, y).
+     *  @param postLayoutTransform When postLayoutTransform is true,
+     *  the element is positioned in such a way that the top-left corner of its bounding box is (x, y).
      *  Bounding box is in element's parent coordinate space and is calculated
      *  from the element's layout size, layout position and layout transform matrix.
      *
-     *  Note that calls to setLayoutSize can affect the layout position, so
-     *  setLayoutPosition should be called after setLayoutSize.
+     *  Note that calls to the setLayoutBoundSize() method can affect the layout position, so
+     *  call setLayoutBoundPosition() after calling setLayoutBoundSize().
      *
      *  @see #setLayoutSize
      *  @see #getLayoutMatrix
@@ -578,21 +586,22 @@
     function setLayoutBoundsPosition(x:Number, y:Number, postLayoutTransform:Boolean = true):void;

     /**
-     *  Sets the layout size to the specified dimensions.  This is the size that
-     *  the element uses to draw on screen.
-     *
-     *  If one of the dimensions is left unspecified (NaN), it's size
-     *  will be picked such that element can be optimally sized to fit the other
-     *  dimension.  This is useful when the caller doesn't want to
-     *  overconstrain the element, for example when the element's width and height
-     *  are corelated (text, components with complex transforms, etc.)
-     *  If both dimensions are left unspecified, the element will have its layout size
-     *  set to its preferred size.
-     *
-     *  setLayoutSize does not clip against minium or maximum sizes.
-     *
-     *  Note that calls to setLayoutSize can affect the layout position, so
-     *  setLayoutSize should be called before setLayoutPosition.
+     *  Sets the layout size to the specified dimensions.
+     *  This is the size that the element uses to draw on screen.
+     *
+     *
If one of the dimensions is left unspecified (NaN), it's size
+     *  is set such that element can be optimally sized to fit the other
+     *  dimension.  This setting is useful when the caller does not want to
+     *  overconstrain the element.
+     *  For example, when the element's width and height
+     *  are corelated (text components, components with complex transforms)
+     *  If both dimensions are unspecified, the element has its layout size
+     *  set to its preferred size.

+     *
+     *
setLayoutBoundPosition() does not clip against minium or maximum sizes.

+     *
+     *
Note that calls to the setLayoutBoundSize() method can affect the layout position, so
+     *  call setLayoutBoundPosition() after calling setLayoutBoundSize().

      *
      *  @param width The target width.
      *
@@ -629,14 +638,13 @@
      *  computed matrix.  For example UIComponent
      *  defines the offsets property.

      *
-     *  @return
Returns the layout transform Matrix for this element.
-     *  Don't directly modify the return value but call setLayoutMatrix instead.

+     *  @return The layout transform Matrix for this element.
+     *  Don't directly modify the return value but call setLayoutMatrix instead.
      *
      *  @see #setLayoutMatrix
      *  @see #getLayoutMatrix3D
      *  @see #setLayoutMatrix3D
      *  @see mx.core.UIComponent#offsets
-     *  @see mx.graphics.baseClasses.GraphicElement#offsets
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -649,7 +657,7 @@
      *  Sets the transform Matrix that is used to calculate the component's layout
      *  size and position relative to its siblings.
      *
-     *
This matrix is typically defined by the
+     *
The matrix is typically defined by the
      *  component's 2D properties such as x, y,
      *  rotation, scaleX, scaleY,
      *  transformX, and transformY.
@@ -658,24 +666,26 @@
      *  computed matrix.  For example UIComponent
      *  defines the offsets.

      *
-     *
Note that layout Matrix is factored in the getPreferredSize(),
-     *  getMinSize(), getMaxSize(), getLayoutSize() when computed in parent coordinates
-     *  as well as in getLayoutPosition() in both parent and child coordinates.
+     *
Note that layout Matrix is factored in the getPreferredSize(),
+     *  getMinSize(), getMaxSize(), getLayoutSize()
+     *  methods when computed in parent coordinates
+     *  as well as in getLayoutPosition() in both parent and child coordinates.
      *  Layouts that calculate the transform matrix explicitly typically call
      *  this method and work with sizes in child coordinates.
      *  Layouts calling this method pass false
      *  to invalidateLayout so that a subsequent layout pass is not
      *  triggered.

-     *
-     *
Developers that call this method directly typically pass true
-     *  to invalidateLayout so that the parent container is notified that
-     *  it needs to re-layout the children.

+     *
+     *  @param Matrix The matrix.
+     *
+     *  @param invalidateLayout true to cause theparetn container
+     *  to re-layout its children.You typically pass true
+     *  to invalidateLayout.
      *
      *  @see #getLayoutMatrix
      *  @see #getLayoutMatrix3D
      *  @see #setLayoutMatrix3D
      *  @see mx.core.UIComponent#offsets
-     *  @see mx.graphics.baseClasses.GraphicElement#offsets
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -685,11 +695,11 @@
     function setLayoutMatrix(value:Matrix, invalidateLayout:Boolean):void;

     /**
-     *  True if the element has 3D Matrix.
-     *
-     *  Use hasLayoutMatrix3D instead of calling and examining the
-     *  value of getLayoutMatrix3D() as that method returns a valid
-     *  matrix even when the element is in 2D.
+     *  Contians true if the element has 3D Matrix.
+     *
+     *
Use hasLayoutMatrix3D instead of calling and examining the
+     *  return value of getLayoutMatrix3D() becasue that method returns a valid
+     *  matrix even when the element is in 2D.

      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -718,7 +728,6 @@
      *  @see #setLayoutMatrix
      *  @see #setLayoutMatrix3D
      *  @see mx.core.UIComponent#offsets
-     *  @see mx.graphics.baseClasses.GraphicElement#offsets
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -741,18 +750,21 @@
      *  computed matrix.  For example UIComponent
      *  defines the offsets property.

      *
-     *
Note that layout Matrix3D is factored in the getPreferredSize(),
-     *  getMinSize(), getMaxSize(), getLayoutSize() when computed in parent coordinates
-     *  as well as in getLayoutPosition() in both parent and child coordinates.
+     *
Note that layout Matrix3D is factored in the getPreferredSize(),
+     *  getMinSize(), getMaxSize(), getLayoutSize()
+     *  when computed in parent coordinates
+     *  as well as in getLayoutPosition() in both parent and child coordinates.
      *  Layouts that calculate the transform matrix explicitly typically call
      *  this method and work with sizes in child coordinates.
      *  Layouts calling this method pass false
      *  to invalidateLayout so that a subsequent layout pass is not
      *  triggered.

-     *
-     *
Developers that call this method directly typically pass true
-     *  to invalidateLayout so that the parent container is notified that
-     *  it needs to re-layout the children.

+     *
+     *  @param Matrix The matrix.
+     *
+     *  @param invalidateLayout true to cause theparetn container
+     *  to re-layout its children.You typically pass true
+     *  to invalidateLayout.
      *
      *  @see #getLayoutMatrix
      *  @see #setLayoutMatrix
@@ -774,20 +786,28 @@
      *  This function will assign the rotation, scale, and translation values
      *  provided, then update the x/y/z properties as necessary to keep
      *  the transform center fixed.
+     *
      *  @param transformCenter the point, in the component's own coordinates,
      *  to keep fixed relative to its parent.
+     *
      *  @param scale the new values for the scale of the transform
+     *
      *  @param rotation the new values for the rotation of the transform
+     *
      *  @param translation the new values for the translation of the transform
+     *
      *  @param postLayoutScale the new values for the post-layout scale
      *  of the transform
+     *
      *  @param postLayoutRotation the new values for the post-layout rotation
      *  of the transform
+     *
      *  @param postLayoutTranslation the new values for the post-layout translation
      *  of the transform
-     *  @param invalidateLayout
If true, the parent container size and display are
+     *
+     *  @param invalidateLayout If true, the parent container size and display are
      *  invalidated. Layouts calling this method pass false
-     *  so that a subsequent layout pass is not triggered.

+     *  so that a subsequent layout pass is not triggered.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


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

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

 package mx.formatters
 {