Packagemx.managers
Interfacepublic interface ISystemManager extends flash.events.IEventDispatcher, IChildList, IFlexModuleFactory
ImplementorsSystemManager

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 mx.core.Application, which is the main "top-level" window within an application.

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.

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.

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.

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 content of the Loader that loaded it and simply serve as the parent of the sub-application

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 numChildren property or getChildAt() 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 rawChildren property.



Public Properties
 PropertyDefined by
  cursorChildren : IChildList
[read-only] An list of the custom cursors being parented by this ISystemManager.
ISystemManager
  document : Object
A reference to the document object.
ISystemManager
  focusPane : Sprite
A single Sprite shared among components used as an overlay for drawing focus.
ISystemManager
  loaderInfo : LoaderInfo
[read-only] The LoaderInfo object that represents information about the application.
ISystemManager
 InheritednumChildren : int
The number of children in this child list.
IChildList
  numModalWindows : int
The number of modal windows.
ISystemManager
  popUpChildren : IChildList
[read-only] An list of the topMost (popup) windows being parented by this ISystemManager.
ISystemManager
  rawChildren : IChildList
[read-only] A list of all children being parented by this ISystemManager.
ISystemManager
  screen : Rectangle
[read-only] The size and position of the application window.
ISystemManager
  stage : Stage
[read-only] The flash.display.Stage that represents the application window mapped to this SystemManager
ISystemManager
  swfBridgeGroup : ISWFBridgeGroup
[read-only] Contains all the bridges to other applications that this application is connected to.
ISystemManager
  toolTipChildren : IChildList
[read-only] A list of the tooltips being parented by this ISystemManager.
ISystemManager
  topLevelSystemManager : ISystemManager
[read-only] The ISystemManager responsible for the application window.
ISystemManager
Public Methods
 MethodDefined by
  
Activates the FocusManager in an IFocusManagerContainer.
ISystemManager
 Inherited
addChild(child:DisplayObject):DisplayObject
Adds a child DisplayObject after the end of this child list.
IChildList
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
Adds a child DisplayObject to this child list at the index specified.
IChildList
  
addChildBridge(bridge:IEventDispatcher, owner:DisplayObject):void
Adds a child bridge to the system manager.
ISystemManager
  
addChildToSandboxRoot(layer:String, child:DisplayObject):void
Adds child to sandbox root in the layer requested.
ISystemManager
  
Registers a top-level window containing a FocusManager.
ISystemManager
 Inherited
contains(child:DisplayObject):Boolean
Determines if a DisplayObject is in this child list, or is a descendant of an child in this child list.
IChildList
 Inherited
create(... parameters):Object
A factory method that requests an instance of a definition known to the module.
IFlexModuleFactory
  
Deactivates the FocusManager in an IFocusManagerContainer, and activate the FocusManager of the next highest window that is an IFocusManagerContainer.
ISystemManager
  
deployMouseShields(deploy:Boolean):void
Deploy or remove mouse shields.
ISystemManager
  
dispatchEventFromSWFBridges(event:Event, skip:IEventDispatcher = null, trackClones:Boolean = false, toOtherSystemManagers:Boolean = false):void
Dispatch a message to all parent and child applications in this SystemManager's SWF bridge group, regardless of whether they are in the same SecurityDomain or not.
ISystemManager
 Inherited
getChildAt(index:int):DisplayObject
Gets the child DisplayObject at the specified index in this child list.
IChildList
 Inherited
getChildByName(name:String):DisplayObject
Gets the child DisplayObject with the specified name in this child list.
IChildList
 Inherited
getChildIndex(child:DisplayObject):int
Gets the index of a specific child in this child list.
IChildList
  
getDefinitionByName(name:String):Object
Converts the given String to a Class or package-level Function.
ISystemManager
 Inherited
getObjectsUnderPoint(point:Point):Array
Returns an array of DisplayObjects that lie under the specified point and are in this child list.
IChildList
  
getSandboxRoot():DisplayObject
Gets the system manager is the root of all top level system managers in this SecurityDomain
ISystemManager
  
getTopLevelRoot():DisplayObject
Attempts to get the system manager that is the in the main application.
ISystemManager
  
getVisibleApplicationRect(bounds:Rectangle = null):Rectangle
Get the bounds of the loaded application that are visible to the user on the screen.
ISystemManager
 Inherited
info():Object
Returns a block of key/value pairs that hold static data known to the module.
IFlexModuleFactory
  
isDisplayObjectInABridgedApplication(displayObject:DisplayObject):Boolean
Tests if a display object is in a child application that is loaded in compatibility mode or in an untrusted sandbox.
ISystemManager
  
isFontFaceEmbedded(tf:TextFormat):Boolean
Returns true if the required font face is embedded in this application, or has been registered globally by using the Font.registerFont() method.
ISystemManager
  
isTopLevel():Boolean
Returns true if this ISystemManager is responsible for an application window, and false if this application has been loaded into another application.
ISystemManager
  
isTopLevelRoot():Boolean
Tests if this system manager is the root of all top level system managers.
ISystemManager
 Inherited
