Packagefin.desktop
Classpublic class Window
InheritanceWindow Inheritance DesktopEventManager Inheritance Object

A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. The new window appears in the same process as the parent window.



Protected Properties
 PropertyDefined By
 Inherited_connection : DesktopConnection
DesktopEventManager
 Inherited_defaultPayload : Object
DesktopEventManager
 Inherited_eventDispatcher : EventDispatcher
DesktopEventManager
 Inherited_eventTopic : String
DesktopEventManager
Public Methods
 MethodDefined By
  
Window(uuid:String, name:String)
Window constructor
Window
 Inherited
addEventListener(type:String, listener:Function, callback:Function = null, errorCallback:Function = null):void
Registers an event listener on the specified event.
DesktopEventManager
  
animate(transition:Transition, options:TransitionOptions, callback:Function = null, errorCallback:Function = null):void
Window
  
blur(callback:Function = null, errorCallback:Function = null):void
Window
  
bringToFront(callback:Function = null, errorCallback:Function = null):void
Window
  
close(callback:Function = null, errorCallback:Function = null):void
Closes the window
Window
  
[static]
Window
  
disableFrame(callback:Function = null, errorCallback:Function = null):void
Window
 Inherited
dispatchEvent(event:Event):void
DesktopEventManager
  
enableFrame(callback:Function = null, errorCallback:Function = null):void
Window
  
flash(callback:Function = null, errorCallback:Function = null):void
Window
  
focus(callback:Function = null, errorCallback:Function = null):void
Window
  
getBounds(callback:Function = null, errorCallback:Function = null):void
Window
  
getGroup(callback:Function = null, errorCallback:Function = null):void
Window
  
getInstances():Dictionary
[static]
Window
  
getOptions(callback:Function = null, errorCallback:Function = null):void
Window
  
getSnapshot(callback:Function = null, errorCallback:Function = null):void
Window
  
getState(callback:Function, errorCallback:Function = null):void
Gets the current state ("minimized", "maximized", or "restored") of the window
Window
  
hide(callback:Function = null, errorCallback:Function = null):void
Hides the window if it is shown
Window
  
isShowing(callback:Function = null, errorCallback:Function = null):void
Window
  
joinGroup(window:Window, callback:Function = null, errorCallback:Function = null):void
Window
  
leaveGroup(callback:Function = null, errorCallback:Function = null):void
Window
  
maximize(callback:Function = null, errorCallback:Function = null):void
Maximizes the window
Window
  
mergeGroup(window:Window, callback:Function = null, errorCallback:Function = null):void
Window
  
minimize(callback:Function = null, errorCallback:Function = null):void
Minimizes the window
Window
  
moveBy(deltaLeft:Number = 0, deltaTop:Number = 0, callback:Function = null, errorCallback:Function = null):void
Moves the window by a specified amount
Window
  
moveTo(left:Number, top:Number, callback:Function = null, errorCallback:Function = null):void
Moves the window to a specified location
Window
 Inherited
removeEventListener(type:String, listener:Function, callback:Function = null, errorCallback:Function = null):void
Removes a previously registered event listener from the specified event
DesktopEventManager
  
resizeBy(deltaWidth:Number = 0, deltaHeight:Number = 0, anchor:String = top-left, callback:Function = null, errorCallback:Function = null):void
Resizes the window by the specified amount
Window
  
resizeTo(width:Number, height:Number, anchor:String = top-left, callback:Function = null, errorCallback:Function = null):void
Resizes the window to the specified dimensions
Window
  
restore(callback:Function = null, errorCallback:Function = null):void
Window
  
setBounds(left:Number, top:Number, width:*, height:*, callback:Function = null, errorCallback:Function = null):void
Window
  
show(callback:Function = null, errorCallback:Function = null):void
Shows the window if it is hidden
Window
  
showAt(left:Number, top:Number, toggle:Boolean = false, callback:Function = null, errorCallback:Function = null):void
Window
  
updateOptions(options:WindowOptions, callback:Function = null, errorCallback:Function = null):void
Window
Protected Methods
 MethodDefined By
 Inherited
createPayload(object:Object = null):Object
DesktopEventManager
 Inherited
sendMessage(action:String, payload:Object, callback:Function = null, errorCallback:Function = null):void
DesktopEventManager
Constructor Detail
Window()Constructor
public function Window(uuid:String, name:String)

Window constructor

Parameters
uuid:String — UUID of the parent Application
 
name:String — Name of the Window
Method Detail
animate()method
public function animate(transition:Transition, options:TransitionOptions, callback:Function = null, errorCallback:Function = null):void

Parameters

transition:Transition
 
options:TransitionOptions
 
callback:Function (default = null)
 
errorCallback:Function (default = null)

