Packageorg.openzet.containers
Classpublic class MDIWindow
InheritanceMDIWindow Inheritance mx.containers.Panel
ImplementsIMDIWindow

MDIWindow container implements IMDIWindow interface and comprises titleBar, caption, status bar, border and child content area. Normally, MDIWindow instances are used as children of MDI containers and provide built-in support for minimize, maximize and close buttons.

MXML Syntaxexpanded Hide MXML Syntax

<zet:MDIWindow> tag inherits all properties of its superclass on top of following properties.

  <zet:MDIWindow
   Properties
   info=""
   showMaxButton="false|true"
   showMinButton="false|true"
   showCloseButton="false|true"
   windowState="normal|maximized|minimized"
   resizeType
   moveType
   allowRotate
    Styles
   infoStyleName="mdiWindowInfoStyle"
   maxButtonDisabledSkin="'MaxButtonDisabled' symbol in Assets.swf"
   maxButtonDownSkin="'MaxButtonDown' symbol in Assets.swf"
   maxButtonOverSkin="'MaxButtonOver' symbol in Assets.swf"
   maxButtonUpSkin="'MaxButtonUp' symbol in Assets.swf"
   minButtonDisabledSkin="'MinButtonDisabled' symbol in Assets.swf"
   minButtonDownSkin="'MinButtonDown' symbol in Assets.swf"
   minButtonOverSkin="'MinButtonOver' symbol in Assets.swf"
   minButtonUpSkin="'MinButtonUp' symbol in Assets.swf"
   restoreButtonDisabledSkin="'RestoreButtonDisabled' symbol in Assets.swf"
   restoreButtonDownSkin="'RestoreButtonDown' symbol in Assets.swf"
   restoreButtonOverSkin="'RestoreButtonOver' symbol in Assets.swf"
   restoreButtonUpSkin="'RestoreButtonUp' symbol in Assets.swf"
   closeButtonDisabledSkin="'CloseButtonDisabled' symbol in Assets.swf"
   closeButtonDownSkin="'CloseButtonDown' symbol in Assets.swf"
   closeButtonOverSkin="'CloseButtonOver' symbol in Assets.swf"
   closeButtonUpSkin="'CloseButtonUp' symbol in Assets.swf"
    Events
   close="No default"
   minimize="No default"
   maximize="No default"
   restore="No default"
   >
      ...
      child tags
      ...
  </zet:MDIWindow>
  

View the examples.

See also

org.openzet.containers.MDI
mx.containers.Panel


Public Properties
 PropertyDefined by
  dragAlpha : Number = 0.4
[static] Alpha value for a dragged window.
MDIWindow
  dragAlphaEnabled : Boolean = false
[static] Specifies whether to apply transparency to a windw when dragging it.
MDIWindow
  draggable : Boolean
Flag to specify whether dragging is enabled.
MDIWindow
  info : String
Text property to show at the bottom of a window.
MDIWindow
  mdi : IMDI
Reference to the parent container of IMDI type.
MDIWindow
  moveType : String = "none"
[static] Specifies move type.
MDIWindow
  resizable : Boolean
Flag to specify whether resizing is enabled.
MDIWindow
  resizeType : String = "none"
[static] Specifie resize type.
MDIWindow
  showCloseButton : Boolean
Flag to specify whether to show close button.
MDIWindow
  showMaxButton : Boolean
Flag to specify whether to show maximize button.
MDIWindow
  showMinButton : Boolean
Flag to specify whether to show minimize button.
MDIWindow
  useInfo : Boolean
Flag to specify whehter to use info property.
MDIWindow
  windowState : String
Specifies a window's maximized, minimized, normal state.
MDIWindow
Public Methods
 MethodDefined by
  
Constructor.
MDIWindow
  
close():void
Closes a window
MDIWindow
  
destroy():void
You should call this method after removing objects from an MDI instance.
MDIWindow
  
focusIn():void
Invoked by an MDI instance when a window gets its focus.
MDIWindow
  
focusOut():void
Invoked by an MDI instance when a window loses its focus.
MDIWindow
  
maximize():void
Maximizes a windwow
MDIWindow
  
minimize():void
Minimizes a window
MDIWindow
  
restore():void
Restores a window
MDIWindow
  
