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:52 UTC
[35/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/managers/ISystemManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as
index 35e5800,0000000..d468939
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as
@@@ -1,529 -1,0 +1,529 @@@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.managers
+{
+
- COMPILE::AS3
++COMPILE::SWF
+{
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+}
+COMPILE::JS
+{
+ import flex.display.DisplayObject;
+ import flex.display.Sprite;
+}
+import flex.display.ModuleInfo;
+import flex.display.TopOfDisplayList;
+
+import flex.events.IEventDispatcher;
+import org.apache.flex.geom.Rectangle;
+COMPILE::LATER
+{
+import flash.text.TextFormat;
+}
+
+import mx.core.IChildList;
+import mx.core.IFlexModuleFactory;
+
+/**
+ * An ISystemManager manages an "application window".
+ * Every application that runs on the desktop or in a browser
+ * has an area where the visuals of the application will be
+ * displayed. It may be a window in the operating system
+ * or an area within the browser. That is an "application window"
+ * and different from an instance of <code>mx.core.Application</code>, which
+ * is the main "top-level" window within an application.
+ *
+ * <p>Every application has an ISystemManager.
+ * The ISystemManager sends an event if
+ * the size of the application window changes (you cannot change it from
+ * within the application, but only through interaction with the operating
+ * system window or browser). It parents all displayable items within the
+ * application, such as the main mx.core.Application instance and all popups,
+ * tooltips, cursors, an so on. Any object parented by the ISystemManager is
+ * considered to be a "top-level" window, even tooltips and cursors.</p>
+ *
+ * <p>The ISystemManager also switches focus between top-level windows
+ * if there are more than one IFocusManagerContainer displayed and users
+ * are interacting with components within the IFocusManagerContainers.</p>
+ *
+ * <p>All keyboard and mouse activity that is not expressly trapped is seen
+ * by the ISystemManager, making it a good place to monitor activity
+ * should you need to do so.</p>
+ *
+ * <p>If an application is loaded into another application, an ISystemManager
+ * will still be created, but will not manage an "application window",
+ * depending on security and domain rules.
+ * Instead, it will be the <code>content</code> of the <code>Loader</code>
+ * that loaded it and simply serve as the parent of the sub-application</p>
+ *
+ * <p>The ISystemManager maintains multiple lists of children, one each for
+ * tooltips, cursors, popup windows.
+ * This is how it ensures that popup windows "float" above the main
+ * application windows and that tooltips "float" above that
+ * and cursors above that.
+ * If you examine the <code>numChildren</code> property
+ * or <code>getChildAt()</code> method on the ISystemManager
+ * you are accessing the main application window and any other windows
+ * that aren't popped up.
+ * To get the list of all windows, including popups, tooltips and cursors,
+ * use the <code>rawChildren</code> property.</p>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory
+{
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // cursorChildren
+ //----------------------------------
+
+ /**
+ * An list of the custom cursors
+ * being parented by this ISystemManager.
+ *
+ * <p>An ISystemManager has various types of children,
+ * such as the Application, popups, top-most windows,
+ * tooltips, and custom cursors.
+ * You can access the custom cursors through
+ * the <code>cursorChildren</code> property.</p>
+ *
+ * <p>The IChildList object has methods like <code>getChildAt()</code>
+ * and properties like <code>numChildren</code>.
+ * For example, <code>cursorChildren.numChildren</code> gives
+ * the number of custom cursors (which will be either 0 or 1)
+ * and, if a custom cursor exists, you can access it as
+ * <code>cursorChildren.getChildAt(0)</code>.</p>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get cursorChildren():IChildList;
+
+ //----------------------------------
+ // document
+ //----------------------------------
+
+ /**
+ * A reference to the document object.
+ * A document object is an Object at the top of the hierarchy of a
+ * Flex application, MXML component, or AS 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;
+
+ //----------------------------------
+ // embeddedFontList
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get embeddedFontList():Object;
+
+ //----------------------------------
+ // focusPane
+ //----------------------------------
+
+ /**
+ * A single Sprite shared among components used as an overlay for drawing focus.
+ * You share it if you parent a focused component, not if you are IFocusManagerComponent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get focusPane():Sprite;
+
+ /**
+ * @private
+ */
+ function set focusPane(value:Sprite):void;
+
+ //----------------------------------
+ // isProxy
+ //----------------------------------
+
+ /**
+ * True if the ISystemManager is a proxy and not a root class.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get isProxy():Boolean;
+
+ //----------------------------------
+ // loaderInfo
+ //----------------------------------
+
+ /**
+ * The LoaderInfo object that represents information about the application.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get moduleInfo():ModuleInfo;
+
+ //----------------------------------
+ // numModalWindows
+ //----------------------------------
+
+ /**
+ * The number of modal windows.
+ *
+ * <p>Modal windows don't allow
+ * clicking in another windows which would normally
+ * activate the FocusManager in that window. The PopUpManager
+ * modifies this count as it creates and destroy modal windows.</p>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get numModalWindows():int;
+
+ /**
+ * @private
+ */
+ function set numModalWindows(value:int):void;
+
+ //----------------------------------
+ // popUpChildren
+ //----------------------------------
+
+ /**
+ * An list of the topMost (popup)
+ * windows being parented by this ISystemManager.
+ *
+ * <p>An ISystemManager has various types of children,
+ * such as the Application, popups,
+ * tooltips, and custom cursors.
+ * You can access the top-most windows through
+ * the <code>popUpChildren</code> property.</p>
+ *
+ * <p>The IChildList object has methods like <code>getChildAt()</code>
+ * and properties like <code>numChildren</code>.
+ * For example, <code>popUpChildren.numChildren</code> gives
+ * the number of topmost windows and you can access them as
+ * <code>popUpChildren.getChildAt(i)</code>.</p>
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get popUpChildren():IChildList;
+
+ //----------------------------------
+ // rawChildren
+ //----------------------------------
+
+ /**
+ * A list of all children
+ * being parented by this ISystemManager.
+ *
+ * <p>An ISystemManager has various types of children,
+ * such as the Application, popups,
+ * tooltips, and custom cursors.</p>
+ *
+ * <p>The IChildList object has methods like <code>getChildAt()</code>
+ * and properties like <code>numChildren</code>.</p>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get rawChildren():IChildList;
+
+ //----------------------------------
+ // screen
+ //----------------------------------
+
+ /**
+ * The size and position of the application window.
+ *
+ * The Rectangle object contains <code>x</code>, <code>y</code>,
+ * <code>width</code>, and <code>height</code> properties.
+ *
+ * The Rectangle is in sandbox root coordinates.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get screen():Rectangle
+
+ //----------------------------------
+ // topOfDisplayList
+ //----------------------------------
+
+ /**
+ * The flash.display.Stage that represents the application window
+ * mapped to this SystemManager
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get topOfDisplayList():TopOfDisplayList
+
+ //----------------------------------
+ // toolTipChildren
+ //----------------------------------
+
+ /**
+ * A list of the tooltips
+ * being parented by this ISystemManager.
+ *
+ * <p>An ISystemManager has various types of children,
+ * such as the Application, popups, topmost windows,
+ * tooltips, and custom cursors.</p>
+ *
+ * <p>The IChildList object has methods like <code>getChildAt()</code>
+ * and properties like <code>numChildren</code>.
+ * For example, <code>toolTipChildren.numChildren</code> gives
+ * the number of tooltips (which will be either 0 or 1)
+ * and, if a tooltip exists, you can access it as
+ * <code>toolTipChildren.getChildAt(0)</code>.</p>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get toolTipChildren():IChildList;
+
+ //----------------------------------
+ // topLevelSystemManager
+ //----------------------------------
+
+ /**
+ * The ISystemManager responsible for the application window.
+ * This will be the same ISystemManager unless this application
+ * has been loaded into another application.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get topLevelSystemManager():ISystemManager;
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Converts the given String to a Class or package-level Function.
+ * Calls the appropriate <code>ApplicationDomain.getDefinition()</code>
+ * method based on
+ * whether you are loaded into another application or not.
+ *
+ * @param name Name of class, for example "mx.video.VideoManager".
+ *
+ * @return The Class represented by the <code>name</code>, or null.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function getDefinitionByName(name:String):Object;
+
+ /**
+ * Returns <code>true</code> if this ISystemManager is responsible
+ * for an application window, and <code>false</code> if this
+ * application has been loaded into another application.
+ *
+ * @return <code>true</code> if this ISystemManager is responsible
+ * for an application window.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function isTopLevel():Boolean;
+
+ /**
+ * Returns <code>true</code> if the required font face is embedded
+ * in this application, or has been registered globally by using the
+ * <code>Font.registerFont()</code> method.
+ *
+ * @param tf The TextFormat class representing character formatting information.
+ *
+ * @return <code>true</code> if the required font face is embedded
+ * in this application, or has been registered globally by using the
+ * <code>Font.registerFont()</code> method.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ COMPILE::LATER
+ function isFontFaceEmbedded(tf:TextFormat):Boolean;
+
+ /**
+ * Tests if this system manager is the root of all
+ * top level system managers.
+ *
+ * @return <code>true</code> if the SystemManager
+ * is the root of all SystemManagers on the display list,
+ * and <code>false</code> otherwise.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function isTopLevelRoot():Boolean;
+
+ /**
+ * Attempts to get the system manager that is the in the main application.
+ *
+ * @return The main application's systemManager if allowed by
+ * security restrictions or null if it is in a different SecurityDomain.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function getTopLevelRoot():DisplayObject;
+
+ /**
+ * Gets the system manager that is the root of all
+ * top level system managers in this SecurityDomain.
+ *
+ * @return the highest-level systemManager in the sandbox
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ COMPILE::LATER
+ function getSandboxRoot():DisplayObject;
+
+ /**
+ * Get the bounds of the loaded application that are visible to the user
+ * on the screen.
+ *
+ * @param bounds Optional. The starting bounds for the visible rect. The
+ * bounds are in global coordinates. If <code>bounds</code> is null the
+ * starting bounds is defined by the <code>screen</code> property of the
+ * system manager.
+ *
+ * @return a <code>Rectangle</code> including the visible portion of the this
+ * object. The rectangle is in global coordinates.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ COMPILE::LATER
+ function getVisibleApplicationRect(bounds:Rectangle = null, skipToSandboxRoot:Boolean = false):Rectangle;
+
+ /**
+ * Deploy or remove mouse shields. Mouse shields block mouse input to untrusted
+ * applications. The reason you would want to block mouse input is because
+ * when you are dragging over an untrusted application you would normally not
+ * receive any mouse move events. The Flash Player does not send events
+ * across trusted/untrusted boundries due to security concerns. By covering
+ * the untrusted application with a mouse shield (assuming you are its parent)
+ * you can get mouse move message and the drag operation will work as expected.
+ *
+ * @param deploy <code>true</code> to deploy the mouse shields, <code>false</code>
+ * to remove the mouse shields.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function deployMouseShields(deploy:Boolean):void;
+
+ /**
+ * Attempt to notify the parent SWFLoader that the application's size may
+ * have changed.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ function invalidateParentSizeAndDisplayList():void;
+
+
+ //----------------------------------
+ // stage
+ //----------------------------------
+
+ /**
+ * The flash.display.Stage that represents the application window
+ * mapped to this SystemManager
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
- COMPILE::AS3
++ COMPILE::SWF
+ function get stage():Stage
+
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManagerChildManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/ISystemManagerChildManager.as
index a716ca1,0000000..e499ba2
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManagerChildManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManagerChildManager.as
@@@ -1,60 -1,0 +1,60 @@@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.managers
+{
+
- COMPILE::AS3
++COMPILE::SWF
+{
+ import flash.display.DisplayObject;
+}
+COMPILE::JS
+{
+ import flex.display.DisplayObject;
+}
+
+[ExcludeClass]
+
+/**
+ */
+public interface ISystemManagerChildManager
+{
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ function addingChild(child:DisplayObject):void;
+ function childAdded(child:DisplayObject):void;
+
+ function childRemoved(child:DisplayObject):void;
+ function removingChild(child:DisplayObject):void;
+
+ function initializeTopLevelWindow(width:Number, height:Number):void;
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
index 6498b61,0000000..1b2212f
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
@@@ -1,213 -1,0 +1,213 @@@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.managers
+{
+
- COMPILE::AS3
++COMPILE::SWF
+{
+ import flash.display.DisplayObject;
+}
+COMPILE::JS
+{
+ import flex.display.DisplayObject;
+}
+
+import mx.core.IToolTip;
+import mx.core.IUIComponent;
+import mx.effects.IEffect;
+
+[ExcludeClass]
+
+/**
+ * @private
+ * This interface was used by Flex 2.0.1.
+ * Flex 3 uses IToolTipManager2 instead.
+ */
+public interface IToolTipManager
+{
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // currentTarget
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get currentTarget():DisplayObject;
+
+ /**
+ * @private
+ */
+ function set currentTarget(value:DisplayObject):void;
+
+ //----------------------------------
+ // currentToolTip
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get currentToolTip():IToolTip;
+
+ /**
+ * @private
+ */
+ function set currentToolTip(value:IToolTip):void;
+
+ //----------------------------------
+ // enabled
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get enabled():Boolean;
+
+ /**
+ * @private
+ */
+ function set enabled(value:Boolean):void;
+
+ //----------------------------------
+ // hideDelay
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get hideDelay():Number;
+
+ /**
+ * @private
+ */
+ function set hideDelay(value:Number):void;
+
+ //----------------------------------
+ // hideEffect
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get hideEffect():IEffect;
+
+ /**
+ * @private
+ */
+ function set hideEffect(value:IEffect):void;
+
+ //----------------------------------
+ // scrubDelay
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get scrubDelay():Number;
+
+ /**
+ * @private
+ */
+ function set scrubDelay(value:Number):void;
+
+ //----------------------------------
+ // showDelay
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get showDelay():Number;
+
+ /**
+ * @private
+ */
+ function set showDelay(value:Number):void;
+
+ //----------------------------------
+ // showEffect
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get showEffect():IEffect;
+
+ /**
+ * @private
+ */
+ function set showEffect(value:IEffect):void;
+
+ //----------------------------------
+ // showEffect
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get toolTipClass():Class;
+
+ /**
+ * @private
+ */
+ function set toolTipClass(value:Class):void;
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ function registerToolTip(target:DisplayObject, oldToolTip:String,
+ newToolTip:String):void;
+
+ /**
+ * @private
+ */
+ function registerErrorString(target:DisplayObject, oldErrorString:String,
+ newErrorString:String):void;
+
+ /**
+ * @private
+ */
+ function sizeTip(toolTip:IToolTip):void;
+
+ /**
+ * @private
+ */
+ function createToolTip(text:String, x:Number, y:Number,
+ errorTipBorderStyle:String = null,
+ context:IUIComponent = null):IToolTip;
+
+ /**
+ * @private
+ */
+ function destroyToolTip(toolTip:IToolTip):void;
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager2.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager2.as
index db5af2d,0000000..196511f
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager2.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager2.as
@@@ -1,226 -1,0 +1,226 @@@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.managers
+{
+
- COMPILE::AS3
++COMPILE::SWF
+{
+ import flash.display.DisplayObject;
+}
+COMPILE::JS
+{
+ import flex.display.DisplayObject;
+}
+
+import mx.core.IToolTip;
+import mx.core.IUIComponent;
+import mx.effects.IAbstractEffect;
+
+[ExcludeClass]
+
+/**
+ * @private
+ * This interface is used internally by Flex 3.
+ * Flex 2.0.1 used the IToolTipManager interface.
+ *
+ * This interface does not extend IToolTipManager
+ * because IToolTipManager had a dependency on Effect,
+ * which has a dependency on UIComponent.
+ * IToolTipManager2 fixes this by depending on IAbstractEffect,
+ * a new interface in Flex 3.
+ *
+ * IToolTipManager2 must be in the cross-versioning
+ * bootstrap set of classes (see bootstrap-defs.as)
+ * and if the bootstrap loader contains implementation
+ * classes such as Effect and UIComponent then any apps
+ * and modules it loads would use the bootstrap's version
+ * of these classes, instead of using their own versions.
+ */
+public interface IToolTipManager2
+{
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // currentTarget
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get currentTarget():DisplayObject;
+
+ /**
+ * @private
+ */
+ function set currentTarget(value:DisplayObject):void;
+
+ //----------------------------------
+ // currentToolTip
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get currentToolTip():IToolTip;
+
+ /**
+ * @private
+ */
+ function set currentToolTip(value:IToolTip):void;
+
+ //----------------------------------
+ // enabled
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get enabled():Boolean;
+
+ /**
+ * @private
+ */
+ function set enabled(value:Boolean):void;
+
+ //----------------------------------
+ // hideDelay
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get hideDelay():Number;
+
+ /**
+ * @private
+ */
+ function set hideDelay(value:Number):void;
+
+ //----------------------------------
+ // hideEffect
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get hideEffect():IAbstractEffect;
+
+ /**
+ * @private
+ */
+ function set hideEffect(value:IAbstractEffect):void;
+
+ //----------------------------------
+ // scrubDelay
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get scrubDelay():Number;
+
+ /**
+ * @private
+ */
+ function set scrubDelay(value:Number):void;
+
+ //----------------------------------
+ // showDelay
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get showDelay():Number;
+
+ /**
+ * @private
+ */
+ function set showDelay(value:Number):void;
+
+ //----------------------------------
+ // showEffect
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get showEffect():IAbstractEffect;
+
+ /**
+ * @private
+ */
+ function set showEffect(value:IAbstractEffect):void;
+
+ //----------------------------------
+ // toolTipClass
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ function get toolTipClass():Class;
+
+ /**
+ * @private
+ */
+ function set toolTipClass(value:Class):void;
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ function registerToolTip(target:DisplayObject, oldToolTip:String,
+ newToolTip:String):void;
+
+ /**
+ * @private
+ */
+ function registerErrorString(target:DisplayObject, oldErrorString:String,
+ newErrorString:String):void;
+
+ /**
+ * @private
+ */
+ function sizeTip(toolTip:IToolTip):void;
+
+ /**
+ * @private
+ */
+ function createToolTip(text:String, x:Number, y:Number,
+ errorTipBorderStyle:String = null,
+ context:IUIComponent = null):IToolTip;
+
+ /**
+ * @private
+ */
+ function destroyToolTip(toolTip:IToolTip):void;
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77148f4a/frameworks/projects/MX/src/main/flex/mx/managers/SystemChildrenList.as
----------------------------------------------------------------------
diff --cc frameworks/projects/MX/src/main/flex/mx/managers/SystemChildrenList.as
index b1588f4,0000000..160c0a4
mode 100644,000000..100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/SystemChildrenList.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/SystemChildrenList.as
@@@ -1,300 -1,0 +1,300 @@@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.managers
+{
+
- COMPILE::AS3
++COMPILE::SWF
+{
+ import flash.display.DisplayObject;
+ import flash.geom.Point;
+}
+COMPILE::JS
+{
+ import flex.display.DisplayObject;
+ import org.apache.flex.geom.Point;
+}
+import mx.core.IChildList;
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+[ExcludeClass]
+
+/**
+ * @private
+ * A SystemManager has various types of children,
+ * such as the Application, popups, tooltips, and custom cursors.
+ *
+ * You can access all the children via the <code>rawChildren</code> property.
+ * You can access just the popups via <code>popUpChildren</code>,
+ * the tooltips via <code>toolTipChildren</code>,
+ * and the custom cursors via <code>cursorChildren</code>.
+ * Each of these returns a SystemChildrenList which implements IChildList.
+ *
+ * The SystemChildrenList is given two indices that map
+ * to a subset of the indices of children within the entire
+ * set of child indices in the SystemManager.
+ * It manages the children within those two indices.
+ */
+public class SystemChildrenList implements IChildList
+{
+ include "../core/Version.as";
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function SystemChildrenList(owner:SystemManager,
+ lowerBoundReference:QName,
+ upperBoundReference:QName)
+ {
+ super();
+
+ this.owner = owner;
+ this.lowerBoundReference = lowerBoundReference;
+ this.upperBoundReference = upperBoundReference;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ private var owner:SystemManager;
+
+ /**
+ * @private
+ * Either "noTopMostIndex", "topMostIndex", or "toolTipIndex".
+ * The popUpChildren extends from noTopMostIndex to topMostIndex.
+ * The toolTips extends from topMostIndex to toolTipIndex.
+ * The cursors extends from toolTipIndex to cursorIndex.
+ */
+ private var lowerBoundReference:QName;
+
+ /**
+ * @private
+ * Either "topMostIndex", "toolTipIndex", or "cursorIndex".
+ * The popUpChildren extends from noTopMostIndex to topMostIndex.
+ * The toolTips extends from topMostIndex to toolTipIndex.
+ * The cursors extends from toolTipIndex to cursorIndex.
+ */
+ private var upperBoundReference:QName;
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @copy mx.core.IChildList#numChildren
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function get numChildren():int
+ {
+ return owner[upperBoundReference] - owner[lowerBoundReference];
+ }
+
+ /**
+ * @copy mx.core.IChildList#addChild
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function addChild(child:DisplayObject):DisplayObject
+ {
+ owner.rawChildren_addChildAt(
+ child, owner[upperBoundReference]);
+ owner[upperBoundReference]++;
+ return child;
+ }
+
+ /**
+ * @copy mx.core.IChildList#addChildAt
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function addChildAt(child:DisplayObject, index:int):DisplayObject
+ {
+ owner.rawChildren_addChildAt(
+ child, owner[lowerBoundReference] + index);
+ owner[upperBoundReference]++;
+ return child;
+ }
+
+ /**
+ * @copy mx.core.IChildList#removeChild
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function removeChild(child:DisplayObject):DisplayObject
+ {
+ var index:int = owner.rawChildren_getChildIndex(child);
+ if (owner[lowerBoundReference] <= index &&
+ index < owner[upperBoundReference])
+ {
+ owner.rawChildren_removeChild(child);
+ owner[upperBoundReference]--;
+ }
+ return child;
+ }
+
+ /**
+ * @copy mx.core.IChildList#removeChildAt
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function removeChildAt(index:int):DisplayObject
+ {
+ var child:DisplayObject =
+ owner.rawChildren_removeChildAt(
+ index + owner[lowerBoundReference]);
+ owner[upperBoundReference]--;
+ return child;
+ }
+
+ /**
+ * @copy mx.core.IChildList#getChildAt
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function getChildAt(index:int):DisplayObject
+ {
+ var retval:DisplayObject =
+ owner.rawChildren_getChildAt(
+ owner[lowerBoundReference] + index);
+ return retval;
+ }
+
+ /**
+ * @copy mx.core.IChildList#getChildByName
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function getChildByName(name:String):DisplayObject
+ {
+ return owner.rawChildren_getChildByName(name);
+ }
+
+ /**
+ * @copy mx.core.IChildList#getChildIndex
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function getChildIndex(child:DisplayObject):int
+ {
+ var retval:int = owner.rawChildren_getChildIndex(child);
+ retval -= owner[lowerBoundReference];
+ return retval;
+ }
+
+ /**
+ * @copy mx.core.IChildList#setChildIndex
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function setChildIndex(child:DisplayObject, newIndex:int):void
+ {
+ owner.rawChildren_setChildIndex(
+ child, owner[lowerBoundReference] + newIndex);
+ }
+
+ /**
+ * @copy mx.core.IChildList#getObjectsUnderPoint
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function getObjectsUnderPoint(point:Point):Array
+ {
+ return owner.rawChildren_getObjectsUnderPoint(point);
+ }
+
+ /**
+ * @copy mx.core.IChildList#contains
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function contains(child:DisplayObject):Boolean
+ {
+ if (child != owner && owner.rawChildren_contains(child))
+ {
+ while (child.parent != owner)
+ {
+ child = child.parent;
+ }
+ var childIndex:int = owner.rawChildren_getChildIndex(child);
+ if (childIndex >= owner[lowerBoundReference] &&
+ childIndex < owner[upperBoundReference])
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
+}