com.openfin.desktop.win32
Class ExternalWindowObserver

java.lang.Object
  extended by com.openfin.desktop.win32.ExternalWindowObserver
All Implemented Interfaces:
DesktopStateListener

public class ExternalWindowObserver
extends Object
implements DesktopStateListener

Integrates a window outside of the desktop for interaction and control with the API. An integrated window is controlled in the same way as an HTML window running in the desktop. It can be controlled and queried by the API, generate events that are subscribed to by addEventListener, and join/merge groups with other windows for docking. Created by wche on 3/11/15.


Nested Class Summary
static class ExternalWindowObserver.WINDOWPOS
          Structure of WindowPos
static class ExternalWindowObserver.WINDOWRECT
           
 
Field Summary
static int SC_CLOSE
           
static int SC_MAXIMIZE
           
static int SC_MINIMIZE
           
static int SC_RESTORE
           
static int SWP_HIDEWINDOW
           
static int SWP_NOMOVE
           
static int SWP_NOSIZE
           
static int SWP_SHOWWINDOW
           
static int WM_CAPTURECHANGED
           
static int WM_DESTROY
           
static int WM_ENTERSIZEMOVE
           
static int WM_ERASEBKGND
           
static int WM_EXITSIZEMOVE
           
static int WM_KEYDOWN
           
static int WM_KEYUP
           
static int WM_KILLFOCUS
           
static int WM_LBUTTONDOWN
           
static int WM_LBUTTONUP
           
static int WM_MOUSEMOVE
           
static int WM_MOVE
           
static int WM_MOVING
           
static int WM_NCLBUTTONDBLCLK
           
static int WM_NCLBUTTONUP
           
static int WM_NOTIFY
           
static int WM_PAINT
           
static int WM_SETFOCUS
           
static int WM_SIZING
           
static int WM_SYSCOMMAND
           
static int WM_WINDOWPOSCHANGED
           
static int WM_WINDOWPOSCHANGING
           
 
Constructor Summary
ExternalWindowObserver(int port, String parentAppUuid, String name, Window window, AckListener listener)
          Establishes a connection and registers the window identified by hWnd with the desktop.
 
Method Summary
 void dispose()
          Ensures this window is deregistered on disposal
 String getAppUuid()
          Get UUID of parent application
 String getName()
          Get name of this window
 void onError(String reason)
          DesktopStateListener.onError
 void onMessage(String message)
          DesktopStateListener.onMessage
 void onOutgoingMessage(String message)
          DesktopStateListener.onOutgoingMessage
 void onReady()
          DesktopStateListener.onReady
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WM_CAPTURECHANGED

public static final int WM_CAPTURECHANGED
See Also:
Constant Field Values

WM_DESTROY

public static final int WM_DESTROY
See Also:
Constant Field Values

WM_ENTERSIZEMOVE

public static final int WM_ENTERSIZEMOVE
See Also:
Constant Field Values

WM_ERASEBKGND

public static final int WM_ERASEBKGND
See Also:
Constant Field Values

WM_EXITSIZEMOVE

public static final int WM_EXITSIZEMOVE
See Also:
Constant Field Values

WM_KEYDOWN

public static final int WM_KEYDOWN
See Also:
Constant Field Values

WM_KEYUP

public static final int WM_KEYUP
See Also:
Constant Field Values

WM_KILLFOCUS

public static final int WM_KILLFOCUS
See Also:
Constant Field Values

WM_LBUTTONDOWN

public static final int WM_LBUTTONDOWN
See Also:
Constant Field Values

WM_LBUTTONUP

public static final int WM_LBUTTONUP
See Also:
Constant Field Values

WM_MOUSEMOVE

public static final int WM_MOUSEMOVE
See Also:
Constant Field Values

WM_MOVE

public static final int WM_MOVE
See Also:
Constant Field Values

WM_MOVING

public static final int WM_MOVING
See Also:
Constant Field Values

WM_NCLBUTTONDBLCLK

public static final int WM_NCLBUTTONDBLCLK
See Also:
Constant Field Values

WM_NCLBUTTONUP

public static final int WM_NCLBUTTONUP
See Also:
Constant Field Values

WM_NOTIFY

public static final int WM_NOTIFY
See Also:
Constant Field Values

WM_SETFOCUS

public static final int WM_SETFOCUS
See Also:
Constant Field Values

WM_SIZING

public static final int WM_SIZING
See Also:
Constant Field Values

WM_SYSCOMMAND

public static final int WM_SYSCOMMAND
See Also:
Constant Field Values

WM_WINDOWPOSCHANGED

public static final int WM_WINDOWPOSCHANGED
See Also:
Constant Field Values

WM_WINDOWPOSCHANGING

public static final int WM_WINDOWPOSCHANGING
See Also:
Constant Field Values

WM_PAINT

public static final int WM_PAINT
See Also:
Constant Field Values

SC_CLOSE

public static final int SC_CLOSE
See Also:
Constant Field Values

SC_MAXIMIZE

public static final int SC_MAXIMIZE
See Also:
Constant Field Values

SC_MINIMIZE

public static final int SC_MINIMIZE
See Also:
Constant Field Values

SC_RESTORE

public static final int SC_RESTORE
See Also:
Constant Field Values

SWP_HIDEWINDOW

public static final int SWP_HIDEWINDOW
See Also:
Constant Field Values

SWP_NOMOVE

public static final int SWP_NOMOVE
See Also:
Constant Field Values

SWP_NOSIZE

public static final int SWP_NOSIZE
See Also:
Constant Field Values

SWP_SHOWWINDOW

public static final int SWP_SHOWWINDOW
See Also:
Constant Field Values
Constructor Detail

ExternalWindowObserver

public ExternalWindowObserver(int port,
                              String parentAppUuid,
                              String name,
                              Window window,
                              AckListener listener)
                       throws DesktopException,
                              URISyntaxException,
                              DesktopIOException
Establishes a connection and registers the window identified by hWnd with the desktop.

Parameters:
port - The host that the desktop is running on
parentAppUuid - The UUID of the application to create register this window as a child of
name - The unique name for this window as a child window
window - The HWND of the window to control/observe
listener - AckListener for external registering
Throws:
DesktopException
URISyntaxException
DesktopIOException
Method Detail

getAppUuid

public String getAppUuid()
Get UUID of parent application

Returns:
UUID

getName

public String getName()
Get name of this window

Returns:
name

dispose

public void dispose()
             throws DesktopException
Ensures this window is deregistered on disposal

Throws:
DesktopException

onReady

public void onReady()
DesktopStateListener.onReady

Specified by:
onReady in interface DesktopStateListener

onError

public void onError(String reason)
DesktopStateListener.onError

Specified by:
onError in interface DesktopStateListener
Parameters:
reason - Error message

onMessage

public void onMessage(String message)
DesktopStateListener.onMessage

Specified by:
onMessage in interface DesktopStateListener
Parameters:
message - Message text

onOutgoingMessage

public void onOutgoingMessage(String message)
DesktopStateListener.onOutgoingMessage

Specified by:
onOutgoingMessage in interface DesktopStateListener
Parameters:
message - Message text


Copyright © 2016. All rights reserved.