Transferred from the Adobe Open Source Subversion Repository

Revision: 21787
Author:   betravis@adobe.com
Date:     2011-08-02T23:46:01.859648Z

Log Message:
-----------
Update to ToggleSwitchSkin labels. CSS selectors #selectedLabelDisplay, #unselectedLabelDisplay now work and should support the color, textShadowColor, and textShadowAlpha styles, among other StyleableTextField styles.

QE notes:
Doc notes:
Bugs:
SDK-30943 - Change event fired even when selection isn't actually changed
Reviewer: klin
Tests run: checkintests, mustella
Is noteworthy for integration: Yes

Modified Paths:
--------------
<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/mobilecomponents/src/spark/components/ToggleSwitch.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
@@ -67,7 +67,7 @@
                 layoutThumbWidth = 94;
                 layoutThumbHeight = 56;
                 layoutStrokeWeight = 2;
-                layoutOuterStrokeWeight = 2;
+                layoutBorderSize = 2;
                 layoutTextShadowOffset = -2;
                 layoutInnerPadding = 14;
                 layoutOuterPadding = 22;
@@ -79,7 +79,7 @@
                 layoutThumbWidth = 70;
                 layoutThumbHeight = 42;
                 layoutStrokeWeight = 2;
-                layoutOuterStrokeWeight = 1;
+                layoutBorderSize = 1;
                 layoutTextShadowOffset = -1;
                 layoutInnerPadding = 10;
                 layoutOuterPadding = 17;
@@ -92,7 +92,7 @@
                 layoutThumbWidth = 47;
                 layoutThumbHeight = 28;
                 layoutStrokeWeight = 1;
-                layoutOuterStrokeWeight = 1;
+                layoutBorderSize = 1;
                 layoutTextShadowOffset = -1;
                 layoutInnerPadding = 7;
                 layoutOuterPadding = 11;
@@ -101,9 +101,9 @@
             }
         }

-        layoutCornerRadius = layoutThumbHeight / 2;
-        selectedLabelText = resourceManager.getString("components","toggleSwitchSelectedLabel");
-        unselectedLabelText =  resourceManager.getString("components","toggleSwitchUnselectedLabel");
+        layoutCornerEllipseSize = layoutThumbHeight;
+        selectedLabel = resourceManager.getString("components","toggleSwitchSelectedLabel");
+        unselectedLabel =  resourceManager.getString("components","toggleSwitchUnselectedLabel");
     }

     //----------------------------------------------------------------------------------------------
@@ -137,7 +137,7 @@
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
-    protected var layoutCornerRadius:Number;
+    protected var layoutCornerEllipseSize:Number;

     /**
      * The stroke weight outlining the graphics of the skin
@@ -149,15 +149,15 @@
     protected var layoutStrokeWeight:Number;

     /**
-     *  The stroke weight outlining the component
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    protected var layoutOuterStrokeWeight:Number;
-
-	/**
+     *  The size of the border surrounding the component
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    protected var layoutBorderSize:Number;
+
+    /**
      * The padding between the labels and the thumb
      *
      *  @langversion 3.0
@@ -186,40 +186,24 @@

     /**
      *  The label for the selected side of the component
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    public var selectedLabelDisplay:StyleableTextField;
-
-    /**
-     *  The label's shadow for the unselected side of the component
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    public var selectedLabelDisplayShadow:StyleableTextField;
+     *  Exposed for styling purposes only
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public var selectedLabelDisplay:LabelDisplayComponent;

     /**
      *  The label for the unselected side of the component
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    public var unselectedLabelDisplay:StyleableTextField;
-
-    /**
-     *  The label's shadow for the unselected side of the component
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    public var unselectedLabelDisplayShadow:StyleableTextField;
-
+     *  Exposed for styling purposes only
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public var unselectedLabelDisplay:LabelDisplayComponent;
+
     /**
      *  The content clipped by the track that slides to match the thumb's
      *  position. Contents include a background and the (un)selected labels.
@@ -227,16 +211,16 @@
      *  shadow, foreground.
      */
     private var slidingContentBackground:SpriteVisualElement;
-    private var slidingContentForeground:SpriteVisualElement;
+    private var slidingContentForeground:UIComponent;
     private var slidingContentOverlayClass:Class;
     private var slidingContentOverlay:DisplayObject;

-	/**
-	 *  The contents inside the skin, not including the outline
-	 *  stroke
-	 */
-	private var contents:SpriteVisualElement;
-
+    /**
+     *  The contents inside the skin, not including the outline
+     *  stroke
+     */
+    private var contents:UIComponent;
+
     //----------------------------------------------------------------------------------------------
     //
     //  Skin parts
@@ -318,49 +302,49 @@
     }

     //----------------------------------
-    //  selectedLabelText
+    //  selectedLabel
     //----------------------------------

-    private var _selectedLabelText:String;
+    private var _selectedLabel:String;
     /**
      *  The text of the label showing when the component is selected.
-     *  Subclasses can override this to customize the selected label.
+     *  Subclasses can set or override this to customize the selected label.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
      */
