Transferred from the Adobe Open Source Subversion Repository

Revision: 11934
Author:   cframpto@adobe.com
Date:     2009-11-18T15:01:08.366461Z

Log Message:
-----------
Remove dependencies RichEditableText api calls had on using an interactionManager.  API calls can be done regardless of the values of editable and selectable which just apply to interactive editing.

The api calls are: insertText, appendText, selectRange, selectAll, setFormatOfRange, getFormatOfRange.  The first 4 methods can change the selection and when that occurs, a selectionChange event will be dispatched.

The editingMode should not be changed any event handler while in the middle of a text operation.  This includes the selectionChange event.

I may make a few more tweaks to this code as I continue to test and find edge conditions.

QE notes:
Doc notes: editingMode should not be changed by any event handler while in the middle of a text operation
Bugs: SDK-23638
Reviewer: Gordon
Tests run: checkintests, TextArea, TextInput, NumericStepper, ComboBox
Is noteworthy for integration: yes

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as
@@ -24,11 +24,23 @@
 import flashx.textLayout.container.ContainerController;
 import flashx.textLayout.container.TextContainerManager;
 import flashx.textLayout.edit.EditingMode;
+import flashx.textLayout.edit.ElementRange;
 import flashx.textLayout.edit.IEditManager;
 import flashx.textLayout.edit.ISelectionManager;
 import flashx.textLayout.edit.SelectionFormat;
+import flashx.textLayout.edit.SelectionManager;
+import flashx.textLayout.edit.SelectionState;
+import flashx.textLayout.elements.FlowLeafElement;
 import flashx.textLayout.elements.IConfiguration;
+import flashx.textLayout.elements.ParagraphElement;
 import flashx.textLayout.elements.TextFlow;
+import flashx.textLayout.events.SelectionEvent;
+import flashx.textLayout.formats.Category;
+import flashx.textLayout.formats.ITextLayoutFormat;
+import flashx.textLayout.formats.TextLayoutFormat;
+import flashx.textLayout.operations.ApplyFormatOperation;
+import flashx.textLayout.operations.InsertTextOperation;
+import flashx.textLayout.property.Property;
 import flashx.textLayout.tlf_internal;
 import flashx.undo.IUndoManager;
 import flashx.undo.UndoManager;
