Transferred from the Adobe Open Source Subversion Repository

Revision: 20690
Author:   mhorn@adobe.com
Date:     2011-03-08T20:26:51.755036Z

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/Legend.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/PieChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/PlotChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/series/items/LineSeriesSegment.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/CandlestickChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/HLOCChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/InstanceCache.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/series/BarSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/Series.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/LineChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/BubbleChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/effects/SeriesZoom.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianDataCanvas.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/ColumnChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/DateTimeAxis.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/BarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/AreaChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/charts/src/mx/charts/chartClasses/ChartElement.as</path>

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

--- frameworks/projects/charts/src/mx/charts/DateTimeAxis.as
+++ frameworks/projects/charts/src/mx/charts/DateTimeAxis.as
@@ -515,7 +515,7 @@
     {
         return _dataUnits;
     }
-
+
     /**
      *  @private
      */
@@ -807,9 +807,9 @@
     public function set maximum(value:Date):void
     {
         if (value != null)
-        	assignedMaximum = value.getTime();
-		else
-			assignedMaximum = NaN;
+            assignedMaximum = value.getTime();
+        else
+            assignedMaximum = NaN;

         invalidateCache();

@@ -845,10 +845,10 @@
      */
     public function set minimum(value:Date):void
     {
-    	if (value != null)
-        	assignedMinimum = value.getTime();
-		else
-			assignedMinimum = NaN;
+        if (value != null)
+            assignedMinimum = value.getTime();
+        else
+            assignedMinimum = NaN;
         invalidateCache();

         dispatchEvent(new Event("mappingChange"));
@@ -994,22 +994,22 @@
             {
                 diff = dateRangeUtilities.calculateDisabledRange(computedMinimum,cache[i][field]);
                 if(direction == "inverted")
-                	cache[i][convertedField] = 1 - (cache[i][field] - diff - computedMinimum) / alen;
+                    cache[i][convertedField] = 1 - (cache[i][field] - diff - computedMinimum) / alen;
                 else
-					cache[i][convertedField] = (cache[i][field] - diff - computedMinimum) / alen;
+                    cache[i][convertedField] = (cache[i][field] - diff - computedMinimum) / alen;
             }
         }
         else
         {
-        	var r:Number = computedMaximum - computedMinimum;
-
-        	for (i = 0; i < n; i++)
-        	{
-            	if(direction == "inverted")
-                	cache[i][convertedField] = 1 - (cache[i][field] - computedMinimum) / r;
+            var r:Number = computedMaximum - computedMinimum;
+
+            for (i = 0; i < n; i++)
+            {
+                if(direction == "inverted")
+                    cache[i][convertedField] = 1 - (cache[i][field] - computedMinimum) / r;
                 else
-                	cache[i][convertedField] = (cache[i][field] - computedMinimum) / r;
-        	}
+                    cache[i][convertedField] = (cache[i][field] - computedMinimum) / r;
+            }
         }

     }
@@ -1332,7 +1332,7 @@
                 v = cache[i];
                 var d:Date = parseFunction(v[field]);
                 if (d != null)
-                	v[convertedField] = d.getTime();
+                    v[convertedField] = d.getTime();
             }
         }
         else
@@ -1349,7 +1349,7 @@
                 {
                     v = cache[i];
                     if (!v[field])
-                    	continue;
+                        continue;
                     v[convertedField] = Date.parse(v[field]);
                 }
             }
@@ -1363,7 +1363,7 @@
                     {
                         v = cache[i];
                         if (!v[field])
-                    		continue;
+                            continue;
                         v[convertedField] = Date.parse(v[field].toString());
                     }
                 }
@@ -1373,7 +1373,7 @@
                     {
                         v = cache[i];
                         if (!v[field])
-                    		continue;
+                            continue;
                         v[convertedField] = Number(v[field].toString());
                     }
                 }
@@ -1384,7 +1384,7 @@
                 {
                     v = cache[i];
                     if (!v[field])
-                    	continue;
+                        continue;
                     v[convertedField] = v[field].getTime();
                 }
             }
@@ -1394,7 +1394,7 @@
                 {
                     v = cache[i];
                     if (!v[field])
-                    	continue;
+                        continue;
                     v[convertedField] = v[field];
                 }
             }
@@ -1486,24 +1486,24 @@
                         if (!(dateRangeUtilities.isDisabled(dTime)))
                         {
                             if(direction == "inverted")
-                            	labelCache.push(new AxisLabel(
-                             		1 - (dTime - computedMinimum - diff) / r, new Date(dTime),
-                             		lfunc(labelDate, previousValue, this)));
+                                labelCache.push(new AxisLabel(
+                                    1 - (dTime - computedMinimum - diff) / r, new Date(dTime),
+                                    lfunc(labelDate, previousValue, this)));
                             else
-                            	labelCache.push(new AxisLabel(
-                            		(dTime - computedMinimum - diff) / r, new Date(dTime),
-                            		lfunc(labelDate, previousValue, this)));
+                                labelCache.push(new AxisLabel(
+                                    (dTime - computedMinimum - diff) / r, new Date(dTime),
+                                    lfunc(labelDate, previousValue, this)));
                         }
                     }
                     else
-                    	if(direction == "inverted")
-                    		labelCache.push(new AxisLabel(
-                            	1 - (dTime - computedMinimum) / r, new Date(dTime),
-                            	lfunc(labelDate, previousValue, this)));
+                        if(direction == "inverted")
+                            labelCache.push(new AxisLabel(
+                                1 - (dTime - computedMinimum) / r, new Date(dTime),
+                                lfunc(labelDate, previousValue, this)));
                         else
-                        	labelCache.push(new AxisLabel(
-                            	(dTime - computedMinimum) / r, new Date(dTime),
-                        		lfunc(labelDate, previousValue, this)));
+                            labelCache.push(new AxisLabel(
+                                (dTime - computedMinimum) / r, new Date(dTime),
+                                lfunc(labelDate, previousValue, this)));

                     if (previousValue == null)
                         previousValue = new Date(dTime);
