Packagefin.desktop
Classpublic class CapturingWindow
InheritanceCapturingWindow Inheritance Object

A object that support embedding of an Air window into an OpenFin window

To embed an Air window into an existing OpenFin window:

      var captureOptions:CaptureOptions = new CaptureOptions();
      captureOptions.applicationUuid = existingAppUuid;
      captureOptions.windowName = existingWindowName;
      captureOptions.borderTop = captureOptions.borderRight = captureOptions.borderBottom = captureOptions.borderLeft = 30;
      captureWindow = new CapturingWindow(stage.nativeWindow);
      captureWindow.capture(captureOptions);
 

To embed an Air window into a new OpenFin window of an existing OpenFin app:

      var captureOptions:CaptureOptions = new CaptureOptions();
      captureOptions.applicationUuid = existingAppUuid;
      var windowOptions:WindowOptions = new WindowOptions();
      windowOptions.autoShow = true;
      windowOptions.frame = false;
      windowOptions.name = "myAirWindowParent";
      windowOptions.url = "http://localhost:8080/AirParent.html";
      // populate other attributes of windowOptions
      captureOptions.windowOptions = windowOptions;
      captureOptions.borderTop = captureOptions.borderRight = captureOptions.borderBottom = captureOptions.borderLeft = 30;
      captureWindow = new CapturingWindow(stage.nativeWindow);
      captureWindow.capture(captureOptions);
 

To embed an Air window into a new OpenFin window of a new OpenFin app:

      var captureOptions:CaptureOptions = new CaptureOptions();
      var appOptions = new ApplicationOptions(newAppUuid, "http://localhost:8080/AirParent.html");
      var windowOptions:WindowOptions = new WindowOptions();
      windowOptions.autoShow = true;
      windowOptions.frame = false;
      // populate other attributes of windowOptions
      appOptions.mainWindowOptions = windowOptions;
      captureOptions.applicationOptions = appOptions;
      captureOptions.borderTop = captureOptions.borderRight = captureOptions.borderBottom = captureOptions.borderLeft = 30;
      captureWindow = new CapturingWindow(stage.nativeWindow);
      captureWindow.capture(captureOptions);
  



Public Methods
 MethodDefined By
  
CapturingWindow(nativeWindow:NativeWindow)
Constructor
CapturingWindow
  
capture(captureOptions:CaptureOptions, callback:Function = null, errorCallback:Function = null):void
Embeds an Air window into OpenFin window
CapturingWindow
  
detach(callback:Function = null):void
Detach Air window from the embedding OpenFin window
CapturingWindow
Constructor Detail
CapturingWindow()Constructor
public function CapturingWindow(nativeWindow:NativeWindow)

Constructor

Parameters
nativeWindow:NativeWindow — an instance of native window
Method Detail
capture()method
public function capture(captureOptions:CaptureOptions, callback:Function = null, errorCallback:Function = null):void

Embeds an Air window into OpenFin window

Parameters

captureOptions:CaptureOptions
 
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.

detach()method 
public function detach(callback:Function = null):void

Detach Air window from the embedding OpenFin window

Parameters

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