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

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

 package mx.automation.codec
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17957
Author:   clucier@adobe.com
Date:     2010-09-30T18:19:26.473648Z

Log Message:
-----------
Moved to using a simple custom layout to manage all of the permutations if icon/label/iconPlacement in the Spark button skins. Label should not properly truncated when overflowed.

Addressed issue with ToggleButtonSkin where if toggled and disabled, the button would not appear disabled.

Added iconPlacement style to ButtonBarBase and addressed several iconField and iconFunction related bugs.

QE notes: None
Doc notes: None
Bugs: SDK-27900, SDK-27896, SDK-27902, SDK-27901, SDK-27894, SDK-27897, SDK-27899
Reviewer: Evtim (Layout logic), Darrell (ButtonBar)
Tests run: Checkin.
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/ToggleButtonSkin.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/LabelAndIconLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/SparkButtonSkin.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/LabelAndIconLayout.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/LabelAndIconLayout.as
@@ -0,0 +1,517 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 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.components.supportClasses
+{
+
+import mx.core.ILayoutElement;
+
+import spark.components.IconPlacement;
+import spark.components.supportClasses.GroupBase;
+import spark.core.IDisplayText;
+import spark.layouts.supportClasses.LayoutBase;
+import spark.layouts.supportClasses.LayoutElementHelper;
+
+/**
+ *  Helper layout to layout a label relative to a sibling element.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4.5
+ */
+public class LabelAndIconLayout extends LayoutBase
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function LabelAndIconLayout():void
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     */
+    private var labelElement:ILayoutElement;
+
+    /**
+     * @private
+     */
+    private var iconElement:ILayoutElement;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  gap
+    //----------------------------------
+
+    private var _gap:int = 6;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  The horizontal space between layout elements, in pixels.
+     *
+     *  Note that the gap is only applied between layout elements, so if there's
+     *  just one element, the gap has no effect on the layout.
+     *
+     *  @default 6
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get gap():int
+    {
+        return _gap;
+    }
+
+    /**
+     *  @private
+     */
+    public function set gap(value:int):void
+    {
+        if (_gap == value)
+            return;
+
+        _gap = value;
+        invalidateTargetSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  iconPlacement
+    //----------------------------------
+
+    private var _iconPlacement:String = IconPlacement.LEFT;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  Position of icon relative to label.
+     *
+     *  @default IconPlacement.LEFT
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get iconPlacement():String
+    {
+        return _iconPlacement;
+    }
+
+    /**
+     *  @private
+     */
+    public function set iconPlacement(value:String):void
+    {
+        if (_iconPlacement == value)
+            return;
+
+        _iconPlacement = value;
+        invalidateTargetSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  paddingLeft
+    //----------------------------------
+
+    private var _paddingLeft:Number = 0;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  Number of pixels between the container's left edge
+     *  and the left edge of the first layout element.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get paddingLeft():Number
+    {
+        return _paddingLeft;
+    }
+
+    /**
+     *  @private
+     */
+    public function set paddingLeft(value:Number):void
+    {
+        if (_paddingLeft == value)
+            return;
+
+        _paddingLeft = value;
+        invalidateTargetSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  paddingRight
+    //----------------------------------
+
+    private var _paddingRight:Number = 0;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  Number of pixels between the container's right edge
+     *  and the right edge of the last layout element.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get paddingRight():Number
+    {
+        return _paddingRight;
+    }
+
+    /**
+     *  @private
+     */
+    public function set paddingRight(value:Number):void
+    {
+        if (_paddingRight == value)
+            return;
+
+        _paddingRight = value;
+        invalidateTargetSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  paddingTop
+    //----------------------------------
+
+    private var _paddingTop:Number = 0;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  The minimum number of pixels between the container's top edge and
+     *  the top of all the container's layout elements.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get paddingTop():Number
+    {
+        return _paddingTop;
+    }
+
+    /**
+     *  @private
+     */
+    public function set paddingTop(value:Number):void
+    {
+        if (_paddingTop == value)
+            return;
+
+        _paddingTop = value;
+        invalidateTargetSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  paddingBottom
+    //----------------------------------
+
+    private var _paddingBottom:Number = 0;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  The minimum number of pixels between the container's bottom edge and
+     *  the bottom of all the container's layout elements.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get paddingBottom():Number
+    {
+        return _paddingBottom;
+    }
+
+    /**
+     *  @private
+     */
+    public function set paddingBottom(value:Number):void
+    {
+        if (_paddingBottom == value)
+            return;
+
+        _paddingBottom = value;
+        invalidateTargetSizeAndDisplayList();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  LayoutBase methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function measure():void
+    {
+        super.measure();
+
+        var layoutTarget:GroupBase = target;
+        if (!layoutTarget)
+            return;
+
+        var width:Number = _paddingLeft + _paddingRight;
+        var height:Number = _paddingTop + _paddingBottom;
+
+        var horizontal:Boolean =
+            iconPlacement == IconPlacement.LEFT ||
+            iconPlacement == IconPlacement.RIGHT;
+
+        assignLayoutElements();
+
+        var iconHeight:Number = iconElement ? iconElement.getPreferredBoundsHeight() : 0;
+        var iconWidth:Number = iconElement ? iconElement.getPreferredBoundsWidth() : 0;
+
+        var labelWidth:Number = labelElement && IDisplayText(labelElement).text ?
+            labelElement.getPreferredBoundsWidth() : 0;
+        var labelHeight:Number = labelElement && IDisplayText(labelElement).text ?
+            labelElement.getPreferredBoundsHeight() : 0;
+
+        if (horizontal)
+        {
+            width += labelWidth + iconWidth;
+            if (labelWidth && iconWidth)
+                width += _gap;
+            height += Math.max(labelHeight, iconHeight);
+        }
+        else
+        {
+            width += Math.max(labelWidth, iconWidth);
+            height += labelHeight + iconHeight;
+            if (labelHeight && iconHeight)
+                height += _gap;
+        }
+
+        layoutTarget.measuredWidth = Math.ceil(width);
+        layoutTarget.measuredHeight = Math.ceil(height);
+    }
+
+    /**
+     *  @private
+     */
+    override public function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        var layoutTarget:GroupBase = target;
+        if (!layoutTarget)
+            return;
+
+        var width:Number = _paddingLeft + _paddingRight;
+        var height:Number = _paddingTop + _paddingBottom;
+
+        var gap:Number;
+
+        var horizontal:Boolean =
+            iconPlacement == IconPlacement.LEFT ||
+            iconPlacement == IconPlacement.RIGHT;
+
+        assignLayoutElements();
+
+        var iconHeight:Number = iconElement ? iconElement.getPreferredBoundsHeight() : 0;
+        var iconWidth:Number = iconElement ? iconElement.getPreferredBoundsWidth() : 0;
+
+        var validLabel:Boolean = labelElement && IDisplayText(labelElement).text;
+
+        var labelWidth:Number = validLabel ?  labelElement.getPreferredBoundsWidth() : 0;
+        var labelHeight:Number = validLabel ? labelElement.getPreferredBoundsHeight() : 0;
+        var labelVerticalCenter:Number = validLabel ?
+            LayoutElementHelper.parseConstraintValue(labelElement.verticalCenter) : 0;
+
+        var labelX:Number = 0;
+        var labelY:Number = 0;
+        var iconX:Number = 0;
+        var iconY:Number = 0;
+
+        var viewWidth:Number = unscaledWidth - _paddingLeft - _paddingRight;
+        var viewHeight:Number = unscaledHeight - _paddingTop - _paddingBottom;
+
+        if (horizontal)
+        {
+           gap = (iconWidth && labelWidth) ? _gap : 0;
+
+           if (labelWidth > 0)
+           {
+               labelWidth = Math.max(Math.min(viewWidth - iconWidth - gap, labelWidth), 0);
+           }
+           labelHeight = Math.min(unscaledHeight, labelHeight);
+
+           labelX = ((viewWidth - labelWidth - iconWidth - gap) / 2) + paddingLeft;
+
+           if (iconPlacement == IconPlacement.LEFT)
+           {
+               labelX += iconWidth + gap;
+               iconX = labelX - (iconWidth + gap);
+           }
+           else
+           {
+               iconX = labelX + labelWidth + gap;
+           }
+
+           // Collapse padding as necessary if we're lacking the space.
+           if ((_paddingLeft + _paddingRight + iconWidth) > unscaledWidth)
+               iconX = (unscaledWidth/2 - iconWidth/2);
+
+           iconY = ((viewHeight - iconHeight)/2) + _paddingTop;
+           labelY = ((viewHeight - labelHeight)/2) +
+               _paddingTop + labelVerticalCenter;
+        }
+        else
+        {
+            gap = (iconHeight && labelHeight) ? _gap : 0;
+
+            if (labelWidth > 0)
+            {
+                labelWidth = Math.max(viewWidth, 0);
+                labelHeight = Math.min(viewHeight - iconHeight - gap, labelHeight);
+            }
+
+            labelX = _paddingLeft;
+            iconX += ((viewWidth - iconWidth) / 2) + _paddingLeft;
+
+            if (iconPlacement == IconPlacement.BOTTOM)
+            {
+                labelY += ((viewHeight - labelHeight - iconHeight - gap)/2) +
+                    labelVerticalCenter + _paddingTop;
+                iconY += labelY + labelHeight + gap;
+            }
+            else
+            {
+                iconY = ((viewHeight - labelHeight- iconHeight - gap)/2) + _paddingTop;
+                labelY += iconY + iconHeight + gap + labelVerticalCenter;
+            }
+
+            // Collapse padding as necessary if we're lacking the space.
+            if ((_paddingTop + _paddingBottom + iconHeight) > unscaledHeight)
+                iconY = (unscaledHeight/2 - iconHeight/2);
+
+        }
+
+        if (labelElement)
+        {
+            labelElement.setLayoutBoundsSize(labelWidth, labelHeight);
+            labelElement.setLayoutBoundsPosition(Math.ceil(labelX), Math.ceil(labelY));
+        }
+
+        if (iconElement)
+        {
+            iconElement.setLayoutBoundsSize(iconWidth, iconHeight);
+            iconElement.setLayoutBoundsPosition(Math.ceil(iconX), Math.ceil(iconY));
+        }
+
+        // Make sure that if the content spans partially over a pixel to the right/bottom,
+        // the content size includes the whole pixel.
+        layoutTarget.setContentSize(
+            Math.ceil(Math.max(unscaledWidth, Math.max(iconWidth, labelWidth))),
+            Math.ceil(Math.max(unscaledHeight, Math.max(iconHeight, labelHeight)))
+            );
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Convenience function for subclasses that invalidates the
+     *  target's size and displayList so that both layout's measure()
+     *  and updateDisplayList methods get called.
+     *
+     *
Typically a layout invalidates the target's size and display list so that
+     *  it gets a chance to recalculate the target's default size and also size and
+     *  position the target's elements. For example changing the gap
+     *  property on a VerticalLayout will internally call this method
+     *  to ensure that the elements are re-arranged with the new setting and the
+     *  target's default size is recomputed.

+     */
+    private function invalidateTargetSizeAndDisplayList():void
+    {
+        var g:GroupBase = target;
+        if (!g)
+            return;
+
+        g.invalidateSize();
+        g.invalidateDisplayList();
+    }
+
+    /**
+     *  @private
+     *  Determine which is our label and which is its sibling.
+     *  Technically we're expecting at most two elements here
+     *  but its not fatal if there are more, though one may obtain
+     *  unexpected results.
+     */
+    private function assignLayoutElements():void
+    {
+        for (var i:int = 0; i < target.numElements; i++)
+        {
+            var layoutElement:ILayoutElement = target.getElementAt(i);
+            if (!layoutElement || !layoutElement.includeInLayout)
+                continue;
+
+            if (layoutElement is IDisplayText)
+                labelElement = layoutElement;
+            else
+                iconElement = layoutElement;
+        }
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3430
Author:   gruehle@adobe.com
Date:     2008-09-30T23:43:13.377931Z

Log Message:
-----------
This is a collection of minor component changes, done for consistency.

* Data is always "pushed" into skin parts. We were doing this in some places like ItemsComponent.contentGroup, but not in other places. Affected components are TextInput, TextArea, NumericStepper, and Button.

* Button (and every subclass) has an optional "labelField" SkinPart. The Button "label" property is pushed into this part if it is defined.

* Added skin states to the following components:
  TrackBase (includes H/VScrollBar and H/VSlider): States "normal" and "disabled".
  Spinner (includes NumericStepper): States "normal" and "disabled".
  ContainerBase (includes ItemsComponent, Selector, and List): States "normal" and "disabled".

  The appearance of "disabled" states is controlled by the skin. The behavior of "disabled" states is still controlled by the component (ie ScrollBar disables the thumb, track and arrow when it is disabled).

* Added new ContainerBase class, which is the base class for ItemsComponent and DataComponent. The base class manages the skin states and puts up a mouse shield when disabled.

* Thumb positioning code in slider and scrollbar always rounds to the nearest pixel boundary. Sub-pixel positioning makes the thumbs look blurry.

* TextView measurement is rounded to integer values. It was commonly returning non-integer values which was causing subsequent components in relative layouts to be positioned on sub-pixel boundaries.

Bugs: SDK-16933 Make Label be an optional part of Button and related components
QE: The pixel alignment changes may result in bitmap comparison failures. The bitmaps should be regenerated with the pixel alignment. There should be no functional changes to any of the components.
Reviewer: Chet, Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/DataComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ItemsComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ContainerBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/DataComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SelectorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ComplexPanelSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/Spinner.as
+++ frameworks/projects/spark/src/spark/components/Spinner.as
@@ -27,6 +27,11 @@
  *  @eventType flash.events.Event
  */
 [Event(name="change", type="flash.events.Event")]
+
+/**
+ *  Skin states for this component.
+ */
+[SkinStates("normal", "disabled")]

 /**
  *  A Spinner is used to select a value from an
@@ -108,6 +113,7 @@
     {
         super.enabled = value;
         enableSkinParts(value);
+        invalidateSkinState();
     }

     //--------------------------------------------------------------------------
@@ -151,6 +157,14 @@
     //--------------------------------------------------------------------------

     /**
+     *  @inheritDoc
+     */
+	override protected function getUpdatedSkinState():String
+	{
+		return enabled ? "normal" : "disabled";
+	}
+
+    /**
      *  @private
      */
     override protected function partAdded(partName:String, instance:Object):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 3682
Author:   hmuller@adobe.com
Date:     2008-10-16T15:03:51.166448Z

Log Message:
-----------
FiFixed 17061, removed unnecessary override of 'set value' in FxNumericStepper

Previuosly FxSpinner::step() conflated stepSize and the
valueInterval property.  The latter forces FxRange values to be an
integer multiple of valueInterval, irrespective of the minimum.

I've changed FxSpinner::step() to leave enforcing the valueInterval
constraint to the value property.  So less the valueWrap logic, the
step method becomes:

    value += (increase) ? stepSize : -stepSize;

If the developer _also_ sets the valueInterval property, the new value
will still be forced to be a multiple.

I've also removed the unnecessary override of 'set value' in FxNumericStepper
per the changes in SVN 3597.

QE: It's possible that some spinner/slide/scrollbar tests confirmed the old behavior
Doc: No
Checkintests: Pass
Reviewer: Chet
Bugs:
    SDK-17061 - Gumbo Range does not allow an odd-only range

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxRange.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxNumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxSpinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/Spinner.as
+++ frameworks/projects/spark/src/spark/components/Spinner.as
@@ -226,8 +226,6 @@

     /**
      *  @private
-     *  Adds complex behavior to step in order to adhere to
-     *  multiples of stepSize (including maximum and minimum).
      */
     override public function step(increase:Boolean = true):void
     {
@@ -235,47 +233,9 @@
             return;

         if (increase)
-        {
-            if (value == maximum && valueWrap)
-            {
-                // Check for value wrapping
-                setValue(minimum);
-            }
-            else if (value == minimum)
-            {
-                // Edge case when going up from the minimum.
-                var steppedDown:Number = stepSize * Math.ceil(minimum / stepSize);
-                if (steppedDown == minimum)
-                    setValue(minimum + stepSize);
-                else
-                    setValue(steppedDown);
-            }
-            else
-            {
-                setValue(nearestValidValue(value + stepSize, stepSize));
-            }
-        }
+            value = (valueWrap && (value == maximum)) ? minimum : value + stepSize;
         else
-        {
-            if (value == minimum && valueWrap)
-            {
-                // Check for value wrapping
-                setValue(maximum);
-            }
-            else if (value == maximum)
-            {
-                // Edge case when coming down from the maximum
-                var steppedUp:Number = stepSize * Math.floor(maximum / stepSize);
-                if (steppedUp == maximum)
-                    setValue(maximum - stepSize);
-                else
-                    setValue(steppedUp);
-            }
-            else
-            {
-                setValue(nearestValidValue(value - stepSize, stepSize));
-            }
-        }
+            value = (valueWrap && (value == minimum)) ? maximum : value - stepSize;
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8142
Author:   srahim@adobe.com
Date:     2009-06-23T23:38:44.347619Z

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

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

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

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

--- frameworks/projects/spark/src/spark/components/VSlider.as
+++ frameworks/projects/spark/src/spark/components/VSlider.as
@@ -28,8 +28,28 @@
 [DefaultTriggerEvent("change")]

 /**
- *  The VSlider class defines a vertical slider component.
+ *  The VSlider (vertical slider) control lets users select a value
+ *  by moving a slider thumb between the end points of the slider track.
+ *  The slider track stretches from bottom to top. The current value of
+ *  the slider is determined by the relative location of the thumb between
+ *  the end points of the slider, corresponding to the slider's minimum and maximum values.
+ *
+ *
The slider can allow a continuous range of values between its minimum and maximum values,
+ *  or it can be restricted to values at concrete intervals between the minimum and maximum value.
+ *  It can use a data tip to display its current value.

  *
+ *  @mxml
+ *
+ *
The <VSlider> tag inherits all of the tag
+ *  attributes of its superclass and adds no tag attributes:

+ *

+ *  <VSlider/>
+ *

+ *
+ *  @see spark.skins.spark.VSliderSkin
+ *  @see spark.skins.spark.VSliderThumbSkin
+ *  @see spark.skins.spark.VSliderTrackSkin
+ *
  *  @includeExample examples/VSliderExample.mxml
  *
  *  @langversion 3.0


Transferred from the Adobe Open Source Subversion Repository

Revision: 20270
Author:   klin@adobe.com
Date:     2011-02-10T17:56:36.074517Z

Log Message:
-----------
Converting two FIXMEs to TODOs.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/FormLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/FormLayout.as
+++ frameworks/projects/spark/src/spark/layouts/FormLayout.as
@@ -270,7 +270,7 @@
                 fiLayout.setLayoutColumnWidths(columnMaxWidths);
             }

-            // Recalculate contentWidth
+            // Recalculate contentWidth; contentHeight already includes padding.
             var contentWidth:Number = calculateColumnWidthsSum(columnMaxWidths);
             layoutTarget.setContentSize(contentWidth + paddingLeft + paddingRight, layoutTarget.contentHeight);
         }
@@ -409,7 +409,7 @@

                 remainingWidth -= colWidth;
             }
-            // FIXME (klin): What do we do if there's remainingWidth after all this?
+            // TODO (klin): What do we do if there's remainingWidth after all this?
         }
     }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 6233
Author:   hmuller@adobe.com
Date:     2009-04-23T22:53:13.031320Z

Log Message:
-----------
First pass at TileLayout virtualization support.  This version relies exclusively on the typicalItem's dimensions.

QE Notes:
Doc Notes:
Bugs:
Reviewer: Evtim

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

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

--- frameworks/projects/spark/src/spark/layouts/TileLayout.as
+++ frameworks/projects/spark/src/spark/layouts/TileLayout.as
@@ -33,7 +33,7 @@
  *
  *  Per-element supported constraints are percentWidth, percentHeight.
  *  Element's minimum and maximum sizes will always be respected and
- *  where possible, element's size will be limited to less then or equal
+ *  where possible, an element's size will be limited to less then or equal
  *  of the cell size.
  *
  *  When not explicitly set, the columnWidth is calculated as the maximum
@@ -646,6 +646,17 @@
     private var _tileWidthCached:Number = NaN;
     private var _tileHeightCached:Number = NaN;
     private var _numElementsCached:int = -1;
+
+    /**
+     *  @private
+     *  The following variables are used by updateDisplayList() and set by
+     *  calculateDisplayParameters().   If virtualLayout=true they're based
+     *  on the current scrollRect.
+     */
+    private var visibleStartIndex:int = -1;   // dataProvider/layout element index
+    private var visibleEndIndex:int = -1;     // ...
+    private var visibleStartX:Number = 0;     // first tile/cell origin
+    private var visibleStartY:Number = 0;     // ...

     //--------------------------------------------------------------------------
     //
@@ -754,7 +765,7 @@

     /**
      *  @private
-     *  Returns true, if the dimensions (colCounr1, rowCount1) are more square than (colCount2, rowCount2).
+     *  Returns true, if the dimensions (colCount1, rowCount1) are more square than (colCount2, rowCount2).
      *  Squareness is the difference between width and height of a tile layout
      *  with the specified number of columns and rows.
      */
@@ -794,7 +805,7 @@
             else
                 _columnCount = 1;
         }
-        else if (!isNaN(height) && (orientation == "columns" || isNaN(width)))
+        else if (!isNaN(height) && (orientation == TileOrientation.COLUMNS || isNaN(width)))
         {
             if (_rowHeight + explicitVerticalGap > 0)
                 _rowCount = Math.max(1, Math.floor((height + explicitVerticalGap) / (_rowHeight + explicitVerticalGap)));
@@ -940,10 +951,56 @@

     /**
      *  @private
+     *  Update _tileWidth,Height to be the maximum of their current
+     *  value and the element's preferred bounds.
+     */
+    private function updateVirtualTileSize(elt:ILayoutElement):void
+    {
+        if (!elt || !elt.includeInLayout)
+            return;
+        var w:Number = elt.getPreferredBoundsWidth();
+        var h:Number = elt.getPreferredBoundsHeight();
+        _tileWidthCached = isNaN(_tileWidthCached) ? w : Math.max(w, _tileWidthCached);
+        _tileHeightCached = isNaN(_tileHeightCached) ? h : Math.max(h, _tileHeightCached);
+    }
+
+    /**
+     *  @private
+     */
+    private function calculateVirtualTileSize():void
+    {
+        // If both dimensions are explicitly set, we're done
+        _columnWidth = explicitColumnWidth;
+        _rowHeight = explicitRowHeight;
+        if (!isNaN(_columnWidth) && !isNaN(_rowHeight))
+        {
+            _tileWidthCached = _columnWidth;
+            _tileHeightCached = _rowHeight;
+            return;
+        }
+
+        // update _tileWidth,HeightCached based on the typicalElement
+        updateVirtualTileSize(typicalLayoutElement);
+
+        // update _tileWidth,HeightCached based on visible elements
+        if ((visibleStartIndex != -1) && (visibleEndIndex != -1))
+        {
+            for(var index:int = visibleStartIndex; index <= visibleEndIndex; index++)
+                updateVirtualTileSize(target.getVirtualElementAt(index));
+        }
+
+        if (isNaN(_columnWidth))
+            _columnWidth = _tileWidthCached;
+        if (isNaN(_rowHeight))
+            _rowHeight = _tileHeightCached;
+    }
+
+    /**
+     *  @private
      *  Calculates _columnWidth and _rowHeight from maximum of
      *  elements preferred size and any explicit overrides.
      */
-    private function calculateTileSize():void
+    private function calculateRealTileSize():void
     {
         _columnWidth = _tileWidthCached;
         _rowHeight = _tileHeightCached;
@@ -984,19 +1041,33 @@
         if (isNaN(_rowHeight))
             _rowHeight = _tileHeightCached = rowHeight;
     }
-
-    /**
-     *  @private
-     *  @return Returns the number of layout elements.
+
+    private function calculateTileSize():void
+    {
+        if (useVirtualLayout)
+            calculateVirtualTileSize();
+        else
+            calculateRealTileSize();
+    }
+
+    /**
+     *  @private
+     *  For normal layout return the number of non-null includeInLayout=true
+     *  layout elements, for virtual layout just return the number of layout
+     *  elements.
      */
     private function calculateElementCount():int
     {
         if (-1 != _numElementsCached)
             return _numElementsCached;
-
+
         var layoutTarget:GroupBase = target;
         var count:int = layoutTarget.numElements;
         _numElementsCached = count;
+
+        if (useVirtualLayout)
+            return _numElementsCached;
+
         for (var i:int = 0; i < count; i++)
         {
             var el:ILayoutElement = layoutTarget.getElementAt(i);
@@ -1006,6 +1077,63 @@

         return _numElementsCached;
     }
+
+    /**
+     *  @private
+     *  This method computes values for visibleStartX,Y, visibleStartIndex, and
+     *  visibleEndIndex based on the TileLayout geometry values, like _columnWidth
+     *  and _rowHeight, computed by calculateActualValues().
+     *
+     *  If useVirtualLayout=false, then visibleStartX,Y=0 and visibleStartIndex=0
+     *  and visibleEndIndex=layoutTarget.numElements-1.
+     *
+     *  If useVirtualLayout=true and orientation=ROWS then visibleStartIndex is the
+     *  layout element index of the item at first visible row relative to the scrollRect,
+     *  column 0.  Note that we're using column=0 instead of the first visible column
+     *  to simplify the iteration logic in updateDisplayList().  This is optimal
+     *  for the common case where the entire row is visible.   Optimally handling
+     *  the case where orientation=ROWS and each row is only partially visible is
+     *  doable but adds some complexity to the main loop.
+     *
+     *  The logic for useVirtualLayout=true and orientation=COLS is similar.
+     */
+    private function calculateDisplayParameters(unscaledWidth:int, unscaledHeight:int):void
+    {
+        updateActualValues(unscaledWidth, unscaledHeight);
+
+        var layoutTarget:GroupBase = target;
+        var eltCount:int = layoutTarget.numElements;
+        visibleStartX = 0;   // initial values for xPos,yPos in updateDisplayList
+        visibleStartY = 0;
+        visibleStartIndex = 0;
+        visibleEndIndex = eltCount - 1;
+
+        if (useVirtualLayout)
+        {
+            var hsp:Number = layoutTarget.horizontalScrollPosition;
+            var vsp:Number = layoutTarget.verticalScrollPosition;
+            var cwg:Number = _columnWidth + _horizontalGap;
+            var rwg:Number = _rowHeight + _verticalGap;
+
+            var visibleCol0:int = Math.floor(hsp / cwg);
+            var visibleRow0:int = Math.floor(vsp / rwg);
+            var visibleCol1:int = Math.min(_columnCount - 1, Math.floor((hsp + unscaledWidth) / cwg));
+            var visibleRow1:int = Math.min(_rowCount - 1, Math.floor((vsp + unscaledHeight) / rwg));
+
+            if (orientation == TileOrientation.ROWS)
+            {
+                visibleStartIndex = (visibleRow0 * _columnCount);
+                visibleEndIndex = Math.min(eltCount - 1, (visibleRow1 * _columnCount) + visibleCol1);
+                visibleStartY = visibleRow0 * rwg;
+            }
+            else
+            {
+                visibleStartIndex = (visibleCol0 * _rowCount);
+                visibleEndIndex = Math.min(eltCount - 1, (visibleCol1 * _rowCount) + visibleRow1);
+                visibleStartX = visibleCol0 * cwg;
+            }
+        }
+    }

     /**
      *  Sets the size and the position of the specified layout element and cell bounds.
@@ -1127,6 +1255,22 @@
     /**
      *  @private
      */
+    override protected function scrollPositionChanged():void
+    {
+        super.scrollPositionChanged();
+
+        var layoutTarget:GroupBase = target;
+        if (!layoutTarget)
+            return;
+
+        if (useVirtualLayout)
+            layoutTarget.invalidateDisplayList();
+    }
+
+
+    /**
+     *  @private
+     */
     override public function measure():void
     {
         var layoutTarget:GroupBase = target;
@@ -1156,22 +1300,23 @@
         if (!layoutTarget)
             return;

-        updateActualValues(unscaledWidth, unscaledHeight);
-
-        var xPos:Number = 0;
-        var yPos:Number = 0;
+        calculateDisplayParameters(unscaledWidth, unscaledHeight);
+
+        // Upper right hand corner of first (visibleStartIndex) tile/cell
+        var xPos:Number = visibleStartX;  // 0 if useVirtualLayout=false
+        var yPos:Number = visibleStartY;  // ...
+
+        // Use MajorDelta when moving along the major axis
+        var xMajorDelta:Number;
+        var yMajorDelta:Number;
+
+        // Use MinorDelta when moving along the minor axis
+        var xMinorDelta:Number;
+        var yMinorDelta:Number;

         // Use counter and counterLimit to track when to move along the minor axis
         var counter:int = 0;
         var counterLimit:int;
-
-        // Use MajorDelta when moving along the major axis
-        var xMajorDelta:Number;
-        var yMajorDelta:Number;
-
-        // Use MinorDelta when moving along the minor axis
-        var xMinorDelta:Number;
-        var yMinorDelta:Number;

         // Setup counterLimit and deltas based on orientation
         if (orientation == TileOrientation.ROWS)
@@ -1191,10 +1336,9 @@
             yMinorDelta = 0;
         }

-        var count:int = layoutTarget.numElements;
-        for (var i:int = 0; i < count; i++)
-        {
-            var el:ILayoutElement = layoutTarget.getElementAt(i);
+        for(var index:int = visibleStartIndex; index <= visibleEndIndex; index++)
+        {
+            var el:ILayoutElement = layoutTarget.getVirtualElementAt(index);
             if (!el || !el.includeInLayout)
                 continue;

@@ -1232,8 +1376,13 @@
                                     Math.round(_rowCount * (_rowHeight + _verticalGap) - _verticalGap));

         // Reset the cache
-        _tileWidthCached = _tileHeightCached = NaN;
+        if (!useVirtualLayout)
+            _tileWidthCached = _tileHeightCached = NaN;
         _numElementsCached = -1;
+
+        // No getVirtualElementAt() during measure, see calculateVirtualTileSize()
+        if (useVirtualLayout)
+            visibleStartIndex = visibleEndIndex = -1;

         // If actual values have chnaged, notify listeners
         dispatchEventsForActualValueChanges();


Filter records by selected root entity in records list

--- collect-client/src/main/flex/org/openforis/collect/presenter/ListPresenter.as
+++ collect-client/src/main/flex/org/openforis/collect/presenter/ListPresenter.as
@@ -489,6 +489,7 @@
 			var filter:RecordFilterProxy = (! filterEnabled || currentFilter == null) ? new RecordFilterProxy(): ObjectUtil.clone(currentFilter) as RecordFilterProxy;
 			filter.offset = offset;
 			filter.maxNumberOfRecords = recordsPerPage;
+			filter.rootEntityId = Application.activeRootEntity == null ? NaN : Application.activeRootEntity.id;
 			_dataClient.loadRecordSummaries(responder, filter, currentSortFields);
 		}


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

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

 package mx.charts
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8618
Author:   mhorn@adobe.com
Date:     2009-07-16T14:35:58.279240Z

Log Message:
-----------
asdoc bug fixes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/netmon/NetworkMonitor.as</path>

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

--- frameworks/projects/rpc/src/mx/netmon/NetworkMonitor.as
+++ frameworks/projects/rpc/src/mx/netmon/NetworkMonitor.as
@@ -120,17 +120,18 @@

     /**
      *  Adjust the URLRequest so that it goes through the monitor.
-     *  The URLRequest sent to the monitor will have two headers:
-     *  actualHostPort -- the real host:port for the url
-     *  correlationID  -- the correlationID for the request in case it's from
-     *                    messaging (Image/Loader requests need to create
-     *                    their  own correlationIDs)
+     *  The URLRequest sent to the monitor will have two headers:
+     *

+     *
actualHostPort: The real host:port for the URL.

+     *
correlationID: The correlationID for the request in case it's from
+     *                    messaging (Image/Loader requests need to create their  own correlationIDs)

+     *

      *
      *  @param urlRequest The URLRequest to adjust.
      *  (Relative URLs are supported.)
      *
-     *  @param rootURL Used to compute an absolute URL from the relative
-     *  if necessary, pass the SWFs URL.
+     *  @param rootURL Computes an absolute URL from the relative URL.
+     *  If necessary, pass the SWF file's URL as this value.
      *
      *  @param correlationID The correlationID that may be used
      *  for associated events.
@@ -150,8 +151,7 @@

     /**
      *  Tell the monitor that an event occurred.
-     *  This may be used by the Loader to monitor Security and IOErrors
-     *  (not that Security will ever be thrown).
+     *  This may be used by the Loader to monitor security and IO errors.
      *  It should not be used for the Loader's complete event.
      *
      *  @param event The event that is about to occur (or occurred).


Transferred from the Adobe Open Source Subversion Repository

Revision: 6594
Author:   clucier@adobe.com
Date:     2009-05-04T19:43:39.756168Z

Log Message:
-----------
Incorporating some review feedback related to mouseOpaque changes.  Adding flavors of addEventListener and removeEventListener for automation.

Reviewer: Ryan
QE Notes: None
Bugs: None

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -704,7 +704,34 @@
                 invalidateDisplayList();
         }
     }
-
+
+    /**
+     *  @private
+     *  Automation requires a version of addEventListener that does not
+     *  affect behavior of the underlying component.
+     */
+    mx_internal function $addEventListener(
+                            type:String, listener:Function,
+                            useCapture:Boolean = false,
+                            priority:int = 0,
+                            useWeakReference:Boolean = false):void
+    {
+        super.addEventListener(type, listener, useCapture,
+                               priority, useWeakReference);
+    }
+
+    /**
+     *  @private
+     *  Automation requires a version of removeEventListener that does not
+     *  affect behavior of the underlying component.
+     */
+    mx_internal function $removeEventListener(
+                              type:String, listener:Function,
+                              useCapture:Boolean = false):void
+    {
+        super.removeEventListener(type, listener, useCapture);
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Overridden methods: UIComponent


Transferred from the Adobe Open Source Subversion Repository

Revision: 14197
Author:   hmuller@adobe.com
Date:     2010-02-16T21:52:40.988951Z

Log Message:
-----------
Merge 4.x revision 14151 to trunk.   Second try.

Revised mirroring support for popups in DropDownList and ComboBox.

UIComponent/invalidateLayoutDirection() now assumes that a component without an IVisualElement parent inherits a LTR coordinate system.

PopUpAnchor uses MatrixUtil.getConcatenatedMatrix() - which concatenates UIComponent layoutMatrix - for layout computations and MatrixUtil.getConcatenatedComputedMatrix() to find the stage coordinates of a popup's origin.

Sync'd MX ListBase/validateDisplayList(), which is a copy of UIComponent/validateDisplayList() with validateMatrix() changes made
in the UIComponent version.

QE notes: Full Mustella run was OK (thanks Joan!)
Doc notes:
Bugs:
Reviewer: Jason
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="dir" action="M">/flex/sdk/trunk/frameworks</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ComboBox.as
+++ frameworks/projects/mx/src/mx/controls/ComboBox.as
@@ -53,6 +53,7 @@
 import mx.managers.ISystemManager;
 import mx.managers.PopUpManager;
 import mx.styles.CSSStyleDeclaration;
+import mx.utils.MatrixUtil;

 use namespace mx_internal;

@@ -1727,10 +1728,11 @@
             systemManager.addEventListener(Event.RESIZE, stage_resizeHandler, false, 0, true);
         }

-        var m:Matrix = transform.concatenatedMatrix;
+
+        var m:Matrix = MatrixUtil.getConcatenatedMatrix(this);
         _dropdown.scaleX = m.a; //scale x
         _dropdown.scaleY = m.d; //scale y
-
+
         return _dropdown;
     }

@@ -1796,6 +1798,12 @@
             }

             point = _dropdown.parent.globalToLocal(point);
+
+            // If the combobox's layout is mirrored then the the dropdown's
+            // will be too.  That also means that (stage coordinate) point.x is
+            // currently the right edge of the dropdown.  Fix that:
+            if (layoutDirection == "rtl")
+                point.x -= _dropdown.width;

             var sel:int = _dropdown.selectedIndex;
             if (sel == -1)


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

--- frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.as
+++ frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.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.skins.halo
 {


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

--- frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.as
+++ frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.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: 18543
Author:   rfrishbe@adobe.com
Date:     2010-11-11T21:39:53.401769Z

Log Message:
-----------
Making some PARB changes around down state support and InteractionStateDetector.  ItemRendererInteractionStateDetector has been renamed to InteractionStateDetector.  down state is now applicable in mouse interactionMode.  downColor defaults to undefined, and is only set in the mobiletheme--this way it won't break the mouse interaction case.

Fixing up ItemRenderer transitions.  Added a new method, invalidateRendererState().  We now don't transition immediately to the state when the selected, hovered, etc.. properties get set, but we wait until validation.

QE notes:
Doc notes:
Bugs: SDK-28482
Reviewer: Eric Day, Glenn
Tests run: checkintests, mustella DataGroup, List, ListDND
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ItemRendererInteractionStateDetector.as" copyfrom-rev="18476" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/InteractionStateDetector.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ItemRendererInteractionStateDetector.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/InteractionState.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/defaults.css</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
@@ -70,8 +70,8 @@
         // Initially state is dirty
         rendererStateIsDirty = true;

-        itemRendererInteractionStateDetector = new ItemRendererInteractionStateDetector(this);
-        itemRendererInteractionStateDetector.addEventListener(Event.CHANGE, itemRendererInteractionStateDetector_changeHandler);
+        interactionStateDetector = new InteractionStateDetector(this);
+        interactionStateDetector.addEventListener(Event.CHANGE, interactionStateDetector_changeHandler);
     }

     //--------------------------------------------------------------------------
@@ -84,13 +84,22 @@
      *  @private
      *  Helper class to help determine when we are in the hovered or down states
      */
-    private var itemRendererInteractionStateDetector:ItemRendererInteractionStateDetector;
+    private var interactionStateDetector:InteractionStateDetector;

     /**
      *  @private
      *  Whether the renderer's state is invalid or not.
      */
     private var rendererStateIsDirty:Boolean = false;
+
+    /**
+     *  @private
+     *  A flag associated with rendererStateIsDirty, determining if
+     *  this renderer should play any associated transitions
+     *  in the next validation pass.  This is different from the mx_internal
+     *  playTransitions flag, which is set externally by List and DataGroup.
+     */
+    private var playTransitionsOnNextRendererState:Boolean = false;

     /**
      *  @private
@@ -167,9 +176,6 @@

     /**
      *  Set to true when the user is pressing down on an item renderer.
-     *
-     *
This property is only applicable when interactionMode
-     *  is set to "touch".

      *
      *  @default false
      */
@@ -186,7 +192,7 @@
         if (value != _down)
         {
             _down = value;
-            setCurrentState(getCurrentRendererState(), playTransitions);
+            invalidateRendererState();
             if (autoDrawBackground)
             {
                 redrawRequested = true;
@@ -205,10 +211,7 @@
     private var _hovered:Boolean = false;

     /**
-     *  Set to true when the mouse is hovered over the item renderer.
-     *
-     *
This property is only applicable when interactionMode
-     *  is set to "mouse".

+     *  Set to true when the user is hovered over the item renderer.
      *
      *  @default false
      */
@@ -225,7 +228,7 @@
         if (value != _hovered)
         {
             _hovered = value;
-            setCurrentState(getCurrentRendererState(), playTransitions);
+            invalidateRendererState();
             if (autoDrawBackground)
             {
                 redrawRequested = true;
@@ -321,7 +324,7 @@
             return;

         _showsCaret = value;
-        setCurrentState(getCurrentRendererState(), playTransitions);
+        invalidateRendererState();
         if (autoDrawBackground)
         {
             redrawRequested = true;
@@ -356,7 +359,7 @@
         if (value != _selected)
         {
             _selected = value;
-            setCurrentState(getCurrentRendererState(), playTransitions);
+            invalidateRendererState();
             if (autoDrawBackground)
             {
                 redrawRequested = true;
@@ -391,7 +394,7 @@
         if (value != _dragging)
         {
             _dragging = value;
-            setCurrentState(getCurrentRendererState(), playTransitions);
+            invalidateRendererState();
         }
     }

@@ -468,9 +471,9 @@
     /**
      *  Returns the name of the state to be applied to the renderer. For example, a
      *  very basic List item renderer would return the String "normal", "hovered",
-     *  or "selected" to specify the renderer's state if in mouse interactionMode.
-     *  If in touch interactionMode, the basic set of states are: "normal",
-     *  "down", "selected", and "downAndSelected".
+     *  or "selected" to specify the renderer's state.
+     *  If dealing with touch interactions (or mouse interactions where selection
+     *  is ignored), "down" and "downAndSelected" are also important states.
      *
      *
A subclass of ItemRenderer must override this method to return a value
      *  if the behavior desired differs from the default behavior.

@@ -481,13 +484,13 @@
      *
The full set of states supported (in order of precedence) are:
      *

      *
dragging

-     *
downAndSelected (only applicable in touch interactionMode)

+     *
downAndSelected

      *
selectedAndShowsCaret

-     *
hoveredAndShowsCaret (only applicable in mouse interactionMode)

+     *
hoveredAndShowsCaret

      *
normalAndShowsCaret

-     *
down (only applicable in touch interactionMode)

+     *
down

      *
selected

-     *
hovered (only applicable in mouse interactionMode)

+     *
hovered

      *
normal

      *

      *

@@ -537,6 +540,26 @@
         return null;
     }

+    /**
+     *  Marks the renderer's state as invalid so that the new state is set
+     *  during a later screen update.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function invalidateRendererState():void
+    {
+        playTransitionsOnNextRendererState = (playTransitionsOnNextRendererState || playTransitions);
+
+        if (rendererStateIsDirty)
+            return; // State is already invalidated
+
+        rendererStateIsDirty = true;
+        invalidateProperties();
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Overridden Methods
@@ -548,13 +571,17 @@
      */
     override protected function commitProperties():void
     {
+        // need to run this code before calling super.commitProperites
+        // because the super.commitProperties can handle state change on
+        // rare occassion (during initialization)
+        if (rendererStateIsDirty)
+        {
+            setCurrentState(getCurrentRendererState(), playTransitionsOnNextRendererState);
+            playTransitionsOnNextRendererState = false;
+            rendererStateIsDirty = false;
+        }
+
         super.commitProperties();
-
-        if (rendererStateIsDirty)
-        {
-            setCurrentState(getCurrentRendererState(), playTransitions);
-            rendererStateIsDirty = false;
-        }
     }

     /**
@@ -602,9 +629,10 @@

         var backgroundColor:uint;
         var drawBackground:Boolean = true;
-
-        if (down)
-            backgroundColor = getStyle("downColor");
+        var downColor:* = getStyle("downColor");
+
+        if (down && downColor !== undefined)
+            backgroundColor = downColor;
         else if (selected)
             backgroundColor = getStyle("selectionColor");
         else if (hovered)
@@ -653,10 +681,10 @@
     /**
      *  @private
      */
-    private function itemRendererInteractionStateDetector_changeHandler(event:Event):void
-    {
-        hovered = itemRendererInteractionStateDetector.hovered;
-        down = itemRendererInteractionStateDetector.down;
+    private function interactionStateDetector_changeHandler(event:Event):void
+    {
+        down = (interactionStateDetector.state == InteractionState.DOWN);
+        hovered = (interactionStateDetector.state == InteractionState.OVER);
     }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4111
Author:   chaase@adobe.com
Date:     2008-11-14T16:39:46.711628Z

Log Message:
-----------
Makes auto-reversal of transitions work more completely and correctly, fixing some API issues and other related animation/effect issues along the way. Seeking behavior in effects is improved (although still far from perfect, especially for non-playing effects), and dynamic behavior of effects (picking up values dynamically from the environment) is improved.

QE Notes: better seek() behavior, can just call it on non-playing effects and it will automatically play/pause the effect if necessary
Doc Notes: None
Bugs: sdk-17294, sdk-16595, sdk-18104, sdk-18105, sdk-18106, sdk-18107
Reviewer: Jason
tests: checkintests, Mustella: tests/Effects, tests/gumbo/effects tests/ListDataEffects

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/Transition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EffectEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxMoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Parallel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Sequence.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/AddAction.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
@@ -19,6 +19,7 @@
 import mx.components.Group;
 import mx.components.baseClasses.GroupBase;
 import mx.core.UIComponent;
+import mx.core.mx_internal;
 import mx.effects.Animation;
 import mx.effects.EffectInstance;
 import mx.effects.EffectManager;
@@ -32,6 +33,8 @@
 import mx.styles.IStyleClient;
 import mx.core.IVisualElementContainer;

+use namespace mx_internal;
+
 /**
  * The FxAnimateInstance class implements the instance class for the
  * FxAnimate effect. Flex creates an instance of this class when
@@ -152,6 +155,23 @@
         return _repeatBehavior;
     }

+    //----------------------------------
+    //  playReversed
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override mx_internal function set playReversed(value:Boolean):void
+    {
+        super.playReversed = value;
+
+        if (animation)
+            animation.reverse();
+
+        reverseAnimation = value;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Overridden methods
@@ -263,7 +283,7 @@
     // Methods
     //
     //--------------------------------------------------------------------------
-
+
     /**
      *  @copy mx.effects.IEffectInstance#startEffect()
      */
@@ -277,7 +297,7 @@
         {
             UIComponent(target).effectStarted(this);
         }
-
+
         if (autoRemoveTarget)
             addDisappearingTarget();

@@ -318,8 +338,8 @@
             var holder:PropertyValuesHolder = PropertyValuesHolder(propertyValuesList[i]);
             var property:String = holder.property;
             var propValues:Array = holder.values;
-            var fromValue:Object;
-            var toValue:Object;
+            var fromValue:Object = null;
+            var toValue:Object = null;

             if (!property || (property == ""))
                 throw new Error("Illegal property value: " + property);
@@ -330,14 +350,11 @@
             if (!isNaN(propValues[0]))
                 fromValue = propValues[0];
             if (!isNaN(propValues[1]))
-            {
                 toValue = propValues[1];
-            }
-            else
-            {
-                if (propertyChanges &&
-                    propertyChanges.end[property] !== undefined)
-                    toValue = propertyChanges.end[property];
+            else if (propertyChanges &&
+                propertyChanges.end[property] !== undefined)
+            {
+                toValue = propertyChanges.end[property];
             }
             if (propertyValuesList.length > 1)
             {
@@ -377,7 +394,7 @@
         animation.repeatBehavior = repeatBehavior;
         animation.easer = easer;
         animation.startDelay = startDelay;
-
+
         animation.play();

         // TODO (chaase): there may be a better way to organize the


tremor: send entry description to tremor. code cleanup

--- plugins/tremorPlugin/src/com/kaltura/kdpfl/plugin/component/TremorMediator.as
+++ plugins/tremorPlugin/src/com/kaltura/kdpfl/plugin/component/TremorMediator.as
@@ -12,9 +12,9 @@
 	import com.tremormedia.acudeo.events.ControlsEvent;
 	import com.tremormedia.acudeo.page.Page;
 	import com.tremormedia.acudeo.player.Player;
-
+
 	import fl.core.UIComponent;
-
+
 	import flash.display.DisplayObject;
 	import flash.display.Loader;
 	import flash.display.MovieClip;
@@ -25,9 +25,8 @@
 	import flash.geom.Rectangle;
 	import flash.net.URLRequest;
 	import flash.net.navigateToURL;
-
+
 	import org.puremvc.as3.interfaces.INotification;
-	import org.puremvc.as3.interfaces.IProxy;

 		public class TremorMediator extends SequenceMultiMediator {
 		public static const NAME:String = "TremorMediator";
@@ -103,6 +102,10 @@
 		 * url of current media entry
 		 */
 		private var _entryUrl:String = "";
+		/**
+		 * description of current media entry
+		 */
+		private var _entryDesc:String = "";

 		/**
 		 * current player volium
@@ -156,6 +159,9 @@
 		 * The creationDate of this entry
 		 */
 		public var creationDate:Number = 0;
+
+		private var _mediaProxy:MediaProxy;
+		private var _sequenceProxy:SequenceProxy;
 		/**
 		 * Constructor.
 		 * @param viewComponent
@@ -305,8 +311,7 @@
 		private function onAdsError(evt:Event=null):void {
 			bypassAds = true;
 			enableControls();
-			var sp:SequenceProxy = facade.retrieveProxy(SequenceProxy.NAME) as SequenceProxy;
-			if(sp.vo.isInSequence)
+			if(_sequenceProxy.vo.isInSequence)
 			{
 				sendNotification(NotificationType.SEQUENCE_ITEM_PLAY_END);
 				trace("AdManager onAdsError0 Releasing sequence");
@@ -420,27 +425,15 @@
 			var destinationDate:Date = new Date();
 			destinationDate.setDate(destinationDate.getDate() - maxAgeForAds);

-
-
 			//calculate all 3 dates:
 			var nd:Date = new Date ();
 			nd.setTime(creationDate*1000);

-
-
-
-
-
-
-
-
-
 			if( int(destinationDate.time/1000) <= creationDate  || maxAgeForAds==0)
 			{
-				var sequenceManager:IProxy = facade.retrieveProxy("sequenceProxy");
-				if (sequenceManager["sequenceContext"] == SequenceContextType.PRE) {
+				if (_sequenceProxy.sequenceContext == SequenceContextType.PRE) {
 					sendNotification(preSequenceNotificationStartName);
-				} else if (sequenceManager["sequenceContext"] == SequenceContextType.POST) {
+				} else if (_sequenceProxy.sequenceContext == SequenceContextType.POST) {
 					sendNotification(postSequenceNotificationStartName);
 				}
 			}
@@ -456,6 +449,8 @@
 		 * know that all config values are present
 		 */
 		override public function onRegister():void {
+			_mediaProxy = facade.retrieveProxy(MediaProxy.NAME) as MediaProxy;
+			_sequenceProxy = facade.retrieveProxy(SequenceProxy.NAME) as SequenceProxy;
 		}

@@ -473,15 +468,11 @@

 		override public function handleNotification(note:INotification):void {
-			var kc:Object = facade.retrieveProxy("servicesProxy")["kalturaClient"];
-			var config:Object = facade.retrieveProxy("configProxy");
-			var media:Object = facade.retrieveProxy("mediaProxy");
-			var sequenceProxy:Object = facade.retrieveProxy("sequenceProxy");
 			var data:Object = note.getBody();
 			switch (note.getName()) {
 				case NotificationType.PLAYER_UPDATE_PLAYHEAD:
-					if (media["vo"]["entry"]["duration"] && !sequenceProxy["vo"]["isInSequence"]) {
-						setPlayhead(data as Number, media["vo"]["entry"]["duration"]);
+					if (_mediaProxy.vo.entry.duration && !_sequenceProxy.vo.isInSequence) {
+						setPlayhead(data as Number, _mediaProxy.vo.entry.duration);
 					}
 					break;
 				case NotificationType.VOLUME_CHANGED:
@@ -494,7 +485,7 @@
 						onAdsError();
 						break;
 					}
-					var newEntryId:String = (facade.retrieveProxy(MediaProxy.NAME) as MediaProxy).vo.entry.id;
+					var newEntryId:String = _mediaProxy.vo.entry.id;
 					preAds(newEntryId);
 					break;

@@ -514,7 +505,7 @@
 					}
 					break;
 				case NotificationType.MEDIA_READY:
-					var entry:Object = ((facade.retrieveProxy(MediaProxy.NAME) as MediaProxy).vo.entry);
+					var entry:Object = (_mediaProxy.vo.entry);
 					creationDate = entry["createdAt"];

 					var today:Date = new Date();
@@ -548,21 +539,23 @@
 			_entryTitle = null;
 			_entryId = null;
 			_entryUrl = null;
+			_entryDesc = null;
 		}

 		private function retrieveMediaData():void {
-			var mp:Object = facade.retrieveProxy("mediaProxy");
-			_entryTitle = mp.vo.entry.name;
-			_entryId = mp.vo.entry.id;
-			_entryUrl = mp.vo.entry["dataUrl"];
+			_entryTitle = _mediaProxy.vo.entry.name;
+			_entryId = _mediaProxy.vo.entry.id;
+			_entryUrl = _mediaProxy.vo.entry["dataUrl"];
+			_entryDesc = _mediaProxy.vo.entry.description;
 			var content:Content = new Content();
 			dispatcher.dispatchEvent(new Event(FETCH_PARAMS));
 			if(params)
 				content.adParams = params;
 			content.id = _entryId;
 			content.url = _entryUrl;
-			content.title = _entryTitle
+			content.title = _entryTitle;
+			content.description = _entryDesc;
 			_adManager.setContent(content);
 		}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

SDK-30990 - SpinnerList does not respect text color

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

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

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/YearProvider.as
+++ frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/YearProvider.as
@@ -40,7 +40,7 @@
      *  @productversion Flex 4.5.2
      */
     public function YearProvider(locale:String, start:int = 1601, end:int = 9999,
-                                 today:Date = null, todayAccentColor:uint = 0)
+                                 today:Date = null)
     {
         super();

@@ -55,7 +55,6 @@
         formatter.dateTimePattern = formatter.getYearPattern();

         todayDate = today;
-        accentColor = todayAccentColor;
     }

     //----------------------------------------------------------------------------------------------
@@ -71,9 +70,6 @@
     private var endYear:int;

     private var todayDate:Date;
-
-    // color to apply as accent color for dates that match today's date
-    private var accentColor:uint;

     // formatter to use in localizing the date labels
     private var formatter:DateTimeFormatterEx;
@@ -120,7 +116,7 @@
         if (todayDate)
         {
             if (year == todayDate.fullYear)
-                item["accentColor"] = accentColor;
+                item["_emphasized_"] = true;
         }

         return item;


housekeeping

housekeeping

git-svn-id: f772d44cbf86d9968f12179c1556189f5afcea6e@657 e0ac87d7-b42b-0410-9034-8248a05cb448

--- braineditor/Core_A.as
+++ braineditor/Core_A.as
@@ -21,16 +21,7 @@
         brain = new Brain();
         modetogglebutton=new ModeToggleButton(mc,new Point(0,40), new Point(100,70),"DRAWMODE");
         makelobebutton=new MakeLobeButton(mc,new Point(0,80), new Point(100,110),modetogglebutton);
-        var keyListener = {};
-        keyListener.onKeyDown = function()
-        {
-            var k = Key.getCode();
-            if(k == Key.DELETEKEY){
-                Brain.makenewlobe();
-            }
-        };

-    Key.addListener( keyListener );
     }

     // entry point==============================================================


Another simplification

Another simplification

--- src/org/jivesoftware/xiff/data/im/RosterItemVO.as
+++ src/org/jivesoftware/xiff/data/im/RosterItemVO.as
@@ -42,13 +42,7 @@
 		}

 		public function containsGroup(group:String):Boolean {
-			for(var i:int = 0; i<_groups.length; i++){
-				if(group == _groups[i]){
-					return true;
-				}
-			}
-
-			return false;
+			return groups.indexOf(group) >= 0;
 		}

 		public function isPending():Boolean {


Might as well use a different signifier in case people do want to use
negative indices.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4846 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/util/StreamableArrayList.as
+++ src/as/com/threerings/util/StreamableArrayList.as
@@ -33,9 +33,9 @@
         _array = (values == null) ? new Array() : values;
     }

-    public function add (item :Object, index :int = -1) :Boolean
+    public function add (item :Object, index :int = int.MAX_VALUE) :Boolean
     {
-        _array.splice((index == -1) ? _array.length : index, 0, item);
+        _array.splice(Math.min(_array.length, index), 0, item);
         return true;
     }

@@ -44,12 +44,12 @@
      *
      * @param otherList may be another StreamableArrayList or an Array
      */
-    public function addAll (otherList :*, index :int = -1) :Boolean
+    public function addAll (otherList :*, index :int = int.MAX_VALUE) :Boolean
     {
         var other :Array = getArray(otherList);

         // splice the array in at the index
-        _array.splice((index == -1) ? _array.length : index, 0, other);
+        _array.splice(Math.min(_array.length, index), 0, other);
         return (other.length > 0);
     }


Recompile for default OVVBeacon location

--- tests/test_ad/src/net/iab/vpaid/core/AdData.as
+++ tests/test_ad/src/net/iab/vpaid/core/AdData.as
@@ -22,7 +22,8 @@
 			var url:String = escape("http://services.mediamind.com/instream/IAB/videos/ad-video-canal.mp4");
 			_params.advideo = unescape(url);
 			_params.skipOffset = 5;
-			_params.ovvBeaconURL = "http://localhost/iab/OVVBeacon.swf";
+			//_params.ovvBeaconURL = "http://localhost/iab/OVVBeacon.swf";
+			_params.ovvBeaconURL = "/ad/OVVBeacon.swf";
 			this.params = params;
 		}


add a new HLSSettings to level switch down automatically in case of level IO error

if level loading fails, and if in auto mode, and we are not on lowest level, don't report Level loading error straight-away, try to switch down first

--- src/com/pivotshare/hls/loader/FragmentLoader.as
+++ src/com/pivotshare/hls/loader/FragmentLoader.as
@@ -194,6 +194,7 @@
             _streamBuffer = streamBuffer;
             _hls.addEventListener(HLSEvent.MANIFEST_LOADED, _manifestLoadedHandler);
             _hls.addEventListener(HLSEvent.LEVEL_LOADED, _levelLoadedHandler);
+            _hls.addEventListener(HLSEvent.LEVEL_LOADING_ABORTED, _levelLoadingAbortedHandler);
             _timer = new Timer(20, 0);
             _timer.addEventListener(TimerEvent.TIMER, _checkLoading);
             _loadingState = LOADING_STOPPED;
@@ -214,6 +215,7 @@
             stop();
             _hls.removeEventListener(HLSEvent.MANIFEST_LOADED, _manifestLoadedHandler);
             _hls.removeEventListener(HLSEvent.LEVEL_LOADED, _levelLoadedHandler);
+            _hls.removeEventListener(HLSEvent.LEVEL_LOADING_ABORTED, _levelLoadingAbortedHandler);
             _loadingState = LOADING_STOPPED;
             _keyLoader = new KeyLoader();
         }
@@ -319,6 +321,17 @@
                 _loadingState = LOADING_IDLE;
             }
             // speed up loading of new fragment
+            _timer.start();
+        };
+
+        /** Store the manifest data. **/
+        private function _levelLoadingAbortedHandler(event : HLSEvent) : void {
+            _levelNext = event.level-1;
+            CONFIG::LOGGING {
+                Log.warn("FragmentLoader:_levelLoadingAbortedHandler:switch down to:" + _levelNext);
+            }
+            _loadingState = LOADING_IDLE;
+            // speed up loading of new playlist/fragment
             _timer.start();
         };


Removed an error-causing semicolon in ListCLICommandsCommand.

--- src/engine/tetragon/command/cli/ListCLICommandsCommand.as
+++ src/engine/tetragon/command/cli/ListCLICommandsCommand.as
@@ -112,7 +112,7 @@
 				+ " filtered to a specific command group by using the command category's name as an argument:\n\n"
 				+ "\t\tall:      List all commands (default).\n"
 				+ "\t\tcli:      Only list commands that are part of the CLI category.\n"
-				+ "\t\tecs:      Only list commands that are part of the 'entity component system' category.\n\n";
+				+ "\t\tecs:      Only list commands that are part of the 'entity component system' category.\n\n"
 				+ "\t\tenv:      Only list commands that are part of the env category.\n"
 				+ "\t\tfile:     Only list commands that are part of the file category.\n\n";
 		}


Remove giant obnoxious game-blocking chat display.

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

--- src/as/com/threerings/ezgame/client/EZGamePanel.as
+++ src/as/com/threerings/ezgame/client/EZGamePanel.as
@@ -44,7 +44,7 @@
         _gameView = new MediaContainer(cfg.configData); // TODO
         addChild(_gameView);

-        addChild(new ChatDisplayBox(ctx));
+        //addChild(new ChatDisplayBox(ctx));
     }

     // from PlaceView


Fix bug in getting colorizations by name.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@967 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/media/image/ClassRecord.as
+++ src/as/com/threerings/media/image/ClassRecord.as
@@ -83,7 +83,7 @@
         }

         // Look for name matches among all colors
-        for each (var color :ColorRecord in colors) {
+        for each (var color :ColorRecord in colors.values()) {
                 if (StringUtil.compareIgnoreCase(color.name, name) == 0) {
                 return color.colorId;
             }


Changes in transform2()

Changes in transform2()

I found matrixes with scale are working different in JS and Flash.
For example:
target.beginBitmapFill(bmd, new Matrix(2,0,0,2,-rect.x,-rect.y), true, true);
inflates textures in Flash and deflates for JS.

New revision works same way for scale in Flash and JS (rotation components not tested).

--- src/flash/__native/GLCanvasRenderingContext2D.as
+++ src/flash/__native/GLCanvasRenderingContext2D.as
@@ -609,12 +609,12 @@
 			return null;
 		}*/
 		public function transform2 (m:Matrix) : Object {
-			var result_a:Number = matr.a * m.a;
+			var result_a:Number = matr.a / m.a;
 			var result_b:Number = 0.0;
 			var result_c:Number = 0.0;
-			var result_d:Number = matr.d * m.d;
-			var result_tx:Number = matr.tx * m.a + m.tx;
-			var result_ty:Number = matr.ty * m.d + m.ty;
+			var result_d:Number = matr.d / m.d;
+			var result_tx:Number = matr.tx / m.a + m.tx / m.a;
+			var result_ty:Number = matr.ty / m.d + m.ty / m.d;
 			if (matr.b != 0.0 || matr.c != 0.0 || m.b != 0.0 || m.c != 0.0)
 			{
 				result_a = result_a + matr.b * m.c;
@@ -662,4 +662,4 @@
 			return r;
 		}
 	}
-}+}