@@ -1556,11 +1556,11 @@
                         if (!(dateRangeUtilities.isDisabled(dTime)))
                         {
                             if(direction == "inverted")
-                            	labelCache.push(new AxisLabel(
+                                labelCache.push(new AxisLabel(
                                         1 - (dTime - computedMinimum - diff) / r, new Date(dTime),
                                         lfunc(labelDate, previousValue, this)));
                             else
-                            	labelCache.push(new AxisLabel(
+                                labelCache.push(new AxisLabel(
                                         (dTime - computedMinimum - diff) / r, new Date(dTime),
                                         lfunc(labelDate, previousValue, this)));
                         }
@@ -1568,13 +1568,13 @@
                     else
                     {
                         if(direction == "inverted")
-                        	labelCache.push(new AxisLabel(
-                            	1 - (dTime - computedMinimum) / r, new Date(dTime),
-                            	lfunc(labelDate, previousValue, this)));
+                            labelCache.push(new AxisLabel(
+                                1 - (dTime - computedMinimum) / r, new Date(dTime),
+                                lfunc(labelDate, previousValue, this)));
                         else
-                        	labelCache.push(new AxisLabel(
-                            	(dTime - computedMinimum) / r, new Date(dTime),
-                            	lfunc(labelDate, previousValue, this)));
+                            labelCache.push(new AxisLabel(
+                                (dTime - computedMinimum) / r, new Date(dTime),
+                                lfunc(labelDate, previousValue, this)));
                     }
                     if (previousValue == null)
                         previousValue = new Date(dTime);
@@ -1607,18 +1607,18 @@
                 {
                     d = new Date(i);
                     if (disabledDays|| disabledRanges)
-                    {
+                    {
                         if (previousValue != null)
-                        	diff =  dateRangeUtilities.getDisabledRange(previousValue.getTime() + 1, i, _labelUnits);
+                            diff =  dateRangeUtilities.getDisabledRange(previousValue.getTime() + 1, i, _labelUnits);
                         else
                             diff =  dateRangeUtilities.getDisabledRange(computedMinimum, i, _labelUnits);

                         if (!(dateRangeUtilities.isDisabled(i)))
                         {
                              if(direction == "inverted")
-                             	labelCache.push(new AxisLabel(1 - (i - computedMinimum - diff)/r , d, lfunc(d, previousValue, this)));
+                                labelCache.push(new AxisLabel(1 - (i - computedMinimum - diff)/r , d, lfunc(d, previousValue, this)));
                              else
-                             	labelCache.push(new AxisLabel((i - computedMinimum - diff)/r , d, lfunc(d, previousValue, this)));
+                                labelCache.push(new AxisLabel((i - computedMinimum - diff)/r , d, lfunc(d, previousValue, this)));
                             if (!firstLabelAdded)
                                 firstLabelAdded = true;
                         }
@@ -1627,77 +1627,77 @@
                             i += MILLISECONDS_IN_DAY;
                         else
                         {
-                        	var tmp:Date = new Date(i);
-                        	if (_labelUnits == "weeks")
+                            var tmp:Date = new Date(i);
+                            if (_labelUnits == "weeks")
                             {
-                            	tmp.dateUTC = tmp.dateUTC + 7 * computedInterval;
-                        		i = tmp.time;
+                                tmp.dateUTC = tmp.dateUTC + 7 * computedInterval;
+                                i = tmp.time;
                             }
-                        	else if (_labelUnits == "hours")
+                            else if (_labelUnits == "hours")
                             {
-                            	tmp.hoursUTC = tmp.hoursUTC + computedInterval;
-                        		i = tmp.time;
-                            }
+                                tmp.hoursUTC = tmp.hoursUTC + computedInterval;
+                                i = tmp.time;
+                            }
                             else if (_labelUnits == "minutes")
                             {
-                            	tmp.minutesUTC = tmp.minutesUTC + computedInterval;
-                        		i = tmp.time;
+                                tmp.minutesUTC = tmp.minutesUTC + computedInterval;
+                                i = tmp.time;
                             }
                             else if (_labelUnits == "seconds")
                             {
-                            	tmp.secondsUTC = tmp.secondsUTC + computedInterval;
-                        		i = tmp.time;
+                                tmp.secondsUTC = tmp.secondsUTC + computedInterval;
+                                i = tmp.time;
                             }
                             else if (_labelUnits == "milliseconds")
                             {
-                            	tmp.millisecondsUTC = tmp.millisecondsUTC + computedInterval;
-                        		i = tmp.time;
+                                tmp.millisecondsUTC = tmp.millisecondsUTC + computedInterval;
+                                i = tmp.time;
                             }
                             else
-                        	{
-                        		tmp.dateUTC = tmp.dateUTC + computedInterval;
-                        		i = tmp.time;
-                        	}
+                            {
+                                tmp.dateUTC = tmp.dateUTC + computedInterval;
+                                i = tmp.time;
+                            }
                         }
                     }
                     else
                     {
-                    	if(direction == "inverted")
-                    		labelCache.push(new AxisLabel(1 - (i - computedMinimum)/r , d, lfunc(d, previousValue, this)));
-                    	else
-                        	labelCache.push(new AxisLabel((i - computedMinimum)/r , d, lfunc(d, previousValue, this)));
+                        if(direction == "inverted")
+                            labelCache.push(new AxisLabel(1 - (i - computedMinimum)/r , d, lfunc(d, previousValue, this)));
+                        else
+                            labelCache.push(new AxisLabel((i - computedMinimum)/r , d, lfunc(d, previousValue, this)));
                         previousValue = d;
                         tmp = new Date(i);
                         if (_labelUnits == "weeks")
                         {
-                        	tmp.dateUTC = tmp.dateUTC + 7 * computedInterval;
-                        	i = tmp.time;
+                            tmp.dateUTC = tmp.dateUTC + 7 * computedInterval;
+                            i = tmp.time;
                         }
                         else if (_labelUnits == "hours")
                             {
-                            	tmp.hoursUTC = tmp.hoursUTC + computedInterval;
-                        		i = tmp.time;
-                            }
+                                tmp.hoursUTC = tmp.hoursUTC + computedInterval;
+                                i = tmp.time;
+                            }
                             else if (_labelUnits == "minutes")
                             {
-                            	tmp.minutesUTC = tmp.minutesUTC + computedInterval;
-                        		i = tmp.time;
+                                tmp.minutesUTC = tmp.minutesUTC + computedInterval;
+                                i = tmp.time;
                             }
                             else if (_labelUnits == "seconds")
                             {
-                            	tmp.secondsUTC = tmp.secondsUTC + computedInterval;
-                        		i = tmp.time;
+                                tmp.secondsUTC = tmp.secondsUTC + computedInterval;
+                                i = tmp.time;
                             }
                             else if (_labelUnits == "milliseconds")
                             {
-                            	tmp.millisecondsUTC = tmp.millisecondsUTC + computedInterval;
-                        		i = tmp.time;
+                                tmp.millisecondsUTC = tmp.millisecondsUTC + computedInterval;
+                                i = tmp.time;
                             }
                             else
-                        	{
-                        		tmp.dateUTC = tmp.dateUTC + computedInterval;
-                        		i = tmp.time;
-                        	}
+                            {
+                                tmp.dateUTC = tmp.dateUTC + computedInterval;
+                                i = tmp.time;
+                            }
                     }
                 }

@@ -1709,7 +1709,17 @@
     }

     /**
-     *  @inheritDoc
+     *  Invoked when an AxisRenderer is unable to cleanly render
+     *  the labels without overlap, and would like the Axis object
+     *  to reduce the set of labels.
+     *  The method is passed the two labels that are overlapping.
+     *
+     *  @param intervalStart The start of the interval where labels overlap.
+     *
+     *  @param intervalEnd The end of the interval where labels overlap.
+     *
+     *  @return A new label set that resolves the overlap by reducing
+     *  the number of labels.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -1963,34 +1973,34 @@
                     var tmp:Date = new Date(i);
                     if (_minorTickUnits == "weeks")
                     {
-                    	tmp.dateUTC = tmp.dateUTC + 7 * _minorTickInterval;
-                    	i = tmp.time;
+                        tmp.dateUTC = tmp.dateUTC + 7 * _minorTickInterval;
+                        i = tmp.time;
                     }
                     else if (_minorTickUnits == "hours")
                     {
-                      	tmp.hoursUTC = tmp.hoursUTC + _minorTickInterval;
-                   		i = tmp.time;
-                    }
+                        tmp.hoursUTC = tmp.hoursUTC + _minorTickInterval;
+                        i = tmp.time;
+                    }
                     else if (_minorTickUnits == "minutes")
                     {
-                       	tmp.minutesUTC = tmp.minutesUTC + _minorTickInterval;
-                   		i = tmp.time;
+                        tmp.minutesUTC = tmp.minutesUTC + _minorTickInterval;
+                        i = tmp.time;
                     }
                     else if (_minorTickUnits == "seconds")
                     {
-                      	tmp.secondsUTC = tmp.secondsUTC + _minorTickInterval;
-                   		i = tmp.time;
+                        tmp.secondsUTC = tmp.secondsUTC + _minorTickInterval;
+                        i = tmp.time;
                     }
                     else if (_minorTickUnits == "milliseconds")
                     {
-                      	tmp.millisecondsUTC = tmp.millisecondsUTC + _minorTickInterval;
-                   		i = tmp.time;
+                        tmp.millisecondsUTC = tmp.millisecondsUTC + _minorTickInterval;
+                        i = tmp.time;
                     }
                     else
                     {
-                    	tmp.dateUTC = tmp.dateUTC + _minorTickInterval;
+                        tmp.dateUTC = tmp.dateUTC + _minorTickInterval;
                         i = tmp.time;
-                   	}
+                    }
                 }
                 break;
             }
@@ -2332,7 +2342,7 @@
         var m:String = d[millisecondsP].toString();
         if (m.length < 4)
         {
-        	var n:int = m.length;
+            var n:int = m.length;
             for (var i:int = n; i < 4; i++)
             {
                 m = "0" + m;


Transferred from the Adobe Open Source Subversion Repository

Revision: 14633
Author:   egeorgie@adobe.com
Date:     2010-03-09T00:15:25.159747Z

Log Message:
-----------
Merge revision 14632 to trunk: Update ASDoc comment to clarify percentWidth/percentHeight behavior related to bug http://bugs.adobe.com/jira/browse/FLEXDOCS-1245

QE notes: N/A
Doc notes: See related bug. This revision updates the ASDoc comments.
Bugs: http://bugs.adobe.com/jira/browse/FLEXDOCS-1245
Reviewer: Hans
Tests run: N/A
Is noteworthy for integration: No

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

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -2588,14 +2588,10 @@
      *
Setting this property causes a resize event to
      *  be dispatched.
      *  See the resize event for details on when
-     *  this event is dispatched.
-     *  If the component's scaleX property is not 1.0,
-     *  the width of the component from its internal coordinates
-     *  do not match.
-     *  Thus a 100 pixel wide component with a scaleX
-     *  of 2 takes 100 pixels in the parent, but
-     *  internally thinks it is 50 pixels wide.

-     *
+     *  this event is dispatched.

+     *
+     *  @see #percentWidth
+     *
      *  @langversion 3.0
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
@@ -2668,14 +2664,10 @@
      *
      *
Setting this property causes a resize event to be dispatched.
      *  See the resize event for details on when
-     *  this event is dispatched.
-     *  If the component's scaleY property is not 100,
-     *  the height of the component from its internal coordinates
-     *  do not match.
-     *  Thus a 100 pixel high component with a scaleY
-     *  of 200 takes 100 pixels in the parent, but
-     *  internally thinks it is 50 pixels high.

-     *
+     *  this event is dispatched.

+     *
+     *  @see #percentHeight
+     *
      *  @langversion 3.0
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
@@ -5014,7 +5006,7 @@
     [Inspectable(environment="none")]

     /**
-     *  Number that specifies the width of a component as a percentage
+     *  Specifies the width of a component as a percentage
      *  of its parent's size. Allowed values are 0-100. The default value is NaN.
      *  Setting the width or explicitWidth properties
      *  resets this property to NaN.
@@ -5024,6 +5016,11 @@
      *  in percent.

      *
      *
This property is always set to NaN for the UITextField control.

+     *
+     *
When used with Spark layouts, this property is used to calculate the
+     *  width of the component's bounds after scaling and rotation. For example
+     *  if the component is rotated at 90 degrees, then specifying
+     *  percentWidth will affect the component's height.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -5065,7 +5062,7 @@
     [Inspectable(environment="none")]

     /**
-     *  Number that specifies the height of a component as a percentage
+     *  Specifies the height of a component as a percentage
      *  of its parent's size. Allowed values are 0-100. The default value is NaN.
      *  Setting the height or explicitHeight properties
      *  resets this property to NaN.
@@ -5075,6 +5072,11 @@
      *  in percent.

      *
      *
This property is always set to NaN for the UITextField control.

+     *
+     *
When used with Spark layouts, this property is used to calculate the
+     *  height of the component's bounds after scaling and rotation. For example
+     *  if the component is rotated at 90 degrees, then specifying
+     *  percentHeight will affect the component's width.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 21952
Author:   smgilson@adobe.com
Date:     2011-08-12T12:57:45.892892Z

Log Message:
-----------
ASDoc edits for ToggleSwitch

ASDoc bug fixes for: 2925508, 2912546, 2896762

QE notes:
Doc notes:
Bugs: 2925508, 2912546, 2896762
Reviewer:
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/rpc/src/mx/utils/RpcClassAliasInitializer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanceUtils.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@1265624 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
@@ -34,13 +34,16 @@
 use namespace mx_internal;

 /**
- *  ActionScript-based skin for ToggleSwitch. The colors of the component can
+ *  ActionScript-based skin for the ToggleSwitch control.
+ *  The colors of the component can
  *  be customized using styles. This class is responsible for most of the
  *  graphics drawing, with some additional fxg assets.
  *
  *  @langversion 3.0
  *  @playerversion AIR 3
  *  @productversion Flex 4.5.2
+ *
+ *  @see spark.components.ToggleSwitch
  */
 public class ToggleSwitchSkin extends MobileSkin
 {
@@ -50,7 +53,7 @@
     //
     //----------------------------------------------------------------------------------------------
     /**
-     *  Constructor
+     *  Constructor.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -113,7 +116,7 @@
     //----------------------------------------------------------------------------------------------

     /**
-     *  The width used to draw the thumb skin part
+     *  The width to draw the thumb skin part.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -122,7 +125,7 @@
     protected var layoutThumbWidth:Number;

     /**
-     *  The height used to draw the thumb skin part
+     *  The height to draw the thumb skin part.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -131,7 +134,7 @@
     protected var layoutThumbHeight:Number;

     /**
-     *  The corner radius of the thumb and track
+     *  The corner radius of the thumb and track.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -140,7 +143,7 @@
     protected var layoutCornerEllipseSize:Number;

     /**
-     * The stroke weight outlining the graphics of the skin
+     *  The stroke weight outlining the graphics of the skin.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -149,7 +152,7 @@
     protected var layoutStrokeWeight:Number;

     /**
-     *  The size of the border surrounding the component
+     *  The size of the border surrounding the component.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -158,7 +161,7 @@
     protected var layoutBorderSize:Number;

     /**
-     * The padding between the labels and the thumb
+     *  The padding between the labels and the thumb.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -167,7 +170,7 @@
     protected var layoutInnerPadding:Number;

     /**
-     * The padding between the labels and the edge of the track
+     *  The padding between the labels and the edge of the track.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -176,7 +179,7 @@
     protected var layoutOuterPadding:Number;

     /**
-     * The offset between a label and its shadow
+     *  The offset between a label and its shadow.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -185,8 +188,8 @@
     protected var layoutTextShadowOffset:Number;

     /**
-     *  The label for the selected side of the component
-     *  Exposed for styling purposes only
+     *  The label for the selected side of the component.
+     *  Exposed for styling purposes only.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -195,8 +198,8 @@
     public var selectedLabelDisplay:LabelDisplayComponent;

     /**
-     *  The label for the unselected side of the component
-     *  Exposed for styling purposes only
+     *  The label for the unselected side of the component.
+     *  Exposed for styling purposes only.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -206,7 +209,8 @@

     /**
      *  The content clipped by the track that slides to match the thumb's
-     *  position. Contents include a background and the (un)selected labels.
+     *  position.
+     *  Contents include a background and the (un)selected labels.
      *  The sliding content is stacked, from back to front, as background,
      *  shadow, foreground.
      */
@@ -228,7 +232,7 @@
     //----------------------------------------------------------------------------------------------

     /**
-     *  The thumb skin part
+     *  The thumb skin part.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -237,7 +241,7 @@
     public var thumb:IVisualElement;

     /**
-     *  The track skin part
+     *  The track skin part.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -308,7 +312,7 @@
     private var _selectedLabel:String;
     /**
      *  The text of the label showing when the component is selected.
-     *  Subclasses can set or override this to customize the selected label.
+     *  Subclasses can set or override this property to customize the selected label.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -331,7 +335,7 @@
     private var _unselectedLabel:String;
     /**
      *  The text of the label showing when the component is not selected.
-     *  Subclasses can set or override this to customize the unselected label.
+     *  Subclasses can set or override this property to customize the unselected label.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3


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

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

 package mx.controls.scrollClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

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

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

Modified Paths:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/messaging/errors/NoChannelAvailableError.as
+++ frameworks/projects/rpc/src/mx/messaging/errors/NoChannelAvailableError.as
@@ -18,6 +18,12 @@
  *

  *
ChannelSet.send() if the ChannelSet has no channels.

  *

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 public class NoChannelAvailableError extends MessagingError
 {
@@ -31,6 +37,12 @@
      *  Constructs a new instance of the NoChannelAvailableError with the specified message.
      *
      *  @param msg String that contains the message that describes this NoChannelAvailableError.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public function NoChannelAvailableError(msg:String)
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 9288
Author:   rfrishbe@adobe.com
Date:     2009-08-13T23:16:32.460880Z

Log Message:
-----------
Adding change 9148 again, with some fixes for spark skins for halo components as well.  Because Group handles the disabled alpha, when a skin gets directly disabled (skin.enabled=false), it causes some issues.  In Spark, we never directly disable the skin, but we just put the skin in the "disabled" state.

QE notes: -
Doc notes: -
Bugs: SDK-22209, SDK-22605
Reviewer: Glenn
Tests run: checkintests, Steve ran all Halo component tests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/SliderTrackHighlightSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/SliderTrackSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -76,6 +76,16 @@
  *  @productversion Flex 4
  */
 [Style(name="contentBackgroundColor", type="uint", format="Color", inherit="yes", theme="spark")]
+
+/**
+ *  The alpha value when the container is disabled.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="disabledAlpha", type="Number", inherit="no", theme="spark")]

 /**
  *  Color of focus ring when the component is in focus
@@ -178,6 +188,22 @@
     //--------------------------------------------------------------------------

     //----------------------------------
+    //  alpha
+    //----------------------------------
+
+    private var _explicitAlpha:Number = 1.0;
+
+    /**
+     *  @private
+     */
+    override public function set alpha(value:Number):void
+    {
+        if (enabled)
+            super.alpha = value;
+        _explicitAlpha = value;
+    }
+
+    //----------------------------------
     //  mouseChildren
     //----------------------------------

@@ -223,7 +249,18 @@
         // If enabled, reset the mouseChildren, mouseEnabled to the previously
         // set explicit value, otherwise disable mouse interaction.
         super.mouseChildren = value ? _explicitMouseChildren : false;
-        super.mouseEnabled  = value ? _explicitMouseEnabled  : false;
+        super.mouseEnabled  = value ? _explicitMouseEnabled  : false;
+
+        if (value)
+            super.alpha = _explicitAlpha;
+        else
+        {
+            var disabledAlpha:Number = getStyle("disabledAlpha");
+
+            if (!isNaN(disabledAlpha))
+                super.alpha = disabledAlpha;
+            // else if it is NaN, it'll get handled in styleChanged()
+        }
     }

     //--------------------------------------------------------------------------
@@ -956,6 +993,23 @@
         }
     }