resume(compulsion:Boolean = false):void
Resumes user interaction within the content area suspended by a call on suspend() method.
MDIWindow
  
setPosition(x:Number, y:Number):void
Moves the component to a specified position within its parent.
MDIWindow
  
setSize(w:Number, h:Number):void
Sizes the object.
MDIWindow
  
setWindowState(value:String, noEvent:Boolean = false):void
Invoked whenever windowState property changes.
MDIWindow
  
suspend():void
Prevents user interaction within a window's content area.
MDIWindow
Events
 EventSummaryDefined by
   Dispatched when close() method is invoked or close button is clicked on.MDIWindow
   Dispatched when the user presses the Enter key.MDIWindow
   Dispatched when maximize() method is invoekd or maximize button is clicked on.MDIWindow
   Dispatched when minimize() method is invoked or minimize button is clicked on.MDIWindow
   Dispatched when restore() method is invoked or restore button is clicked on.MDIWindow
   Dispatched while dragging is in progress.MDIWindow
   Disptached when dragging is complete.MDIWindow
   Dispatched when dragging starts.MDIWindow
   Dispatched when resizing is in progress.MDIWindow
   Dispatched when resizing completes.MDIWindow
   Dispatched when resizing starts.MDIWindow
Styles
 StyleDescriptionDefined by
  
horizontalSizeCursor
Type: Class   CSS Inheritance: no
cursot for window when resizint it horizontally The default value is .
MDIWindow
  
infoStyleName
Type: String   CSS Inheritance: no
Stylename for controlBar'ss info TextField The default value is "mdiWindowTitleStyle".
MDIWindow
  
maxButtonDisabledSkin
Type: Class   CSS Inheritance: no
The maximize button disabled skin. The default value is the "MaxButtonDisabled" symbol in the Assets.swf file..
MDIWindow
  
maxButtonDownSkin
Type: Class   CSS Inheritance: no
The maximize button down skin. The default value is the "MaxButtonDown" symbol in the Assets.swf file..
MDIWindow
  
maxButtonOverSkin
Type: Class   CSS Inheritance: no
The maximize button over skin. The default value is the "MaxButtonOver" symbol in the Assets.swf file..
MDIWindow
  
maxButtonUpSkin
Type: Class   CSS Inheritance: no
The maximize button up skin. The default value is the "MaxButtonDisabled" symbol in the Assets.swf file..
MDIWindow
  
minButtonDisabledSkin
Type: Class   CSS Inheritance: no
minimize button style. The default value is the "MinButtonDisabled" symbol in the Assets.swf file..
MDIWindow
  
minButtonDownSkin
Type: Class   CSS Inheritance: no
The minimize button down skin. The default value is the "MinButtonDown" symbol in the Assets.swf file..
MDIWindow
  
minButtonOverSkin
Type: Class   CSS Inheritance: no
The minimize button over skin. The default value is the "MinButtonOver" symbol in the Assets.swf file..
MDIWindow
  
minButtonUpSkin
Type: Class   CSS Inheritance: no
The minimize button up skin. The default value is the "MinButtonUp" symbol in the Assets.swf file..
MDIWindow
  
resizeBorderAlpha
Type: Number   Format: Number   CSS Inheritance: no
리사이즈 시에 표시할 테두리 알파를 나타낸다. The default value is 1.
MDIWindow
  
resizeBorderThickness
Type: Number   Format: length   CSS Inheritance: no
리사이즈 시에 표시할 테두리 두께를 나타낸다. The default value is 4.
MDIWindow
  
restoreButtonDisabledSkin
Type: Class   CSS Inheritance: no
The restore button disabled skin. The default value is the "restoreButtonDisabled" symbol in the Assets.swf file..
MDIWindow
  
restoreButtonDownSkin
Type: Class   CSS Inheritance: no
The restore button down skin. The default value is the "restoreButtonDown" symbol in the Assets.swf file..
MDIWindow
  
restoreButtonOverSkin
Type: Class   CSS Inheritance: no
The restore button over skin. The default value is the "restoreButtonOver" symbol in the Assets.swf file..
MDIWindow
  
restoreButtonUpSkin
Type: Class   CSS Inheritance: no
The restore button up skin. The default value is the "restoreButtonUp" symbol in the Assets.swf file..
MDIWindow
  