@@ -299,6 +311,267 @@

     /**
      *  @private
+     *  To apply a format to a selection in a textFlow without using the
+     *  selection manager.
+     */
+    mx_internal function applyFormatOperation(
+                            leafFormat:ITextLayoutFormat,
+                            paragraphFormat:ITextLayoutFormat,
+                            containerFormat:ITextLayoutFormat,
+                            anchorPosition:int,
+                            activePosition:int):Boolean
+    {
+        // Nothing to do.
+        if (anchorPosition == -1 || activePosition == -1)
+            return true;
+
+        var textFlow:TextFlow = getTextFlowWithComposer();
+
+        var operationState:SelectionState =
+            new SelectionState(textFlow, anchorPosition, activePosition);
+
+        var op:ApplyFormatOperation =
+            new ApplyFormatOperation(
+                operationState, leafFormat, paragraphFormat, containerFormat);
+
+        //ToDo: remove generations if not needed
+
+        //var beforeGeneration:uint = textFlow.generation;
+        //op.setGenerations(beforeGeneration, 0);
+
+        var success:Boolean = op.doOperation();
+        if (success)
+        {
+            textFlow.normalize();
+
+            // This has to be done after the normalize, because normalize
+            // increments the generation number.
+            //op.setGenerations(beforeGeneration, textFlow.generation);
+
+            textFlow.flowComposer.updateAllControllers();
+        }
+
+        return success;
+    }
+
+    /**
+     *  @private
+     *  To get the format of a character without using a SelectionManager.
+     *  The method should be kept in sync with the version in the
+     *  SelectionManager.
+     */
+    mx_internal function getCommonCharacterFormat(
+                                        anchorPosition:int,
+                                        activePosition:int):ITextLayoutFormat
+    {
+        if (anchorPosition == -1 || activePosition == -1)
+            return null;
+
+        var textFlow:TextFlow = getTextFlowWithComposer();
+
+        var absoluteStart:int = getAbsoluteStart(anchorPosition, activePosition);
+        var absoluteEnd:int = getAbsoluteEnd(anchorPosition, activePosition);
+
+        var selRange:ElementRange =
+            ElementRange.createElementRange(textFlow, absoluteStart, absoluteEnd);
+
+        var leaf:FlowLeafElement = selRange.firstLeaf;
+        var attr:TextLayoutFormat = new TextLayoutFormat(leaf.computedFormat);
+
+        // If there is a insertion point, see if there is an interaction
+        // manager with a pending point format.
+        if (anchorPosition != -1 && anchorPosition == activePosition)
+        {
+            if (textFlow.interactionManager)
+            {
+                var selectionState:SelectionState =
+                    textFlow.interactionManager.getSelectionState();
+                if (selectionState.pointFormat)
+                    attr.apply(selectionState.pointFormat);
+            }
+        }
+        else
+        {
+            for (;;)
+            {
+                if (leaf == selRange.lastLeaf)
+                    break;
+                leaf = leaf.getNextLeaf();
+                attr.removeClashing(leaf.computedFormat);
+            }
+        }
+
+        return Property.extractInCategory(
+                    TextLayoutFormat,
+                    TextLayoutFormat.description,
+                    attr, Category.CHARACTER) as ITextLayoutFormat;
+    }
+
+    /**
+     *  @private
+     *  To get the format of the container without using a SelectionManager.
+     *  The method should be kept in sync with the version in the
+     *  SelectionManager.
+     */
+    mx_internal function getCommonContainerFormat():ITextLayoutFormat
+    {
+        var textFlow:TextFlow = getTextFlowWithComposer();
+
+        var controller:ContainerController =
+            textFlow.flowComposer.getControllerAt(0);
+
+        return Property.extractInCategory(
+                    TextLayoutFormat, TextLayoutFormat.description,
+                    controller.computedFormat,
+                    Category.CONTAINER) as ITextLayoutFormat;
+    }
+
+    /**
+     *  @private
+     *  To get the format of a paragraph without using a SelectionManager.
+     *  The method should be kept in sync with the version in the
+     *  SelectionManager.
+     */
+    mx_internal function getCommonParagraphFormat(
+                                        anchorPosition:int,
+                                        activePosition:int):ITextLayoutFormat
+    {
+        if (anchorPosition == -1 || activePosition == -1)
+            return null;
+
+        var textFlow:TextFlow = getTextFlowWithComposer();
+
+        var absoluteStart:int = getAbsoluteStart(anchorPosition, activePosition);
+        var absoluteEnd:int = getAbsoluteEnd(anchorPosition, activePosition);
+
+        var selRange:ElementRange =
+            ElementRange.createElementRange(textFlow, absoluteStart, absoluteEnd);
+
+        var para:ParagraphElement = selRange.firstParagraph;
+        var attr:TextLayoutFormat = new TextLayoutFormat(para.computedFormat);
+        for (;;)
+        {
+            if (para == selRange.lastParagraph)
+                break;
+
+            para = textFlow.findAbsoluteParagraph(
+                            para.getAbsoluteStart() + para.textLength);
+            attr.removeClashing(para.computedFormat);
+        }
+
+        return Property.extractInCategory(TextLayoutFormat,
+                    TextLayoutFormat.description,
+                    attr, Category.PARAGRAPH) as ITextLayoutFormat;
+    }
+
+    /**
+     *  @private
+     *  Insert or append text to the textFlow without using an EditManager.
+     *  If there is a SelectionManager or EditManager its selection will be
+     *  updated at the end of the operation to keep it in sync.
+     */
+    mx_internal function insertTextOperation(insertText:String,
+                                             anchorPosition:int,
+                                             activePosition:int):Boolean
+    {
+        // No insertion point.
+        if (anchorPosition == -1 || activePosition == -1)
+            return false;
+
+        var textFlow:TextFlow = getTextFlowWithComposer();
+
+        var absoluteStart:int = getAbsoluteStart(anchorPosition, activePosition);
+        var absoluteEnd:int = getAbsoluteEnd(anchorPosition, activePosition);
+
+        var operationState:SelectionState =
+            new SelectionState(textFlow, absoluteStart, absoluteEnd);
+
+        var op:InsertTextOperation =
+            new InsertTextOperation(operationState, insertText);
+
+        // Generations don't seem to be used in this code path since we
+        // aren't doing composite, merge or undo operations so they were
+        // optimized out.
+
+        var success:Boolean = op.doOperation();
+        if (success)
+        {
+            textFlow.normalize();
+
+            textFlow.flowComposer.updateAllControllers();
+
+            var insertPt:int = absoluteEnd - (absoluteEnd - absoluteStart) +
+                                    + insertText.length;
+
+            // No point format.
+            var selectionState:SelectionState =
+                new SelectionState(textFlow, insertPt, insertPt);
+
+            // If there is a selection manager, keep the selection in
+            // sync and clear the point format as the EditManager insertText
+            // operation does.
+            if (textFlow.interactionManager)
+            {
+                var selectionManager:SelectionManager =
+                    SelectionManager(textFlow.interactionManager);
+
+                selectionManager.setSelectionState(selectionState);
+            }
+
+            var selectionEvent:SelectionEvent =
+                new SelectionEvent(SelectionEvent.SELECTION_CHANGE,
+                                   false, false, selectionState);
+
+            textFlow.dispatchEvent(selectionEvent);
+
+            scrollToRange(insertPt, insertPt);
+        }
+
+        return success;
+    }
+
+    mx_internal function getTextFlowWithComposer():TextFlow
+    {
+        var textFlow:TextFlow = getTextFlow();
+
+        // Make sure there is a text flow with a flow composer.  There will
+        // not be an interaction manager if editingMode is read-only.  If
+        // there is an interaction manager flush any pending inserts into the
+        // text flow.
+        if (composeState != TextContainerManager.COMPOSE_COMPOSER)
+            convertToTextFlowWithComposer();
+        else if (textFlow.interactionManager)
+            textFlow.interactionManager.flushPendingOperations();
+
+        return textFlow;
+    }
+
+    /**
+     *  @private
+     */
+    private function getAbsoluteStart(anchorPosition:int, activePosition:int):int
+    {
+        return (anchorPosition < activePosition) ?
+                    anchorPosition : activePosition;
+    }
+
+    /**
+     *  @private
+     */
+    private function getAbsoluteEnd(anchorPosition:int, activePosition:int):int
+    {
+        return (anchorPosition > activePosition) ?
+                    anchorPosition : activePosition;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
      */
     override public function focusInHandler(event:FocusEvent):void
     {
@@ -403,6 +676,12 @@
         textDisplay.systemManager.getSandboxRoot().removeEventListener(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, mouseMoveSomewhereHandler);
     }

+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
     private function mouseUpSomewhereHandler(event:Event):void
     {
         mouseUpSomewhere(event);


Track BEF failures.

Track BEF failures.

--- HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPStreamSource.as
+++ HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPStreamSource.as
@@ -424,6 +424,27 @@
 					else
 					{
 						_request = _indexHandler.getNextFile(_qualityLevel);
+					}
+
+					// Count best effort fetches in a row.
+					if(_request.kind == HTTPStreamRequestKind.BEST_EFFORT_DOWNLOAD)
+					{
+						_bestEffortFetchRunCount++;
+
+						CONFIG::LOGGING
+						{
+							logger.debug("Encountered " + _bestEffortFetchRunCount + " best effort fetch in a row.");
+						}
+					}
+					else if(_request.kind == HTTPStreamRequestKind.DOWNLOAD)
+					{
+						CONFIG::LOGGING
+						{
+							if(_bestEffortFetchRunCount > 0)
+								logger.debug("Got normal request after " + _bestEffortFetchRunCount + " best effort fetches in a row.");
+						}
+
+						_bestEffortFetchRunCount = 0;
 					}

 					// Log the request.
@@ -1069,6 +1090,8 @@

 		private var _isLiveStalled:Boolean = false;

+		private var _bestEffortFetchRunCount:int = 0;
+
 		CONFIG::LOGGING
 		{
 			private static const logger:Logger = Log.getLogger("org.osmf.net.httpstreaming.HLSHTTPStreamSource");


Transferred from the Adobe Open Source Subversion Repository

Revision: 17206
Author:   jszeto@adobe.com
Date:     2010-08-06T00:21:03.791589Z

Log Message:
-----------
Mobile Button Skin Changes

Refactor ButtonSkin into MobileSkin, ButtonSkinBase and ButtonSkin.

MobileSkin has logic for dealing with currentState
ButtonSkinBase has the label and icon placement logic (and is essentially a borderless skin)
ButtonSkin adds the FXG skins and the gradient background

- Text is now bold
- Emphasized buttons use ButtonSkin instead of DefaultButtonSkin and don't show any emphasized state (we aren't supporting emphasized buttons for mobile)
- Optimized the FXG skin creation
- Moved iconClass and labelPlacement from Button to ButtonBase.
- Updated padding values for label to match spec
- Removed the spark ButtonLabelPlacement class and moved the mx one from mx to frameworks swc

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

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/MobileSkin.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/ButtonLabelPlacement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ButtonLabelPlacement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/ButtonLabelPlacement.as" copyfrom-rev="17195" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/ButtonLabelPlacement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as
@@ -11,30 +11,14 @@

 package spark.skins.mobile
 {
+    import flash.display.DisplayObject;
+    import flash.display.GradientType;
+    import flash.geom.Matrix;

-import flash.display.DisplayObject;
-import flash.display.GradientType;
-import flash.events.Event;
-import flash.events.EventDispatcher;
-import flash.geom.Matrix;
-import flash.text.TextField;
-import flash.text.TextFormat;
-import flash.text.TextFormatAlign;
-import flash.text.TextLineMetrics;
-
-import mx.core.IUITextField;
-import mx.core.UIComponent;
-import mx.core.UITextField;
-import mx.core.mx_internal;
-import mx.states.SetProperty;
-import mx.states.State;
-import mx.utils.ColorUtil;
-
-import spark.components.Button;
-import spark.components.supportClasses.ButtonLabelPlacement;
-
-use namespace mx_internal;
-
+    import mx.states.SetProperty;
+    import mx.states.State;
+    import mx.utils.ColorUtil;
+
 /*
     ISSUES:
     - should we support textAlign
@@ -43,17 +27,20 @@
     - need a downIconClass style?
     - should the label be UITextField or another text class?

+    TODO:
+    - remove spark ButtonLabelPlacement and move mx ButtonLabelPlacement
 */
 /**
- *  Actionscript based skin for mobile applications. The skin supports iconClass and labelPlacement. It uses
- *  a couple of FXG classes to implement the vector drawing.
+ *  Actionscript based skin for mobile applications. The skin supports
+ *  iconClass and labelPlacement. It uses a couple of FXG classes to
+ *  implement the vector drawing.
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class ButtonSkin extends UIComponent
+public class ButtonSkin extends ButtonSkinBase
 {

     //--------------------------------------------------------------------------
@@ -64,14 +51,6 @@
     public function ButtonSkin()
     {
         super();
-
-        states = [
-            new State({name:"up"}),
-            new State({name:"over"}),
-            new State({name:"down"}),
-            new State({name:"disabled",
-                overrides:[new SetProperty(this, "alpha", 0.5)]})
-        ];
     }

     //--------------------------------------------------------------------------
@@ -79,63 +58,15 @@
     //  Variables
     //
     //--------------------------------------------------------------------------
+    private var bgImg:DisplayObject;

-    private var textField:IUITextField;
-    private var textFieldShadow:IUITextField;
-    private var bgImg:DisplayObject;
+    private var changeFXGSkin:Boolean = false;

     private static var matrix:Matrix = new Matrix();

-    // TODO (jszeto) move to const values
-    // TODO (jszeto) add comments
-    private static var alphas:Array = [1, 1, 1];
-    private static var ratios:Array = [0, 127.5, 255];
-    // TODO (jszeto) move to local vars
-    private static var colors:Array = [];
-
-    // Holds the icon
-    private var iconDisplay:DisplayObject;
-
-    // TODO (jszeto) Either static consts or styles
-    private var gap:int = 10;
-    private var paddingLeft:int = 10;
-    private var paddingRight:int = 10;
-    private var paddingTop:int = 10;
-    private var paddingBottom:int = 10;
-
-    private static var TEXT_WIDTH_PADDING:Number = UITextField.TEXT_WIDTH_PADDING + 1;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden properties
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * @copy spark.skins.spark.ApplicationSkin#hostComponent
-     */
-    public var hostComponent:Button; // SkinnableComponent will popuplate
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  currentState
-    //----------------------------------
-
-    override public function set currentState(value:String):void
-    {
-        if (value == currentState)
-            return;
-
-        super.currentState = value;
-
-        // TODO (jszeto) maybe call invalidateDisplayList instead of applyFXG
-        applyFXG();
-    }
+    // Used for gradient background
+    private static const alphas:Array = [1, 1, 1];
+    private static const ratios:Array = [0, 127.5, 255];

     //--------------------------------------------------------------------------
     //
@@ -145,171 +76,35 @@

     /**
      *  @private
-     */
-    override protected function createChildren():void
+     */
+    override protected function commitCurrentState():void
+    {
+        // TODO (jszeto) Don't use previousState and use "is" checks in applyFXG
+
+        // Over and up states are the same
+        if ((currentState == "down" &&
+            (previousState == "up" || previousState == "over")) ||
+            (previousState == "down" &&
+                (currentState == "up" || currentState == "over")))
+        {
+            changeFXGSkin = true;
+            invalidateDisplayList();
+        }
+    }
+
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
-        // Set up text fields only if we have a hostComponent
-        // TODO (jszeto) Do we need to check for this?
-        if (hostComponent != null)
-        {
-            textField = IUITextField(createInFontContext(UITextField));
-            textFieldShadow = IUITextField(createInFontContext(UITextField));
-
-            // TODO (jszeto) Ask XD if shadow color is dependant upon text color
-            textFieldShadow.setColor(0x000000);
-            textFieldShadow.alpha = .20;
-
-            addChild(UITextField(textFieldShadow));
-            addChild(UITextField(textField));
-
-            hostComponent.addEventListener("contentChange", hostComponent_contentChangeHandler);
+        var colors:Array = [];
+
+        graphics.clear();
+
+        // Size the FXG background
+        if (changeFXGSkin)
+        {
+            applyFXG();
+            changeFXGSkin = false;
         }

-        var iconClass:Class = getStyle("iconClass");
-
-        if (iconClass)
-        {
-            // Should be a bitmap
-            iconDisplay = new iconClass();
-            addChild(iconDisplay);
-        }
-
-        applyFXG();
-    }
-
-    /**
-     *  @private
-     */
-    override public function styleChanged(styleProp:String):void {
-        // TODO: Refactor to check whether styleProp is one of three following value types and update
-        // the styles accordingly:
-        // 1) Individual style name (e.g. "fontSize"). 2) "styleName". 3) null.
-        // If 1) reset only individual style. If 2) or 3), reset all styles
-
-        // Only deal with text if a hostComponent exists and text fields are not empty
-        /*if(hostComponent != null && textField != null && textFieldShadow != null) {
-            var tf:TextFormat = textField.defaultTextFormat;
-
-            tf = setTextFormat(tf);
-
-            //textField.setTextFormat(tf);
-            tf.color = 0x000000;
-            textFieldShadow.setTextFormat(tf);
-            textFieldShadow.alpha = .20;
-        }*/
-
-        // TODO Reapply the color to the textFieldShadow
-        // TODO (jszeto) Add check for change to iconClass
-
-        super.styleChanged(styleProp);
-    }
-
-    /**
-     *  @private
-     */
-    override protected function commitProperties():void
-    {
-        super.commitProperties();
-
-        // TODO (jszeto) is this necessary? Won't the contentChange handler take care of this?
-        updateLabel();
-    }
-
-    /**
-     *  @private
-     */
-    override protected function measure():void
-    {
-        super.measure();
-
-        var labelPlacement:String = getStyle("labelPlacement");
-        if (labelPlacement == null)
-            labelPlacement = ButtonLabelPlacement.RIGHT;
-
-        var textWidth:Number = 0;
-        var textHeight:Number = 0;
-        var lineMetrics:TextLineMetrics;
-
-        if (hostComponent && hostComponent.label != "")
-        {
-            lineMetrics = measureText(hostComponent.label);
-            textWidth = lineMetrics.width + TEXT_WIDTH_PADDING;
-            textHeight = lineMetrics.height + UITextField.TEXT_HEIGHT_PADDING;
-        }
-        else
-        {
-            lineMetrics = measureText("Wj");
-            textWidth = lineMetrics.width + TEXT_WIDTH_PADDING;
-            textHeight = lineMetrics.height + UITextField.TEXT_HEIGHT_PADDING;
-        }
-
-        var iconWidth:Number = iconDisplay ? iconDisplay.width : 0;
-        var iconHeight:Number = iconDisplay ? iconDisplay.height : 0;
-        var w:Number = 0;
-        var h:Number = 0;
-
-        if (labelPlacement == ButtonLabelPlacement.LEFT ||
-            labelPlacement == ButtonLabelPlacement.RIGHT)
-        {
-            w = textWidth + iconWidth;
-            if (textWidth && iconWidth)
-                w += gap; //getStyle("horizontalGap");
-            h = Math.max(textHeight, iconHeight);
-        }
-        else
-        {
-            w = Math.max(textWidth, iconWidth);
-            h = textHeight + iconHeight;
-            if (textHeight && iconHeight)
-                h += gap; // getStyle("verticalGap");
-        }
-
-        // Add padding. !!!Need a hack here to only add padding if we don't
-        // have text or icon. This is required to make small buttons (like scroll
-        // arrows and numeric stepper buttons) look correct.
-        if (textWidth || iconWidth)
-        {
-            w += paddingLeft + paddingRight; //getStyle("paddingLeft") + getStyle("paddingRight");
-            h += paddingTop + paddingBottom; //getStyle("paddingTop") + getStyle("paddingBottom");
-        }
-
-        measuredMinWidth = measuredWidth = w;
-        measuredMinHeight = measuredHeight = h;
-    }
-
-    /**
-     *  @private
-     */
-    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
-    {
-        graphics.clear();
-        super.updateDisplayList(unscaledWidth, unscaledHeight);
-
-        var labelWidth:Number = 0;
-        var labelHeight:Number = 0;
-
-        var labelX:Number = 0;
-        var labelY:Number = 0;
-
-        var iconWidth:Number = 0;
-        var iconHeight:Number = 0;
-
-        var iconX:Number = 0;
-        var iconY:Number = 0;
-
-        var horizontalGap:Number = 0;
-        var verticalGap:Number = 0;
-
-        var labelPlacement:String = getStyle("labelPlacement");
-        if (labelPlacement == null)
-            labelPlacement = ButtonLabelPlacement.RIGHT;
-
-        var textWidth:Number = 0;
-        var textHeight:Number = 0;
-
-        var lineMetrics:TextLineMetrics;
-
-        // Size the FXG background
         if (bgImg != null)
         {
             // TODO (jszeto) Figure out why this is .5 Should it be 0?
@@ -332,205 +127,27 @@
         graphics.drawRect(1, 1, unscaledWidth - 1, unscaledHeight - 2);
         graphics.endFill();

-        if (hostComponent && hostComponent.label != "")
-        {
-            lineMetrics = measureText(hostComponent.label);
-            textWidth = lineMetrics.width + TEXT_WIDTH_PADDING;
-            textHeight = lineMetrics.height + UITextField.TEXT_HEIGHT_PADDING;
-        }
-        else
-        {
-            lineMetrics = measureText("Wj");
-            textWidth = lineMetrics.width + TEXT_WIDTH_PADDING;
-            textHeight = lineMetrics.height + UITextField.TEXT_HEIGHT_PADDING;
-        }
-
-        var textAlign:String = "center"; // getStyle("textAlign");
-        // Map new Spark values that might be set in a selector
-        // affecting both Halo and Spark components.
-        if (textAlign == "start")
-            textAlign = TextFormatAlign.LEFT;
-        else if (textAlign == "end")
-            textAlign = TextFormatAlign.RIGHT;
-
-        var viewWidth:Number = unscaledWidth;
-        var viewHeight:Number = unscaledHeight;
-
-        if (iconDisplay)
-        {
-            iconWidth = iconDisplay.width;
-            iconHeight = iconDisplay.height;
-        }
-
-        if (labelPlacement == ButtonLabelPlacement.LEFT ||
-            labelPlacement == ButtonLabelPlacement.RIGHT)
-        {
-            horizontalGap = gap;
-
-            if (iconWidth == 0 || textWidth == 0)
-                horizontalGap = 0;
-
-            if (textWidth > 0)
-            {
-                labelWidth =
-                    Math.max(Math.min(viewWidth - iconWidth - horizontalGap -
-                        paddingLeft - paddingRight, textWidth), 0);
-            }
-            else
-            {
-                labelWidth = 0;
-            }
-            labelHeight = Math.min(viewHeight, textHeight);
-
-            if (textAlign == "left")
-            {
-                labelX += paddingLeft;
-            }
-            else if (textAlign == "right")
-            {
-                labelX += (viewWidth - labelWidth - iconWidth -
-                    horizontalGap - paddingRight);
-            }
-            else // "center" -- default value
-            {
-                labelX += ((viewWidth - labelWidth - iconWidth -
-                    horizontalGap - paddingLeft - paddingRight) / 2) + paddingLeft;
-            }
-
-            if (labelPlacement == ButtonLabelPlacement.RIGHT)
-            {
-                labelX += iconWidth + horizontalGap;
-                iconX = labelX - (iconWidth + horizontalGap);
-            }
-            else
-            {
-                iconX  = labelX + labelWidth + horizontalGap;
-            }
-
-            iconY  = ((viewHeight - iconHeight - paddingTop - paddingBottom) / 2) + paddingTop;
-            labelY = ((viewHeight - labelHeight - paddingTop - paddingBottom) / 2) + paddingTop;
-        }
-        else
-        {
-            verticalGap = gap;
-
-            if (iconHeight == 0 || !hostComponent || hostComponent.label == "")
-                verticalGap = 0;
-
-            if (textWidth > 0)
-            {
-                labelWidth = Math.max(viewWidth - paddingLeft - paddingRight, 0);
-                labelHeight =
-                    Math.min(viewHeight - iconHeight - paddingTop - paddingBottom - verticalGap, textHeight);
-            }
-            else
-            {
-                labelWidth = 0;
-                labelHeight = 0;
-            }
-
-            labelX = paddingLeft;
-
-            if (textAlign == "left")
-            {
-                iconX += paddingLeft;
-            }
-            else if (textAlign == "right")
-            {
-                iconX += Math.max(viewWidth - iconWidth - paddingRight, paddingLeft);
-            }
-            else
-            {
-                iconX += ((viewWidth - iconWidth - paddingLeft - paddingRight) / 2) + paddingLeft;
-            }
-
-            if (labelPlacement == ButtonLabelPlacement.TOP)
-            {
-                labelY += ((viewHeight - labelHeight - iconHeight -
-                    paddingTop - paddingBottom - verticalGap) / 2) + paddingTop;
-                iconY += labelY + labelHeight + verticalGap;
-            }
-            else
-            {
-                iconY += ((viewHeight - labelHeight - iconHeight -
-                    paddingTop - paddingBottom - verticalGap) / 2) + paddingTop;
-                labelY += iconY + iconHeight + verticalGap;
-            }
-        }
-
-        textField.x = Math.round(labelX);
-        textField.y = Math.round(labelY);
-        textField.height = labelHeight;
-        textField.width = labelWidth;
-
-        textFieldShadow.x = Math.round(labelX);
-        textFieldShadow.y = Math.round(labelY + 1);
-        textFieldShadow.height = labelHeight;
-        textFieldShadow.width = labelWidth;
-
-        if (iconDisplay)
-        {
-            iconDisplay.x = Math.round(iconX);
-            iconDisplay.y = Math.round(iconY);
-        }
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    private function hostComponent_contentChangeHandler(event:Event):void
-    {
-        updateLabel();
+        // The label and icon should be placed on top of the FXG skins
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
     }

     /**
      *  @private
      */
-    private function updateLabel():void
-    {
-        if (hostComponent != null && textField)
-        {
-            textField.text = hostComponent.label;
-            textFieldShadow.text = hostComponent.label;
-            invalidateSize();
-        }
-    }
-
-    /**
-     *  @private
-     *  TODO (jszeto) fix up this logic
-     */
     private function applyFXG():void
     {
+        if (currentState == null)
+            return;
+
+        if (bgImg != null)
+            removeChild(bgImg);
+
         if (currentState == "down")
-        {
-            if (bgImg != null)
-                removeChild(bgImg);
             bgImg = new Button_bg_down();
-        }
-        else
-        {
-            if (!(bgImg is Button_bg_up))
-            {
-                if (bgImg != null)
-                    removeChild(bgImg);
-                bgImg = new Button_bg_up();
-            }
-        }
+        else if (currentState == "up" || currentState == "over")
+            bgImg = new Button_bg_up();

-        if (bgImg != null)
-        {
-            // Put the fxg background on the bottom
-            addChildAt(bgImg, 0);
-            invalidateDisplayList();
-        }
+        addChildAt(bgImg, 0);
     }
-
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3450
Author:   rfrishbe@adobe.com
Date:     2008-10-02T04:54:40.265411Z

Log Message:
-----------
Couple of changes to Group and DataGroup:

1.  Got rid of content_changing, content_changed, dataProvider_changing, and dataProvider_changed events.  The events both group and datagroup emit are the item add and item remove events.  Fixed up Selector, DataComponent, and ItemsComponent to not key off of these events anymore.

2.  Clean up Group's canShareDisplayObject from the blendMode change

3.  Fix up DataGroup to deal with a case where a GraphicElement's itemRenderer's group was holding on to the display object.  When the graphic element was pushed into another itemRenderer, we tried to remove the graphic element's display object from its parent, but calling removeChild() on a Group RTE's.  We need to revisit the fix here, and possibly add methods for removing display objects to Group, or don't RTE in Group on removeChild/addChild, or add some code so itemRenderer's can clean themselves up afterwards...at any rate, this fix will be revisited.

QE: Yes
Doc: Yes - event removed
Bugs: SDK-17135
Reviewer: Deepa

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/DataComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Selector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableContainer.as
@@ -24,18 +24,6 @@
 import mx.core.IDeferredInstance;
 import mx.core.IFactory;
 import mx.managers.IFocusManagerContainer;
-
-/**
- *  Dispatched prior to the component's content being changed. This is only
- *  dispatched when all content of the component is changing.
- */
-[Event(name="contentChanging", type="flex.events.FlexEvent")]
-
-/**
- *  Dispatched after the component's content has changed. This is only
- *  dispatched when all content of the component has changed.
- */
-[Event(name="contentChanged", type="flex.events.FlexEvent")]

 /**
  *  Sent after the content for this component has been created. With deferred
@@ -119,10 +107,6 @@
                     ItemExistenceChangedEvent.ITEM_ADD, contentGroup_itemAddedHandler);
                 _placeHolderGroup.addEventListener(
                     ItemExistenceChangedEvent.ITEM_REMOVE, contentGroup_itemRemovedHandler);
-                _placeHolderGroup.addEventListener(
-                    FlexEvent.CONTENT_CHANGING, contentGroup_contentChangingHandler);
-                _placeHolderGroup.addEventListener(
-                    FlexEvent.CONTENT_CHANGED, contentGroup_contentChangedHandler);
             }
             return _placeHolderGroup;
         }
@@ -401,10 +385,6 @@
                 ItemExistenceChangedEvent.ITEM_ADD, contentGroup_itemAddedHandler);
             contentGroup.addEventListener(
                 ItemExistenceChangedEvent.ITEM_REMOVE, contentGroup_itemRemovedHandler);
-            contentGroup.addEventListener(
-                FlexEvent.CONTENT_CHANGING, contentGroup_contentChangingHandler);
-            contentGroup.addEventListener(
-                FlexEvent.CONTENT_CHANGED, contentGroup_contentChangedHandler);

             if (_placeHolderGroup)
             {
@@ -412,10 +392,6 @@
                     ItemExistenceChangedEvent.ITEM_ADD, contentGroup_itemAddedHandler);
                 _placeHolderGroup.removeEventListener(
                     ItemExistenceChangedEvent.ITEM_REMOVE, contentGroup_itemRemovedHandler);
-                _placeHolderGroup.removeEventListener(
-                    FlexEvent.CONTENT_CHANGING, contentGroup_contentChangingHandler);
-                _placeHolderGroup.removeEventListener(
-                    FlexEvent.CONTENT_CHANGED, contentGroup_contentChangedHandler);

                 _placeHolderGroup = null;
             }
@@ -433,10 +409,6 @@
                 ItemExistenceChangedEvent.ITEM_ADD, contentGroup_itemAddedHandler);
             contentGroup.removeEventListener(
                 ItemExistenceChangedEvent.ITEM_REMOVE, contentGroup_itemRemovedHandler);
-            contentGroup.removeEventListener(
-                FlexEvent.CONTENT_CHANGING, contentGroup_contentChangingHandler);
-            contentGroup.removeEventListener(
-                FlexEvent.CONTENT_CHANGED, contentGroup_contentChangedHandler);
         }
     }

@@ -492,18 +464,6 @@
         // Re-dispatch the event
         dispatchEvent(event);
     }
-
-    private function contentGroup_contentChangingHandler(event:FlexEvent):void
-    {
-        // Re-dispatch the event
-        dispatchEvent(event);
-    }
-
-    private function contentGroup_contentChangedHandler(event:FlexEvent):void
-    {
-        // Re-dispatch the event
-        dispatchEvent(event);
-    }
 }

 }


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

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

 package mx.olap
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 20920
Author:   build@adobe.com
Date:     2011-03-18T19:54:14.958635Z

Log Message:
-----------
Version update to 4.5.1

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/airspark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation_air/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/flex-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation_spark/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark_dmv/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/rpc/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation_flashflexkit/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation_dmv/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/VersionInfo.java</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/advancedgrids/src/mx/core/Version.as</path>

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

--- frameworks/projects/automation_spark/src/spark/core/Version.as
+++ frameworks/projects/automation_spark/src/spark/core/Version.as
@@ -15,4 +15,4 @@
  *  @private
  *  Version string for this class.
  */
-mx_internal static const VERSION:String = "4.5.0.0";
+mx_internal static const VERSION:String = "4.5.1.0";


FLEX-33891 stop getstyleManager being called twice

--- frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
+++ frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
@@ -95,7 +95,7 @@
         var className:String = qualified ? getQualifiedClassName(object) : object.className;
         var advancedObject:IAdvancedStyleClient = object as IAdvancedStyleClient;

-        var typeHierarchy:OrderedObject = getTypeHierarchy(object, qualified);
+        var typeHierarchy:OrderedObject = getTypeHierarchy(object, styleManager, qualified);
         var types:Array = typeHierarchy.propertyList;
         var typeCount:int = types.length;
         var classDecls:Array = null;
@@ -788,7 +788,7 @@
     {
         var styleManager:IStyleManager2 = getStyleManager(object);
         var qualified:Boolean = styleManager.qualifiedTypeSelectors;
-        var typeHierarchy:OrderedObject = getTypeHierarchy(object, qualified);
+        var typeHierarchy:OrderedObject = getTypeHierarchy(object, styleManager, qualified);
         return typeHierarchy.object_proxy::getObjectProperty(cssType) != null;
     }

@@ -841,9 +841,8 @@
      *  name and then each super class name until we hit a stop class, such as
      *  mx.core::UIComponent.
      */
-    private static function getTypeHierarchy(object:IStyleClient, qualified:Boolean=true):OrderedObject
-    {
-        var styleManager:IStyleManager2 = getStyleManager(object);
+    private static function getTypeHierarchy(object:IStyleClient, styleManager:IStyleManager2, qualified:Boolean=true):OrderedObject
+    {
         var className:String = getQualifiedClassName(object);
         var hierarchy:OrderedObject = styleManager.typeHierarchyCache[className] as OrderedObject;
         if (hierarchy == null)


Transferred from the Adobe Open Source Subversion Repository

Revision: 10464
Author:   rfrishbe@adobe.com
Date:     2009-09-21T17:40:30.663638Z

Log Message:
-----------
Removing support in Flex framework for compatibility version < 3.  We won't support compatibility-version 2 or 2.01 anymore.  We only keep compatibility-version for one full release, so for Flex 4, we only support compatibility-version = 3.x.

This should reduce our code-size some as we no longer need this old code.  I didn't clean up the compiler's support for compatibility-versioning as it didn't seem worth the effort.

QE notes: -
Doc notes: -
Bugs: SDK-15360
Reviewer: Kevin
Tests run: checkintests, Joan ran all mustella tests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.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/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserYearArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.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/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuBarItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PanelSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuItemRenderer.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/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.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/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<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/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/Flex.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>

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

--- frameworks/projects/mx/src/mx/controls/sliderClasses/Slider.as
+++ frameworks/projects/mx/src/mx/controls/sliderClasses/Slider.as
@@ -19,7 +19,6 @@
 import flash.events.MouseEvent;
 import flash.geom.Point;

-import mx.core.FlexVersion;
 import mx.core.IFlexDisplayObject;
 import mx.core.IUIComponent;
 import mx.core.UIComponent;
@@ -648,9 +647,6 @@
      */
     override public function get baselinePosition():Number
     {
-        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
-            return super.baselinePosition;
-
         if (!validateBaselinePosition())
             return NaN;


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

--- frameworks/projects/automation_spark/src/spark/automation/tabularData/RichEditableTextTabularData.as
+++ frameworks/projects/automation_spark/src/spark/automation/tabularData/RichEditableTextTabularData.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: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

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

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

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

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

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

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

--- frameworks/projects/advancedgrids/src/mx/olap/IOLAPHierarchy.as
+++ frameworks/projects/advancedgrids/src/mx/olap/IOLAPHierarchy.as
@@ -0,0 +1,171 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.olap
+{
+import mx.collections.ICollectionView;
+import mx.collections.IList;
+
+/**
+ *  The IOLAPHierarchy interface represents a user-defined hierarchy
+ *  in a dimension of an OLAP schema.
+ *.
+ *  @see mx.olap.OLAPHierarchy
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public interface IOLAPHierarchy extends IOLAPElement
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  allMemberName
+	//----------------------------------
+
+    /**
+     *  The name of the all member of the hierarchy.
+     *
+     *  @default "(All)"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get allMemberName():String;
+
+    //----------------------------------
+	//  children
+	//----------------------------------
+
+    /**
+     *  The children of the all member, as a list of IOLAPMember instances.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get children():IList; //of IOLAPMembers
+
+    //----------------------------------
+	//  defaultMember
+	//----------------------------------
+
+    /**
+     *  The default member of the hierarchy.
+     *  The default member is used if the hierarchy
+     *  is used where a member is expected.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get defaultMember():IOLAPMember;
+
+    //----------------------------------
+	//  hasAll
+	//----------------------------------
+
+    /**
+     *  Specifies whether the hierarchy has an all member, true,
+     *  or not, false. If true, the all member name
+     *  is as specified by the allMemberName property.
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get hasAll():Boolean;
+
+    //----------------------------------
+	//  levels
+	//----------------------------------
+
+    /**
+     *  All the levels of this hierarchy, as a list of IOLAPLevel instances.
+     *
+     *  The returned list might represent remote data and therefore can throw
+     *  an ItemPendingError.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get levels():IList; //of IOLAPLevels
+
+    //----------------------------------
+	//  members
+	//----------------------------------
+
+    /**
+     *  All members of all the levels that belong to this hierarchy,
+     *  as a list of IOLAPMember instances.
+     *
+     *  The returned list might represent remote data and therefore can throw
+     *  an ItemPendingError.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get members():IList; //of IOLAPMembers
+
+    //--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  Returns the level with the given name within the hierarchy.
+     *
+     *  @param name The name of the level.
+     *
+     *  @return An IOLAPLevel instance representing the level,
+     *  or null if a level is not found.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function findLevel(name:String):IOLAPLevel;
+
+    /**
+     *  Returns the member with the given name within the hierarchy.
+     *
+     *  @param name The name of the member.
+     *
+     *  @return An IOLAPMember instance representing the member,
+     *  or null if a member is not found.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function findMember(name:String):IOLAPMember;
+}
+}


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

--- frameworks/projects/framework/src/mx/effects/IAbstractEffect.as
+++ frameworks/projects/framework/src/mx/effects/IAbstractEffect.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.effects
+{
+
+import flash.events.Event;
+import flash.events.IEventDispatcher;
+
+/**
+ *  The IAbstractEffect interface is used to denote
+ *  that a property or parameter must be of type Effect,
+ *  but does not actually implement any of the APIs of the
+ *  IEffect interface.
+ *  The UIComponent class recognizes when property that
+ *  implements the AbstractEffect interface changes, and passes it to
+ *  the EffectManager class for processing.
+ *
+ *  @see mx.effects.IEffect
+ */
+public interface IAbstractEffect extends IEventDispatcher
+{
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 10872
Author:   cframpto@adobe.com
Date:     2009-10-05T19:39:47.041984Z

Log Message:
-----------
Most changes already approved by PARB and a few are pending.  Given the two reviewers are at MAX and then there is a shutdown week we decided to take a chance that these changes will actually stick.

TLFText.css -> MXFTEText.css
TLFTextField -> FTETextField
UITLFTextField -> UIFTETextField
TLFDataGridItemRenderer -> FTEDataGridItemRenderer
TLFTextInput -> MXFTETextInput

UITextFormat.useTLF -> UITextFormat.useFTE

QE notes:
Doc notes:
Bugs: SDK-22909
Reviewer: Gordon
Tests run: checkintests
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/TextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/TLFTextInput.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/MXFTETextInput.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/TLFTextInput.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/TLFTextField.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/FTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/TLFDataGridItemRenderer.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/TextFieldFactory.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/TLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/CSSTextLayoutFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/TLFDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ITextFieldFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/TLFText.css" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/MXFTEText.css</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/TLFText.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/spark/src/spark/core/CSSTextLayoutFormat.as
+++ frameworks/projects/spark/src/spark/core/CSSTextLayoutFormat.as
@@ -297,7 +297,7 @@
 		// can affect both Halo and Spark components,
 		// we need to map true to "on" and false to "off"
 		// here and in Label.
-		// For Halo components, UITextField and UITLFTextField
+		// For Halo components, UITextField and UIFTETextField
 		// do the opposite mapping
 		// of "auto" and "on" to true and "off" to false.
 		// We also support a value of "default"


Transferred from the Adobe Open Source Subversion Repository

Revision: 9270
Author:   clucier@adobe.com
Date:     2009-08-13T15:27:57.150840Z

Log Message:
-----------
Preliminary checkin of the 4+ runtime design layer feature.  Note that this is being committed primarily so that the tooling folks can start playing.  We've yet to integrate spec or PARB feedback
as such QE does not yet need to test.

QE notes: No need to test just yet.
Doc notes: Ditto
Bugs: N/A
Reviewer: Glenn / Paul
Tests run: Checkin
Is noteworthy for integration: Yes, Catalyst/FB may enable feature to begin integration if so desired.  Enable with compiler flag "-enable-runtime-design-layers".

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/DesignLayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/ValueNodeHandler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/Analyzer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/AnalyzerAdapter.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/MxmlScanner.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.java</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/LayeredNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/DocumentBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.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/modules/compiler/src/java/flex2/compiler/mxml/analyzer/SyntaxAnalyzer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/Model.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/NodeTypeResolver.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/DesignLayerNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/SyntaxTreeBuilder.java</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/DesignLayer.java</path>

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

--- frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
+++ frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
@@ -19,12 +19,14 @@
 import flash.geom.PerspectiveProjection;
 import flash.geom.Point;
 import flash.geom.Vector3D;
-
 import mx.core.AdvancedLayoutFeatures;
+import mx.core.DesignLayer;
 import mx.core.FlexSprite;
 import mx.core.IInvalidating;
 import mx.core.IVisualElement;
 import mx.core.mx_internal;
+import mx.events.PropertyChangeEvent;
+import mx.utils.MatrixUtil;
 import mx.events.FlexEvent;
 import mx.geom.Transform;
 import mx.utils.MatrixUtil;
@@ -248,6 +250,42 @@
     //--------------------------------------------------------------------------

     //----------------------------------
+    //  alpha
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the alpha property.
+     */
+    private var _alpha:Number = 1.0;
+
+    /**
+     *  @private
+     */
+    override public function get alpha():Number
+    {
+        // Here we roundtrip alpha in the same manner as the
+        // player (purposely introducing a rounding error).
+        return int(_alpha * 256.0) / 256.0;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set alpha(value:Number):void
+    {
+        if (_alpha != value)
+        {
+            _alpha = value;
+
+            if (layer)
+                value = value * layer.computedAlpha;
+
+            super.alpha = value;
+        }
+    }
+
+    //----------------------------------
     //  baseline
     //----------------------------------

@@ -546,7 +584,46 @@
     {
         _owner = value;
     }
-
+
+    //----------------------------------
+    //  layer
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the layer property.
+     */
+    private var _layer:DesignLayer;
+
+    [Inspectable (environment='none')]
+
+    /**
+     *  @copy mx.core.IVisualElement#layer
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get layer():DesignLayer
+    {
+        return _layer;
+    }
+
+    /**
+     *  @private
+     */
+    public function set layer(value:DesignLayer):void
+    {
+        if (_layer)
+            _layer.removeEventListener("layerPropertyChange", layer_PropertyChange, false);
+
+        _layer = value;
+
+        if (_layer)
+            _layer.addEventListener("layerPropertyChange", layer_PropertyChange, false, 0, true);
+    }
+
     //----------------------------------
     //  percentHeight
     //----------------------------------
@@ -1024,6 +1101,40 @@
     }

     //----------------------------------
+    //  visible
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the visible property.
+     */
+    private var _visible:Boolean = true;
+
+    /**
+     *  @inheritDoc
+     */
+    override public function get visible():Boolean
+    {
+        return _visible;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set visible(value:Boolean):void
+    {
+        _visible = value;
+
+        if (layer && !layer.computedVisibility)
+            value = false;
+
+        if (super.visible == value)
+            return;
+
+        super.visible = value;
+    }
+
+    //----------------------------------
     //  width
     //----------------------------------

@@ -1220,6 +1331,30 @@
         return naturalHeight;
     }

+    /**
+     *  @private
+     */
+    protected function layer_PropertyChange(event:PropertyChangeEvent):void
+    {
+        switch (event.property)
+        {
+            case "visible":
+            {
+                var newValue:Boolean = (event.newValue && _visible);
+                if (newValue != super.visible)
+                    super.visible = newValue;
+                break;
+            }
+            case "alpha":
+            {
+                var newAlpha:Number = Number(event.newValue) * _alpha;
+                if (newAlpha != super.alpha)
+                    super.alpha = newAlpha;
+                break;
+            }
+        }
+    }
+
     /**
      *  @inheritDoc
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 12886
Author:   jszeto@adobe.com
Date:     2009-12-13T01:35:34.061540Z

Log Message:
-----------
SpriteVisualElement globalToLocal bug fix

SDK-24477 - resized SpriteVisualElement returns the incorrect point when calling globalToLocal

Updated GroupBase and SpriteVisualElement to ignore stretchX and stretchY when calculating globalToLocal and localToGlobal

QE notes: Add tests for globalToLocal and localToGlobal
Doc notes: none
Bugs: SDK-24477
Reviewer: Evtim
Tests run: checkintests, primitives, Group
Is noteworthy for integration: Yes. Fixes TH-8488

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

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

--- frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
+++ frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
@@ -1745,7 +1745,66 @@
             IUIComponent(child).initialize();
         }
     }
-
+
+    /**
+     *  @private
+     */
+    override public function globalToLocal(point:Point):Point
+    {
+        if (resizeMode == ResizeMode.SCALE && _layoutFeatures != null)
+        {
+            // If resize mode is scale, then globalToLocal shouldn't account for
+            // stretchX/Y
+            var sX:Number = _layoutFeatures.stretchX;
+            var sY:Number = _layoutFeatures.stretchY;
+            _layoutFeatures.stretchX = 1;
+            _layoutFeatures.stretchY = 1;
+            applyComputedMatrix();
+
+            var p:Point = super.globalToLocal(point);
+
+            // Restore stretch
+            _layoutFeatures.stretchX = sX;
+            _layoutFeatures.stretchY = sY;
+            applyComputedMatrix();
+
+            return p;
+        }
+        else
+        {
+            return super.globalToLocal(point);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override public function localToGlobal(point:Point):Point
+    {
+        if (resizeMode == ResizeMode.SCALE && _layoutFeatures != null)
+        {
+            // If resize mode is scale, then localToGlobal shouldn't account for
+            // stretchX/Y
+            var sX:Number = _layoutFeatures.stretchX;
+            var sY:Number = _layoutFeatures.stretchY;
+            _layoutFeatures.stretchX = 1;
+            _layoutFeatures.stretchY = 1;
+            applyComputedMatrix();
+
+            var p:Point = super.localToGlobal(point);
+
+            // Restore stretch
+            _layoutFeatures.stretchX = sX;
+            _layoutFeatures.stretchY = sY;
+            applyComputedMatrix();
+
+            return p;
+        }
+        else
+        {
+            return super.localToGlobal(point);
+        }
+    }
     //--------------------------------------------------------------------------
     //
     //  Methods


OFC-366 MinCountError not shown in interface in data cleansing phase

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/AttributePresenter.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/AttributePresenter.as
@@ -8,6 +8,7 @@

 	import org.openforis.collect.Application;
 	import org.openforis.collect.event.ApplicationEvent;
+	import org.openforis.collect.metamodel.proxy.AttributeDefinitionProxy;
 	import org.openforis.collect.model.proxy.AttributeProxy;
 	import org.openforis.collect.model.proxy.RecordProxy;
 	import org.openforis.collect.remoting.service.UpdateResponse;
@@ -50,6 +51,8 @@
 			var validationStateDisplay:UIComponent = inputField != null ? inputField.validationStateDisplay: _view;
 			var validationToolTipTrigger:UIComponent = validationStateDisplay;
 			_validationDisplayManager = new ValidationDisplayManager(validationToolTipTrigger, validationStateDisplay);
+			var attrDefn:AttributeDefinitionProxy = _view.attributeDefinition;
+			_validationDisplayManager.showMinMaxCountErrors = ! attrDefn.multiple;
 			if(_view.attribute != null) {
 				updateValidationDisplayManager();
 			}
@@ -107,6 +110,6 @@
 				}
 			}
 		}
-
+
 	}
 }


Fixing bugs with InteractiveVisualization mouse interactions, not done
yet.

Change-Id: I8881aae41efd5b3897577db1d60ea35920c3224e

--- WeaveUI/src/weave/visualization/layers/InteractiveVisualization.as
+++ WeaveUI/src/weave/visualization/layers/InteractiveVisualization.as
@@ -217,7 +217,7 @@
 		private function updateMouseCursor():void
 		{

-			var mode:String = _temporaryMouseMode ? _temporaryMouseMode : mouseModeDefault.value;
+			var mode:String = _temporaryMouseMode || mouseModeDefault.value;

 			if(mouseIsRolledOver)
 			{
@@ -301,12 +301,11 @@
 			handleMouseEvent(event);
 		}
 		protected function handleMouseUp():void
-		{
+		{
 			_mouseDown = false;

 			updateMouseCursor();

-			mouseDragActive = false;
 			// when the mouse is released, handle mouse move so the selection rectangle will cause the selection to update.
 			handleMouseEvent(StageUtils.mouseEvent);
 		}
@@ -356,7 +355,6 @@

 		protected function handleMouseEvent(event:MouseEvent):void
 		{
-			var mode:String = _temporaryMouseMode ? _temporaryMouseMode : mouseModeDefault.value;
 			var str:String;
 			var i:int;

@@ -385,14 +383,15 @@
 					break;
 				}
 			}
-			if(event.ctrlKey)
+			if (event.ctrlKey)
 				interactions.insertEvent(InteractionController.CTRL);
-			if(event.altKey)
+			if (event.altKey)
 				interactions.insertEvent(InteractionController.ALT);
-			if(event.shiftKey)
+			if (event.shiftKey)
 				interactions.insertEvent(InteractionController.SHIFT);
-
-			function updateMouseDragStageCoordinates():void
+
+			// if currently dragging, update drag coords and don't change mouse mode
+			if (mouseDragActive)
 			{
 				// update end coordinates of selection rectangle
 				if (event.type == MouseEvent.MOUSE_UP)
@@ -406,36 +405,37 @@
 					mouseDragStageCoords.setMaxCoords(stage.mouseX, stage.mouseY);
 				}
 			}
-			// only update mouse mode when mouse drag isn't active
-			updateTemporaryMouseMode();
-
-			switch(interactions.determineAction())
+			else // not dragging -- ok to update mouse mode
+			{
+				updateTemporaryMouseMode();
+			}
+
+			var dragReleased:Boolean = mouseDragActive ? !event.buttonDown : false;
+			var mode:String = _temporaryMouseMode || mouseModeDefault.value;
+			switch(mode)//(interactions.determineAction())
 			{
 				case InteractionController.SELECT_ADD:
 				{
-					if(mouseDragActive)
+					if (mouseDragActive)
 						handleSelection(event, mode);
 					break;
 				}
 				case InteractionController.SELECT:
 				{
-					if(mouseDragActive)
+					if (mouseDragActive)
 						handleSelection(event,mode);
 					break;
 				}
 				case InteractionController.SELECT_REMOVE:
 				{
 					if (mouseDragActive)
+						handleSelection(event, mode);
+					break;
+				}
+				case InteractionController.PAN:
+				{
+					if (enableZoomAndPan.value && mouseDragActive)
 					{
-						handleSelection(event, mode);
-					}
-					break;
-				}
-				case InteractionController.PAN:
-				{
-					if(enableZoomAndPan.value && mouseDragActive)
-					{
-						updateMouseDragStageCoordinates();
 						// pan the dragged distance
 						projectDragBoundsToDataQueryBounds(null, false);
 						zoomBounds.getDataBounds(tempDataBounds);
@@ -449,16 +449,18 @@
 				}
 				case InteractionController.ZOOM:
 				{
-					if(enableZoomAndPan.value && mouseDragActive)
+					if (enableZoomAndPan.value && dragReleased)
 					{
-						updateMouseDragStageCoordinates();
+						// zoom to selected data bounds if area > 0
+						projectDragBoundsToDataQueryBounds(null, true); // data bounds in same direction when zooming
+						if (queryBounds.getArea() > 0)
+							zoomBounds.setDataBounds(queryBounds);
 					}
 					break;
 				}
 				case InteractionController.PROBE:
 				{
-
-					if (mouseIsRolledOver && !event.buttonDown)
+					if (mouseIsRolledOver)
 					{
 						// probe when mouse is rolled over and selection is inactive
 						handleProbe();
@@ -469,7 +471,9 @@
 				case InteractionController.ZOOM_TO_EXTENT:
 				{
 					if (enableZoomAndPan.value && mode != InteractionController.SELECT_ADD && mode != InteractionController.SELECT_REMOVE)
-						zoomBounds.setDataBounds(fullDataBounds, true); // zoom to full extent
+					{
+						zoomBounds.setDataBounds(fullDataBounds, true); // zoom to full extent
+					}
 					else
 					{
 						// clear selection or select all
@@ -485,35 +489,56 @@
 					}
 					break;
 				}
-				case InteractionController.ZOOM_OUT:
-				{
-					zoom(2, mode);
-					break;
-				}
 				case InteractionController.ZOOM_IN:
-				{
-					zoom(0.5, mode);
-					break;
-				}
-			}
-			//trace(mode, str);
-			if(enableZoomAndPan.value && !event.buttonDown && mode == InteractionController.ZOOM && event.type != MouseEvent.MOUSE_MOVE)
-			{
-				// zoom to selected data bounds if area > 0
-				projectDragBoundsToDataQueryBounds(null, true); // data bounds in same direction when zooming
-				if (queryBounds.getArea() > 0)
-					zoomBounds.setDataBounds(queryBounds);
-			}
+				case InteractionController.ZOOM_OUT:
+				{
+					if (enableZoomAndPan.value)
+					{
+						var multiplier:Number = 1;
+						if (mode == InteractionController.ZOOM_IN)
+							multiplier = 0.5; // zoom in 2x
+						else
+							multiplier = 2; // zoom out 2x
+
+						projectDragBoundsToDataQueryBounds(null, false);
+						zoomBounds.getDataBounds(_tempBounds);
+						_tempBounds.setCenter(queryBounds.getXCenter(), queryBounds.getYCenter());
+
+						_tempBounds.centeredResize(_tempBounds.getWidth() * multiplier, _tempBounds.getHeight() * multiplier);
+
+						zoomBounds.setDataBounds(_tempBounds);
+					}
+					break;
+				}
+			}
+
+			// finally, unset mouseDragActive if button was released
+			if (dragReleased)
+				mouseDragActive = false;

 			updateSelectionRectangleGraphics();
 			interactions.clearEvents();
-			//updateMouseCursor();
+		}
+
+		//TODO - use this
+		private function selectAllVisibleRecords():void
+		{
+			// clear selection or select all
+
+			// set up mouse drag rectangle to select or deselect visible area
+			zoomBounds.getScreenBounds(_screenBounds);
+			_screenBounds.getMinPoint(tempPoint);
+			mouseDragStageCoords.setMinPoint(localToGlobal(tempPoint));
+			_screenBounds.getMaxPoint(tempPoint);
+			mouseDragStageCoords.setMaxPoint(localToGlobal(tempPoint));
+
+			immediateHandleSelection();
 		}

 		private var _selectionRectangleGraphicsCleared:Boolean = true;
 		protected function updateSelectionRectangleGraphics():void
 		{
-			var mouseMode:String = _temporaryMouseMode ? _temporaryMouseMode : mouseModeDefault.value;
+			var mouseMode:String = _temporaryMouseMode || mouseModeDefault.value;

 			if (!Weave.properties.enableToolSelection.value || !enableSelection.value) return;
 			var g:Graphics = selectionRectangleCanvas.graphics;
@@ -578,34 +603,6 @@
 		private function validateDashedLine():void
 		{
 			_dashedLine.lengthsString = Weave.properties.dashedSelectionBox.value;
-		}
-
-		private function zoom(multiplier:Number, mode:String):void
-		{
-			if (enableZoomAndPan.value && mode != InteractionController.SELECT_ADD && mode != InteractionController.SELECT_REMOVE)
-			{
-				// zoom in 2x
-				projectDragBoundsToDataQueryBounds(null, false);
-				zoomBounds.getDataBounds(_tempBounds);
-				_tempBounds.setCenter(queryBounds.getXCenter(), queryBounds.getYCenter());
-
-				_tempBounds.centeredResize(_tempBounds.getWidth() * multiplier, _tempBounds.getHeight() * multiplier);
-
-				zoomBounds.setDataBounds(_tempBounds);
-			}
-			else
-			{
-				// clear selection or select all
-
-				// set up mouse drag rectangle to select or deselect visible area
-				zoomBounds.getScreenBounds(_screenBounds);
-				_screenBounds.getMinPoint(tempPoint);
-				mouseDragStageCoords.setMinPoint(localToGlobal(tempPoint));
-				_screenBounds.getMaxPoint(tempPoint);
-				mouseDragStageCoords.setMaxPoint(localToGlobal(tempPoint));
-
-				immediateHandleSelection();
-			}
 		}

 		private function handleSelection(event:MouseEvent,mode:String):void
@@ -855,7 +852,7 @@
 			if (!Weave.properties.enableToolSelection.value || !enableSelection.value)
 				return;

-			var mouseMode:String = _temporaryMouseMode ? _temporaryMouseMode : mouseModeDefault.value;
+			var mouseMode:String = _temporaryMouseMode || mouseModeDefault.value;

 			// set the probe filter to a new set of keys
 			var keySet:KeySet = layer.selectionFilter.internalObject as KeySet;


Interrupt camera interpolation when user pan/orbit/zoom camera

--- bin/Data/Scripts/Editor/EditorView.as
+++ bin/Data/Scripts/Editor/EditorView.as
@@ -630,7 +630,8 @@
     }
 }

-CameraSmoothInterpolate cameraSmoothInterpolate;
+
+CameraSmoothInterpolate cameraSmoothInterpolate; // Camera smooth interpolation control

 void SetRenderPath(const String&in newRenderPathName)
 {
@@ -1528,16 +1529,22 @@

 void CameraPan(Vector3 trans)
 {
+    cameraSmoothInterpolate.Stop();
+
     cameraLookAtNode.Translate(trans);
 }

 void CameraMoveForward(Vector3 trans)
 {
+    cameraSmoothInterpolate.Stop();
+
     cameraNode.Translate(trans, TS_PARENT);
 }

 void CameraRotateAroundLookAt(Quaternion rot)
 {
+    cameraSmoothInterpolate.Stop();
+
     cameraNode.rotation = rot;

     Vector3 dir = cameraNode.direction;
@@ -1550,6 +1557,8 @@

 void CameraRotateAroundCenter(Quaternion rot)
 {
+    cameraSmoothInterpolate.Stop();
+
     cameraNode.rotation = rot;

     Vector3 oldPos = cameraNode.worldPosition;
@@ -1561,6 +1570,13 @@

     cameraLookAtNode.worldPosition = cameraNode.worldPosition + dir * dist;
     cameraNode.worldPosition = oldPos;
+}
+
+void CameraZoom(float zoom)
+{
+    cameraSmoothInterpolate.Stop();
+
+    camera.zoom = Clamp(zoom, .1, 30);
 }

 void HandleStandardUserInput(float timeStep)
@@ -1641,7 +1657,8 @@
         else
         {
             float zoom = camera.zoom + input.mouseMoveWheel * speedMultiplier * factor;
-            camera.zoom = Clamp(zoom, .1, 30);
+
+            CameraZoom(zoom);
         }
     }

@@ -1839,7 +1856,8 @@
             else
             {
                 float zoom = camera.zoom + input.mouseMoveWheel * speedMultiplier * 0.5f;
-                camera.zoom = Clamp(zoom, .1, 30);
+
+                CameraZoom(zoom);
             }
         }
     }


Suppress scene changes while toggling the debug icons visibility during preview camera render so that the attribute editor doesn't constantly refresh, making attributes uneditable. Closes #854.

--- bin/Data/Scripts/Editor/EditorView.as
+++ bin/Data/Scripts/Editor/EditorView.as
@@ -2046,10 +2046,12 @@
     }
     if (eventData["Camera"].GetPtr() is previewCamera.Get())
     {
+        suppressSceneChanges = true;
         if (grid !is null)
             grid.viewMask = 0;
         if (debugIconsNode !is null)
             debugIconsNode.enabled = false;
+        suppressSceneChanges = false;
     }
 }

@@ -2063,10 +2065,12 @@
     }
     if (eventData["Camera"].GetPtr() is previewCamera.Get())
     {
+        suppressSceneChanges = true;
         if (grid !is null)
             grid.viewMask = 0x80000000;
         if (debugIconsNode !is null)
             debugIconsNode.enabled = true;
+        suppressSceneChanges = false;
     }
 }


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

--- frameworks/projects/automation/src/mx/automation/delegates/controls/TreeItemRendererAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/TreeItemRendererAutomationImpl.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.
 //
 ////////////////////////////////////////////////////////////////////////////////