+    /**
+     *  @private
+     */
+    override public function styleChanged(styleProp:String):void
+    {
+        super.styleChanged(styleProp);
+        var allStyles:Boolean = (styleProp == null || styleProp == "styleName");
+
+        if (!enabled && (allStyles || styleProp == "disabledAlpha"))
+        {
+            var disabledAlpha:Number = getStyle("disabledAlpha");
+
+            if (!isNaN(disabledAlpha))
+                super.alpha = disabledAlpha;
+        }
+    }
+
     //----------------------------------
     //  horizontal,verticalScrollPositionDelta
     //----------------------------------


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 12796
Author:   cframpto@adobe.com
Date:     2009-12-10T18:05:16.265768Z

Log Message:
-----------
Because TLF does not have the concept of "auto" fontLookup like we have at the Flex-level, we have had to rework the meaning of the fontLookup attribute so it is possible to have spans with device text in a component whose fontLookup is "embeddedCFF" without requiring fontLookup "device" to be explicitly specified for those spans.

For Spark text components, the default fontLookup has been changed from "auto" to "embeddedCFF".  The default fontFamily is "Arial".

If the component level fontLookup either defaults to "embeddedCFF" or is explicitly set to "embeddedCFF", for each element that is not explicitly set to fontLookup "device", it will first look for the embedded font, and failing that, will fail back to the device font.  All fonts for a given text component must be in the same swf context.

