Packageflexlib.mdi.containers
Classpublic class MDIWindow
InheritanceMDIWindow Inheritance mx.containers.Panel

Central window class used in flexlib.mdi. Includes min/max/close buttons by default.



Public Properties
 PropertyDefined by
  closeBtn : Button
[read-only] Close window button.
MDIWindow
  cornerHandleSize : Number = 10
Size of corner handles.
MDIWindow
  draggable : Boolean = true
Flag determining whether or not this window is draggable.
MDIWindow
  edgeHandleSize : Number = 4
Size of edge handles.
MDIWindow
  hasFocus : Boolean
MDIWindow
  maximized : Boolean
[read-only]
MDIWindow
  maximizeRestoreBtn : Button
[read-only] Maximize/restore window button.
MDIWindow
  minimizeBtn : Button
[read-only] Minimize window button.
MDIWindow
  minimized : Boolean
[read-only]
MDIWindow
  minimizeHeight : Number
[read-only]
MDIWindow
  resizable : Boolean = true
Flag determining whether or not this window is resizable.
MDIWindow
  savedWindowRect : Rectangle
Rectangle to represent window's size and position when resize begins or window's size/position is saved.
MDIWindow
  showCloseButton : Boolean
MDIWindow
  showControls : Boolean
[write-only]
MDIWindow
  titleBarOverlay : Canvas
Invisible shape laid over titlebar to prevent funkiness from clicking in title textfield.
MDIWindow
  winContextMenu : ContextMenu = null
Window's context menu.
MDIWindow
  windowControls : MDIWindowControlsContainer
Reference to class used to create windowControls property.
MDIWindow
  windowManager : MDIManager
Reference to MDIManager instance this window is managed by, if any.
MDIWindow
  windowStyleName : Object
MDIWindow
Public Methods
 MethodDefined by
  
Constructor
MDIWindow
  
close(event:MouseEvent = null):void
Close the window.
MDIWindow
  
getTitleIconObject():DisplayObject
Returns reference to titleIconObject which is mx_internal by default.
MDIWindow
  
getTitleTextField():UITextField
Returns reference to titleTextField which is protected by default.
MDIWindow
  
maximize():void
Maximize the window.
MDIWindow
  
maximizeRestore(event:MouseEvent = null):void
Called from maximize/restore button
MDIWindow
  
minimize(event:MouseEvent = null):void
Minimize the window.
MDIWindow
  
restore():void
Restores the window to its last floating position.
MDIWindow
  
restoreStyle():void
Restores style settings for restore and maximize
MDIWindow
  
saveStyle():void
Save style settings for minimizing.
MDIWindow
  
styleChanged(styleProp:String):void
Detects change to styleName that is executed by MDIManager indicating a change in focus.
MDIWindow
  
unMinimize(event:MouseEvent = null):void
Restore window to state it was in prior to being minimized.
MDIWindow
  
MDIWindow
Protected Methods
 MethodDefined by
  
Create resize handles and window controls.
MDIWindow
  
MDIWindow
  
updateDisplayList(w:Number, h:Number):void
Position and size resize handles and window controls.
MDIWindow
Events
 EventSummaryDefined by
   Dispatched when the close button is clicked.MDIWindow
   Dispatched while the window is being dragged.MDIWindow
   Dispatched when the window stops being dragged.MDIWindow
   Dispatched when the window starts being dragged.MDIWindow
   Dispatched when the window loses focus and no longer has topmost z-index of MDIManager's children.MDIWindow
   Dispatched when the window gains focus and is given topmost z-index of MDIManager's children.MDIWindow
   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.MDIWindow
   Dispatched when the minimize button is clicked.MDIWindow
   Dispatched while the mouse is down on a resize handle.MDIWindow
   Dispatched when the mouse is released from a resize handle.MDIWindow
   Dispatched when a resize handle is pressed.MDIWindow
   If the window is minimized, this event is dispatched when the titleBar is clicked.MDIWindow
Styles
 StyleDescriptionDefined by
  
closeBtnStyleName
Type: String   CSS Inheritance: no
Style declaration name for the window's close button. If closeBtnStyleNameNoFocus is not provided this style will be used regardless of the window's focus. If closeBtnStyleNameNoFocus is provided this style will be applied only when the window has focus. The default value is "mdiWindowCloseBtn".
MDIWindow
  