suspendIcon
Type: Class   CSS Inheritance: no
Style for an icon to show when suspend() method is called. The default value is org.openzet.skins.halo.BusyCursor.
MDIWindow
  
suspendTransparency
Type: Number   CSS Inheritance: no
Style for color opacity when suspend() is called and the background processing is halted. suspendTransparency value could vary from 0.0 (trasparent) to 1.0 (intransparent). For color, we should set suspendTransparencyColor style. The default value is 0.5.
MDIWindow
  
suspendTransparencyBlur
Type: Number   CSS Inheritance: no
Style for blur value to apply when the screen is blocked by a call to suspend() method. The default value is 3.
MDIWindow
  
suspendTransparencyColor
Type: uint   Format: Color   CSS Inheritance: no
Style for the color value to paint the screen with when the screen is blocked by a call to suspend() method. The default value is #DDDDDD.
MDIWindow
  
suspendTransparencyDuration
Type: Number   Format: Time   CSS Inheritance: no
Style for duration of suspending effect in milliseconds when suspend() is called. The default value is 100.
MDIWindow
  
titleBarButtonStyleName
Type: String   CSS Inheritance: no
Stylename for a titleBar button. The default value is "titleBarButtonStyle".
MDIWindow
Property detail
dragAlphaproperty
public static var dragAlpha:Number = 0.4

Alpha value for a dragged window. This value could vary from 0.0 to 1.0 Applies only when dragAlphaEnabled is true.

The default value is 0.4.

dragAlphaEnabledproperty 
public static var dragAlphaEnabled:Boolean = false

Specifies whether to apply transparency to a windw when dragging it. If true, the widow will have its transparency value based on dragAlpha property when dragged. This property only apples when MDIWindow.moveType is MDIWindowMoveType.REALTIME.

The default value is false.

draggableproperty 
draggable:Boolean  [read-write]

Flag to specify whether dragging is enabled. Even if set to true, if windowState is maximized, this getter method will return false.

Implementation
    public function get draggable():Boolean
    public function set draggable(value:Boolean):void
infoproperty 
info:String  [read-write]

Text property to show at the bottom of a window.

The default value is "".

This property can be used as the source for data binding.

Implementation
    public function get info():String
    public function set info(value:String):void
mdiproperty 
mdi:IMDI  [read-write]

Reference to the parent container of IMDI type.

Implementation
    public function get mdi():IMDI
    public function set mdi(value:IMDI):void
moveTypeproperty 
public static var moveType:String = "none"

Specifies move type. Possible values include MDIWindowMoveType.NONE, MDIWindowMoveType.REALTIME, MDIWindowMoveType.ANIMATED etc.

The default value is WindowMoveType.NONE.

See also

resizableproperty 
resizable:Boolean  [read-write]

Flag to specify whether resizing is enabled. Even if set to true, if windowState is not normal, this getter method will return false.

Implementation
    public function get resizable():Boolean
    public function set resizable(value:Boolean):void
resizeTypeproperty 
public static var resizeType:String = "none"

Specifie resize type. Possible values include MDIWindowResizeType.NONE, MDIWindowResizeType.REALTIME, MDIWindowResizeType.ANIMATED etc.

The default value is MDIWindowResizeType.NONE.

See also

showCloseButtonproperty 
showCloseButton:Boolean  [read-write]

Flag to specify whether to show close button.

The default value is true.

Implementation
    public function get showCloseButton():Boolean
    public function set showCloseButton(value:Boolean):void
showMaxButtonproperty 
showMaxButton:Boolean  [read-write]

Flag to specify whether to show maximize button.

The default value is true.

Implementation
    public function get showMaxButton():Boolean
    public function set showMaxButton(value:Boolean):void
showMinButtonproperty 
showMinButton:Boolean  [read-write]

Flag to specify whether to show minimize button.

The default value is true.

Implementation
    public function get showMinButton():Boolean
    public function set showMinButton(value:Boolean):void
useInfoproperty 
useInfo:Boolean  [read-write]

Flag to specify whehter to use info property.

Implementation
    public function get useInfo():Boolean
    public function set useInfo(value:Boolean):void
windowStateproperty 
windowState:String  [read-write]