If the component-level fontLookup is "device" or the component-level fontFamily is not found in the swf context, the font lookup for all elements in the component will revert to "device".

If the player doesn't find the device font it will fallback to one of the builtin default fonts.

QE notes: probably need some new mustella tests to cover all the cases - 5 RichText truncation tests fail but I'm not sure this change has anything to do with that
Doc notes:
Bugs: SDK-24470
Reviewer: Gordon
Tests run: checkintests, TextArea, Label, RichText
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/TextUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -18,7 +18,6 @@
 import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
-import flash.geom.Matrix;
 import flash.geom.Rectangle;
 import flash.system.IME;
 import flash.system.IMEConversionMode;
@@ -41,7 +40,6 @@
 import flashx.textLayout.edit.EditingMode;
 import flashx.textLayout.edit.IEditManager;
 import flashx.textLayout.edit.ISelectionManager;
-import flashx.textLayout.edit.SelectionManager;
 import flashx.textLayout.edit.SelectionState;
 import flashx.textLayout.elements.Configuration;
 import flashx.textLayout.elements.GlobalSettings;
@@ -55,7 +53,6 @@
 import flashx.textLayout.events.StatusChangeEvent;
 import flashx.textLayout.formats.BlockProgression;
 import flashx.textLayout.formats.Category;
-import flashx.textLayout.formats.FormatValue;
 import flashx.textLayout.formats.ITextLayoutFormat;
 import flashx.textLayout.formats.TextLayoutFormat;
 import flashx.textLayout.operations.CutOperation;
@@ -65,14 +62,10 @@
 import flashx.textLayout.operations.InsertTextOperation;
 import flashx.textLayout.operations.PasteOperation;
 import flashx.textLayout.tlf_internal;
-import flashx.undo.IOperation;
 import flashx.undo.IUndoManager;

-import mx.core.IEmbeddedFontRegistry;
 import mx.core.IFlexModuleFactory;
 import mx.core.IIMESupport;
-import mx.core.IUIComponent;
-import mx.core.Singleton;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
@@ -80,11 +73,9 @@
 import mx.managers.IFocusManagerComponent;
 import mx.managers.ISystemManager;
 import mx.resources.ResourceManager;
-import mx.utils.ObjectUtil;
 import mx.utils.StringUtil;

 import spark.components.supportClasses.RichEditableTextContainerManager;
-import spark.components.supportClasses.RichEditableTextEditManager;
 import spark.core.CSSTextLayoutFormat;
 import spark.core.IViewport;
 import spark.core.NavigationUnit;
@@ -464,6 +455,12 @@
 		 */
 		GlobalSettings.resourceStringFunction = TextUtil.getResourceString;

+        /**
+         *  Set the TLF hook used to specify the callback used for changing
+         *  the FontLookup based on SWFContext.
+         */
+        GlobalSettings.resolveFontLookupFunction = TextUtil.resolveFontLookup;
+
         staticConfiguration =
             Configuration(TextContainerManager.defaultConfiguration).clone();
         staticConfiguration.manageEnterKey = false; // default is true
@@ -480,9 +477,6 @@
         staticPlainTextExporter =
             TextConverter.getExporter(TextConverter.PLAIN_TEXT_FORMAT);

-        // Used for embedded fonts.
-        staticTextFormat = new TextFormat();
-
         classInitialized = true;
     }

@@ -519,13 +513,7 @@
      *  by walking the leaf FlowElements in the TextFlow.
      */
     private static var staticPlainTextExporter:ITextExporter;
-
-    /**
-     *  @private
-     *  Used in getEmbeddedFontContext().
-     */
-    private static var staticTextFormat:TextFormat;
-
+
     /**
      *  @private
      *  Regular expression which matches all newlines in the text.  Used
@@ -533,42 +521,6 @@
      */
     private static const ALL_NEWLINES_REGEXP:RegExp = /\n/g;

-    //--------------------------------------------------------------------------
-    //
-    //  Class properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  embeddedFontRegistry
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the _embeddedFontRegistry property.
-     *  Note: This gets initialized on first access,
-     *  not when this class is initialized, in order to ensure
-     *  that the Singleton registry has already been initialized.
-     */
-    private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
-
-    /**
-     *  @private
-     *  A reference to the embedded font registry.
-     *  Single registry in the system.
-     *  Used to look up the moduleFactory of a font.
-     */
-    private static function get embeddedFontRegistry():IEmbeddedFontRegistry
-    {
-        if (!_embeddedFontRegistry)
-        {
-            _embeddedFontRegistry = IEmbeddedFontRegistry(
-                Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
-        }
-
-        return _embeddedFontRegistry;
-    }
-
     //--------------------------------------------------------------------------
     //
     //  Class methods
@@ -3276,19 +3228,7 @@
             var bold:Boolean = getStyle("fontWeight") == "bold";
             var italic:Boolean = getStyle("fontStyle") == "italic";

-            var localLookup:ISystemManager =
-                moduleFactory && moduleFactory is ISystemManager ?
-                ISystemManager(moduleFactory) : systemManager;
-
-            fontContext = embeddedFontRegistry.getAssociatedModuleFactory(
-                font, bold, italic, this, fontContext, localLookup, true);
-        }
-
-        if (!fontContext && fontLookup == FontLookup.EMBEDDED_CFF)
-        {
-            // if we couldn't find the font and somebody insists it is
-            // embedded, try the default moduleFactory
-            fontContext = moduleFactory;
+            fontContext = getFontContext(font, bold, italic, true);
         }

         return fontContext;


Transferred from the Adobe Open Source Subversion Repository

Revision: 15271
Author:   cframpto@adobe.com
Date:     2010-04-08T00:10:28.727805Z

Log Message:
-----------
Merge RET fix 15270 from 4.x to trunk.

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

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -2515,20 +2515,15 @@
                     // The composeWidth may be adjusted for minWidth/maxWidth.
                     bounds = measureTextSize(NaN, composeHeight);

+                    measuredWidth = Math.ceil(bounds.right);
+                    measuredHeight = composeHeight;
+
                     // Have we already hit the limit with the existing text?  If we
                     // are beyond the composeHeight we can assume we've maxed out on
-                    // the compose width as well.
+                    // the compose width as well (or the composeHeight isn't
+                    // large enough for even one line of text).
                     if (bounds.bottom > composeHeight)
-                    {
-                        measuredWidth = _textContainerManager.compositionWidth;
-                        measuredHeight = composeHeight;
                         autoSize = false;
-                    }
-                    else
-                    {
-                        measuredWidth = Math.ceil(bounds.right);
-                        measuredHeight = composeHeight;
-                    }
                 }
                 else
                 {
@@ -2615,6 +2610,31 @@
             }

             _textContainerManager.updateContainer();