removeChild(child:DisplayObject):DisplayObject
Removes the specified child DisplayObject from this child list.
IChildList
 Inherited
removeChildAt(index:int):DisplayObject
Removes the child DisplayObject at the specified index from this child list.
IChildList
  
removeChildBridge(bridge:IEventDispatcher):void
Adds a child bridge to the system manager.
ISystemManager
  
removeChildFromSandboxRoot(layer:String, child:DisplayObject):void
Removes child from sandbox root in the layer requested.
ISystemManager
  
Unregisters a top-level window containing a FocusManager.
ISystemManager
 Inherited
setChildIndex(child:DisplayObject, newIndex:int):void
Changes the index of a particular child in this child list.
IChildList
  
useSWFBridge():Boolean
Determines if the caller using this system manager should should communicate directly with other managers or if it should communicate with a bridge.
ISystemManager
Property detail
cursorChildrenproperty
cursorChildren:IChildList  [read-only]

An list of the custom cursors being parented by this ISystemManager.

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 cursorChildren property.

The IChildList object has methods like getChildAt() and properties like numChildren. For example, cursorChildren.numChildren gives the number of custom cursors (which will be either 0 or 1) and, if a custom cursor exists, you can access it as cursorChildren.getChildAt(0).

Implementation
    public function get cursorChildren():IChildList
documentproperty 
document:Object  [read-write]

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.

Implementation
    public function get document():Object
    public function set document(value:Object):void
focusPaneproperty 
focusPane:Sprite  [read-write]

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.

Implementation
    public function get focusPane():Sprite
    public function set focusPane(value:Sprite):void
loaderInfoproperty 
loaderInfo:LoaderInfo  [read-only]

The LoaderInfo object that represents information about the application.

Implementation
    public function get loaderInfo():LoaderInfo
numModalWindowsproperty 
numModalWindows:int  [read-write]

The number of modal windows.

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.

Implementation
    public function get numModalWindows():int
    public function set numModalWindows(value:int):void
popUpChildrenproperty 
popUpChildren:IChildList  [read-only]

An list of the topMost (popup) windows being parented by this ISystemManager.

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 popUpChildren property.

The IChildList object has methods like getChildAt() and properties like numChildren. For example, popUpChildren.numChildren gives the number of topmost windows and you can access them as popUpChildren.getChildAt(i).

Implementation
    public function get popUpChildren():IChildList
rawChildrenproperty 
rawChildren:IChildList  [read-only]

A list of all children being parented by this ISystemManager.

An ISystemManager has various types of children, such as the Application, popups, tooltips, and custom cursors.

The IChildList object has methods like getChildAt() and properties like numChildren.

Implementation
    public function get rawChildren():IChildList
screenproperty 
screen:Rectangle  [read-only]

The size and position of the application window. The Rectangle object contains x, y, width, and height properties.

Implementation
    public function get screen():Rectangle
stageproperty 
stage:Stage  [read-only]

The flash.display.Stage that represents the application window mapped to this SystemManager

Implementation
    public function get stage():Stage
swfBridgeGroupproperty 
swfBridgeGroup:ISWFBridgeGroup  [read-only]

Contains all the bridges to other applications that this application is connected to.

Implementation
    public function get swfBridgeGroup():ISWFBridgeGroup
toolTipChildrenproperty 
toolTipChildren:IChildList  [read-only]

A list of the tooltips being parented by this ISystemManager.

An ISystemManager has various types of children, such as the Application, popups, topmost windows, tooltips, and custom cursors.

The IChildList object has methods like getChildAt() and properties like numChildren. For example, toolTipChildren.numChildren gives the number of tooltips (which will be either 0 or 1) and, if a tooltip exists, you can access it as toolTipChildren.getChildAt(0).

Implementation
    public function get toolTipChildren():IChildList
topLevelSystemManagerproperty 
topLevelSystemManager:ISystemManager  [read-only]

The ISystemManager responsible for the application window. This will be the same ISystemManager unless this application has been loaded into another application.

Implementation
    public function get topLevelSystemManager():ISystemManager
Method detail
activate()method
public function activate(f:IFocusManagerContainer):void

Activates the FocusManager in an IFocusManagerContainer.

Parameters
f:IFocusManagerContainer — IFocusManagerContainer the top-level window whose FocusManager should be activated.
addChildBridge()method 
public function addChildBridge(bridge:IEventDispatcher, owner:DisplayObject):void

Adds a child bridge to the system manager. Each child bridge represents components in another sandbox or compiled with a different version of Flex.

Parameters
bridge:IEventDispatcher — The bridge for the child.
 
owner:DisplayObject — The SWFLoader for the child.
addChildToSandboxRoot()method 
public function addChildToSandboxRoot(layer:String, child:DisplayObject):void

Adds child to sandbox root in the layer requested.

Parameters
layer:String — Name of IChildList in SystemManager
 
child:DisplayObject — DisplayObject to add
addFocusManager()method 
public function addFocusManager(f:IFocusManagerContainer):void

Registers a top-level window containing a FocusManager. Called by the FocusManager, generally not called by application code.