closeBtnStyleNameNoFocus
Type: String   CSS Inheritance: no
Style declaration name for the window's close button when window does not have focus. See closeBtnStyleName documentation for details.
MDIWindow
  
maximizeBtnStyleName
Type: String   CSS Inheritance: no
Style declaration name for the window's maximize button. If maximizeBtnStyleNameNoFocus is not provided this style will be used regardless of the window's focus. If maximizeBtnStyleNameNoFocus is provided this style will be applied only when the window has focus. The default value is "mdiWindowMaximizeBtn".
MDIWindow
  
maximizeBtnStyleNameNoFocus
Type: String   CSS Inheritance: no
Style declaration name for the window's maximize button when window does not have focus. See maximizeBtnStyleName documentation for details.
MDIWindow
  
minimizeBtnStyleName
Type: String   CSS Inheritance: no
Style declaration name for the window's minimize button. If minimizeBtnStyleNameNoFocus is not provided this style will be used regardless of the window's focus. If minimizeBtnStyleNameNoFocus is provided this style will be applied only when the window has focus. The default value is "mdiWindowMinimizeBtn".
MDIWindow
  
minimizeBtnStyleNameNoFocus
Type: String   CSS Inheritance: no
Style declaration name for the window's minimize button when window does not have focus. See minimizeBtnStyleName documentation for details.
MDIWindow
  
resizeCursorHorizontalSkin
Type: Class   CSS Inheritance: no
Name of the class used as cursor when resizing the window horizontally.
MDIWindow
  
resizeCursorHorizontalXOffset
Type: Number   CSS Inheritance: no
Distance to horizontally offset resizeCursorHorizontalSkin.
MDIWindow
  
resizeCursorHorizontalYOffset
Type: Number   CSS Inheritance: no
Distance to vertically offset resizeCursorHorizontalSkin.
MDIWindow
  
resizeCursorTopLeftBottomRightSkin
Type: Class   CSS Inheritance: no
Name of the class used as cursor when resizing from top left or bottom right corner.
MDIWindow
  
resizeCursorTopLeftBottomRightXOffset
Type: Number   CSS Inheritance: no
Distance to horizontally offset resizeCursorTopLeftBottomRightSkin.
MDIWindow
  
resizeCursorTopLeftBottomRightYOffset
Type: Number   CSS Inheritance: no
Distance to vertically offset resizeCursorTopLeftBottomRightSkin.
MDIWindow
  
resizeCursorTopRightBottomLeftSkin
Type: Class   CSS Inheritance: no
Name of the class used as cursor when resizing from top right or bottom left corner.
MDIWindow
  
resizeCursorTopRightBottomLeftXOffset
Type: Number   CSS Inheritance: no
Distance to horizontally offset resizeCursorTopRightBottomLeftSkin.
MDIWindow
  
resizeCursorTopRightBottomLeftYOffset
Type: Number   CSS Inheritance: no
Distance to vertically offset resizeCursorTopRightBottomLeftSkin.
MDIWindow
  
resizeCursorVerticalSkin
Type: Class   CSS Inheritance: no
Name of the class used as cursor when resizing the window vertically.
MDIWindow
  
resizeCursorVerticalXOffset
Type: Number   CSS Inheritance: no
Distance to horizontally offset resizeCursorVerticalSkin.
MDIWindow
  
resizeCursorVerticalYOffset
Type: Number   CSS Inheritance: no
Distance to vertically offset resizeCursorVerticalSkin.
MDIWindow
  
restoreBtnStyleName
Type: String   CSS Inheritance: no
Style declaration name for the window's restore button. If restoreBtnStyleNameNoFocus is not provided this style will be used regardless of the window's focus. If restoreBtnStyleNameNoFocus is provided this style will be applied only when the window has focus. The default value is "mdiWindowRestoreBtn".
MDIWindow
  
restoreBtnStyleNameNoFocus
Type: String   CSS Inheritance: no
Style declaration name for the window's restore button when window does not have focus. See restoreBtnStyleName documentation for details.
MDIWindow
  
styleNameFocus
Type: String   CSS Inheritance: no
Style declaration name for the window when it has focus. The default value is "mdiWindowFocus".
MDIWindow
  