blur()method 
public function blur(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

bringToFront()method 
public function bringToFront(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

close()method 
public function close(callback:Function = null, errorCallback:Function = null):void

Closes the window

Parameters

callback:Function (default = null) — A function that is called if the method succeeds.
 
errorCallback:Function (default = null) — A function that is called when method fails.

createWindowUsingApplication()method 
public static function createWindowUsingApplication(application:Application):Window

Parameters

application:Application

Returns
Window
disableFrame()method 
public function disableFrame(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

enableFrame()method 
public function enableFrame(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

flash()method 
public function flash(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

focus()method 
public function focus(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

getBounds()method 
public function getBounds(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

getGroup()method 
public function getGroup(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

getInstances()method 
public static function getInstances():Dictionary

Returns
Dictionary
getOptions()method 
public function getOptions(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

getSnapshot()method 
public function getSnapshot(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

getState()method 
public function getState(callback:Function, errorCallback:Function = null):void

Gets the current state ("minimized", "maximized", or "restored") of the window

Parameters

callback:Function — A function that is called if the method succeeds.
 
errorCallback:Function (default = null) — A function that is called when method fails.

hide()method 
public function hide(callback:Function = null, errorCallback:Function = null):void

Hides the window if it is shown

Parameters

callback:Function (default = null) — A function that is called if the method succeeds.
 
errorCallback:Function (default = null) — A function that is called when method fails.

isShowing()method 
public function isShowing(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

joinGroup()method 
public function joinGroup(window:Window, callback:Function = null, errorCallback:Function = null):void

Parameters

window:Window
 
callback:Function (default = null)
 
errorCallback:Function (default = null)

leaveGroup()method 
public function leaveGroup(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

maximize()method 
public function maximize(callback:Function = null, errorCallback:Function = null):void

Maximizes the window

Parameters

callback:Function (default = null) — A function that is called if the method succeeds.
 
errorCallback:Function (default = null) — A function that is called when method fails.

mergeGroup()method 
public function mergeGroup(window:Window, callback:Function = null, errorCallback:Function = null):void

Parameters

window:Window
 
callback:Function (default = null)
 
errorCallback:Function (default = null)

minimize()method 
public function minimize(callback:Function = null, errorCallback:Function = null):void

Minimizes the window

Parameters

callback:Function (default = null) — A function that is called if the method succeeds.
 
errorCallback:Function (default = null) — A function that is called when method fails.

moveBy()method 
public function moveBy(deltaLeft:Number = 0, deltaTop:Number = 0, callback:Function = null, errorCallback:Function = null):void

Moves the window by a specified amount

Parameters

deltaLeft:Number (default = 0) — The change in the left position of the window
 
deltaTop:Number (default = 0) — The change in the top position of the window
 
callback:Function (default = null) — A function that is called if the method succeeds.
 
errorCallback:Function (default = null) — A function that is called when method fails.

moveTo()method 
public function moveTo(left:Number, top:Number, callback:Function = null, errorCallback:Function = null):void

Moves the window to a specified location

Parameters

left:Number (default = NaN) — The left position of the window
 
top:Number (default = NaN) — The right position of the window
 
callback:Function (default = null) — A function that is called if the method succeeds.
 
errorCallback:Function (default = null) — A function that is called when method fails.

resizeBy()method 
public function resizeBy(deltaWidth:Number = 0, deltaHeight:Number = 0, anchor:String = top-left, callback:Function = null, errorCallback:Function = null):void

Resizes the window by the specified amount

Parameters

deltaWidth:Number (default = 0) — Width delta of the window
 
deltaHeight:Number (default = 0) — Height delta of the window
 
anchor:String (default = top-left) — Specifies a corner to remain fixed during the resize. Please check resizeTo method for more information
 
callback:Function (default = null) — A function that is called if the method succeeds.
 
errorCallback:Function (default = null) — A function that is called when method fails.

See also

resizeTo
resizeTo()method 
public function resizeTo(width:Number, height:Number, anchor:String = top-left, callback:Function = null, errorCallback:Function = null):void

Resizes the window to the specified dimensions

Parameters

width:Number (default = NaN) — Width of the window
 
height:Number (default = NaN) — Height of the window
 
anchor:String (default = top-left) — Specifies a corner to remain fixed during the resize. Can take the values: "top-left" "top-right" "bottom-left" "bottom-right" default is "top-left".
 
callback:Function (default = null) — A function that is called if the method succeeds.
 
errorCallback:Function (default = null) — A function that is called when method fails.

restore()method 
public function restore(callback:Function = null, errorCallback:Function = null):void

Parameters

callback:Function (default = null)
 
errorCallback:Function (default = null)

setBounds()method 
public function setBounds(left:Number, top:Number, width:*, height:*, callback:Function = null, errorCallback:Function = null):void

Parameters

left:Number
 
top:Number
 
width:*
 
height:*
 
callback:Function (default = null)
 
errorCallback:Function (default = null)

show()method 
public function show(callback:Function = null, errorCallback:Function = null):void

Shows the window if it is hidden

Parameters

callback:Function (default = null) — A function that is called if the method succeeds.
 
errorCallback:Function (default = null) — A function that is called when method fails.

showAt()method 
public function showAt(left:Number, top:Number, toggle:Boolean = false, callback:Function = null, errorCallback:Function = null):void

Parameters

left:Number
 
top:Number
 
toggle:Boolean (default = false)
 
callback:Function (default = null)
 
errorCallback:Function (default = null)

updateOptions()method 
public function updateOptions(options:WindowOptions, callback:Function = null, errorCallback:Function = null):void

Parameters

options:WindowOptions
 
callback:Function (default = null)
 
errorCallback:Function (default = null)