+
+            widthConstraint = NaN;
+            heightConstraint = NaN;
+        }
+
+        /**
+         *  @private
+         */
+        override public function setLayoutBoundsSize(
+                                    width:Number, height:Number,
+                                    postLayoutTransform:Boolean = true):void
+        {
+            // width and height are NaN unless there are constraints on them.
+            // Save these so when we are auto-sizing we know which dimensions
+            // are constrained.  Without this it is not possible to differentiate
+            // between a measured width/height that is the same as the
+            // constrained width/height to know whether that dimension can
+            // be sized or must be fixed at the constrained value.
+            if (!isNaN(width))
+                widthConstraint = width;
+
+            if (!isNaN(height))
+                heightConstraint = height;
+
+            super.setLayoutBoundsSize(width, height, postLayoutTransform);
         }

         /**
@@ -3341,9 +3361,11 @@

         /**
          *  @private
-         *  If auto-sizing text, it may need to be remeasured if it is constrained
-         *  by the layout manager.  Changing one dimension may change the size of
-         *  the measured text and the layout manager needs to know this.
+         *  If auto-sizing text, it may need to be remeasured if it is
+         *  constrained in one dimension by the layout manager.  If it is
+         *  constrained in both dimensions there is no need to remeasure.
+         *  Changing one dimension may change the size of the measured text
+         *  and the layout manager needs to know this.
          */
         private function remeasureText(width:Number, height:Number):Boolean
         {
@@ -3355,15 +3377,15 @@
             // remeasure which will reset autoSize.
             autoSize = false;

-            widthConstraint = NaN;
-            heightConstraint = NaN;
-
-            if (width != measuredWidth)
+            if (!isNaN(widthConstraint))
             {
                 // Do we have a constrained width and an explicit height?
                 // If so, the sizes are set so no need to remeasure now.
-                if (!isNaN(explicitHeight) || !isNaN(_heightInLines))
+                if (!isNaN(explicitHeight) || !isNaN(_heightInLines) ||
+                    !isNaN(heightConstraint))
+                {
                     return false;
+                }

                 // Is there no width?
                 if (width == 0)
@@ -3372,11 +3394,9 @@
                 // No reflow for explicit lineBreak
                 if (_textContainerManager.hostFormat.lineBreak == "explicit")
                     return false;
-
-                widthConstraint = width;
             }

-            if (height != measuredHeight)
+            if (!isNaN(heightConstraint))
             {
                 // Do we have a constrained height and an explicit width?
                 // If so, the sizes are set so no need to remeasure now.
@@ -3385,9 +3405,7 @@

                 // Is there no height?
                 if (height == 0)
-                    return false;
-
-                heightConstraint = height;
+                    return false;
             }

             // Width or height is different than what was measured.  Since we're


getObject() no longer returns deprecated objects.

Change-Id: I82dfeb03f967575daae430b937a6ec22bcd9a8a6

--- WeaveCore/src/weave/core/SessionManager.as
+++ WeaveCore/src/weave/core/SessionManager.as
@@ -1205,7 +1205,7 @@
 			var object:ILinkableObject = root;
 			for each (var propertyName:Object in path)
 			{
-				if (object == null)
+				if (object == null || _disposedObjectsMap[object])
 					return null;
 				if (object is ILinkableHashMap)
 				{
@@ -1226,7 +1226,7 @@
 					object = object[propertyName] as ILinkableObject;
 				}
 			}
-			return object;
+			return _disposedObjectsMap[object] ? null : object;
 		}


Fix rare case where HTTPStreamDownloader has a bigger downloadBytesCount then totalBytesCount

--- HLSPlugin/src/org/denivip/osmf/net/httpstreaming/hls/HTTPHLSStreamSource.as
+++ HLSPlugin/src/org/denivip/osmf/net/httpstreaming/hls/HTTPHLSStreamSource.as
@@ -771,8 +771,7 @@
 			// FM-1003 (http://bugs.adobe.com/jira/browse/FM-1003)
 			// Re-dispatch this event on the _dispatcher
 			_dispatcher.dispatchEvent(event);
-
-			var input:IDataInput = _indexDownloader.getBytes(_indexDownloader.downloadBytesCount);
+			var input:IDataInput = _indexDownloader.getBytes();
 			var bytes:ByteArray = new ByteArray();
 			input.readBytes(bytes, 0, input.bytesAvailable);
 			bytes.position = 0;


FIX  FLEX-33166 Mobile TextInput with native StageTextInput cannot be included in scrollable forms - cleanup code (removed traces)

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
@@ -423,19 +423,12 @@
      */
     private var savedSelectionAnchorIndex:int = 0;
     private var savedSelectionActiveIndex:int = 0;
-    private var showProxy:Boolean = true;
-
-    /* if showProxy = true; proxy is visible, and StageText is not visible
+
+    /*  indicates whether editing is in place
      * */
     private var isEditing:Boolean = false;

-    /*  indicates whether editing is in place
-     * */
-    private var isMouseDown:Boolean = false;
-
     private var invalidateProxyFlag:Boolean = false;
-
-

     //--------------------------------------------------------------------------
     //
@@ -667,8 +660,11 @@
             var sm:SystemManager = application ? application.systemManager as SystemManager : null;
             _densityScale = sm ? sm.densityScale : 1.0;
         }
-
         return _densityScale;
+    }
+
+    protected function get showProxy():Boolean {
+        return !isEditing;
     }

     //----------------------------------