-    protected function get selectedLabelText():String
-    {
-        return _selectedLabelText;
-    }
-
-    protected function set selectedLabelText(value:String):void
-    {
-        _selectedLabelText = value;
+    protected function get selectedLabel():String
+    {
+        return _selectedLabel;
+    }
+
+    protected function set selectedLabel(value:String):void
+    {
+        _selectedLabel = value;
     }

     //----------------------------------
-    //  unselectedLabelText
+    //  unselectedLabel
     //----------------------------------
-
-    private var _unselectedLabelText:String;
+
+    private var _unselectedLabel:String;
     /**
      *  The text of the label showing when the component is not selected.
-     *  Subclasses can override this to customize the unselected label.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    protected function get unselectedLabelText():String
-    {
-        return _unselectedLabelText;
-    }
-
-    protected function set unselectedLabelText(value:String):void
-    {
-        _unselectedLabelText = value;
+     *  Subclasses can set or override this to customize the unselected label.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    protected function get unselectedLabel():String
+    {
+        return _unselectedLabel;
+    }
+
+    protected function set unselectedLabel(value:String):void
+    {
+        _unselectedLabel = value;
     }

     //----------------------------------------------------------------------------------------------
@@ -378,24 +362,24 @@
         super.drawBackground(unscaledWidth, unscaledHeight);

         // calculate skin dimensions - outer stroke
-        var calculatedContentWidth:Number = Math.max(unscaledWidth - 2 * layoutOuterStrokeWeight,
+        var calculatedContentWidth:Number = Math.max(unscaledWidth - 2 * layoutBorderSize,
             getElementPreferredWidth(thumb));
-        var calculatedContentHeight:Number = Math.max(unscaledHeight - 2 * layoutOuterStrokeWeight,
+        var calculatedContentHeight:Number = Math.max(unscaledHeight - 2 * layoutBorderSize,
             getElementPreferredHeight(thumb));
-
+
         drawSlidingContent(calculatedContentWidth, calculatedContentHeight);
         drawTrack(calculatedContentWidth, calculatedContentHeight);
         drawThumb(calculatedContentWidth, calculatedContentHeight);
         drawMask(calculatedContentWidth, calculatedContentHeight);
-
-		// simulate outer stroke using a larger filled rounded rect
+
+        // simulate outer stroke using a larger filled rounded rect
         graphics.clear();
         graphics.beginFill(0xffffff, 0.3);
-		graphics.drawRoundRect(0, (calculatedContentHeight - layoutThumbHeight) / 2,
-            calculatedContentWidth + 2 * layoutOuterStrokeWeight,
-            layoutThumbHeight + 2 * layoutOuterStrokeWeight,
-            2 * layoutCornerRadius + layoutOuterStrokeWeight);
-		graphics.endFill();
+        graphics.drawRoundRect(0, (calculatedContentHeight - layoutThumbHeight) / 2,
+            calculatedContentWidth + 2 * layoutBorderSize,
+            layoutThumbHeight + 2 * layoutBorderSize,
+            layoutCornerEllipseSize + layoutBorderSize);
+        graphics.endFill();
     }

     /**
@@ -407,14 +391,14 @@
         super.layoutContents(unscaledWidth, unscaledHeight);

         // calculate skin dimensions - outer stroke
-        var calculatedContentWidth:Number = Math.max(unscaledWidth - 2 * layoutOuterStrokeWeight,
+        var calculatedContentWidth:Number = Math.max(unscaledWidth - 2 * layoutBorderSize,
             getElementPreferredWidth(thumb));
-        var calculatedContentHeight:Number = Math.max(unscaledHeight - 2 * layoutOuterStrokeWeight,
+        var calculatedContentHeight:Number = Math.max(unscaledHeight - 2 * layoutBorderSize,
             getElementPreferredHeight(thumb));
-
-		setElementSize(contents, calculatedContentWidth, layoutThumbHeight);
-		setElementPosition(contents, layoutOuterStrokeWeight,
-            layoutOuterStrokeWeight + (calculatedContentHeight - layoutThumbHeight) / 2);
+
+        setElementSize(contents, calculatedContentWidth, layoutThumbHeight);
+        setElementPosition(contents, layoutBorderSize,
+            layoutBorderSize + (calculatedContentHeight - layoutThumbHeight) / 2);

         layoutTrack(calculatedContentWidth, layoutThumbHeight);
         layoutThumb(calculatedContentWidth, layoutThumbHeight);
@@ -428,25 +412,17 @@
      */
     override protected function measure():void
     {
-        if (selectedLabelDisplay.isTruncated || unselectedLabelDisplay.isTruncated)
-        {
-            selectedLabelDisplay.text = selectedLabelText;
-            unselectedLabelDisplay.text = unselectedLabelText;
-        }
-        selectedLabelDisplay.commitStyles();
-        unselectedLabelDisplay.commitStyles();
-
         // The skin must be at least as large as the thumb + outer stroke
-        measuredMinWidth = layoutThumbWidth + 2 * layoutOuterStrokeWeight;
-        measuredMinHeight = layoutThumbWidth + 2 * layoutOuterStrokeWeight;
+        measuredMinWidth = layoutThumbWidth + 2 * layoutBorderSize;
+        measuredMinHeight = layoutThumbWidth + 2 * layoutBorderSize;

         // The preferred size will display all label text
         var labelWidth:Number = Math.max(getElementPreferredWidth(selectedLabelDisplay),
             getElementPreferredWidth(unselectedLabelDisplay));

         measuredWidth = layoutThumbWidth + labelWidth + layoutInnerPadding +
-            layoutOuterPadding + 2 * layoutOuterStrokeWeight;
-        measuredHeight = layoutThumbHeight + 2 * layoutOuterStrokeWeight;
+            layoutOuterPadding + 2 * layoutBorderSize;
+        measuredHeight = layoutThumbHeight + 2 * layoutBorderSize;
     }

     /**
@@ -457,17 +433,17 @@
         if (currentState && currentState.indexOf("disabled") >= 0)
         {
             alpha = 0.5;
-            selectedLabelDisplayShadow.visible = false;
-            unselectedLabelDisplayShadow.visible = false;
+            selectedLabelDisplay.showShadow(false);
+            unselectedLabelDisplay.showShadow(false);
         }
         else
         {
             alpha = 1.0;
-            selectedLabelDisplayShadow.visible = true;
-            unselectedLabelDisplayShadow.visible = true;
+            selectedLabelDisplay.showShadow(true);
+            unselectedLabelDisplay.showShadow(true);
         }
     }
-
+
     /**
      *  @private
      */
@@ -475,41 +451,31 @@
     {
         super.createChildren();

-		contents = new SpriteVisualElement();
-		addChild(contents);
-
-		// SlidingContent: background, overlay, labels
+        contents = new UIComponent();
+        addChild(contents);
+
+        // SlidingContent: background, overlay, labels
         slidingContentBackground = new SpriteVisualElement();
         contents.addChild(slidingContentBackground);
-
+
         slidingContentOverlay = new slidingContentOverlayClass();
         contents.addChild(slidingContentOverlay);

-        slidingContentForeground = new SpriteVisualElement();
+        slidingContentForeground = new UIComponent(); //SpriteVisualElement();
         contents.addChild(slidingContentForeground);

-        selectedLabelDisplayShadow = StyleableTextField(createInFontContext(StyleableTextField));
-        selectedLabelDisplayShadow.styleName = this;
-        selectedLabelDisplayShadow.colorName = "textShadowColor";
-        selectedLabelDisplayShadow.text = selectedLabelText;
-        slidingContentForeground.addChild(selectedLabelDisplayShadow);
-
-        selectedLabelDisplay = StyleableTextField(createInFontContext(StyleableTextField));
-        selectedLabelDisplay.styleName = this;
-        selectedLabelDisplay.text = selectedLabelText;
-        slidingContentForeground.addChild(selectedLabelDisplay);
-
-        unselectedLabelDisplayShadow = StyleableTextField(createInFontContext(StyleableTextField));
-        unselectedLabelDisplayShadow.styleName = this;
-        unselectedLabelDisplayShadow.colorName = "textShadowColor";
-        unselectedLabelDisplayShadow.text = unselectedLabelText;
-        slidingContentForeground.addChild(unselectedLabelDisplayShadow);
-
-        unselectedLabelDisplay = StyleableTextField(createInFontContext(StyleableTextField));
-        unselectedLabelDisplay.styleName = this;
-        unselectedLabelDisplay.text = unselectedLabelText;
+        selectedLabelDisplay = new LabelDisplayComponent();
+        selectedLabelDisplay.id = "selectedLabelDisplay";
+        selectedLabelDisplay.text = selectedLabel;
+        selectedLabelDisplay.shadowYOffset = layoutTextShadowOffset;
+        slidingContentForeground.addChild(selectedLabelDisplay);
+
+        unselectedLabelDisplay = new LabelDisplayComponent();
+        unselectedLabelDisplay.id = "unselectedLabelDisplay";
+        unselectedLabelDisplay.text = unselectedLabel;
+        unselectedLabelDisplay.shadowYOffset = layoutTextShadowOffset;
         slidingContentForeground.addChild(unselectedLabelDisplay);
-
+
         // Track
         track = new SpriteVisualElement();
         contents.addChild(SpriteVisualElement(track));
@@ -529,23 +495,6 @@
         contents.addChild(contentMask);
     }

-    /**
-     *  @private
-     */
-    override public function styleChanged(styleProp:String):void
-    {
-        super.styleChanged(styleProp);
-        // Because their parent is not an ISimpleStyleClient, we need to update
-        // these manually.
-        var labels:Array = [ selectedLabelDisplay, selectedLabelDisplayShadow,
-            unselectedLabelDisplay, unselectedLabelDisplayShadow ];
-        for each (var textField:StyleableTextField in labels)
-        {
-            if (textField)
-                textField.styleChanged(styleProp);
-        }
-    }
-
     //----------------------------------------------------------------------------------------------
     //
     //  Methods
@@ -582,56 +531,19 @@
      */
     private function layoutSlidingContent(skinWidth:Number, skinHeight:Number):void
     {
-        var visibleTrackArea:Number = skinWidth - layoutThumbWidth;
-
-        layoutLabels(selectedLabelDisplay, selectedLabelDisplayShadow, (-visibleTrackArea + layoutOuterPadding), 0,
-            (visibleTrackArea - layoutInnerPadding - layoutOuterPadding), layoutThumbHeight,
-            layoutTextShadowOffset, selectedLabelText);
-        layoutLabels(unselectedLabelDisplay, unselectedLabelDisplayShadow, (layoutThumbWidth + layoutInnerPadding), 0,
-            (visibleTrackArea - layoutInnerPadding - layoutOuterPadding), layoutThumbHeight,
-            layoutTextShadowOffset, unselectedLabelText);
+        var visibleTrackWidth:Number = skinWidth - layoutThumbWidth;
+        var labelWidth:Number = visibleTrackWidth - layoutInnerPadding - layoutOuterPadding;
+
+        setElementSize(selectedLabelDisplay, labelWidth, layoutThumbHeight);
+        setElementPosition(selectedLabelDisplay, -visibleTrackWidth + layoutOuterPadding, 0);
+
+        setElementSize(unselectedLabelDisplay, labelWidth, layoutThumbHeight);
+        setElementPosition(unselectedLabelDisplay, layoutThumbWidth + layoutInnerPadding, 0);

         setElementSize(slidingContentOverlay, skinWidth, layoutThumbHeight);
         setElementPosition(slidingContentOverlay, 0, (skinHeight - layoutThumbHeight) / 2);

         moveSlidingContent();
-    }
-
-    /**
-     *  Position a label and its shadow within the given rectangle
-     */
-    private function layoutLabels(label:StyleableTextField, labelShadow:StyleableTextField,
-                                  x:Number, y:Number, width:Number, height:Number,
-                                  shadowYOffset:Number, labelText:String):void
-    {
-        if (label.isTruncated) {
-            label.text = labelText;
-            labelShadow.text = labelText;
-        }
-
-        var textWidth:Number = getElementPreferredWidth(label);
-        var textHeight:Number = getElementPreferredHeight(label);
-
-        var labelWidth:Number = Math.max(Math.min(textWidth, width), 0);
-        var labelHeight:Number = textHeight;
-
-        labelShadow.alpha = getStyle("textShadowAlpha");
-
-        label.commitStyles();
-        labelShadow.commitStyles();
-
-        setElementSize(label, labelWidth, labelHeight);
-        setElementSize(labelShadow, labelWidth, labelHeight);
-        if (textWidth > labelWidth) {
-            label.truncateToFit();
-            labelShadow.truncateToFit();
-        }
-
-        var labelX:Number = x + (width - labelWidth) / 2;
-        var labelY:Number = y + (height - labelHeight) / 2;
-
-        setElementPosition(label, labelX, labelY);
-        setElementPosition(labelShadow, labelX, labelY + shadowYOffset);
     }

     /**
@@ -644,7 +556,7 @@
         graphics.lineStyle(layoutStrokeWeight, 0, .3);
         graphics.drawRoundRect(layoutStrokeWeight / 2, layoutStrokeWeight / 2,
             skinWidth - layoutStrokeWeight,
-            (layoutThumbHeight - layoutStrokeWeight), (layoutCornerRadius * 2 - layoutStrokeWeight / 2));
+            (layoutThumbHeight - layoutStrokeWeight), (layoutCornerEllipseSize - layoutStrokeWeight / 2));
         graphics.lineStyle();
     }

@@ -686,7 +598,7 @@

         colorMatrix.createGradientBox(layoutThumbWidth, layoutThumbHeight, Math.PI / 2);
         graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, colorMatrix);
-        graphics.drawRoundRect(0, 0, layoutThumbWidth, layoutThumbHeight, layoutCornerRadius * 2);
+        graphics.drawRoundRect(0, 0, layoutThumbWidth, layoutThumbHeight, layoutCornerEllipseSize);
         graphics.endFill();

         // Base gradient fill, one stroke weight inside outline
@@ -705,7 +617,7 @@
         graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, colorMatrix);
         graphics.drawRoundRect(layoutStrokeWeight, layoutStrokeWeight,
             layoutThumbWidth - layoutStrokeWeight * 2,
-            layoutThumbHeight - layoutStrokeWeight * 2, layoutCornerRadius * 2 - layoutStrokeWeight * 2);
+            layoutThumbHeight - layoutStrokeWeight * 2, layoutCornerEllipseSize - layoutStrokeWeight * 2);
         graphics.endFill();

         // Thumb highlight, one stroke weight inside outline
@@ -727,14 +639,14 @@
         graphics.lineGradientStyle(GradientType.LINEAR, colors, alphas, ratios, colorMatrix);
         graphics.drawRoundRect(layoutStrokeWeight * 1.5, layoutStrokeWeight * 1.5,
             layoutThumbWidth - layoutStrokeWeight * 3, layoutThumbHeight - layoutStrokeWeight * 3,
-            layoutCornerRadius * 2 - layoutStrokeWeight * 3);
+            layoutCornerEllipseSize - layoutStrokeWeight * 3);
         graphics.lineStyle();

         // When alpha is set, we do not want the thumb to show through to the track
         var thumbMask:Sprite = Sprite(SpriteVisualElement(thumb).mask);
         thumbMask.graphics.clear();
         thumbMask.graphics.beginFill(0xffffff);
-        thumbMask.graphics.drawRoundRect(0, 0, layoutThumbWidth, layoutThumbHeight, 2 * layoutCornerRadius);
+        thumbMask.graphics.drawRoundRect(0, 0, layoutThumbWidth, layoutThumbHeight, layoutCornerEllipseSize);
         thumbMask.graphics.endFill();
         SpriteVisualElement(thumb).opaqueBackground = baseColor;
     }
@@ -756,7 +668,7 @@
         var graphics:Graphics = SpriteVisualElement(contents.mask).graphics;
         graphics.clear();
         graphics.beginFill(0x0);
-        graphics.drawRoundRect(0, 0, skinWidth, layoutThumbHeight, layoutCornerRadius * 2);
+        graphics.drawRoundRect(0, 0, skinWidth, layoutThumbHeight, layoutCornerEllipseSize);
         graphics.endFill();
     }

@@ -769,11 +681,11 @@
         setElementPosition(contents.mask, 0, (skinHeight - layoutThumbHeight) / 2);
     }

-	/**
+    /**
      *  Move the sliding content to line up with thumbPosition.
-	 *  This version assumes the thumb and track share the same coordinate system.
-	 */
-	private function moveSlidingContent():void
+     *  This version assumes the thumb and track share the same coordinate system.
+     */
+    private function moveSlidingContent():void
     {
         if (!hostComponent)
             return;
@@ -782,9 +694,9 @@
         var y:Number = thumb.getLayoutBoundsY();
         setElementPosition(slidingContentBackground, x, y);
         setElementPosition(slidingContentForeground, x, y);
-	}
-
-	//----------------------------------------------------------------------------------------------
+    }
+
+    //----------------------------------------------------------------------------------------------
     //
     //  Event handlers
     //