Parameters
f:IFocusManagerContainer — The top-level window in the application.
deactivate()method 
public function deactivate(f:IFocusManagerContainer):void

Deactivates the FocusManager in an IFocusManagerContainer, and activate the FocusManager of the next highest window that is an IFocusManagerContainer.

Parameters
f:IFocusManagerContainer — IFocusManagerContainer the top-level window whose FocusManager should be deactivated.
deployMouseShields()method 
public function deployMouseShields(deploy:Boolean):void

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.

Parameters
deploy:Booleantrue to deploy the mouse shields, false to remove the mouse shields.
dispatchEventFromSWFBridges()method 
public function dispatchEventFromSWFBridges(event:Event, skip:IEventDispatcher = null, trackClones:Boolean = false, toOtherSystemManagers:Boolean = false):void

Dispatch a message to all parent and child applications in this SystemManager's SWF bridge group, regardless of whether they are in the same SecurityDomain or not. You can optionally exclude an application with this method's parameters.

Parameters
event:Event — The event to dispatch.
 
skip:IEventDispatcher (default = null) — Specifies an IEventDispatcher that you do not want to dispatch a message to. This is typically used to skip the IEventDispatcher that originated the event.
 
trackClones:Boolean (default = false) — Whether to keep a reference to the events as they are dispatched.
 
toOtherSystemManagers:Boolean (default = false) — Whether to dispatch the event to other top-level SystemManagers in AIR.
getDefinitionByName()method 
public function getDefinitionByName(name:String):Object

Converts the given String to a Class or package-level Function. Calls the appropriate ApplicationDomain.getDefinition() method based on whether you are loaded into another application or not.

Parameters
name:String — Name of class, for example "mx.video.VideoManager".

Returns
Object — The Class represented by the name, or null.
getSandboxRoot()method 
public function getSandboxRoot():DisplayObject

Gets the system manager is the root of all top level system managers in this SecurityDomain

Returns
DisplayObject — the highest-level systemManager in the sandbox
getTopLevelRoot()method 
public function getTopLevelRoot():DisplayObject

Attempts to get the system manager that is the in the main application.

Returns
DisplayObject — The main application's systemManager if allowed by security restrictions or null if it is in a different SecurityDomain.
getVisibleApplicationRect()method 
public function getVisibleApplicationRect(bounds:Rectangle = null):Rectangle

Get the bounds of the loaded application that are visible to the user on the screen.

Parameters
bounds:Rectangle (default = null) — Optional. The starting bounds for the visible rect. The bounds are in global coordinates. If bounds is null the starting bounds is defined by the screen property of the system manager.

Returns
Rectangle — a Rectangle including the visible portion of the this object. The rectangle is in global coordinates.
isDisplayObjectInABridgedApplication()method 
public function isDisplayObjectInABridgedApplication(displayObject:DisplayObject):Boolean

Tests if a display object is in a child application that is loaded in compatibility mode or in an untrusted sandbox.

Parameters
displayObject:DisplayObject — The DisplayObject to test.

Returns
Booleantrue if displayObject is in a child application that is loaded in compatibility mode or in an untrusted sandbox, and false otherwise.
isFontFaceEmbedded()method 
public function isFontFaceEmbedded(tf:TextFormat):Boolean

Returns true if the required font face is embedded in this application, or has been registered globally by using the Font.registerFont() method.

Parameters
tf:TextFormat — The TextFormat class representing character formatting information.

Returns
Booleantrue if the required font face is embedded in this application, or has been registered globally by using the Font.registerFont() method.
isTopLevel()method 
public function isTopLevel():Boolean

Returns true if this ISystemManager is responsible for an application window, and false if this application has been loaded into another application.

Returns
Booleantrue if this ISystemManager is responsible for an application window.
isTopLevelRoot()method 
public function isTopLevelRoot():Boolean

Tests if this system manager is the root of all top level system managers.

Returns
Booleantrue if the SystemManager is the root of all SystemManagers on the display list, and false otherwise.
removeChildBridge()method 
public function removeChildBridge(bridge:IEventDispatcher):void

Adds a child bridge to the system manager. Each child bridge represents components in another sandbox or compiled with a different version of Flex.

Parameters
bridge:IEventDispatcher — The bridge for the child
removeChildFromSandboxRoot()method 
public function removeChildFromSandboxRoot(layer:String, child:DisplayObject):void

Removes child from sandbox root in the layer requested.

Parameters
layer:String — Name of IChildList in SystemManager
 
child:DisplayObject — DisplayObject to add
removeFocusManager()method 
public function removeFocusManager(f:IFocusManagerContainer):void

Unregisters a top-level window containing a FocusManager. Called by the FocusManager, generally not called by application code.

Parameters
f:IFocusManagerContainer — The top-level window in the application.
useSWFBridge()method 
public function useSWFBridge():Boolean

Determines if the caller using this system manager should should communicate directly with other managers or if it should communicate with a bridge.

Returns
Booleantrue if the caller using this system manager should communicate using sandbox bridges. If false the system manager may directly call other managers directly via references.