Packageflexlib.mdi.managers
Classpublic class MDIManager
InheritanceMDIManager Inheritance flash.events.EventDispatcher

Class responsible for applying effects and default behaviors to MDIWindow instances such as tiling, cascading, minimizing, maximizing, etc.



Public Properties
 PropertyDefined By
  container : UIComponent
MDIManager
  effects : IMDIEffectsDescriptor
MDIManager
  enforceBoundaries : Boolean = true
MDIManager
  global : MDIManager
[static] [read-only]
MDIManager
  minTilePadding : Number = 5
MDIManager
  showMinimizedTiles : Boolean = false
MDIManager
  snapDistance : Number = 0
MDIManager
  tileMinimize : Boolean = true
MDIManager
  tileMinimizeWidth : int = 200
MDIManager
  tilePadding : Number = 8
MDIManager
  windowList : Array
MDIManager
Public Methods
 MethodDefined By
  
MDIManager(container:UIComponent, effects:IMDIEffectsDescriptor = null)
Constructor()
MDIManager
  
absPos(window:MDIWindow, x:int, y:int):void
Positions a window in an absolute position
MDIManager
  
add(window:MDIWindow):void
MDIManager
  
addCenter(window:MDIWindow):void
MDIManager
  
addContextMenu(window:MDIWindow, contextMenu:ContextMenu = null):void
MDIManager
  
bringToFront(window:MDIWindow):void
Brings a window to the front of the screen.
MDIManager
  
cascade():void
Cascades all managed windows from top left to bottom right
MDIManager
  
center(window:MDIWindow):void
Positions a window in the center of the available screen.
MDIManager
  
executeDefaultBehavior(event:Event):void
MDIManager
  
Gets a list of open windows for scenarios when only open windows need to be managed
MDIManager
  
manage(window:MDIWindow):void
Pushes an existing window onto the managed window stack.
MDIManager
  
position(window:MDIWindow):void
Positions a window on the screen This is primarly used as the default space on the screen to position the window.
MDIManager
  
remove(window:MDIWindow):void
Removes a window instance from the managed window stack
MDIManager
  
removeAll():void
Removes all windows from managed window stack;
MDIManager
  
resize(window:MDIWindow):void
MDIManager
  
MDIManager
  
tile(fillAvailableSpace:Boolean = false, gap:Number = 0):void
Tiles the window across the screen By default, windows will be tiled to all the same size and use only the space they can accomodate.
MDIManager
Events
 Event Summary Defined By
  Dispatched when the windows are cascaded.MDIManager
  Dispatched when an effect ends.MDIManager
  Dispatched when an effect begins.MDIManager
  Dispatched when the windows are tiled.MDIManager
  Dispatched when a window is added to the manager.MDIManager
  Dispatched when the minimize button is clicked.MDIManager
  Dispatched while the window is being dragged.MDIManager
  Dispatched when the window stops being dragged.MDIManager
  Dispatched when the window begins being dragged.MDIManager
  Dispatched when the window loses focus and no longer has topmost z-index of MDIManager's children.MDIManager
  Dispatched when the window gains focus and is given topmost z-index of MDIManager's children.MDIManager
  Dispatched when the maximize button is clicked or when the window is in a normal state (not minimized or maximized) and the titleBar is double clicked.MDIManager
  Dispatched when the minimize button is clicked.MDIManager
  Dispatched while the mouse is down on a resize handle.MDIManager
  Dispatched when the mouse is released from a resize handle.MDIManager
  Dispatched when a resize handle is pressed.MDIManager
  If the window is minimized, this event is dispatched when the titleBar is clicked.MDIManager
Public Constants
 ConstantDefined By
  CONTEXT_MENU_LABEL_CASCADE : String = Cascade
[static]
MDIManager
  CONTEXT_MENU_LABEL_SHOW_ALL : String = Show All Windows
[static]
MDIManager
  CONTEXT_MENU_LABEL_TILE : String = Tile
[static]
MDIManager
  CONTEXT_MENU_LABEL_TILE_FILL : String = Tile + Fill
[static]
MDIManager
Property Detail
containerproperty
container:UIComponent


Implementation
    public function get container():UIComponent
    public function set container(value:UIComponent):void
effectsproperty 
public var effects:IMDIEffectsDescriptor

enforceBoundariesproperty 
public var enforceBoundaries:Boolean = true

globalproperty 
global:MDIManager  [read-only]


Implementation
    public static function get global():MDIManager
minTilePaddingproperty 
public var minTilePadding:Number = 5

showMinimizedTilesproperty 
public var showMinimizedTiles:Boolean = false

snapDistanceproperty 
public var snapDistance:Number = 0

tileMinimizeproperty 
public var tileMinimize:Boolean = true

tileMinimizeWidthproperty 
public var tileMinimizeWidth:int = 200

tilePaddingproperty 
public var tilePadding:Number = 8

windowListproperty 
windowList:Array


Implementation
    public function get windowList():Array
    public function set windowList(value:Array):void
Constructor Detail
MDIManager()Constructor
public function MDIManager(container:UIComponent, effects:IMDIEffectsDescriptor = null)

Constructor()