@@ -1368,11 +1364,6 @@
      */
     override public function setFocus():void
     {
-        // if mouse is down, let SetFocus   handle the focus, otherwise it's programmatic, so assign focus
-  /*      if (isMouseDown)
-        {
-            return;
-        }*/
         if (stageText != null)
         {
             stageText.assignFocus();      // will trigger stageTextfocusIn
@@ -1512,9 +1503,11 @@
     }

-    /**
-     * EDITING AND FOCUS MANAGEMENT
-     */
+      //--------------------------------------------------------------------------
+        //
+        //    EDITING AND FOCUS MANAGEMENT
+        //
+        //--------------------------------------------------------------------------

     /**
      * @return true if editing was actually stated,, false is already started
@@ -1524,7 +1517,6 @@
         if (!isEditing)
         {
             isEditing = true;
-            showProxy = false;
             proxy.visible = false;
             updateViewPort();
             stageText.visible = true;
@@ -1544,7 +1536,6 @@
         {
             isEditing = false;
             invalidateProxy();
-            showProxy = true;
             proxy.visible = true;
             stageText.visible = false;

@@ -1854,10 +1845,8 @@
     private function touchStartingHandler(event:Event):void
     {
         // don't allow touch scrolling while editing (of the StageText will stay in place)
-        trace("[DEBUG] touchStartingHandler", debugId);
        if (isEditing)
           event.preventDefault();
-
     }

     protected function stageText_changeHandler(event:Event):void
@@ -1886,7 +1875,6 @@
     private function stageText_focusInHandler(event:FocusEvent):void
     {
         if (startTextEdit()){
-            trace("[DEBUG] stageText focus IN:", debugId);
             // Focus events are documented as bubbling. However, all events coming
             // from StageText are set to not bubble. So we need to create an
             // appropriate bubbling event here.
@@ -1898,7 +1886,6 @@
     private function stageText_focusOutHandler(event:FocusEvent):void
     {
         if (endTextEdit()) {
-            trace("[DEBUG] stageText focus OUT:", debugId);
             // Focus events are documented as bubbling. However, all events coming
             // from StageText are set to not bubble. So we need to create an
             // appropriate bubbling event here.
@@ -1951,7 +1938,6 @@
     {

         if ( startTextEdit()) {
-            trace("[DEBUG] stageText SK ACTIVATE:", debugId);
             dispatchEvent(new SoftKeyboardEvent(event.type,
                     true, event.cancelable, this, event.triggerType));
         }
@@ -1960,7 +1946,6 @@
     private function stageText_softKeyboardDeactivateHandler(event:SoftKeyboardEvent):void
     {
         if (endTextEdit()) {
-            trace("[DEBUG] stageText SK DE activate:", debugId);
             dispatchEvent(new SoftKeyboardEvent(event.type,
                     true, event.cancelable, this, event.triggerType));
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 21504
Author:   aaltman@adobe.com
Date:     2011-06-30T16:58:51.113669Z

Log Message:
-----------
Initial checkin of StageText-based skins for mobile TextInput and TextArea. New default skins have not been changed yet. Skins use native text controls on Android and iOS devices.

QE notes: Padding isn't correct yet. Skins do not yet work on iOS because of runtime bug 2906305.
Doc notes:
Bugs:
Reviewer: Carol Frampton, Jason Szeto, Alex Harui
Tests run: Checkin tests, focusManager tests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as
@@ -0,0 +1,106 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2011 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.skins.mobile
+{
+import spark.components.TextArea;
+import spark.skins.mobile.supportClasses.StageTextSkinBase;
+
+/**
+ *  ActionScript-based skin for TextArea controls in mobile applications.
+ *
+ *  @see spark.components.TextArea
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 3.0
+ *  @productversion Flex 4.5.2
+ */
+public class StageTextAreaSkin extends StageTextSkinBase
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3.0
+     *  @productversion Flex 4.5.2
+     */
+    public function StageTextAreaSkin()
+    {
+        super();
+        multiline = true;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @copy spark.skins.spark.ApplicationSkin#hostComponent
+     */
+    public var hostComponent:TextArea;  // SkinnableComponent will populate
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function layoutContents(unscaledWidth:Number,
+                                               unscaledHeight:Number):void
+    {
+        // base class handles border position & size
+        super.layoutContents(unscaledWidth, unscaledHeight);
+
+        // position & size the text
+        var paddingLeft:Number = getStyle("paddingLeft");
+        var paddingRight:Number = getStyle("paddingRight");
+        var paddingTop:Number = getStyle("paddingTop");
+        var paddingBottom:Number = getStyle("paddingBottom");
+
+        var unscaledTextWidth:Number = unscaledWidth - paddingLeft - paddingRight;
+        var unscaledTextHeight:Number = unscaledHeight - paddingTop - paddingBottom;
+
+        if (textDisplay)
+        {
+            textDisplay.commitStyles();
+            setElementSize(textDisplay, unscaledTextWidth, unscaledTextHeight);
+            setElementPosition(textDisplay, paddingLeft, paddingTop);
+        }
+
+        if (promptDisplay)
+        {
+            promptDisplay.commitStyles();
+            setElementSize(promptDisplay, unscaledTextWidth, unscaledTextHeight);
+            setElementPosition(promptDisplay, paddingLeft, paddingTop);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function measure():void
+    {
+        super.measure();
+        measureTextComponent(hostComponent);
+    }
+}
+}


Modify sample web project

Modify sample web project

--- samples/projects/krew_async/projects/web-project/src/WebMain.as
+++ samples/projects/krew_async/projects/web-project/src/WebMain.as
@@ -13,7 +13,7 @@
             krew.log("Kicked from WebMain");

             KrewConfig.IS_AIR = false;
-            KrewConfig.ASSET_URL_SCHEME = "http://uri/to/assets/";
+            KrewConfig.ASSET_URL_SCHEME = "http://docs.tatsuya-koyama.com/assets/media/swf/krewsample/";

             var main:Main = new Main(this);
         }


fixed a bug, where propertyIsMethod would not work

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@162 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/tweens/TweenedPropertyVO.as
+++ src/reprise/tweens/TweenedPropertyVO.as
@@ -112,7 +112,7 @@
 			var result : Number = tweenFunction.apply(null, args);
 			var methodArgs : Array =
 				[roundResults ? Math.round(result) : result].concat(extraParams);
-			Function(scope[property]).apply(scope, methodArgs);
+			(scope[property] as Function).apply(scope, methodArgs);
 		}

 		/*


add customizable size for the joints debug meshes

--- src/aerys/minko/scene/controller/debug/JointsDebugController.as
+++ src/aerys/minko/scene/controller/debug/JointsDebugController.as
@@ -26,17 +26,20 @@
 	 */
 	public final class JointsDebugController extends AbstractController
 	{
+		private var _jointSize		: Number;
 		private var _jointsMaterial	: Material;

-		public function JointsDebugController(jointsMaterial : Material	= null)
+		public function JointsDebugController(jointsSize		: Number	= 0.08,
+											  jointsMaterial 	: Material	= null)
 		{
 			super(Mesh);

-			initialize(jointsMaterial);
+			initialize(jointsSize, jointsMaterial);
 		}

-		private function initialize(jointsMaterial	: Material) : void
+		private function initialize(jointSize : Number, jointsMaterial	: Material) : void
 		{
+			_jointSize = jointSize;
 			_jointsMaterial = jointsMaterial;
 			if (!_jointsMaterial)
 			{
@@ -89,7 +92,7 @@
 						CubeGeometry.cubeGeometry, _jointsMaterial, '__joint__'
 					);

-					jointMesh.transform.appendUniformScale(.08);
+					jointMesh.transform.appendUniformScale(_jointSize);
 					joint.addChild(jointMesh);
 				}
 			}


Fix error in stream status

Fix error in stream status

--- src/Player.as
+++ src/Player.as
@@ -333,18 +333,18 @@
     }

     public function streamStatus():Object {
-      if (this.currentState === 'playing') {
+      //if (this.currentState === 'playing') {
         /* This causes a crash in some situations */
         //this.streamHasAudio = (this.streamHasAudio || this.client.hasAudio());
-        this.streamHasVideo = (this.streamHasVideo || this.client.hasVideo());
-      }
+        //this.streamHasVideo = (this.streamHasVideo || this.client.hasVideo());
+      //}
       var status:Object = {
         'fps': (this.client) ? this.client.currentFPS() : null,
         'resolution': (this.client) ? { width: meta.width, height: meta.height } : null,
         'playbackSpeed': (this.client) ? 1.0 : null,
         'protocol': (this.urlParsed) ? this.urlParsed.protocol : null,
-        'audio': (this.client) ? this.streamHasAudio : null,
-        'video': (this.client) ? this.streamHasVideo : null,
+        //'audio': (this.client) ? this.streamHasAudio : null,
+        //'video': (this.client) ? this.streamHasVideo : null,
         'state': this.currentState,
         'streamURL': (this.urlParsed) ? this.urlParsed.full : null,
         'duration': meta.duration ? meta.duration : null,


Added looping

Added looping

--- src/Player.as
+++ src/Player.as
@@ -13,14 +13,14 @@
   import flash.net.NetStream;
   import flash.net.URLRequest;
   import flash.system.Security;
-  import flash.text.TextField;

   public class Player extends Sprite {

     private var posterUrl: String;
     private var videoUrl: String;
+    private var loop: Boolean;
     private var muted: Boolean;
-    private var autoPlay: Boolean;
+    private var autoplay: Boolean;

     private var videoPlaying: Boolean;

@@ -42,8 +42,9 @@

       posterUrl = loaderInfo.parameters.poster;
       videoUrl = loaderInfo.parameters.video;
+      loop = loaderInfo.parameters.loop == "true";
       muted = loaderInfo.parameters.muted == "true";
-      autoPlay = loaderInfo.parameters.autoPlay == "true";
+      autoplay = loaderInfo.parameters.autoplay == "true";

       setBackgroundColor();

@@ -80,12 +81,6 @@
       return stream.soundTransform.volume == 0;
     }

-    private function setBackgroundColor(): void {
-      graphics.beginFill(0x000000, 1);
-      graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
-      graphics.endFill();
-    }
-
     private function registerExternalMethods(): void {
       ExternalInterface.addCallback("play", play);
       ExternalInterface.addCallback("pause", pause);
@@ -94,6 +89,12 @@
       ExternalInterface.addCallback("unmute", unmute);
       ExternalInterface.addCallback("muted", isMuted);
       ExternalInterface.call("DivineVideoPlayer.ready");
+    }
+
+    private function setBackgroundColor(): void {
+      graphics.beginFill(0x000000, 1);
+      graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
+      graphics.endFill();
     }

     private function loadPoster(): void {
@@ -119,7 +120,7 @@
     private function netStatusHandler(event: NetStatusEvent): void {
       switch (event.info.code) {
         case "NetConnection.Connect.Success": connectStream(); break;
-        case "NetStream.Play.StreamNotFound": break;
+        case "NetStream.Play.Stop": if (loop) stream.seek(0); break;
       }
     }

@@ -127,15 +128,13 @@
       video = new Video(stage.stageWidth, stage.stageHeight);
       addChild(video);

-      //posterContainer.visible = false;
-
       stream = new NetStream(connection);
       stream.soundTransform = new SoundTransform(muted ? 0 : 1);
       stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
       video.attachNetStream(stream);

       stream.play(videoUrl);
-      if (!autoPlay) pause();
+      if (!autoplay) pause();
     }

   }


A weird character was between 'ArgumentError' and the equals sign, causing the test to fail... And no, I don't consider a space a weird character ;-)

Signed-off-by: Erik de Bruin <c195b508e6f0c57aeafdb5e96947e2b79e6a4b40@ixsoftware.nl>

--- compiler.jx.tests/test-files/goog/files/input.as
+++ compiler.jx.tests/test-files/goog/files/input.as
@@ -14,7 +14,7 @@
 		trace(typeof "a");
 	}