@@ -795,7 +707,148 @@
      */
     private function thumbPositionChanged_handler(event:Event):void
     {
-		moveSlidingContent();
+        moveSlidingContent();
     }
 }
+}
+
+import flash.events.Event;
+
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+
+import spark.components.supportClasses.StyleableTextField;
+import spark.core.IDisplayText;
+
+use namespace mx_internal;
+
+/**
+ *  @private
+ *  Component combining two labels to create the effect of text and its drop
+ *  shadow. The component can be used with advanced style selectors and the
+ *  styles "color", "textShadowColor", and "textShadowAlpha". Based off of
+ *  ActionBar.TitleDisplayComponent. These two should eventually be factored.
+ */
+class LabelDisplayComponent extends UIComponent implements IDisplayText
+{
+    public var shadowYOffset:Number = 0;
+    private var labelChanged:Boolean = false;
+    private var labelDisplay:StyleableTextField;
+    private var labelDisplayShadow:StyleableTextField;
+    private var _text:String;
+
+    public function LabelDisplayComponent()
+    {
+        super();
+        _text = "";
+    }
+
+    override public function get baselinePosition():Number
+    {
+        return labelDisplay.baselinePosition;
+    }
+
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        labelDisplay = StyleableTextField(createInFontContext(StyleableTextField));
+        labelDisplay.styleName = this;
+        labelDisplay.editable = false;
+        labelDisplay.selectable = false;
+        labelDisplay.multiline = false;
+        labelDisplay.wordWrap = false;
+        labelDisplay.addEventListener(FlexEvent.VALUE_COMMIT,
+            labelDisplay_valueCommitHandler);
+
+        labelDisplayShadow = StyleableTextField(createInFontContext(StyleableTextField));
+        labelDisplayShadow.styleName = this;
+        labelDisplayShadow.colorName = "textShadowColor";
+        labelDisplayShadow.editable = false;
+        labelDisplayShadow.selectable = false;
+        labelDisplayShadow.multiline = false;
+        labelDisplayShadow.wordWrap = false;
+
+        addChild(labelDisplayShadow);
+        addChild(labelDisplay);
+    }
+
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (labelChanged)
+        {
+            labelDisplay.text = text;
+            invalidateSize();
+            invalidateDisplayList();
+            labelChanged = false;
+        }
+    }
+
+    override protected function measure():void
+    {
+        if (labelDisplay.isTruncated)
+            labelDisplay.text = text;
+        labelDisplay.commitStyles();
+        measuredWidth = labelDisplay.getPreferredBoundsWidth();
+        measuredHeight = labelDisplay.getPreferredBoundsHeight();
+    }
+
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        if (labelDisplay.isTruncated)
+            labelDisplay.text = text;
+        labelDisplay.commitStyles();
+
+        var labelHeight:Number = labelDisplay.getPreferredBoundsHeight();
+        var labelY:Number = (unscaledHeight - labelHeight) / 2;
+
+        var labelWidth:Number = Math.min(unscaledWidth, labelDisplay.getPreferredBoundsWidth());
+        var labelX:Number = (unscaledWidth - labelWidth) / 2;
+
+        labelDisplay.setLayoutBoundsSize(labelWidth, labelHeight);
+        labelDisplay.setLayoutBoundsPosition(labelX, labelY);
+
+        labelDisplay.truncateToFit();
+
+        labelDisplayShadow.commitStyles();
+        labelDisplayShadow.setLayoutBoundsSize(labelWidth, labelHeight);
+        labelDisplayShadow.setLayoutBoundsPosition(labelX, labelY + shadowYOffset);
+
+        labelDisplayShadow.alpha = getStyle("textShadowAlpha");
+
+        // unless the label was truncated, labelDisplayShadow.text was set in
+        // the value commit handler
+        if (labelDisplay.isTruncated)
+            labelDisplayShadow.text = labelDisplay.text;
+    }
+
+    private function labelDisplay_valueCommitHandler(event:Event):void
+    {
+        labelDisplayShadow.text = labelDisplay.text;
+    }
+
+    public function get text():String
+    {
+        return _text;
+    }
+
+    public function set text(value:String):void
+    {
+        _text = value;
+        labelChanged = true;
+        invalidateProperties();
+    }
+
+    public function get isTruncated():Boolean
+    {
+        return labelDisplay.isTruncated;
+    }
+
+    public function showShadow(value:Boolean):void
+    {
+        labelDisplayShadow.visible = value;
+    }
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/rpc/src/mx/messaging/errors/InvalidDestinationError.as
+++ frameworks/projects/rpc/src/mx/messaging/errors/InvalidDestinationError.as
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * ADOBE CONFIDENTIAL
+ * __________________
+ *
+ *  [2002] - [2007] Adobe Systems Incorporated
+ *  All Rights Reserved.
+ *
+ * NOTICE:  All information contained herein is, and remains
+ * the property of Adobe Systems Incorporated and its suppliers,
+ * if any.  The intellectual and technical concepts contained
+ * herein are proprietary to Adobe Systems Incorporated
+ * and its suppliers and may be covered by U.S. and Foreign Patents,
+ * patents in process, and are protected by trade secret or copyright law.
+ * Dissemination of this information or reproduction of this material
+ * is strictly forbidden unless prior written permission is obtained
+ * from Adobe Systems Incorporated.
+ */
+package mx.messaging.errors
+{
+
+/**
+ *  This error is thrown when a destination can't be accessed
+ *  or is not valid.
+ *  This error is thrown by the following methods/properties
+ *  within the framework:
+ *

+ *
ServerConfig.getChannelSet() if an invalid destination is specified.

+ *
ServerConfig.getProperties() if an invalid destination is specified.

+ *
Channel.send() if no destination is specified for the message to send.

+ *
MessageAgent.destination setter if the destination value is null or zero length.

+ *
Producer.send() if no destination is specified for the Producer or message to send.

+ *
Consumer.subscribe() if no destination is specified for the Consumer.

+ *

+ */
+public class InvalidDestinationError extends ChannelError
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructs a new instance of an InvalidDestinationError with the specified message.
+     *
+     *  @param msg String that contains the message that describes this InvalidDestinationError.
+     */
+    public function InvalidDestinationError(msg:String)
+    {
+        super(msg);
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 4046
Author:   jimurphy@adobe.com
Date:     2008-11-07T14:49:20.952872Z

Log Message:
-----------
Merged gumbo_alpha revisions 4019,4021 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout_core.swc</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout_conversion.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout_edit.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -499,18 +499,24 @@
         if (maskChanged)
         {
             maskChanged = false;
-            if (_mask && !_mask.parent)
+            if (_mask)
+            {
+            	maskTypeChanged = true;
+
+	            if (!_mask.parent)
             {
             	// TODO!!! This needs to be a sibling because alpha
                 super.addChild(_mask);
                 var maskComp:UIComponent = _mask as UIComponent;
                 if (maskComp)
                 {
+	                	maskComp.validateProperties();
                     maskComp.validateSize();
                     maskComp.setActualSize(maskComp.getExplicitOrMeasuredWidth(),
                                            maskComp.getExplicitOrMeasuredHeight());
                 }
             }
+        }
         }

         if (maskTypeChanged)


Transferred from the Adobe Open Source Subversion Repository

Revision: 18797
Author:   dloverin@adobe.com
Date:     2010-11-23T12:37:29.486584Z

Log Message:
-----------
Fix "direction" and "locale" inline styles on DefaultGridItemRenderer.

Fixup the styleDeclaration setter to add the “direction” and “locale” styles. This gets the styles into style manager where the editor can inherit them.

QE notes: None.
Doc notes: None.
Bugs: SDK-28290
Reviewer: Hans, Carol
Tests run: cyclone server
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/UITextFieldGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as
+++ frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as
@@ -19,7 +19,10 @@
 import flash.text.TextFieldAutoSize;

 import mx.core.UIFTETextField;
+import mx.styles.CSSMergedStyleDeclaration;
 import mx.styles.IStyleClient;
+import mx.styles.IStyleManager2;
+import mx.styles.StyleManager;

 import spark.components.gridClasses.IGridItemRenderer;

@@ -104,69 +107,51 @@

         addEventListener(ToolTipEvent.TOOL_TIP_SHOW, toolTipShowHandler);
     }
-
+
     //--------------------------------------------------------------------------
     //
-    //  Variables
+    //  IStyleClient Methods and Properties
+    //  (source code from mx.controls.dataGridClassses.DataGridItemRenderer.as)
     //
-    //--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  styleDeclaration
+    //----------------------------------
+
+    private var _styleDeclaration:CSSStyleDeclaration;

     /**
      *  @private
-     *  Hold the property to style conversions that getStyle() should use.
-     *  Since setStyle() in UIFTETextField is a no-op, getStyle() will look here
-     *  for a "pseudo style" before looking for the real styles.  See notes
-     *  on direction and locale properties.
      */
-    private var pseudoStyles:Object;
-
-    //----------------------------------
-    //  direction
-    //----------------------------------
+    public function get styleDeclaration():CSSStyleDeclaration
+    {
+        return _styleDeclaration;
+    }

     /**
-     * @private
-     * This is a property in FTETextField so if set in mxml the property
-     * rather than the style is set.  UIFTETextField will overwrite the
-     * property with the value of the "direction" style so convert the property
-     * to a style.
+     *  @private
      */
-    override public function set direction(value:String):void
+    public function set styleDeclaration(value:CSSStyleDeclaration):void
     {
-        if (!pseudoStyles)
-            pseudoStyles = {};
-        pseudoStyles["direction"] = value;
+        // The "direction" and "locale" are treated as properites instead of
+        // styles by the compiler when the DefaultGridItemRenderer is used.
+        // This means styleDeclaration will not include these inline styles.
+        // This code adds "direction" and "locale" back into styleDeclaration
+        // so the style system sees the styles.
+        var uiFTETextField:UIFTETextField = UIFTETextField(this);
+        var styleManager:IStyleManager2 = StyleManager.getStyleManager(moduleFactory);
+        var style:CSSStyleDeclaration = new CSSStyleDeclaration(value.selector, styleManager);
+
+        style.defaultFactory = function():void
+        {
+            this.direction = uiFTETextField.direction;
+            this.locale = uiFTETextField.locale;
+        }
+
+        _styleDeclaration = new CSSMergedStyleDeclaration(style, value, value.selector,
+            styleManager);
     }
-
-    //----------------------------------
-    //  locale
-    //----------------------------------
-
-    /**
-     * @private
-     * This is a property in FTETextField so if set in mxml the property
-     * rather than the style is set.  UIFTETextField will overwrite the
-     * property with the value of the "locale" style so convert the property
-     * to a style.
-     */
-    override public function set locale(value:String):void
-    {
-        if (!pseudoStyles)
-            pseudoStyles = {};
-        pseudoStyles["locale"] = value;
-    }
-
-    /**
-     * @private
-     */
-    override public function getStyle(styleProp:String):*
-    {
-        if (pseudoStyles && pseudoStyles[styleProp] !== undefined)
-            return pseudoStyles[styleProp];
-
-        return super.getStyle(styleProp);
-    }
-

 include "TextFieldGridItemRendererInclude.as"


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as
@@ -238,12 +238,7 @@
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 7039
Author:   jimurphy@adobe.com
Date:     2009-05-18T16:46:05.499802Z

Log Message:
-----------
Merged beta1 revisions 6962,6965,6977,6991,6996,7035 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/internal/OEMConfiguration.java</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/sax/FXGSAXScanner.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/ShapeHelper.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as
+++ frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as
@@ -842,9 +842,9 @@
             {

                 var currentPositionPt:Point = layoutMatrix.transformPoint(centerP);
-                currentPostLayoutPosition.x = currentPositionPt.x;
-                currentPostLayoutPosition.y = currentPositionPt.y;
-                currentPostLayoutPosition.z = 0;
+                currentPosition.x = currentPositionPt.x;
+                currentPosition.y = currentPositionPt.y;
+                currentPosition.z = 0;
             }

             if (currentPostLayoutPosition != null)
@@ -958,38 +958,28 @@
                 postLayoutTransformCenterPosition != null);
         if(needOffsets)
             _offsets = new TransformOffsets();
