flexlib :: library Documentation | All Packages | All Classes | Index | Frames No Frames |
MDIManager

Package | flexlib.mdi.managers
Class | public class MDIManager
Inheritance | MDIManager flash.events.EventDispatcher

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

Public Properties

| Property | Defined 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

| Method | Defined 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
|  | getOpenWindowList():Array 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
|  | showAllWindows():void | 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
--- | --- | --- | ---
|  | cascade | Dispatched when the windows are cascaded. | MDIManager
|  | effectEnd | Dispatched when an effect ends. | MDIManager
|  | effectStart | Dispatched when an effect begins. | MDIManager
|  | tile | Dispatched when the windows are tiled. | MDIManager
|  | windowAdd | Dispatched when a window is added to the manager. | MDIManager
|  | windowClose | Dispatched when the minimize button is clicked. | MDIManager
|  | windowDrag | Dispatched while the window is being dragged. | MDIManager
|  | windowDragEnd | Dispatched when the window stops being dragged. | MDIManager
|  | windowDragStart | Dispatched when the window begins being dragged. | MDIManager
|  | windowFocusEnd | Dispatched when the window loses focus and no longer has topmost z-index of MDIManager's children. | MDIManager
|  | windowFocusStart | Dispatched when the window gains focus and is given topmost z-index of MDIManager's children. | MDIManager
|  | windowMaximize | 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
|  | windowMinimize | Dispatched when the minimize button is clicked. | MDIManager
|  | windowResize | Dispatched while the mouse is down on a resize handle. | MDIManager
|  | windowResizeEnd | Dispatched when the mouse is released from a resize handle. | MDIManager
|  | windowResizeStart | Dispatched when a resize handle is pressed. | MDIManager
|  | windowRestore | If the window is minimized, this event is dispatched when the titleBar is clicked. | MDIManager

Public Constants

| Constant | Defined 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

container | property

`container:UIComponent`

Implementation
`public function get container():UIComponent`
`public function set container(value:UIComponent):void`

effects | property |

`public var effects:IMDIEffectsDescriptor`

enforceBoundaries | property |

`public var enforceBoundaries:Boolean = true`

global | property |

`global:MDIManager` [read-only]

Implementation
`public static function get global():MDIManager`

minTilePadding | property |

`public var minTilePadding:Number = 5`

showMinimizedTiles | property |

`public var showMinimizedTiles:Boolean = false`

snapDistance | property |

`public var snapDistance:Number = 0`

tileMinimize | property |

`public var tileMinimize:Boolean = true`

tileMinimizeWidth | property |

`public var tileMinimizeWidth:int = 200`

tilePadding | property |

`public var tilePadding:Number = 8`

windowList | property |

`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 <p>This is primarly used as the default space on the screen to position the window.</p>

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 <p>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. </p>

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_CASCADE | Constant

`public static const CONTEXT_MENU_LABEL_CASCADE:String = Cascade`

CONTEXT_MENU_LABEL_SHOW_ALL | Constant |

`public static const CONTEXT_MENU_LABEL_SHOW_ALL:String = Show All Windows`

CONTEXT_MENU_LABEL_TILE | Constant |

`public static const CONTEXT_MENU_LABEL_TILE:String = Tile`

CONTEXT_MENU_LABEL_TILE_FILL | Constant |

`public static const CONTEXT_MENU_LABEL_TILE_FILL:String = Tile + Fill`

Dimanche Juin 19 2011, 03:12 PM +02:00