-	private var _a:ArgumentError = new ArgumentError();
+	private var _a:ArgumentError = new ArgumentError();

 	public const MY_INSTANCE_CONST:String = "myInstanceConst";
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19572
Author:   sameer@adobe.com
Date:     2011-01-03T09:12:04.569388Z

Log Message:
-----------
headerStyleName does not work on AdvancedDataGrid/AdvancedDataGridColumn
QE notes: test headerStyleName
Doc notes: NA
Bugs: FLEXDMV-2489
Reviewer: Sreeni
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as

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

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
@@ -1540,8 +1540,7 @@
             {
                 if (headerStyleName is String)
                 {
-                    headerStyleName =
-                        owner.styleManager.getMergedStyleDeclaration(String(headerStyleName));
+                    chain = addStylesToProtoChain(String(headerStyleName), chain, target);
                 }

                 if (headerStyleName is CSSStyleDeclaration)
@@ -1553,8 +1552,7 @@
             {
                 if (headerStyleName is String)
                 {
-                    headerStyleName =
-                        owner.styleManager.getMergedStyleDeclaration(String(headerStyleName));
+                    chain = addStylesToProtoChain(String(headerStyleName), chain, target);
                 }

                 if (headerStyleName is CSSStyleDeclaration)
@@ -1862,6 +1860,26 @@
                 owner.systemManager);
         return fontContext != oldEmbeddedFontContext;
     }
+
+	/**
+	 *  @private
+	 */
+	private function addStylesToProtoChain(styles:String, chain:Object, target:DisplayObject):Object
+	{
+		var styleNames:Array = styles.split(/\s+/);
+		for (var c:int=0; c < styleNames.length; c++)
+		{
+			if (styleNames[c].length)
+			{
+				var declaration:CSSStyleDeclaration =
+					owner.styleManager.getMergedStyleDeclaration("." + styleNames[c]);
+
+				if (declaration)
+					chain = declaration.addStyleToProtoChain(chain, target);
+			}
+		}
+		return chain;
+	}

     /**
      *  @private


Transferred from the Adobe Open Source Subversion Repository

Revision: 22074
Author:   smgilson@adobe.com
Date:     2011-08-18T18:48:26.478480Z

Log Message:
-----------
ASDoc edits for Callout

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ContentBackgroundAppearance.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/mobilecomponents/src/spark/components/Callout.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as
+++ frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as
@@ -13,9 +13,11 @@
 {

 /**
- *  Enumeration of horizontal and vertical positions of the Callout component
+ *  The CalloutPosition calss defines the enumeration of
+ *  horizontal and vertical positions of the Callout component
  *  relative to the owner.
  *
+ *  @see spark.components.Callout
  *  @see spark.components.Callout#horizontalPosition
  *  @see spark.components.Callout#verticalPosition
  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

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


Added default player movement states. Added a check to prevent entering move forward state instantly after a collision.

--- src/engine/tetragon/systems/racetrack/RacetrackSystem.as
+++ src/engine/tetragon/systems/racetrack/RacetrackSystem.as
@@ -35,7 +35,6 @@
 	import tetragon.data.racetrack.constants.RTTriggerActions;
 	import tetragon.data.racetrack.constants.RTTriggerTypes;
 	import tetragon.data.racetrack.proto.RTObject;
-	import tetragon.data.racetrack.proto.RTObjectImageSequence;
 	import tetragon.data.racetrack.proto.RTTrigger;
 	import tetragon.data.racetrack.vo.RTCar;
 	import tetragon.data.racetrack.vo.RTColorSet;
@@ -123,6 +122,7 @@
 		private var _isSteeringRight:Boolean;
 		private var _isJump:Boolean;
 		private var _isFall:Boolean;
+		private var _isIdleAfterCollision:Boolean;

 		private var _started:Boolean;

@@ -279,14 +279,14 @@
 			/* only process non-render logic if system is started. */
 			if (!_started) return;

+			var i:int, playerSegment:RTSegment = findSegment(_position + _playerZ);
+
 			_speedPercent = _speed / _maxSpeed;
-			var i:int, playerSegment:RTSegment = findSegment(_position + _playerZ);
-
-			updateCars(_dt, playerSegment, _playerWidth);
-
 			_startPosition = _position;
 			_position = increase(_position, _dt * _speed, _trackLength);

+			updateCars(playerSegment, _playerWidth);
+
 			/* Handle player interaction. */
 			if (_allowControls)
 			{
@@ -299,22 +299,19 @@
 				processSegmentTriggers(playerSegment);
 			}

-			/* Check if player drives onto off-road area. */
-			if ((_playerX < -1) || (_playerX > 1))
-			{
-				if (_speed > _offRoadLimit)
-				{
-					_speed = accel(_speed, _offRoadDecel, _dt);
-				}
-			}
-
 			/* Check player collisions with other entities. */
 			if (playerSegment.entitiesNum > 0)
 			{
 				processEntityCollisions(playerSegment);
 			}

-			/* Check player collision with opponents. */
+			/* Slow down if player drives onto off-road area. */
+			if ((_playerX < -1 || _playerX > 1) && _speed > _offRoadLimit)
+			{
+				_speed = accel(_speed, _offRoadDecel);
+			}
+
+			/* Check player collision with other cars. */
 			for (i = 0; i < playerSegment.cars.length; i++)
 			{
 				var car:RTCar = playerSegment.cars[i];
@@ -429,7 +426,7 @@
 					spriteScale = interpolate(seg.point1.screen.scale, seg.point2.screen.scale, op.percent);
 					spriteX = interpolate(seg.point1.screen.x, seg.point2.screen.x, op.percent) + (spriteScale * op.offset * _roadWidth * _widthHalf);
 					spriteY = interpolate(seg.point1.screen.y, seg.point2.screen.y, op.percent);
-					renderEntity(op.entity, null, spriteScale, spriteX, spriteY, -0.5, -1, seg.clip, seg.haze);
+					renderEntity(op.entity, spriteScale, spriteX, spriteY, -0.5, -1, seg.clip, seg.haze);
 				}

 				/* Render other objects. */
@@ -443,7 +440,7 @@
 						spriteScale = seg.point1.screen.scale;
 						spriteX = seg.point1.screen.x + (spriteScale * entity.offset * _roadWidth * _widthHalf);
 						spriteY = seg.point1.screen.y;
-						renderEntity(entity, null, spriteScale, spriteX, spriteY, (entity.offset < 0 ? -1 : 0), -1, seg.clip, seg.haze);
+						renderEntity(entity, spriteScale, spriteX, spriteY, (entity.offset < 0 ? -1 : 0), -1, seg.clip, seg.haze);
 					}
 				}

@@ -470,7 +467,6 @@
 					}

 					renderEntity(_racetrack.player,
-						seqID,
 						_cameraDepth / _playerZ,
 						_widthHalf,
 						(_heightHalf - (_cameraDepth / _playerZ * interpolate(playerSegment.point1.camera.y, playerSegment.point2.camera.y, playerPercent) * _heightHalf)) + jitter,
@@ -785,7 +781,7 @@
 		/**
 		 * @private
 		 */
-		private function updateCars(dt:Number, playerSegment:RTSegment, playerW:Number):void
+		private function updateCars(playerSegment:RTSegment, playerW:Number):void
 		{
 			var i:int,
 				car:RTCar,
@@ -797,7 +793,7 @@
 				car = _cars[i];
 				oldSegment = findSegment(car.z);
 				car.offset = car.offset + updateCarOffset(car, oldSegment, playerSegment, playerW);
-				car.z = increase(car.z, dt * car.speed, _trackLength);
+				car.z = increase(car.z, _dt * car.speed, _trackLength);
 				car.percent = percentRemaining(car.z, _segmentLength);
 				// useful for interpolation during rendering phase
 				newSegment = findSegment(car.z);
@@ -900,16 +896,43 @@
 			else
 			{
 				var dx:Number = _dt * 2 * _speedPercent;
+				var playerStateID:String = "idle";
+
 				/* Update left/right steering. */
-				if (_isSteeringLeft) _playerX = _playerX - dx;
-				else if (_isSteeringRight) _playerX = _playerX + dx;
+				if (_isSteeringLeft)
+				{
+					playerStateID = "moveLeft";
+					_playerX = _playerX - dx;
+				}
+				else if (_isSteeringRight)
+				{
+					playerStateID = "moveRight";
+					_playerX = _playerX + dx;
+				}

 				_playerX = _playerX - (dx * _speedPercent * segment.curve * _centrifugal);

 				/* Update acceleration & decceleration. */
-				if (_isAccelerating) _speed = accel(_speed, _acceleration, _dt);
-				else if (_isBraking) _speed = accel(_speed, _braking, _dt);
-				else _speed = accel(_speed, _deceleration, _dt);
+				if (_isAccelerating)
+				{
+					_isIdleAfterCollision = false;
+					_speed = accel(_speed, _acceleration);
+				}
+				else if (_isBraking)
+				{
+					_speed = accel(_speed, _braking);
+				}
+				else
+				{
+					_speed = accel(_speed, _deceleration);
+				}
+
+				if (!_isIdleAfterCollision && _speed > 0)
+				{
+					playerStateID = "moveForward";
+				}
+
+				_racetrack.player.object.switchToState(playerStateID);
 			}
 		}

@@ -981,6 +1004,7 @@
 							/* Determines how quick player can steer away from obstacle after being stopped. */
 							_speed = _maxSpeed / 5;
 							_position = increase(segment.point1.world.z, -_playerZ, _trackLength);
+							_isIdleAfterCollision = true;
 						}
 						break;
 					}