styleNameNoFocus
Type: String   CSS Inheritance: no
Style declaration name for the window when it does not have focus. The default value is "mdiWindowNoFocus".
MDIWindow
  
titleStyleNameFocus
Type: String   CSS Inheritance: no
Style declaration name for the text in the title bar when the window is in focus. If titleStyleName (inherited from Panel) is set, titleStyleNameFocus will be overridden by it. The default value is "mdiWindowTitleStyle".
MDIWindow
  
titleStyleNameNoFocus
Type: String   CSS Inheritance: no
Style declaration name for the text in the title bar when the window is not in focus. If titleStyleName (inherited from Panel) is set, titleStyleNameNoFocus will be overridden by it. If titleStyleNameNoFocus is not set but titleStyleNameFocus is, titleStyleNameFocus will be used, regardless of the window's focus state.
MDIWindow
  
windowControlsClass
Type: Class   CSS Inheritance: no
Reference to class that will contain window control buttons like minimize, close, etc. Changes to this style will be detected and will initiate the instantiation and addition of a new class instance. The default value is flexlib.mdi.containers.MDIWindowControlsContainer.
MDIWindow
Public Constants
 ConstantDefined by
  CONTEXT_MENU_LABEL_CLOSE : String = "Close"
[static]
MDIWindow
  CONTEXT_MENU_LABEL_MAXIMIZE : String = "Maximize"
[static]
MDIWindow
  CONTEXT_MENU_LABEL_MINIMIZE : String = "Minimize"
[static]
MDIWindow
  CONTEXT_MENU_LABEL_RESTORE : String = "Restore"
[static]
MDIWindow
Property detail
closeBtnproperty
closeBtn:Button  [read-only]

Close window button.

Implementation
    public function get closeBtn():Button
cornerHandleSizeproperty 
public var cornerHandleSize:Number = 10

Size of corner handles. Can be adjusted to affect "sensitivity" of resize area.

draggableproperty 
public var draggable:Boolean = true

Flag determining whether or not this window is draggable.

edgeHandleSizeproperty 
public var edgeHandleSize:Number = 4

Size of edge handles. Can be adjusted to affect "sensitivity" of resize area.

hasFocusproperty 
hasFocus:Boolean  [read-write]Implementation
    public function get hasFocus():Boolean
    public function set hasFocus(value:Boolean):void
maximizedproperty 
maximized:Boolean  [read-only]Implementation
    public function get maximized():Boolean
maximizeRestoreBtnproperty 
maximizeRestoreBtn:Button  [read-only]

Maximize/restore window button.

Implementation
    public function get maximizeRestoreBtn():Button
minimizeBtnproperty 
minimizeBtn:Button  [read-only]

Minimize window button.

Implementation
    public function get minimizeBtn():Button
minimizedproperty 
minimized:Boolean  [read-only]Implementation
    public function get minimized():Boolean
minimizeHeightproperty 
minimizeHeight:Number  [read-only]Implementation
    public function get minimizeHeight():Number
resizableproperty 
public var resizable:Boolean = true

Flag determining whether or not this window is resizable.

savedWindowRectproperty 
public var savedWindowRect:Rectangle

Rectangle to represent window's size and position when resize begins or window's size/position is saved.

showCloseButtonproperty 
showCloseButton:Boolean  [read-write]Implementation
    public function get showCloseButton():Boolean
    public function set showCloseButton(value:Boolean):void
showControlsproperty 
showControls:Boolean  [write-only]Implementation
    public function set showControls(value:Boolean):void
titleBarOverlayproperty 
public var titleBarOverlay:Canvas

Invisible shape laid over titlebar to prevent funkiness from clicking in title textfield. Making it public gives child components like controls container access to size of titleBar.

winContextMenuproperty 
public var winContextMenu:ContextMenu = null

Window's context menu.

windowControlsproperty 
windowControls:MDIWindowControlsContainer  [read-write]

Reference to class used to create windowControls property.

Implementation
    public function get windowControls():MDIWindowControlsContainer
    public function set windowControls(value:MDIWindowControlsContainer):void
windowManagerproperty 
public var windowManager:MDIManager