-
-        // if the caller passed in a transformCenterPosition, then we know that the transformCenterPosition they passed in is actually the
-        // target position.  If that's the case, we'll deal with that later. If they passed in null, it means they want
-        // to keep the transformCenter locked at its current position.  In which case, we need to calculate it.
-        // so we set targetPosition to a temp vector to store the calculated value.
-        var targetPosition:Vector3D =
-            (transformCenterPosition == null) ?
-            staticTranslation:
-            null;
-
-        // same is true for post layout transform center.
-        var postLayoutTargetPosition:Vector3D =
-            (postLayoutTransformCenterPosition == null) ?
-            staticOffsetTranslation:
-            null;

 		// now if they gave us a non-trivial transform center, and didn't tell us where they want it,
 		// we need to calculate where it is so that we can make sure we keep it there.
         if (transformCenter != null &&
             (transformCenter.x != 0 || transformCenter.y != 0 || transformCenter.z != 0) &&
-            (targetPosition != null || postLayoutTargetPosition != null))
+            (transformCenterPosition == null || postLayoutTransformCenterPosition == null))
         {
-            transformPointToParent(is3D, transformCenter, targetPosition,
-                postLayoutTargetPosition);
+            transformPointToParent(is3D, transformCenter, staticTranslation,
+                staticOffsetTranslation);
+            if(postLayoutTransformCenterPosition == null && transformCenterPosition != null)
+            {
+                staticOffsetTranslation.x = transformCenterPosition.x + staticOffsetTranslation.x - staticTranslation.x;
+                staticOffsetTranslation.y = transformCenterPosition.y + staticOffsetTranslation.y - staticTranslation.y;
+                staticOffsetTranslation.z = transformCenterPosition.z + staticOffsetTranslation.z - staticTranslation.z;
+            }
+
         }
         // if targetPosition/postLayoutTargetPosition is null here, it might be because the caller passed in
         // requested values, so we haven't calculated it yet.  So that means our target position is the values
         // they passed in.