Parameters
container:UIComponent
 
effects:IMDIEffectsDescriptor (default = null)
Method Detail
absPos()method
public function absPos(window:MDIWindow, x:int, y:int):void

Positions a window in an absolute position

Parameters

window:MDIWindow — Window to position
 
x:int — The x position of the window
 
y:int — The y position of the window

add()method 
public function add(window:MDIWindow):void

Parameters

window:MDIWindow

addCenter()method 
public function addCenter(window:MDIWindow):void

Parameters

window:MDIWindow

addContextMenu()method 
public function addContextMenu(window:MDIWindow, contextMenu:ContextMenu = null):void

Parameters

window:MDIWindow
 
contextMenu:ContextMenu (default = null)

bringToFront()method 
public function bringToFront(window:MDIWindow):void

Brings a window to the front of the screen.

Parameters

window:MDIWindow — Window to bring to front

cascade()method 
public function cascade():void

Cascades all managed windows from top left to bottom right

center()method 
public function center(window:MDIWindow):void

Positions a window in the center of the available screen.

Parameters

window:MDIWindow — to center

executeDefaultBehavior()method 
public function executeDefaultBehavior(event:Event):void

Parameters

event:Event

getOpenWindowList()method 
public function getOpenWindowList():Array

Gets a list of open windows for scenarios when only open windows need to be managed

Returns
Array — Array
manage()method 
public function manage(window:MDIWindow):void

Pushes an existing window onto the managed window stack.

Parameters

window:MDIWindow — Window:MDIWindow to push onto managed windows stack

position()method 
public function position(window:MDIWindow):void

Positions a window on the screen

This is primarly used as the default space on the screen to position the window.

Parameters

window:MDIWindow — Window to position

remove()method 
public function remove(window:MDIWindow):void

Removes a window instance from the managed window stack

Parameters

window:MDIWindow — Window to remove

removeAll()method 
public function removeAll():void

Removes all windows from managed window stack;

resize()method 
public function resize(window:MDIWindow):void

Parameters

window:MDIWindow

showAllWindows()method 
public function showAllWindows():void

tile()method 
public function tile(fillAvailableSpace:Boolean = false, gap:Number = 0):void

Tiles the window across the screen

By default, windows will be tiled to all the same size and use only the space they can accomodate. If you set fillAvailableSpace = true, tile will use all the space available to tile the windows with the windows being arranged by varying heights and widths.

Parameters

fillAvailableSpace:Boolean (default = false) — Variable to determine whether to use the fill the entire available screen
 
gap:Number (default = 0)

Event Detail
cascade Event
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.CASCADE

Dispatched when the windows are cascaded.

effectEnd Event  
Event Object Type: mx.events.EffectEvent
EffectEvent.type property = mx.events.EffectEvent.EFFECT_END

Dispatched when an effect ends.

effectStart Event  
Event Object Type: mx.events.EffectEvent
EffectEvent.type property = mx.events.EffectEvent.EFFECT_START

Dispatched when an effect begins.

tile Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.TILE

Dispatched when the windows are tiled.

windowAdd Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_ADD

Dispatched when a window is added to the manager.

windowClose Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_CLOSE

Dispatched when the minimize button is clicked.

windowDrag Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_DRAG

Dispatched while the window is being dragged.

windowDragEnd Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_DRAG_END

Dispatched when the window stops being dragged.

windowDragStart Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_DRAG_START

Dispatched when the window begins being dragged.

windowFocusEnd Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_FOCUS_END

Dispatched when the window loses focus and no longer has topmost z-index of MDIManager's children.

windowFocusStart Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_FOCUS_START

Dispatched when the window gains focus and is given topmost z-index of MDIManager's children.

windowMaximize Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_MAXIMIZE

Dispatched when the maximize button is clicked or when the window is in a normal state (not minimized or maximized) and the titleBar is double clicked.

windowMinimize Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_MINIMIZE

Dispatched when the minimize button is clicked.

windowResize Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_RESIZE

Dispatched while the mouse is down on a resize handle.

windowResizeEnd Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_RESIZE_END

Dispatched when the mouse is released from a resize handle.

windowResizeStart Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_RESIZE_START

Dispatched when a resize handle is pressed.

windowRestore Event  
Event Object Type: flexlib.mdi.events.MDIManagerEvent
MDIManagerEvent.type property = flexlib.mdi.events.MDIManagerEvent.WINDOW_RESTORE

If the window is minimized, this event is dispatched when the titleBar is clicked. If the window is maxmimized, this event is dispatched upon clicking the restore button or double clicking the titleBar.

Constant Detail
CONTEXT_MENU_LABEL_CASCADEConstant
public static const CONTEXT_MENU_LABEL_CASCADE:String = Cascade

CONTEXT_MENU_LABEL_SHOW_ALLConstant 
public static const CONTEXT_MENU_LABEL_SHOW_ALL:String = Show All Windows

CONTEXT_MENU_LABEL_TILEConstant 
public static const CONTEXT_MENU_LABEL_TILE:String = Tile

CONTEXT_MENU_LABEL_TILE_FILLConstant 
public static const CONTEXT_MENU_LABEL_TILE_FILL:String = Tile + Fill