Specifies a window's maximized, minimized, normal state. You can change a window's state by using constants defined in MDIWindowState class. Valid values are MDIWindowState.MINIMIZED, MDIWindowState.MAXIMIZED and MDIWindowState.NORMAL.

The default value is "normal".

Implementation
    public function get windowState():String
    public function set windowState(value:String):void

See also

Constructor detail
MDIWindow()constructor
public function MDIWindow()

Constructor.

Method detail
close()method
public function close():void

Closes a window

destroy()method 
public function destroy():void

You should call this method after removing objects from an MDI instance. Override this method to prevent possible memory leak when removing windows by removing event listeners registered.

focusIn()method 
public function focusIn():void

Invoked by an MDI instance when a window gets its focus.

focusOut()method 
public function focusOut():void

Invoked by an MDI instance when a window loses its focus.

maximize()method 
public function maximize():void

Maximizes a windwow

minimize()method 
public function minimize():void

Minimizes a window

restore()method 
public function restore():void

Restores a window

resume()method 
public function resume(compulsion:Boolean = false):void

Resumes user interaction within the content area suspended by a call on suspend() method. You must call resume() method after calling suspend() method to resume the user interaction.

Parameters
compulsion:Boolean (default = false) — If set to true, resumes the user interaction regardless of the method call counts of suspend() method.
setPosition()method 
public function setPosition(x:Number, y:Number):void

Moves the component to a specified position within its parent.

Parameters
x:Number — x Left position of the component within its parent.
 
y:Number — Top position of the component within its parent.
setSize()method 
public function setSize(w:Number, h:Number):void

Sizes the object.

Parameters
w:Number — Width of the object.
 
h:Number — Height of the object.
setWindowState()method 
public function setWindowState(value:String, noEvent:Boolean = false):void

Invoked whenever windowState property changes. Normally you shouldn't call this method directly but simply change windowState property value to change a window's state.

Parameters
value:StringwindowState property's new value. Possible values are MDIWindowState.NORMAL, MDIWindowState.MAXIMIZED and MDIWindowState.MINIMIZED.
 
noEvent:Boolean (default = false) — If true, no event is dispatched. If false and if windowState changes, dispatches a correspding event.
suspend()method 
public function suspend():void

Prevents user interaction within a window's content area. This method is usually called in cases when data is loaded from the server, when user interaction should be blocked for some reason, or when a suspended screen should be provided. After calling this method, you must always call resume() method to resume user interaction. The number of method calls on suspend() and resume() methods are counted by an internal counter. For example, if you call suspend() method twice for a data load from server, you should also call resume() method twice to resume the user interaction.

Event detail
closeevent 
Event object type: org.openzet.events.MDIWindowEvent

Dispatched when close() method is invoked or close button is clicked on.

enterevent  
Event object type: mx.events.FlexEvent

Dispatched when the user presses the Enter key.

maximizeevent  
Event object type: org.openzet.events.MDIWindowEvent

Dispatched when maximize() method is invoekd or maximize button is clicked on.

minimizeevent  
Event object type: org.openzet.events.MDIWindowEvent

Dispatched when minimize() method is invoked or minimize button is clicked on.

restoreevent  
Event object type: org.openzet.events.MDIWindowEvent

Dispatched when restore() method is invoked or restore button is clicked on.

windowDragevent  
Event object type: org.openzet.events.MDIWindowDragEvent

Dispatched while dragging is in progress.

windowDragEndevent  
Event object type: org.openzet.events.MDIWindowDragEvent

Disptached when dragging is complete.

windowDragStartevent  
Event object type: org.openzet.events.MDIWindowDragEvent

Dispatched when dragging starts.

windowResizeevent  
Event object type: org.openzet.events.MDIWindowResizeEvent

Dispatched when resizing is in progress.

windowResizeEndevent  
Event object type: org.openzet.events.MDIWindowResizeEvent

Dispatched when resizing completes.

windowResizeStartevent  
Event object type: org.openzet.events.MDIWindowResizeEvent

Dispatched when resizing starts.

Examples
MDIExample
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:containers="org.openzet.containers.*"
    xmlns:controls="org.openzet.controls.*"
    width="800" height="600"
    initialize="initializeHandler();">

    <mx:Style source="../openzet-defaults.css" />

    <mx:Style>

    global
    {
        themeColor: #D4D0C8;
    }

    Application
    {