Reference to MDIManager instance this window is managed by, if any.

windowStyleNameproperty 
windowStyleName:Object  [read-write]Implementation
    public function get windowStyleName():Object
    public function set windowStyleName(value:Object):void
Constructor detail
MDIWindow()constructor
public function MDIWindow()

Constructor

Method detail
close()method
public function close(event:MouseEvent = null):void

Close the window.

Parameters
event:MouseEvent (default = null)
createChildren()method 
protected override function createChildren():void

Create resize handles and window controls.

getSelectorList()method 
protected function getSelectorList():Array

Returns
Array
getTitleIconObject()method 
public function getTitleIconObject():DisplayObject

Returns reference to titleIconObject which is mx_internal by default. Provided to allow MDIWindowControlsContainer subclasses as much freedom as possible.

Returns
DisplayObject
getTitleTextField()method 
public function getTitleTextField():UITextField

Returns reference to titleTextField which is protected by default. Provided to allow MDIWindowControlsContainer subclasses as much freedom as possible.

Returns
UITextField
maximize()method 
public function maximize():void

Maximize the window.

maximizeRestore()method 
public function maximizeRestore(event:MouseEvent = null):void

Called from maximize/restore button

Parameters
event:MouseEvent (default = null)

Events
MouseEvent
minimize()method 
public function minimize(event:MouseEvent = null):void

Minimize the window.

Parameters
event:MouseEvent (default = null)
restore()method 
public function restore():void

Restores the window to its last floating position.

restoreStyle()method 
public function restoreStyle():void

Restores style settings for restore and maximize

saveStyle()method 
public function saveStyle():void

Save style settings for minimizing.

styleChanged()method 
public override function styleChanged(styleProp:String):void

Detects change to styleName that is executed by MDIManager indicating a change in focus. Iterates over window controls and adjusts their styles if they're focus-aware.

Parameters
styleProp:String
unMinimize()method 
public function unMinimize(event:MouseEvent = null):void

Restore window to state it was in prior to being minimized.

Parameters
event:MouseEvent (default = null)
updateContextMenu()method 
public function updateContextMenu():void
updateDisplayList()method 
protected override function updateDisplayList(w:Number, h:Number):void

Position and size resize handles and window controls.

Parameters
w:Number
 
h:Number
Event detail
closeevent 
Event object type: flexlib.mdi.events.MDIWindowEvent

Dispatched when the close button is clicked.

dragevent  
Event object type: flexlib.mdi.events.MDIWindowEvent

Dispatched while the window is being dragged.

dragEndevent  
Event object type: flexlib.mdi.events.MDIWindowEvent

Dispatched when the window stops being dragged.

dragStartevent  
Event object type: flexlib.mdi.events.MDIWindowEvent

Dispatched when the window starts being dragged.

focusEndevent  
Event object type: flexlib.mdi.events.MDIWindowEvent

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

focusStartevent  
Event object type: flexlib.mdi.events.MDIWindowEvent

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

maximizeevent  
Event object type: flexlib.mdi.events.MDIWindowEvent

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.

minimizeevent  
Event object type: flexlib.mdi.events.MDIWindowEvent

Dispatched when the minimize button is clicked.

resizeevent  
Event object type: flexlib.mdi.events.MDIWindowEvent

Dispatched while the mouse is down on a resize handle.

resizeEndevent  
Event object type: flexlib.mdi.events.MDIWindowEvent

Dispatched when the mouse is released from a resize handle.

resizeStartevent  
Event object type: flexlib.mdi.events.MDIWindowEvent

Dispatched when a resize handle is pressed.

restoreevent  
Event object type: flexlib.mdi.events.MDIWindowEvent

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_CLOSEconstant
public static const CONTEXT_MENU_LABEL_CLOSE:String = "Close"
CONTEXT_MENU_LABEL_MAXIMIZEconstant 
public static const CONTEXT_MENU_LABEL_MAXIMIZE:String = "Maximize"
CONTEXT_MENU_LABEL_MINIMIZEconstant 
public static const CONTEXT_MENU_LABEL_MINIMIZE:String = "Minimize"
CONTEXT_MENU_LABEL_RESTOREconstant 
public static const CONTEXT_MENU_LABEL_RESTORE:String = "Restore"