Return-Path:
The tool tip is responsible for positioning itself and defining + * its transition effects.
+ * + * @see spark.components.ToolTip + * + * @langversion 3.0 + * @playerversion Flash 11 + * @playerversion AIR 3 + * @productversion Flex 5.0 + */ +public class ToolTipManager extends EventDispatcher +{ + include "../../mx/core/Version.as"; + + //-------------------------------------------------------------------------- + // + // Class variables + // + //-------------------------------------------------------------------------- + + /** + * @private + * Linker dependency on implementation class. + */ + private static var _implClassDependency:ToolTipManagerImpl; + + /** + * @private + * Storage for the impl getter. + * This gets initialized on first access, + * not at static initialization time, in order to ensure + * that the Singleton registry has already been initialized. + */ + private static var _impl:IToolTipManagerImpl; + + /** + * @private + * The singleton instance of ToolTipManagerImpl which was + * registered as implementing the IToolTipManagerImpl interface. + */ + private static function get impl():IToolTipManagerImpl + { + if (!_impl) + _impl = IToolTipManagerImpl(Singleton.getInstance("spark.managers::IToolTipManagerImpl")); + + return _impl; + } + + //-------------------------------------------------------------------------- + // + // Class Properties + // + //-------------------------------------------------------------------------- + + //---------------------------------- + // enabled + //---------------------------------- + + /** + * Iftrue
, the ToolTipManager will automatically
+ * show tool tips when the user moves the mouse pointer over
+ * components.
+ * If false
, the ToolTipManager will not show
+ * tool tips.
+ *
+ * @default true
+ *
+ * @langversion 3.0
+ * @playerversion Flash 11
+ * @playerversion AIR 3
+ * @productversion Flex 5.0
+ */
+ public static function get enabled():Boolean
+ {
+ return impl.enabled;
+ }
+
+ /**
+ * @private
+ */
+ public static function set enabled(value:Boolean):void
+ {
+ impl.enabled = value;
+ }
+
+ //----------------------------------
+ // currentTarget
+ //----------------------------------
+
+ /**
+ * The UIComponent that is currently displaying a tool tip or is
+ * scheduled to display a tool tip when the show delay elapses.
+ * This property is null
if no tool tip is shown or scheduled.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 11
+ * @playerversion AIR 3
+ * @productversion Flex 5.0
+ */
+ public static function get currentTarget():IToolTipManagerClient
+ {
+ return impl.currentTarget;
+ }
+
+ /**
+ * @private
+ */
+ public static function set currentTarget(value:IToolTipManagerClient):void
+ {
+ impl.currentTarget = value;
+ }
+
+ //----------------------------------
+ // currentToolTip
+ //----------------------------------
+
+ /**
+ * The tool tip that is currently visible,
+ * or null
if none is shown.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 11
+ * @playerversion AIR 3
+ * @productversion Flex 5.0
+ */
+ public static function get currentToolTip():IToolTip
+ {
+ return impl.currentToolTip;
+ }
+
+ /**
+ * @private
+ */
+ public static function set currentToolTip(value:IToolTip):void
+ {
+ impl.currentToolTip = value;
+ }
+
+ //----------------------------------------------------------------------
+ //
+ // Class Methods
+ //
+ //----------------------------------------------------------------------
+
+ //----------------------------------------------
+ // Component registration / deregistration
+ //----------------------------------------------
+
+ /**
+ * Registers a target UIComponent with the ToolTipManager.
+ * This causes the ToolTipManager to display a tool tip when the
+ * mouse hovers over the target.
+ *
+ * When popping up a new ToolTip, the + * ToolTipManager passes the target's toolTipData + * property to the ToolTip it creates. + * The ToolTip's skin then renders the data for display.
+ * + *This method may be called by UIComponent's setter for the toolTipData + * property.
+ * + * @param target The UIComponent that owns the tool tip. + * + * @see mx.core.UIComponent + * + * @langversion 3.0 + * @playerversion Flash 11 + * @playerversion AIR 3 + * @productversion Flex 5.0 + */ + public static function registerTarget(target:IToolTipManagerClient):void + { + impl.registerTarget(target); + } + + /** + * Unregisters a target UIComponent with the ToolTipManager. + * The ToolTipManager will no longer pop up tool tips for the + * target component. + * + *This method may be called by UIComponent's setter for the toolTipData + * property.
+ * + * @param target The UIComponent that owns the tool tip. + * + * @langversion 3.0 + * @playerversion Flash 11 + * @playerversion AIR 3 + * @productversion Flex 5.0 + */ + public static function unregisterTarget(target:IToolTipManagerClient):void + { + impl.unregisterTarget(target); + } +} +} Propchange: incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/ToolTipManager.as ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/ToolTipManager.as ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/ToolTipManagerImpl.as URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/ToolTipManagerImpl.as?rev=1370028&view=auto ============================================================================== --- incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/ToolTipManagerImpl.as (added) +++ incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/ToolTipManagerImpl.as Mon Aug 6 21:25:54 2012 @@ -0,0 +1,677 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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 spark.managers +{ + +import flash.display.DisplayObject; +import flash.events.Event; +import flash.events.EventDispatcher; +import flash.events.MouseEvent; +import flash.events.TimerEvent; +import flash.utils.Timer; +import flash.utils.getTimer; + +import mx.core.mx_internal; +import mx.managers.IToolTipManagerClient; + +import spark.core.IToolTip; + +use namespace mx_internal; + +[ExcludeClass] + +/** + * @private + */ +public class ToolTipManagerImpl extends EventDispatcher implements IToolTipManagerImpl +{ + include "../../mx/core/Version.as"; + + //-------------------------------------------------------------------------- + // + // Class variables + // + //-------------------------------------------------------------------------- + + /** + * @private + * + * Place to hook in additional classes. + */ + public static var mixins:Array; + + /** + * @private + */ + private static var _instance:IToolTipManagerImpl; + + //-------------------------------------------------------------------------- + // + // Class methods + // + //-------------------------------------------------------------------------- + + /** + * @private + * This is called by Singleton.getInstance(interfaceName). + */ + public static function getInstance():IToolTipManagerImpl + { + if (!_instance) + _instance = new ToolTipManagerImpl(); + + return _instance; + } + + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * @private + */ + public function ToolTipManagerImpl() + { + super(); + + if (_instance) + throw new Error("Instance already exists."); + + if (mixins) + { + var n:int = mixins.length; + for (var i:int = 0; i < n; i++) + { + new mixins[i](this); + } + } + + if (hasEventListener("initialize")) + dispatchEvent(new Event("initialize")); + } + + //-------------------------------------------------------------------------- + // + // Properties + // + //-------------------------------------------------------------------------- + + //---------------------------------- + // enabled + //---------------------------------- + + /** + * @private + */ + private var _enabled:Boolean = true; + + /** + * @private + */ + public function get enabled():Boolean + { + return _enabled; + } + + /** + * @private + */ + public function set enabled(value:Boolean):void + { + _enabled = value; + } + + //---------------------------------- + // currentTarget + //---------------------------------- + + /** + * @private + */ + private var _currentTarget:IToolTipManagerClient; + + /** + * @private + */ + public function get currentTarget():IToolTipManagerClient + { + return _currentTarget; + } + + /** + * @private + */ + public function set currentTarget(value:IToolTipManagerClient):void + { + _currentTarget = value; + } + + //---------------------------------- + // currentToolTip + //---------------------------------- + + /** + * @private + */ + private var _currentToolTip:IToolTip; + + /** + * @private + */ + public function get currentToolTip():IToolTip + { + return _currentToolTip; + } + + /** + * @private + */ + public function set currentToolTip(value:IToolTip):void + { + _currentToolTip = value; + } + + //---------------------------------------------------------------------- + // + // Variables + // + //---------------------------------------------------------------------- + + /** + * @private + * A flag that keeps track of whether this class's initializeIfNeeded() + * method has been executed. + */ + private var _isInitialized:Boolean = false; + + /** + * @private + * This timer is used to delay the appearance of a tool tip + * after the mouse moves over a target. + * + *This timer is started when the mouse moves over a registered
+ * component, with a duration specified by showDelay.
+ * If the mouse moves out of this object before the timer fires,
+ * the tool tip is never created.
+ * If the mouse stays over the object until the timer fires,
+ * the tool tip is created and popped up.
+ */
+ private var _showTimer:Timer;
+
+ /**
+ * @private
+ * This timer is used to make the tooltip "time out" and hide itself
+ * if the mouse stays over a target.
+ */
+ private var _hideTimer:Timer;
+
+ /**
+ * @private
+ * This timestamp is used for the scrub delay, to determine whether
+ * the current target's tool tip should be shown immediately.
+ */
+ private var _previousToolTipHideTime:int; /* milliseconds */
+
+ //----------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //----------------------------------------------------------------------
+
+ //----------------------------------------------
+ // Component registration / deregistration
+ //----------------------------------------------
+
+ /**
+ * @private
+ */
+ public function registerTarget(target:IToolTipManagerClient):void
+ {
+ initializeIfNeeded();
+ target.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
+ target.addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+ }
+
+ /**
+ * @private
+ */
+ public function unregisterTarget(target:IToolTipManagerClient):void
+ {
+ target.removeEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
+ target.removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+ }
+
+ //----------------------------------
+ // Initialization
+ //----------------------------------
+
+ /**
+ * @private
+ * Lazy initialization.
+ * Occurs when the first target component is registered.
+ */
+ private function initializeIfNeeded():void
+ {
+ if (_isInitialized)
+ return;
+
+ initializeTimers();
+
+ _isInitialized = true;
+
+ // Notify any mixins.
+ if (hasEventListener("initialize"))
+ dispatchEvent(new Event("initialize"));
+ }
+
+ //----------------------------------
+ // Opening tool tips
+ //----------------------------------
+
+ /**
+ * @private
+ * Opens a tool tip immediately or schedules a tooltip to be opened
+ * for the current target, depending on the show delay and scrub delay.
+ */
+ private function showOrScheduleToolTip():void
+ {
+ if (!currentTarget)
+ return;
+
+ // If for example, the showDelay == 0 and the hideDelay == 0,
+ // don't show the tool tip at all.
+ var shouldShowToolTip:Boolean = !isInfiniteDelay(showDelay) && !isZeroDelay(hideDelay);
+ if (!shouldShowToolTip)
+ return;
+
+ var shouldShowToolTipImmediately:Boolean = isZeroDelay(showDelay) || isScrubbing;
+ if (shouldShowToolTipImmediately)
+ showToolTipImmediately();
+ else
+ scheduleToolTip();
+ }
+
+ /**
+ * @private
+ * Opens a tool tip immediately for the current target.
+ * If the target component's toolTipData getter returns null, don't show
+ * the tool tip.
+ */
+ private function showToolTipImmediately():void
+ {
+ if (!currentTarget)
+ return;
+
+ var toolTipData:Object = currentTarget.toolTipData;
+ if (!toolTipData)
+ return;
+
+ currentToolTip = new toolTipClass();
+ currentToolTip.data = toolTipData;
+
+ currentToolTip.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
+ currentToolTip.addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+
+ currentToolTip.showToolTip(currentTarget);
+
+ if (!isInfiniteDelay(hideDelay))
+ startHideDelay(hideDelay);
+ }
+
+ /**
+ * @private
+ */
+ private function scheduleToolTip():void
+ {
+ if (!currentTarget)
+ return;
+
+ startShowDelay(showDelay);
+ }
+
+ //----------------------------------
+ // Closing tool tips
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ private function hideOrUnscheduleToolTip():void
+ {
+ hideToolTipImmediately();
+ unscheduleToolTip();
+ }
+
+ /**
+ * @private
+ */
+ private function hideToolTipImmediately():void
+ {
+ if (!currentToolTip)
+ return;
+
+ currentToolTip.removeEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
+ currentToolTip.removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+
+ currentToolTip.hideToolTip();
+ currentToolTip = null;
+
+ currentTarget = null;
+
+ // Stop any leftover hide delay.
+ stopHideDelay();
+
+ _previousToolTipHideTime = getTimer();
+
+ // Dispatch an event that we've closed the tool tip.
+ // This is picked up by the marshal mixin, which notifies the other
+ // ToolTipManagers in sibling ApplicationDomains.
+ if (hasEventListener("toolTipClosed"))
+ dispatchEvent(new Event("toolTipClosed"));
+ }
+
+ /**
+ * @private
+ */
+ private function unscheduleToolTip():void
+ {
+ if (!isToolTipScheduled)
+ return;
+
+ stopShowDelay();
+
+ currentTarget = null;
+ }
+
+ /**
+ * @private
+ * Returns true if the potential child is equal to the parent
+ * or is in the parent's display list.
+ */
+ private function isChildOfParent(potentialChild:DisplayObject, parent:DisplayObject):Boolean
+ {
+ // If there is no parent, there can't be a child of it.
+ if (!parent)
+ return false;
+
+ // Start at the child.
+ var currentParent:DisplayObject = potentialChild;
+ while (currentParent)
+ {
+ if (currentParent == parent)
+ return true;
+
+ // Move up the display tree.
+ currentParent = currentParent.parent;
+ }
+
+ return false;
+ }
+
+ //----------------------------------
+ // Timer management
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ private function initializeTimers():void
+ {
+ _showTimer = new Timer(0, 1);
+ _showTimer.addEventListener(TimerEvent.TIMER, showTimerHandler);
+
+ _hideTimer = new Timer(0, 1);
+ _hideTimer.addEventListener(TimerEvent.TIMER, hideTimerHandler);
+
+ setPreviousToolTipHideTime();
+ }
+
+ /**
+ * @private
+ */
+ private function get isToolTipScheduled():Boolean
+ {
+ return _showTimer.running;
+ }
+
+ /**
+ * @private
+ */
+ private function get isScrubbing():Boolean
+ {
+ return timeSincePreviousToolTip < scrubDelay;
+ }
+
+ /**
+ * @private
+ */
+ private function get timeSincePreviousToolTip():int
+ {
+ // In case getTimer rolled over and is counting in the negative range,
+ // take the absolute value.
+ var delta:int = getTimer() - _previousToolTipHideTime;
+ return delta > 0 ? delta : -delta;
+ }
+
+ /**
+ * @private
+ */
+ mx_internal function setPreviousToolTipHideTime():void
+ {
+ _previousToolTipHideTime = getTimer();
+ }
+
+ /**
+ * @private
+ */
+ private function startShowDelay(showDelay:Number):void
+ {
+ startTimerWithDelay(_showTimer, showDelay);
+ }
+
+ /**
+ * @private
+ */
+ private function stopShowDelay():void
+ {
+ stopTimer(_showTimer);
+ }
+
+ /**
+ * @private
+ */
+ private function startHideDelay(hideDelay:Number):void
+ {
+ startTimerWithDelay(_hideTimer, hideDelay);
+ }
+
+ /**
+ * @private
+ */
+ private function stopHideDelay():void
+ {
+ stopTimer(_hideTimer);
+ }
+
+ /**
+ * @private
+ */
+ private function startTimerWithDelay(timer:Timer, delay:Number):void
+ {
+ timer.reset();
+ timer.delay = delay;
+ timer.start();
+ }
+
+ /**
+ * @private
+ */
+ private function stopTimer(timer:Timer):void
+ {
+ timer.stop();
+ }
+
+ //----------------------------------
+ // Fetching styles
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ private function get toolTipClass():Class
+ {
+ return getCurrentTargetStyle("toolTipClass");
+ }
+
+ /**
+ * @private
+ */
+ private function get showDelay():Number
+ {
+ return getCurrentTargetStyle("toolTipShowDelay");
+ }
+
+ /**
+ * @private
+ */
+ private function get hideDelay():Number
+ {
+ return getCurrentTargetStyle("toolTipHideDelay");
+ }
+
+ /**
+ * @private
+ */
+ private function get scrubDelay():Number
+ {
+ return getCurrentTargetStyle("toolTipScrubDelay");
+ }
+
+ /**
+ * @private
+ */
+ private function getCurrentTargetStyle(styleName:String):*
+ {
+ return currentTarget.getStyle(styleName);
+ }
+
+ //----------------------------------
+ // Interpreting delay
+ //----------------------------------
+
+ /**
+ * @private
+ * Any value from negative infinity up to 0 means do something immediately.
+ */
+ private function isZeroDelay(delay:Number):Boolean
+ {
+ return delay <= 0;
+ }
+
+ /**
+ * @private
+ * Positive infinity or NaN means never do something.
+ */
+ private function isInfiniteDelay(delay:Number):Boolean
+ {
+ return delay == Number.POSITIVE_INFINITY
+ || isNaN(delay);
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Event handlers
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // Timer event handlers
+ //----------------------------------
+
+ /**
+ * @private
+ */
+ private function showTimerHandler(event:TimerEvent):void
+ {
+ showToolTipImmediately();
+ }
+
+ /**
+ * @private
+ */
+ private function hideTimerHandler(event:TimerEvent):void
+ {
+ hideToolTipImmediately();
+ }
+
+ //----------------------------------
+ // Mouse event handlers
+ //----------------------------------
+
+ /**
+ * @private
+ * Handler for roll overs on registered UIComponents and the tool tip,
+ * if shown.
+ * Tool tips will only be shown if the ToolTipManager is enabled.
+ */
+ private function rollOverHandler(event:MouseEvent):void
+ {
+ if (!enabled)
+ return;
+
+ // event.currentTarget will always be a registered target component
+ // or the tool tip.
+ var isOverCurrentToolTipNow:Boolean = event.currentTarget == currentToolTip;
+ var isOverCurrentTargetNow:Boolean = event.currentTarget == currentTarget;
+
+ // If the mouse is still over the current target or tool tip,
+ // change nothing.
+ if (isOverCurrentToolTipNow || isOverCurrentTargetNow)
+ return;
+
+ // Show a tool tip for the new target.
+ currentTarget = event.currentTarget as IToolTipManagerClient;
+ showOrScheduleToolTip();
+ }
+
+ /**
+ * @private
+ * Handler for roll outs on registered UIComponents and the tool tip,
+ * if shown.
+ */
+ private function rollOutHandler(event:MouseEvent):void
+ {
+ // event.relatedObject can be a child display object
+ // of a registered target component or the tool tip.
+ var isOverCurrentToolTipNow:Boolean = isChildOfParent(event.relatedObject, currentToolTip as DisplayObject);
+ var isOverCurrentTargetNow:Boolean = isChildOfParent(event.relatedObject, currentTarget as DisplayObject);
+
+ // If the mouse is still over the current target or tool tip,
+ // change nothing.
+ if (isOverCurrentToolTipNow || isOverCurrentTargetNow)
+ return;
+
+ // Hide or unschedule the current tool tip.
+ hideOrUnscheduleToolTip();
+ }
+}
+}
Propchange: incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/ToolTipManagerImpl.as
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/ToolTipManagerImpl.as
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/marshalClasses/ToolTipManagerMarshalMixin.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/marshalClasses/ToolTipManagerMarshalMixin.as?rev=1370028&view=auto
==============================================================================
--- incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/marshalClasses/ToolTipManagerMarshalMixin.as (added)
+++ incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/marshalClasses/ToolTipManagerMarshalMixin.as Mon Aug 6 21:25:54 2012
@@ -0,0 +1,174 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 spark.managers.marshalClasses
+{
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.utils.getTimer;
+
+import mx.core.IFlexModuleFactory;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+import mx.events.InterManagerRequest;
+import mx.managers.IActiveWindowManager;
+import mx.managers.IFocusManagerContainer;
+import mx.managers.IMarshalSystemManager;
+import mx.managers.ISystemManager;
+import mx.managers.SystemManagerGlobals;
+import mx.managers.SystemManagerProxy;
+
+import spark.core.IToolTip;
+import spark.managers.IToolTipManagerImpl;
+import spark.managers.ToolTipManager;
+import spark.managers.ToolTipManagerImpl;
+
+use namespace mx_internal;
+
+[ExcludeClass]
+
+[Mixin]
+
+/**
+ * @private
+ * This class extends the functionality of ToolTipManager in
+ * Marshall Plan configurations.
+ * This class listens to the local ToolTipManager for events that
+ * will trigger its handler methods.
+ * Its handler methods create InterManagerRequests to be sent across
+ * ApplicationDomains between subapps and main apps.
+ * These InterManagerRequests are dispatched through the security sandbox's
+ * sandboxRoot system manager.
+ * This class also listens to InterManagerRequests on the sandboxRoot from
+ * other ToolTipManagers.
+ */
+public class ToolTipManagerMarshalMixin
+{
+ include "../../../mx/core/Version.as";
+
+ //--------------------------------------------------------------------------
+ //
+ // Class Method
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ public static function init(fbs:IFlexModuleFactory):void
+ {
+ if (!ToolTipManagerImpl.mixins)
+ ToolTipManagerImpl.mixins = [];
+ if (ToolTipManagerImpl.mixins.indexOf(ToolTipManagerMarshalMixin) == -1)
+ ToolTipManagerImpl.mixins.push(ToolTipManagerMarshalMixin);
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ public function ToolTipManagerMarshalMixin(owner:ToolTipManagerImpl = null)
+ {
+ super();
+
+ if (!owner)
+ return;
+
+ _toolTipManagerImpl = owner;
+ _toolTipManagerImpl.addEventListener("initialize", initializeHandler);
+ _toolTipManagerImpl.addEventListener("toolTipClosed", toolTipClosedHandler);
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ private var _toolTipManagerImpl:ToolTipManagerImpl;
+
+ /**
+ * @private
+ */
+ private var _sandboxRoot:DisplayObject;
+
+ //--------------------------------------------------------------------------
+ //
+ // Class Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ private function initializeHandler(event:Event):void
+ {
+ var systemManager:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0] as ISystemManager;
+ _sandboxRoot = systemManager.getSandboxRoot();
+ _sandboxRoot.addEventListener(InterManagerRequest.TOOLTIP_MANAGER_REQUEST, interManagerRequestHandler, false, 0, true);
+ }
+
+ /**
+ * @private
+ * Notify the other managers that this manager closed a tool tip.
+ */
+ private function toolTipClosedHandler(event:Event):void
+ {
+ var interManagerRequest:InterManagerRequest =
+ new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
+
+ interManagerRequest.name = "toolTipClosed";
+
+ _sandboxRoot.dispatchEvent(interManagerRequest);
+ }
+
+ /**
+ * @private
+ * Receive requests and notifications from other ToolTipManagers.
+ */
+ private function interManagerRequestHandler(event:Event):void
+ {
+ // If the event is strongly-typed as an InterManagerRequest,
+ // then it must have come from this ApplicationDomain, and the
+ // local ToolTipManager. If this is the case, do nothing because
+ // here we handle requests from other managers not the local manager.
+ if (event is InterManagerRequest)
+ return;
+
+ var interManagerRequest:Object = event;
+ var requestName:String = interManagerRequest.name;
+
+ if (requestName == "toolTipClosed")
+ {
+ // Update the scrub delay.
+ _toolTipManagerImpl.setPreviousToolTipHideTime();
+ }
+ }
+
+}
+}
Propchange: incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/marshalClasses/ToolTipManagerMarshalMixin.as
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/framework/src/spark/managers/marshalClasses/ToolTipManagerMarshalMixin.as
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/mobilecomponents/asdoc/en_US/spark/components/examples/SplashScreenImage1.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/mobilecomponents/asdoc/en_US/spark/components/examples/SplashScreenImage1.mxml?rev=1370028&view=auto
==============================================================================
--- incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/mobilecomponents/asdoc/en_US/spark/components/examples/SplashScreenImage1.mxml (added)
+++ incubator/flex/whiteboard/cframpton/adobe.next/frameworks/projects/mobilecomponents/asdoc/en_US/spark/components/examples/SplashScreenImage1.mxml Mon Aug 6 21:25:54 2012
@@ -0,0 +1,52 @@
+
+
+Container
does not support removing deferred content.
+ *
+ * @param cache If true, the removed content is cached to improve the
+ * performance of restoring the children.
+ * The content is weak referenced so that the memory may be garbage
+ * collected if needed.
+ *
+ */
+ public function removeDeferredContent(cache:Boolean = false):void
+ {
+ // This is just a stub to satisfy changes to the
+ // IDeferredContentOwner interface made in 5.0
+ }
+
+ /**
* Given a single UIComponentDescriptor, create the corresponding
* component and add the component as a child of this Container.
*