-        if (targetPosition == null)
-            targetPosition = transformCenterPosition;
-        if (postLayoutTargetPosition == null)
-            postLayoutTargetPosition = postLayoutTransformCenterPosition;
+        var targetPosition:Vector3D = (transformCenterPosition == null)? staticTranslation:transformCenterPosition;
+        var postLayoutTargetPosition:Vector3D = (postLayoutTransformCenterPosition == null)? staticOffsetTranslation:postLayoutTransformCenterPosition;

 		// now update our transform values.
         if (rotation != null)


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ImageSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ImageSkin.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.skins.mobile
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 2535
Author:   jimurphy@adobe.com
Date:     2008-07-21T13:50:50.145075Z

Log Message:
-----------
Merged 3.0.x revisions [2518,2527-2528,2531] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/templates/html-templates/metadata/AC_OETags.js</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/MarshalDragEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/SandboxUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FocusRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/sandbox/ISandboxBridgeProvider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/MarshalEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerBridge.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/sandbox/ISandboxBridgeGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/utils/RPCObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/ModalWindowRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManager2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/sandbox/ISandboxBridgeAccess.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/MarshalMouseEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/sandbox/IChildAccess.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/EventUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/PopUpRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/sandbox/IParentAccess.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/ShowAlertRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/sandbox/SandboxBridgeGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SizeRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxBridgeRequest.as</path>

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

--- frameworks/projects/framework/src/mx/utils/EventUtil.as
+++ frameworks/projects/framework/src/mx/utils/EventUtil.as
@@ -16,8 +16,7 @@
 import mx.events.MarshalMouseEvent;

 /**
- * Utilities to help in handling Events or Event Dispatching.
- *
+ *  Utilities to help with event dispatching or event handling.
  */
 public class EventUtil
 {
@@ -25,50 +24,79 @@

 	//--------------------------------------------------------------------------
 	//
-	//  Class methods
+	//  Class properties
 	//
 	//--------------------------------------------------------------------------

-	private static var _marshalEventMap:Object;
+	//----------------------------------
+    //  marshalMouseEventMap
+	//----------------------------------

 	/**
-	 *  mapping of MouseEvents to MarshalMouseEvent types
+     *  @private
+     */
+    private static var _marshalEventMap:Object;
+
+	/**
+	 *  Mapping of MouseEvents to MarshalMouseEvent types.
 	 */
 	public static function get marshalMouseEventMap():Object
 	{
 		if (!_marshalEventMap)
 		{
 			_marshalEventMap = {};
-			_marshalEventMap[MarshalMouseEvent.CLICK] = MouseEvent.CLICK;
-			_marshalEventMap[MarshalMouseEvent.DOUBLE_CLICK] = MouseEvent.DOUBLE_CLICK;
-			_marshalEventMap[MarshalMouseEvent.MOUSE_DOWN] = MouseEvent.MOUSE_DOWN;
-			_marshalEventMap[MarshalMouseEvent.MOUSE_MOVE] = MouseEvent.MOUSE_MOVE;
-			_marshalEventMap[MarshalMouseEvent.MOUSE_UP] = MouseEvent.MOUSE_UP;
-			_marshalEventMap[MarshalMouseEvent.MOUSE_WHEEL] = MouseEvent.MOUSE_WHEEL;
+
+			_marshalEventMap[MarshalMouseEvent.CLICK] =
+                MouseEvent.CLICK;
+			_marshalEventMap[MarshalMouseEvent.DOUBLE_CLICK] =
+                MouseEvent.DOUBLE_CLICK;
+			_marshalEventMap[MarshalMouseEvent.MOUSE_DOWN] =
+                MouseEvent.MOUSE_DOWN;
+			_marshalEventMap[MarshalMouseEvent.MOUSE_MOVE] =
+                MouseEvent.MOUSE_MOVE;
+			_marshalEventMap[MarshalMouseEvent.MOUSE_UP] =
+                MouseEvent.MOUSE_UP;
+			_marshalEventMap[MarshalMouseEvent.MOUSE_WHEEL] =
+                MouseEvent.MOUSE_WHEEL;
 		}

 		return _marshalEventMap;
 	}

+	//----------------------------------
+    //  mouseEventMap
+	//----------------------------------
+
+	/**
+     *  @private
+     */
 	private static var _mouseEventMap:Object;

 	/**
-	 *  mapping of MarshalMouseEvent to MouseEvents  types
+	 *  Mapping of MarshalMouseEvent to MouseEvents types.
 	 */
 	public static function get mouseEventMap():Object
 	{
 		if (!_mouseEventMap)
 		{
 			_mouseEventMap = {};
-			_mouseEventMap[MouseEvent.CLICK] = MarshalMouseEvent.CLICK;
-			_mouseEventMap[MouseEvent.DOUBLE_CLICK] = MarshalMouseEvent.DOUBLE_CLICK;
-			_mouseEventMap[MouseEvent.MOUSE_DOWN] = MarshalMouseEvent.MOUSE_DOWN;
-			_mouseEventMap[MouseEvent.MOUSE_MOVE] = MarshalMouseEvent.MOUSE_MOVE;
-			_mouseEventMap[MouseEvent.MOUSE_UP] = MarshalMouseEvent.MOUSE_UP;
-			_mouseEventMap[MouseEvent.MOUSE_WHEEL] = MarshalMouseEvent.MOUSE_WHEEL;
+
+			_mouseEventMap[MouseEvent.CLICK] =
+                MarshalMouseEvent.CLICK;
+			_mouseEventMap[MouseEvent.DOUBLE_CLICK] =
+                MarshalMouseEvent.DOUBLE_CLICK;
+			_mouseEventMap[MouseEvent.MOUSE_DOWN] =
+                MarshalMouseEvent.MOUSE_DOWN;
+			_mouseEventMap[MouseEvent.MOUSE_MOVE] =
+                MarshalMouseEvent.MOUSE_MOVE;
+			_mouseEventMap[MouseEvent.MOUSE_UP] =
+                MarshalMouseEvent.MOUSE_UP;
+			_mouseEventMap[MouseEvent.MOUSE_WHEEL] =
+                MarshalMouseEvent.MOUSE_WHEEL;
 		}

 		return _mouseEventMap;
 	}
 }
