You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2016/06/16 22:59:59 UTC
[42/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Merge
branch 'develop' into spark
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
index e234b3d,0000000..215c9de
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
@@@ -1,574 -1,0 +1,574 @@@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.core
+{
+
- COMPILE::AS3
++COMPILE::SWF
+{
+ import flash.display.DisplayObject;
+ import flash.display.DisplayObjectContainer;
+// import flash.display.Sprite;
+}
+COMPILE::JS
+{
+ import flex.display.DisplayObject;
+ import flex.display.DisplayObjectContainer;
+}
+import flex.display.Sprite;
+import mx.managers.ISystemManager;
+
+/**
+ * The IUIComponent interface defines the basic set of APIs
+ * that you must implement to create a child of a Flex container or list.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+public interface IUIComponent extends IFlexDisplayObject
+{
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // baselinePosition
+ //----------------------------------
+
+ /**
+ * The y-coordinate of the baseline
+ * of the first line of text of the component.
+ *
+ * <p>This property is used to implement
+ * the <code>baseline</code> constraint style.
+ * It is also used to align the label of a FormItem
+ * with the controls in the FormItem.</p>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get baselinePosition():Number;
+
+
+ //----------------------------------
+ // document
+ //----------------------------------
+
+ /**
+ * A reference to the document object associated with this component.
+ * A document object is an Object at the top of the hierarchy
+ * of a Flex application, MXML component, or ActionScript component.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get document():Object
+
+ /**
+ * @private
+ */
+ function set document(value:Object):void
+
+ //----------------------------------
+ // enabled
+ //----------------------------------
+
+ /**
+ * Whether the component can accept user interaction. After setting the <code>enabled</code>
+ * property to <code>false</code>, some components still respond to mouse interactions such
+ * as mouseOver. As a result, to fully disable UIComponents,
+ * you should also set the value of the <code>mouseEnabled</code> property to <code>false</code>.
+ * If you set the <code>enabled</code> property to <code>false</code>
+ * for a container, Flex dims the color of the container and of all
+ * of its children, and blocks user input to the container
+ * and to all of its children.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get enabled():Boolean;
+
+ /**
+ * @private
+ */
+ function set enabled(value:Boolean):void;
+
+ //----------------------------------
+ // explicitHeight
+ //----------------------------------
+
+ /**
+ * The explicitly specified height for the component,
+ * in pixels, as the component's coordinates.
+ * If no height is explicitly specified, the value is <code>NaN</code>.
+ *
+ * @see mx.core.UIComponent#explicitHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get explicitHeight():Number;
+
+ /**
+ * @private
+ */
+ function set explicitHeight(value:Number):void;
+
+ //----------------------------------
+ // explicitMaxHeight
+ //----------------------------------
+
+ /**
+ * Number that specifies the maximum height of the component,
+ * in pixels, as the component's coordinates.
+ *
+ * @see mx.core.UIComponent#explicitMaxHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get explicitMaxHeight():Number;
+
+ //----------------------------------
+ // explicitMaxWidth
+ //----------------------------------
+
+ /**
+ * Number that specifies the maximum width of the component,
+ * in pixels, as the component's coordinates.
+ *
+ * @see mx.core.UIComponent#explicitMaxWidth
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get explicitMaxWidth():Number;
+
+ //----------------------------------
+ // explicitMinHeight
+ //----------------------------------
+
+ /**
+ * Number that specifies the minimum height of the component,
+ * in pixels, as the component's coordinates.
+ *
+ * @see mx.core.UIComponent#explicitMinHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get explicitMinHeight():Number;
+
+ //----------------------------------
+ // explicitMinWidth
+ //----------------------------------
+
+ /**
+ * Number that specifies the minimum width of the component,
+ * in pixels, as the component's coordinates.
+ *
+ * @see mx.core.UIComponent#explicitMinWidth
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get explicitMinWidth():Number;
+
+ //----------------------------------
+ // explicitWidth
+ //----------------------------------
+
+ /**
+ * The explicitly specified width for the component,
+ * in pixels, as the component's coordinates.
+ * If no width is explicitly specified, the value is <code>NaN</code>.
+ *
+ * @see mx.core.UIComponent#explicitWidth
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get explicitWidth():Number;
+
+ /**
+ * @private
+ */
+ function set explicitWidth(value:Number):void;
+
+ //----------------------------------
+ // focusPane
+ //----------------------------------
+
+ /**
+ * A single Sprite object that is shared among components
+ * and used as an overlay for drawing the focus indicator.
+ * Components share this object if their parent is a focused component,
+ * not if the component implements the IFocusManagerComponent interface.
+ *
+ * @see mx.core.UIComponent#focusPane
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get focusPane():Sprite;
+
+ /**
+ * @private
+ */
+ function set focusPane(value:Sprite):void;
+
+ //----------------------------------
+ // includeInLayout
+ //----------------------------------
+
+ /**
+ * @copy mx.core.UIComponent#includeInLayout
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get includeInLayout():Boolean;
+
+ /**
+ * @private
+ */
+ function set includeInLayout(value:Boolean):void;
+
+ //----------------------------------
+ // isPopUp
+ //----------------------------------
+
+ /**
+ * @copy mx.core.UIComponent#isPopUp
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get isPopUp():Boolean;
+
+ /**
+ * @private
+ */
+ function set isPopUp(value:Boolean):void;
+
+ //----------------------------------
+ // maxHeight
+ //----------------------------------
+
+ /**
+ * Number that specifies the maximum height of the component,
+ * in pixels, as the component's coordinates.
+ *
+ * @see mx.core.UIComponent#maxHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get maxHeight():Number;
+
+ //----------------------------------
+ // maxWidth
+ //----------------------------------
+
+ /**
+ * Number that specifies the maximum width of the component,
+ * in pixels, as the component's coordinates.
+ *
+ * @see mx.core.UIComponent#maxWidth
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get maxWidth():Number;
+
+ //----------------------------------
+ // measuredMinHeight
+ //----------------------------------
+
+ /**
+ * @copy mx.core.UIComponent#measuredMinHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get measuredMinHeight():Number;
+
+ /**
+ * @private
+ */
+ function set measuredMinHeight(value:Number):void;
+
+ //----------------------------------
+ // measuredMinWidth
+ //----------------------------------
+
+ /**
+ * @copy mx.core.UIComponent#measuredMinWidth
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get measuredMinWidth():Number;
+
+ /**
+ * @private
+ */
+ function set measuredMinWidth(value:Number):void;
+
+ //----------------------------------
+ // minHeight
+ //----------------------------------
+
+ /**
+ * Number that specifies the minimum height of the component,
+ * in pixels, as the component's coordinates.
+ *
+ * @see mx.core.UIComponent#minHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get minHeight():Number;
+
+ //----------------------------------
+ // minWidth
+ //----------------------------------
+
+ /**
+ * Number that specifies the minimum width of the component,
+ * in pixels, as the component's coordinates.
+ *
+ * @see mx.core.UIComponent#minWidth
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get minWidth():Number;
+
+ //----------------------------------
+ // owner
+ //----------------------------------
+
+ /**
+ * @copy mx.core.IVisualElement#owner
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get owner():DisplayObjectContainer;
+
+ /**
+ * @private
+ */
+ function set owner(value:DisplayObjectContainer):void;
+
+ //----------------------------------
+ // percentHeight
+ //----------------------------------
+
+ /**
+ * Number that specifies the height of a component as a
+ * percentage of its parent's size.
+ * Allowed values are 0 to 100.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get percentHeight():Number;
+
+ /**
+ * @private
+ */
+ function set percentHeight(value:Number):void;
+
+ //----------------------------------
+ // percentWidth
+ //----------------------------------
+
+ /**
+ * Number that specifies the width of a component as a
+ * percentage of its parent's size.
+ * Allowed values are 0 to 100.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get percentWidth():Number;
+
+ /**
+ * @private
+ */
+ function set percentWidth(value:Number):void;
+
+ //----------------------------------
+ // systemManager
+ //----------------------------------
+
+ /**
+ * A reference to the SystemManager object for this component.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get systemManager():ISystemManager;
+
+ /**
+ * @private
+ */
+ function set systemManager(value:ISystemManager):void;
+
+ //----------------------------------
+ // tweeningProperties
+ //----------------------------------
+
+ /**
+ * Used by EffectManager.
+ * Returns non-null if a component
+ * is not using the EffectManager to execute a Tween.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get tweeningProperties():Array;
+
+ /**
+ * @private
+ */
+ function set tweeningProperties(value:Array):void;
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Initialize the object.
+ *
+ * @see mx.core.UIComponent#initialize()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function initialize():void;
+
+ /**
+ * @copy mx.core.UIComponent#parentChanged()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function parentChanged(p:DisplayObjectContainer):void;
+
+ /**
+ * @copy mx.core.UIComponent#getExplicitOrMeasuredWidth()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function getExplicitOrMeasuredWidth():Number;
+
+ /**
+ * @copy mx.core.UIComponent#getExplicitOrMeasuredHeight()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function getExplicitOrMeasuredHeight():Number;
+
+ /**
+ * @copy mx.core.UIComponent#setVisible()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function setVisible(value:Boolean, noEvent:Boolean = false):void;
+
+ /**
+ * @copy mx.core.UIComponent#owns()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function owns(displayObject:DisplayObject):Boolean;
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
index e1a2735,0000000..f8f7b75
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
@@@ -1,165 -1,0 +1,165 @@@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.core
+{
+
- COMPILE::AS3
++COMPILE::SWF
+{
+ import flash.display.DisplayObject;
+ import flash.geom.Rectangle;
+ import flash.text.StyleSheet;
+ import flash.text.TextFormat;
+ import flash.text.TextLineMetrics;
+}
+COMPILE::JS
+{
+ import flex.display.DisplayObject;
+ import flex.text.TextFormat;
+ import flex.text.TextLineMetrics;
+ import org.apache.flex.geom.Rectangle;
+}
+import mx.managers.IToolTipManagerClient;
+import mx.styles.ISimpleStyleClient;
+
+/**
+ * The IUITextField interface defines the basic set of APIs
+ * for UITextField instances.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+public interface IUITextField extends IIMESupport,
+ IFlexModule,
+ IInvalidating, ISimpleStyleClient,
+ IToolTipManagerClient, IUIComponent
+{
+
+ include "ITextFieldInterface.as"
+ include "IInteractiveObjectInterface.as"
+
+ /**
+ * @copy mx.core.UITextField#ignorePadding
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get ignorePadding():Boolean;
+ function set ignorePadding(value:Boolean):void;
+
+ /**
+ * @copy mx.core.UITextField#inheritingStyles
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get inheritingStyles():Object;
+ function set inheritingStyles(value:Object):void;
+
+ /**
+ * @copy mx.core.UITextField#nestLevel
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get nestLevel():int;
+ function set nestLevel(value:int):void;
+
+ /**
+ * @copy mx.core.UITextField#nonInheritingStyles
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get nonInheritingStyles():Object;
+ function set nonInheritingStyles(value:Object):void;
+
+ /**
+ * @copy mx.core.UITextField#nonZeroTextHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get nonZeroTextHeight():Number;
+
+ /**
+ * @copy mx.core.UITextField#getStyle()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function getStyle(styleProp:String):*;
+
+ /**
+ * @copy mx.core.UITextField#getUITextFormat()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function getUITextFormat():UITextFormat
+
+ /**
+ * @copy mx.core.UITextField#setColor()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function setColor(color:uint):void;
+
+ /**
+ * @copy mx.core.UITextField#setFocus()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function setFocus():void;
+
+ /**
+ * @copy mx.core.UITextField#truncateToFit()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function truncateToFit(truncationIndicator:String = null):Boolean;
+
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
index 065f15f,0000000..407d254
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
@@@ -1,294 -1,0 +1,294 @@@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package mx.core
+{
- COMPILE::AS3
++COMPILE::SWF
+{
+ import flash.display.DisplayObjectContainer;
+}
+COMPILE::JS
+{
+ import flex.display.DisplayObjectContainer;
+}
+COMPILE::LATER
+{
+import mx.geom.TransformOffsets;
+}
+
+/**
+ * The IVisualElement interface defines the minimum properties and methods
+ * required for a visual element to be laid out and displayed in a Spark container.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+public interface IVisualElement extends ILayoutElement, ILayoutDirectionElement
+{
+
+ /**
+ * The owner of this IVisualElement object.
+ * By default, it is the parent of this IVisualElement object.
+ * However, if this IVisualElement object is a child component that is
+ * popped up by its parent, such as the drop-down list of a ComboBox control,
+ * the owner is the component that popped up this IVisualElement object.
+ *
+ * <p>This property is not managed by Flex, but by each component.
+ * Therefore, if you use the <code>PopUpManger.createPopUp()</code> or
+ * <code>PopUpManger.addPopUp()</code> method to pop up a child component,
+ * you should set the <code>owner</code> property of the child component
+ * to the component that popped it up.</p>
+ *
+ * <p>The default value is the value of the <code>parent</code> property.</p>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get owner():DisplayObjectContainer;
+
+ /**
+ * @private
+ */
+ function set owner(value:DisplayObjectContainer):void;
+
+ /**
+ * The parent container or component for this component.
+ * Only visual elements should have a <code>parent</code> property.
+ * Non-visual items should use another property to reference
+ * the object to which they belong.
+ * By convention, non-visual objects use an <code>owner</code>
+ * property to reference the object to which they belong.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get parent():DisplayObjectContainer;
+
+ /**
+ * Determines the order in which items inside of containers
+ * are rendered.
+ * Spark containers order their items based on their
+ * <code>depth</code> property, with the lowest depth in the back,
+ * and the higher in the front.
+ * Items with the same depth value appear in the order
+ * they are added to the container.
+ *
+ * @default 0
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get depth():Number;
+
+ /**
+ * @private
+ */
+ function set depth(value:Number):void;
+
+ /**
+ * Controls the visibility of this visual element.
+ * If <code>true</code>, the object is visible.
+ *
+ * <p>If an object is not visible, but the <code>includeInLayout</code>
+ * property is set to <code>true</code>, then the object
+ * takes up space in the container, but is invisible.</p>
+ *
+ * <p>If <code>visible</code> is set to <code>true</code>, the object may not
+ * necessarily be visible due to its size and whether container clipping
+ * is enabled.</p>
+ *
+ * <p>Setting <code>visible</code> to <code>false</code>,
+ * prevents the component from getting focus.</p>
+ *
+ * @default true
+ * @see ILayoutElement#includeInLayout
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get visible():Boolean;
+
+ /**
+ * @private
+ */
+ function set visible(value:Boolean):void;
+
+ /**
+ * @copy flash.display.DisplayObject#alpha
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get alpha():Number;
+
+ /**
+ * @private
+ */
+ function set alpha(value:Number):void;
+
+
+ /**
+ * @copy flash.display.DisplayObject#width
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get width():Number;
+
+ /**
+ * @private
+ */
+ function set width(value:Number):void;
+
+ /**
+ * @copy flash.display.DisplayObject#height
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get height():Number;
+
+ /**
+ * @private
+ */
+ function set height(value:Number):void;
+
+ /**
+ * @copy flash.display.DisplayObject#x
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get x():Number;
+
+ /**
+ * @private
+ */
+ function set x(value:Number):void;
+
+
+ /**
+ * @copy flash.display.DisplayObject#y
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get y():Number;
+
+ /**
+ * @private
+ */
+ function set y(value:Number):void;
+
+ /**
+ * Specifies the optional DesignLayer instance associated with this visual
+ * element.
+ *
+ * <p>When a DesignLayer is assigned, a visual element must consider the
+ * visibility and alpha of its parent layer when ultimately committing its
+ * own effective visibility or alpha to its backing DisplayObject
+ * (if applicable).</p>
+ *
+ * <p>A visual element must listen for <code>layerPropertyChange</code>
+ * notifications from the associated layer parent. When the
+ * <code>effectiveAlpha</code> or <code>effectiveVisibility</code> of the
+ * layer changes, the element must then compute its own effective visibility
+ * (or alpha) and apply it accordingly.</p>
+ *
+ * <p>This property should not be set within MXML directly.</p>
+ *
+ * <p>The <code>designLayer</code> property is not used for z-order control,
+ * please see <code>depth</code>.</p>
+ *
+ * @see #depth
+ * @default null
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ COMPILE::LATER
+ function get designLayer():DesignLayer;
+
+ /**
+ * @private
+ */
+ COMPILE::LATER
+ function set designLayer(value:DesignLayer):void;
+
+ /**
+ * Defines a set of adjustments that can be applied to the object's
+ * transform in a way that is invisible to its parent's layout.
+ *
+ * <p>For example, if you want a layout to adjust for an object
+ * that is rotated 90 degrees, set the object's
+ * <code>rotation</code> property. If you want the layout to <i>not</i>
+ * adjust for the object being rotated,
+ * set its <code>postLayoutTransformOffsets.rotationZ</code> property.</p>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ COMPILE::LATER
+ function get postLayoutTransformOffsets():TransformOffsets;
+
+ /**
+ * @private
+ */
+ COMPILE::LATER
+ function set postLayoutTransformOffsets(value:TransformOffsets):void;
+
+ /**
+ * Contains <code>true</code> when the element is in 3D.
+ * The element can be in 3D either because
+ * it has 3D transform properties or it has 3D post layout transform offsets or both.
+ *
+ * @see #postLayoutTransformOffsets
+ * @see mx.core.ILayoutElement#hasLayoutMatrix3D
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function get is3D():Boolean;
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
index 3b5555c,0000000..ec046b1
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
@@@ -1,193 -1,0 +1,193 @@@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.core
+{
+COMPILE::LATER
+{
+import flash.display.Stage;
+}
+
- COMPILE::AS3
++COMPILE::SWF
+{
+ import flash.system.Capabilities;
+ import flash.display.DisplayObject;
+ import mx.managers.SystemManager;
+}
+import org.apache.flex.utils.Display;
+
+import mx.core.mx_internal;
+import mx.utils.Platform;
+
+use namespace mx_internal;
+
+/**
+ * The RuntimeDPIProvider class provides the default mapping of
+ * similar device DPI values into predefined DPI classes.
+ * An Application may have its runtimeDPIProvider property set to a
+ * subclass of RuntimeDPIProvider to override Flex's default mappings.
+ * Overriding Flex's default mappings will cause changes in the Application's
+ * automatic scaling behavior.
+ *
+ * <p>Overriding Flex's default mappings is usually only necessary for devices
+ * that incorrectly report their screenDPI and for devices that may scale better
+ * in a different DPI class.</p>
+ *
+ * <p>Flex's default mappings are:
+ * <table class="innertable">
+ * <tr><td>160 DPI</td><td><140 DPI</td></tr>
+ * <tr><td>160 DPI</td><td>>=140 DPI and <=200 DPI</td></tr>
+ * <tr><td>240 DPI</td><td>>=200 DPI and <=280 DPI</td></tr>
+ * <tr><td>320 DPI</td><td>>=280 DPI and <=400 DPI</td></tr>
+ * <tr><td>480 DPI</td><td>>=400 DPI and <=560 DPI</td></tr>
+ * <tr><td>640 DPI</td><td>>=640 DPI</td></tr>
+ * </table>
+ * </p>
+ *
+ *
+ *
+ * <p>Subclasses of RuntimeDPIProvider should only depend on runtime APIs
+ * and should not depend on any classes specific to the Flex framework except
+ * <code>mx.core.DPIClassification</code>.</p>
+ *
+ * @includeExample examples/RuntimeDPIProviderApp.mxml -noswf
+ * @includeExample examples/RuntimeDPIProviderExample.as -noswf
+ * @includeExample examples/views/RuntimeDPIProviderAppView.mxml -noswf
+ *
+ * @see mx.core.DPIClassification
+ * @see spark.components.Application#applicationDPI
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 2.5
+ * @productversion Flex 4.5
+ */
+public class RuntimeDPIProvider
+{
+
+ mx_internal static const IPAD_MAX_EXTENT:int = 1024;
+ mx_internal static const IPAD_RETINA_MAX_EXTENT: int = 2048;
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 2.5
+ * @productversion Flex 4.5
+ */
+ public function RuntimeDPIProvider()
+ {
+ }
+
+ /**
+ * Returns the runtime DPI of the current device by mapping its
+ * <code>flash.system.Capabilities.screenDPI</code> to one of several DPI
+ * values in <code>mx.core.DPIClassification</code>.
+ *
+ * A number of devices can have slightly different DPI values and Flex maps these
+ * into the several DPI classes.
+ *
+ * Flex uses this method to calculate the current DPI value when an Application
+ * authored for a specific DPI is adapted to the current one through scaling.
+ *
+ * <p> Exceptions: </p>
+ * <ul>
+ * <li>All non-retina iPads receive 160 DPI </li>
+ * <li>All retina iPads receive 320 DPI </li>
+ * </ul>
+ *
+ * @param dpi The DPI value.
+ * @return The corresponding <code>DPIClassification</code> value.
+ * isI
+ * @see flash.system.Capabilities
+ * @see mx.core.DPIClassification
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 2.5
+ * @productversion Flex 4.5
+ */
+
+ public function get runtimeDPI():Number
+ {
+ if (Platform.isIOS) // as isIPad returns false in the simulator
+ {
+ var scX:Number = Display.width;
+ var scY:Number = Display.height;
+
- COMPILE::AS3
++ COMPILE::SWF
+ {
+ // Use the stage width/height only when debugging, because Capabilities reports the computer resolution
+ if (Capabilities.isDebugger)
+ {
+ var root:DisplayObject = SystemManager.getSWFRoot(this);
+ if (root && root.stage)
+ {
+ scX = root.stage.fullScreenWidth;
+ scY = root.stage.fullScreenHeight;
+ }
+ }
+ }
+
+ /* as of Dec 2013, iPad (resp. iPad retina) are the only iOS devices to have 1024 (resp. 2048) screen width or height
+ cf http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density#Apple
+ * */
+ if (scX == IPAD_MAX_EXTENT || scY == IPAD_MAX_EXTENT)
+ return DPIClassification.DPI_160;
+ else if ((scX == IPAD_RETINA_MAX_EXTENT || scY == IPAD_RETINA_MAX_EXTENT))
+ return DPIClassification.DPI_320;
+ }
+
+ return classifyDPI(Display.dpi);
+ }
+
+ /**
+ * @private
+ * Matches the specified DPI to a <code>DPIClassification</code> value.
+ * A number of devices can have slightly different DPI values and classifyDPI
+ * maps these into the several DPI classes.
+ *
+ * This method is specifically kept for Design View. Flex uses RuntimeDPIProvider
+ * to calculate DPI classes.
+ *
+ * @param dpi The DPI value.
+ * @return The corresponding <code>DPIClassification</code> value.
+ */
+ mx_internal static function classifyDPI(dpi:Number):Number
+ {
+ if (dpi <= 140)
+ return DPIClassification.DPI_120;
+
+ if (dpi <= 200)
+ return DPIClassification.DPI_160;
+
+ if (dpi <= 280)
+ return DPIClassification.DPI_240;
+
+ if (dpi <= 400)
+ return DPIClassification.DPI_320;
+
+ if (dpi <= 560)
+ return DPIClassification.DPI_480;
+
+ return DPIClassification.DPI_640;
+ }
+}
- }
++}