@@ -1145,22 +1169,22 @@
 		 * @param clipY
 		 * @param hazeAlpha
 		 */
-		private function renderEntity(entity:RTEntity, sequenceID:String, scale:Number,
+		private function renderEntity(entity:RTEntity, scale:Number,
 			destX:Number, destY:Number, offsetX:Number = 0.0, offsetY:Number = 0.0,
 			clipY:Number = 0.0, hazeAlpha:Number = 1.0):void
 		{
 			if (!entity.object.image) return;

 			var image:Image2D = entity.object.image;
-			// TODO Remove and add handling of object state here!
-			if (sequenceID)
-			{
-				var seq:RTObjectImageSequence = entity.object.sequences[sequenceID];
-				if (seq)
-				{
-					image = seq.movieClip;
-				}
-			}
+
+			//if (sequenceID)
+			//{
+			//	var seq:RTObjectImageSequence = entity.object.sequences[sequenceID];
+			//	if (seq)
+			//	{
+			//		image = seq.movieClip;
+			//	}
+			//}

 			scale *= entity.scale;

@@ -1200,9 +1224,9 @@
 		}

-		private function accel(v:Number, accel:Number, dt:Number):Number
-		{
-			return v + (accel * dt);
+		private function accel(v:Number, accel:Number):Number
+		{
+			return v + (accel * _dt);
 		}


Fixed some issues in player control logic.

--- src/engine/tetragon/systems/racetrack/RacetrackSystem.as
+++ src/engine/tetragon/systems/racetrack/RacetrackSystem.as
@@ -926,16 +926,13 @@
 				{
 					_speed = accel(_speed, _deceleration);
 				}
+			}
+
+			if (_speed <= 0 || _isIdleAfterCollision)
+			{
+				playerStateID = RTPlayerDefaultStateNames.IDLE;
+			}

-				if (_speed <= 0)
-				{
-					playerStateID = RTPlayerDefaultStateNames.IDLE;
-				}
-				else if (!_isIdleAfterCollision)
-				{
-				}
-			}
-
 			if (playerStateID && !_suppressDefaultPlayerStates)
 			{
 				_racetrack.player.object.switchToState(playerStateID);


updated example to use constants, transform matrix and added comments

--- src/Wheel.as
+++ src/Wheel.as
@@ -13,35 +13,53 @@
 	public class Wheel extends Sprite {
 		private var oWheel:Bitmap = null;
 		private var oBike:Bitmap = null;
+		// 2 loaders, one 2 load bike and the other the wheel
 		private var oLoaderBike:Loader = new Loader(),
 			oLoaderWheel:Loader = new Loader();

 		public function Wheel() {
-			trace("oBike is: " + oBike);
-			trace("oWheel is: " + oWheel);
 			oLoaderWheel.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
+			oLoaderBike.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
+			// pngs exported from flash professional as png sequence
 			oLoaderWheel.load(new URLRequest("assets/wheel.png"));
-			oLoaderBike.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
 			oLoaderBike.load(new URLRequest("assets/bike.png"));
 		}

 		private function loaded(event : Event) : void {
 			oWheel = Bitmap(oLoaderWheel.content);
 			oBike = Bitmap(oLoaderBike.content);
-			addChild(oWheel);
-			addChild(oBike);
-			oBike.y = 21;
-			if(oBike != null && oWheel != null ) addEventListener(Event.ENTER_FRAME, enterFrame);
+			// this seems to be called twice, but by the time it is called the first time, both assets seem to be there
+			if(oBike != null && oWheel != null ){
+				// both assets are for sure here so we clean up like in LAS chapter 3
+				oLoaderWheel.contentLoaderInfo.removeEventListener(Event.COMPLETE, loaded);
+				oLoaderBike.contentLoaderInfo.removeEventListener(Event.COMPLETE, loaded);
+				oLoaderWheel = oLoaderBike = null;
+				// add loaded assets to the screen
+				addChild(oWheel);
+				addChild(oBike);
+				oBike.y = 21;
+				// draw the first frame so that we don't get our assets in the wrong place on the screen
+				enterFrame(null);
+				// add listener to redraw 24 fps
+				addEventListener(Event.ENTER_FRAME, enterFrame);
+
+			}
 		}
-
+		// these constants adjust the png relative placement
+		private const centerXOffs:Number = -3;
+		private const centerYOffs:Number = 2;
+		private const bikeXOffset:Number = 14;
+		private const bikeYOffset:Number = 155;
 		private function enterFrame(event : Event) : void {
+			// the bike we just move with the mouse
 			oBike.x = mouseX;
 			oWheel.rotation = mouseX;
+			// transform center of wheel and move it at the same time
 			var oMatrix:Matrix = oWheel.transform.matrix;
 			var oRect:Rectangle = oWheel.getBounds(this);
-			oMatrix.translate((- (oRect.left + ((oRect.width+1)/2))) + mouseX, (- (oRect.top + ((oRect.height+2)/2)))+150);
+			oMatrix.translate((- (oRect.left + ((oRect.width + centerXOffs)/2))) + mouseX + bikeXOffset,
+			(- (oRect.top + ((oRect.height+centerYOffs)/2)))+bikeYOffset);
 			oWheel.transform.matrix = oMatrix;
-			//oWheel.x = mouseX;
 		}
 	}
 }


Doc comment for parse_addr_spec.

Doc comment for parse_addr_spec.

--- swfcat.as
+++ swfcat.as
@@ -174,6 +174,8 @@
             });
         }

+        /* Parse an address in the form "host:port". Returns an Object with
+           keys "host" (String) and "port" (int). Returns null on error. */
         private static function parse_addr_spec(spec:String):Object
         {
             var parts:Array;


notify ClipEventType.SEEK to Flowplayer when starting playback, this will trigger org.flowplayer.controller.PlayTimeTracker to update the playback position fix https://github.com/mangui/flashls/issues/13

--- src/org/mangui/flowplayer/HLSProvider.as
+++ src/org/mangui/flowplayer/HLSProvider.as
@@ -103,6 +103,7 @@
             // }
             if (_pauseAfterStart == false) {
                 _hls.stream.play();
+                _clip.dispatch(ClipEventType.SEEK);
             }
         };


avoid NaN tag duration

avoid NaN tag duration

--- src/org/mangui/hls/model/FragmentData.as
+++ src/org/mangui/hls/model/FragmentData.as
@@ -137,11 +137,16 @@
         }

         public function get tag_duration() : Number {
+            var duration : Number;
             if (audio_found) {
-                return audio_tag_duration;
+                duration = audio_tag_duration;
             } else {
-                return video_tag_duration;
+                duration = video_tag_duration;
             }
+            if(isNaN(duration)) {
+                duration = 0;
+            }
+            return duration;
         }

         public function get tag_pts_min() : Number {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

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

 import mx.core.mx_internal;


Transferred from the Adobe Open Source Subversion Repository

Revision: 4460
Author:   gosmith@adobe.com
Date:     2009-01-09T01:53:33.590972Z

Log Message:
-----------
Renamed UIComponentAccImpl to UIComponentAccProps because it extends AccessibilityProperties, not AccessibilityImplementation.

Added comments with the identifier for each magic role constant, so that it is easier to understand what roles our components are using.

Moved two static methods from UIComponentAccProperties to AccImpl because they make more sense there.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: None (no functional changes)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateFieldAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LinkButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateChooserAccImpl.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccImpl.as" copyfrom-rev="4437" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccProps.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl.as</path>

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

--- frameworks/projects/mx/src/mx/accessibility/LinkButtonAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/LinkButtonAccImpl.as
@@ -102,7 +102,7 @@
 	{
 		super(master);

-		role = 0x1E;
+		role = 0x1E; // ROLE_SYSTEM_LINK
 	}

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