-}+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3161
Author:   gruehle@adobe.com
Date:     2008-09-10T00:44:06.812175Z

Log Message:
-----------
Fix more fallout from the display object sharing optimization.

Bugs:
SDK-16774: Adding a string to a Group in between a graphic item and data item causes an RTE
MXMLG-221: Group with blendMode="layer" no longer renders any differently

QA: Regression test for MXMLG-221 should be added
Reviewer: Deepa

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

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -1,9 +1,7 @@
 package flex.core {
 import flash.display.DisplayObject;
-import flash.display.DisplayObjectContainer;
 import flash.display.Sprite;
 import flash.events.Event;
-import flash.events.EventDispatcher;
 import flash.geom.ColorTransform;
 import flash.geom.Matrix;
 import flash.geom.Rectangle;
@@ -14,8 +12,6 @@
 import flex.events.ItemExistenceChangedEvent;
 import flex.geom.Transform;
 import flex.graphics.Graphic;
-import flex.graphics.IAssignableDisplayObjectElement;
-import flex.graphics.IDisplayObjectElement;
 import flex.graphics.IGraphicElement;
 import flex.graphics.IGraphicElementHost;
 import flex.graphics.MaskType;
@@ -38,7 +34,6 @@
 import mx.events.CollectionEvent;
 import mx.events.PropertyChangeEvent;
 import mx.events.PropertyChangeEventKind;
-import mx.managers.ILayoutManagerClient;
 import mx.styles.IStyleClient;

 //--------------------------------------
@@ -1035,6 +1030,10 @@
                 for (var i:int = index - 1; i >= 0; i--)
                 {
                     var prevItem:* = getItemAt(i);
+
+                    if (!(prevItem is GraphicElement))
+                    	prevItem = getItemSkin(prevItem);
+
                     if (prevItem is DisplayObject)
                         childIndex = super.getChildIndex(DisplayObject(prevItem)) ;
                     else if (prevItem is GraphicElement)
@@ -1136,11 +1135,18 @@

     }

+    // Returns true if the Group's display object can be shared with graphic elements
+    // inside the group
+    private function get canShareDisplayObject():Boolean
+    {
+    	return blendMode == "normal";
+    }
+
     // This function assumes that the only displayObjects are either items in the content array
     // or created directly for an item in the content array.
     private function assignDisplayObjects(startIndex:int = 0):void
     {
-        var currentAssignableDO:DisplayObject = this;
+        var currentAssignableDO:DisplayObject = canShareDisplayObject ? this : null;
         var lastDisplayObject:DisplayObject = this;

         if (alwaysUseItemRenderer)


Transferred from the Adobe Open Source Subversion Repository

Revision: 12327
Author:   smgilson@adobe.com
Date:     2009-12-01T18:17:23.194369Z

Log Message:
-----------
ASDoc updates in preparation for localization

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.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/spark/src/spark/components/Spinner.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/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>

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

--- frameworks/projects/spark/src/spark/components/Panel.as
+++ frameworks/projects/spark/src/spark/components/Panel.as
@@ -551,7 +551,7 @@
     }

     /**
-     *  @inheritDoc
+     *  @private
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -585,7 +585,7 @@
     }

     /**
-     *  @inheritDoc
+     *  @private
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


M Change SkinningShaderPart methods visibility

--- src/aerys/minko/render/shader/parts/SkinningShaderPart.as
+++ src/aerys/minko/render/shader/parts/SkinningShaderPart.as
@@ -108,7 +108,7 @@
 			return outVertexPosition;
 		}

-		public function matrixSkinNormal(inVertexNormal : SFloat) : SFloat
+		private function matrixSkinNormal(inVertexNormal : SFloat) : SFloat
 		{
 			inVertexNormal = inVertexNormal.xyz;

@@ -163,7 +163,7 @@
 		}

-		public function dualQuaternionSkinPosition(inPosition : SFloat) : SFloat
+		private function dualQuaternionSkinPosition(inPosition : SFloat) : SFloat
 		{
 			var numBones		: uint		= meshBindings.countProperty('skinningMatrices');
 			var maxInfluences	: uint		= uint(meshBindings.getProperty('skinningMaxInfluences'));
@@ -247,7 +247,7 @@
 			return result;
 		}

-		public function dualQuaternionSkinNormal(inNormal : SFloat) : SFloat
+		private function dualQuaternionSkinNormal(inNormal : SFloat) : SFloat
 		{
 			var numBones		: uint	= meshBindings.countProperty('skinningMatrices');
 			var maxInfluences	: uint	= uint(meshBindings.getProperty('skinningMaxInfluences'));


Transferred from the Adobe Open Source Subversion Repository

Revision: 7967
Author:   gosmith@adobe.com
Date:     2009-06-18T19:44:16.674676Z

Log Message:
-----------
PARB changes to TextGraphicElement/SimpleText/RichText and to text styles in general.

TextGraphicElement:

The 'truncation' property has been renamed to 'maxDisplayedLines'.

The isTruncated() method has become an 'isTruncated' read-only property.

RichText:

Since a TextFlow object is the fundamental representation for rich test in TLF, the RichText component now has a public textFlow:TextFlow property which you can get or set. To turn TLF markup -- in either String or XML form -- into a TextFlow, use the static importFromString() and importFromXML() methods in the TextFlowUtil class. These are bindable methods so that if the markup parameter changes they will re-evaluate. To turn the TextFlow back into markup, use TextFLowUtil.export(...) to produce XML.

The 'content' property is now intended only for use by the MXML compiler. It is set-only and only supports being set to what MXML markup produces: a String (which will be treated as the text of an implicit span in an implicit paragraph), a FlowElement, or an Array of Strings and FlowElements.

The 'text', 'textFlow', and 'content' properties are interacting properties. For example, you can set 'textFlow' and then get the 'text', and vice versa. In fact, you can now do this immediately, without waiting for the component to undergo a LayoutManager pass. Of these three properties, the last one set in ActionScript wins; if more than one is set in MXML the results are undefined since MXML does not guarantee the order in which properties are set. Setting any of them to null is equivalent to setting the 'text' to the empty String, which is the initial state of the component.

Styles:

The 'lineBreak' style is now non-inheriting, since in TLF it doesn't inherit from FlowElement to FlowElement.

The text styles are now divided into five buckets:

BasicInheritingTextStyles.as
BasicNonInheritingTextStyles.as
AdvancedInheritingTextStyles.as
AdvancedNonInheritingTextStyles.as
SelectionFormatTextStyles.as

Skinnable components like TextInput and TextArea no longer declare any on the noninheriting text styles, because the RichTextElement in the skin doesn't inherit them. You must set them directly on the RichTextElement in the component's skin, either with ActionScript or by reskinning.

The styleInitialized() method has been added to the IAdvancedStyleClient interface.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Carol

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ButtonBarFirstButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonBarFirstButtonSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/BasicTextLayoutFormatStyles.as" copyfrom-rev="7910" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/BasicInheritingTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/SparkChromeWindowedApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/WindowedApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/DefaultButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ButtonBarLastButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonBarLastButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultButtonSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/AdvancedTextLayoutFormatStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/BasicTextLayoutFormatStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/TextFlowUtil.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/AdvancedNonInheritingTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonBarMiddleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ButtonBarMiddleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/TitleBarSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/NonInheritingTextLayoutFormatStyles.as" copyfrom-rev="7910" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/BasicNonInheritingTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/CheckBoxSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/NonInheritingTextLayoutFormatStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/RadioButtonSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/AdvancedTextLayoutFormatStyles.as" copyfrom-rev="7910" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/AdvancedInheritingTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacTitleBarSkin.mxml</path>

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

--- frameworks/projects/framework/src/mx/styles/StyleProxy.as
+++ frameworks/projects/framework/src/mx/styles/StyleProxy.as
@@ -426,7 +426,21 @@
     //
     //--------------------------------------------------------------------------

-    /**
+	/**
+	 *  @copy mx.styles.IAdvancedStyleClient#stylesInitialized()
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
+	 */
+	public function stylesInitialized():void
+	{
+		if (_advancedSource)
+			_advancedSource.stylesInitialized();
+	}
+
+	/**
      *  @copy mx.styles.IAdvancedStyleClient#matchesCSSState()
      *
      *  @langversion 3.0


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

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

 package mx.utils
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8679
Author:   jimurphy@adobe.com
Date:     2009-07-20T13:23:31.007823Z

Log Message:
-----------
These are Asdoc edit from 3.x rev 8623.  I somehow missed committing these when they were supposed to be committed during my previous merge.

bug: no
qa: no
doc: no
checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Consumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/CallResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/HTTPRequestMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/Responder.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/XMLLoadEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/IResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Producer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncToken.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/WSDLLoadEvent.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/events/XMLLoadEvent.as
+++ frameworks/projects/rpc/src/mx/rpc/events/XMLLoadEvent.as
@@ -75,7 +75,9 @@
     public var location:String;

     /**
-     * Returns a copy of this XMLLoadEvent object.
+     *  Returns a copy of this XMLLoadEvent object.
+     *
+     *  @return A copy of this XMLLoadEvent object.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -88,7 +90,9 @@
     }

     /**
-     * Returns a String representation of this XMLLoadEvent object.
+     *  Returns a String representation of this XMLLoadEvent object.
+     *
+     *  @return A String representation of this XMLLoadEvent object.
      *
      *  @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@1274527 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/rpc/xml/DecodingContext.as
+++ frameworks/projects/rpc/src/mx/rpc/xml/DecodingContext.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: 5098
Author:   gauravj@adobe.com
Date:     2009-02-27T02:21:27.489350Z

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:
--------------
151 paths were modified

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

--- frameworks/projects/spark/src/spark/components/VSlider.as
+++ frameworks/projects/spark/src/spark/components/VSlider.as
@@ -26,6 +26,11 @@
  *  The FxVSlider class defines a vertical slider component.
  *
  *  @includeExample examples/FxVSliderExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class FxVSlider extends FxSlider
 {
@@ -39,6 +44,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function FxVSlider()
     {
@@ -53,6 +63,11 @@

     /**
      *  The size of the track, which equals the height of the track.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     override protected function get trackSize():Number
         {
@@ -68,6 +83,11 @@

     /**
      *  The size of the thumb button, which equals the height of the thumb button.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     override protected function calculateThumbSize():Number
     {
@@ -89,6 +109,11 @@
      *
      *  @param thumbPos A number representing the new position of
      *  the thumb button in the control.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     override protected function positionThumb(thumbPos:Number):void
     {
@@ -126,6 +151,11 @@
      *  @param localY The y position relative to the track.
      *
      *  @return The position of the thumb button.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     override protected function pointToPosition(localX:Number,
                                                 localY:Number):Number
@@ -143,6 +173,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     override protected function pointClickToPosition(localX:Number,
                                                      localY:Number):Number


Transferred from the Adobe Open Source Subversion Repository

Revision: 5257
Author:   jszeto@adobe.com
Date:     2009-03-11T22:12:50.289894Z

Log Message:
-----------
Flex SDK Bug Fixes

SDK-19314 Arrow keys which move a slider's thumb also scroll the player window.

If we handle an arrow key or HOME/END, then we stop it from propagating.

SDK-19443 FxHSlider doesnt position tooltip/datatip correctly when on the right edge of the flex app

Added logic to ensure that the dataTip stays in the bounds of the screen

SDK-19384 @review tags are appearing before asdoc descriptions, causing empty ASDoc tooltips in Flex Builder

Removed all occurrences of @review since it is no longer used.

QE Notes: n/a
Doc Notes: n/a
Bugs: SDK-19314, SDK-19443, SDK-19384
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/DropDownBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/VSlider.as
+++ frameworks/projects/spark/src/spark/components/VSlider.as
@@ -14,6 +14,7 @@

 import flash.display.DisplayObject;
 import flash.geom.Point;
+import flash.geom.Rectangle;

 import mx.components.baseClasses.FxSlider;
 import mx.core.UIComponent;
@@ -201,14 +202,24 @@
 			var relY:Number = thumb.y + (thumb.height - tipAsDisplayObject.height) / 2;
 	        var o:Point = new Point(dataTipOriginalPosition.x, relY);
 	        var r:Point = localToGlobal(o);
+
+			// Get the screen bounds
+			var screenBounds:Rectangle = systemManager.getVisibleApplicationRect();
+			// Get the tips bounds. We only care about the dimensions.
+			var tipBounds:Rectangle = tipAsDisplayObject.getBounds(tipAsDisplayObject.parent);
+
+			// Make sure the tip doesn't exceed the bounds of the screen
+			r.x = Math.floor( Math.max(screenBounds.left,
+							  	Math.min(screenBounds.right - tipBounds.width, r.x)));
+			r.y = Math.floor( Math.max(screenBounds.top,
+								Math.min(screenBounds.bottom - tipBounds.height, r.y)));
+
 			r = tipAsDisplayObject.parent.globalToLocal(r);
-
-			// TODO (jszeto) Change to use ILayoutElement.setLayoutBoundsPosition?
-        	tipAsDisplayObject.x = Math.floor(r.x < 0 ? 0 : r.x);
-        	tipAsDisplayObject.y = Math.floor(r.y < 0 ? 0 : r.y);
+        	tipAsDisplayObject.x = r.x;
+        	tipAsDisplayObject.y = r.y;
     	}
     }

 }

-}+}


fixed bug in getItems()

fixed bug in getItems()

--- WeaveData/src/weave/utils/VectorUtils.as
+++ WeaveData/src/weave/utils/VectorUtils.as
@@ -497,7 +497,8 @@
 				else
 					output[keyValue] = item;
 			}
-			output.length = keys ? keys.length : 0;
+			if (output is Array)
+				output.length = keys ? keys.length : 0;

 			return output;
 		}


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

--- frameworks/projects/spark/src/spark/effects/easing/EaseInOutBase.as
+++ frameworks/projects/spark/src/spark/effects/easing/EaseInOutBase.as
@@ -1,13 +1,3 @@
-		////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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.effects.easing
 {
 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 4958
Author:   rfrishbe@adobe.com
Date:     2009-02-13T23:07:46.243121Z

Log Message:
-----------
Change the initialization sequence of FxComponent and Group.  Basically now children (including the skin) should get created at createChildren() time and follow the correct lifecycle pattern.  Unfortunately, this change got mingled in with all my PARB changes, so I'm submitting a bunch of PARB changes for Group, DataGroup, FxContainer, and FxDataContainer, outlined below:

1.     New event classes/names for Group/FxContainer and DataGroup ("elementAdd" and "elementRemove" event of type ElementExistenceEvent for Group/FxContainer and "rendererAdd" and "rendererRemove" event of type RendererExistenceEvent for DataGroup). It was just one event class of ItemExistenceChangedEvent before.
2.     LayoutBase.clipContent->clipAndEnableScrolling (same with IViewport.clipContent and GroupBase.clipContent)
3.     GroupBase.getLayoutELementAt()->getElementAt()
4.     GroupBase.numLayoutElements -> numElements.
5.     LayoutBase.virtualLayout -> useVirtualLayout
6.     ScrollUnit constants are now changed to be uints instead of typed as ScrollUnit.  This means the signature for getHorizontalScrollPositionDelta(unit:ScrollUnit):Number has changed to getHorizontalScrollPositionDelta(scrollUnit:uint):Number (and ditto for getVerticalScrollPositionDelta())
7.  DataGroup.getRendererForItemAt() -> getElementAt()
8.  DataGroup.getItemIndexForRenderer() -> getElementIndex()

Other changes:
 - Change IVisualElement interface so that it's smaller now.  It also extends ILayoutElement now.  The properties removed from IVisualElement are: rotation, rotationX, rotationY, rotationZ, transformX, transformY, offsets, x, y, z, scaleX, scaleY, scaleZ, explicitWidth, explicitMinWidth, explicitMaxWidth, explicitHeight, explicitMinHeight, explicitMaxHeight)
-  Fix in DataGroup so we don’t remove/add elements if we’re gonna do it later anyways.  I also need to do some other work in here around cleaning up of renderers.
- AddItems fix around handling IVisualElementContainers more effeciently
- get mxmlContent now returns a copy of the Array rather than the one we're using internally
- Had to update mustella since there was special case logic for dealing with getLayoutElementAt().  I added this logic for getElementAt(), which replaces that method.

QE Notes: Thanks for changing all the tests and working on the cyclone
Doc Notes: Made some ASDoc changes to some core classes to move the comments into the interfaces.  I did update the comments a bit as well.
Bugs: SDK-18115, SDK-19004
Reviewer: Jason, Glenn, Hans for initialization sequence change and Hans for all PARB changes
tests: checkintests, all mustella tests

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as" copyfrom-rev="4812" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ElementExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/RendererExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/ScrollUnit.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/mustella.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/events/ElementExistenceEvent.as
+++ frameworks/projects/spark/src/spark/events/ElementExistenceEvent.as
@@ -14,11 +14,13 @@

 import flash.events.Event;

+import mx.core.IVisualElement;
+
 /**
- *  Represents events that are dispatched when an item of a Group
+ *  Represents events that are dispatched when an element of a Group
  *  is created or destroyed.
  */
-public class ItemExistenceChangedEvent extends Event
+public class ElementExistenceEvent extends Event
 {
     include "../core/Version.as";

@@ -29,9 +31,9 @@
 	//--------------------------------------------------------------------------

 	/**
-	 *  The ItemExistenceChangedEvent.ITEM_ADD constant
+	 *  The ElementExistenceEvent.ELEMENT_ADD constant
 	 *  defines the value of the type property of the event
-	 *  object for an itemAdd event.
+	 *  object for an elementAdd event.
 	 *
      *
The properties of the event object have the following values:

 	 *

@@ -42,22 +44,24 @@
      *       event listener that handles the event. For example, if you use
      *       myButton.addEventListener() to register an event listener,
      *       myButton is the value of the currentTarget.

-	 *
relatedObject	Contains a reference
-     *         to the item that was created.

+	 *
element	Contains a reference
+     *         to the visual element that was added.

+     *
index	The index where the
+     *       visual element that was added.

      *
target	The Object that dispatched the event;
      *       it is not always the Object listening for the event.
      *       Use the currentTarget property to always access the
      *       Object listening for the event.

 	 *

 	 *
-     *  @eventType itemAdd
+     *  @eventType elementAdd
 	 */
-	public static const ITEM_ADD:String = "itemAdd";
+	public static const ELEMENT_ADD:String = "elementAdd";

 	/**
-	 *  The ItemExistenceChangedEvent.ITEM_REMOVE constant
+	 *  The ElementExistenceEvent.ELEMENT_REMOVE constant
 	 *  defines the value of the type property of the event
-	 *  object for an itemRemove event.
+	 *  object for an elementRemove event.
 	 *
      *
The properties of the event object have the following values:

 	 *

@@ -68,17 +72,19 @@
      *       event listener that handles the event. For example, if you use
      *       myButton.addEventListener() to register an event listener,
      *       myButton is the value of the currentTarget.

-	 *
relatedObject	Contains a reference
-     *        to the item that is about to be removed.

+	 *
element	Contains a reference
+     *        to the visual element that is about to be removed.

+     *
index	The index where the
+     *       visual element that is being removed.

      *
target	The Object that dispatched the event;
      *       it is not always the Object listening for the event.
      *       Use the currentTarget property to always access the
      *       Object listening for the event.

 	 *

 	 *
-     *  @eventType itemRemove
+     *  @eventType elementRemove
 	 */
-	public static const ITEM_REMOVE:String = "itemRemove";
+	public static const ELEMENT_REMOVE:String = "elementRemove";

 	//--------------------------------------------------------------------------
 	//
@@ -95,23 +101,20 @@
 	 *
 	 *  @param cancelable Specifies whether the behavior associated with the event can be prevented.
 	 *
-	 *  @param relatedObject Reference to the item that was created or destroyed.
+	 *  @param element Reference to the element that was added or removed.
 	 *
-	 *  @param index The index where the item was created or destroyed.
-	 *
-	 *  @param renderer The renderer that was used for the item (if applicable)
+	 *  @param index The index where the element was added or removed.
 	 */
-	public function ItemExistenceChangedEvent(
+	public function ElementExistenceEvent(
 								type:String, bubbles:Boolean = false,
 								cancelable:Boolean = false,
-								relatedObject:Object = null,
-								index:int = -1, renderer:Object = null)
+								element:IVisualElement = null,
+								index:int = -1)
 	{
 		super(type, bubbles, cancelable);

-		this.relatedObject = relatedObject;
+		this.element = element;
 		this.index = index;
-		this.renderer = renderer;
 	}

 	//--------------------------------------------------------------------------
@@ -125,27 +128,18 @@
     //----------------------------------

     /**
-     *  The index where the item was created or destroyed.
+     *  The index where the element was added or removed
      */
     public var index:int;

 	//----------------------------------
-	//  relatedObject
+	//  element
 	//----------------------------------

 	/**
-	 *  Reference to the item that was created or destroyed.
+	 *  Reference to the visual element that was added or removed.
 	 */
-	public var relatedObject:Object;
-
-    //----------------------------------
-    //  renderer
-    //----------------------------------
-
-    /**
-     *  The item renderer that was created or destroyed (if applicable).
-     */
-    public var renderer:Object;
+	public var element:IVisualElement;

 	//--------------------------------------------------------------------------
 	//
@@ -158,8 +152,8 @@
 	 */
     override public function clone():Event
     {
-        return new ItemExistenceChangedEvent(type, bubbles, cancelable,
-                                             relatedObject, index, renderer);
+        return new ElementExistenceEvent(type, bubbles, cancelable,
+                                         element, index);
     }
 }


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

--- frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as
+++ frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.formatters
 {