public class ExternalWindowObserver extends Object implements DesktopStateListener
| Modifier and Type | Class and Description |
|---|---|
class |
ExternalWindowObserver.WINDOWPOS |
static class |
ExternalWindowObserver.WINDOWPOS2
Structure of WindowPos
|
static class |
ExternalWindowObserver.WINDOWRECT |
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
ExternalWindowObserver(int port,
String parentAppUuid,
String name,
javafx.stage.Stage stage,
AckListener listener) |
ExternalWindowObserver(int port,
String parentAppUuid,
String name,
Window window,
AckListener listener)
Establishes a connection and registers
the window identified by hWnd with the Runtime.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Ensures this window is deregistered on disposal
|
String |
getAppUuid()
Get UUID of parent application
|
DesktopConnection |
getDesktopConnection() |
String |
getName()
Get name of this window
|
void |
onClose(String error)
DesktopStateListener.onClose
|
void |
onError(String reason)
DesktopStateListener.onError
|
void |
onMessage(String message)
DesktopStateListener.onMessage
|
void |
onOutgoingMessage(String message)
DesktopStateListener.onOutgoingMessage
|
void |
onReady()
DesktopStateListener.onReady
|
void |
setHasFrame(com.sun.jna.platform.win32.WinDef.HWND hwnd,
boolean hasFrame)
Enable or disable window frame
|
void |
setUserGesture(boolean userGesture)
Set userGuesture
|
void |
setWindowOptions(WindowOptions windowOptions)
Set options for the window
|
void |
start() |
public static final int WM_CAPTURECHANGED
public static final int WM_DESTROY
public static final int WM_ENTERSIZEMOVE
public static final int WM_ERASEBKGND
public static final int WM_EXITSIZEMOVE
public static final int WM_KEYDOWN
public static final int WM_KEYUP
public static final int WM_KILLFOCUS
public static final int WM_LBUTTONDOWN
public static final int WM_LBUTTONUP
public static final int WM_MOUSEMOVE
public static final int WM_MOVE
public static final int WM_MOVING
public static final int WM_NCLBUTTONDBLCLK
public static final int WM_NCLBUTTONUP
public static final int WM_NOTIFY
public static final int WM_SETFOCUS
public static final int WM_SIZING
public static final int WM_SYSCOMMAND
public static final int WM_WINDOWPOSCHANGED
public static final int WM_WINDOWPOSCHANGING
public static final int WM_PAINT
public static final int SC_CLOSE
public static final int SC_MAXIMIZE
public static final int SC_MINIMIZE
public static final int SC_RESTORE
public static final int SWP_HIDEWINDOW
public static final int SWP_NOMOVE
public static final int SWP_NOSIZE
public static final int SWP_SHOWWINDOW
public ExternalWindowObserver(int port,
String parentAppUuid,
String name,
Window window,
AckListener listener)
throws DesktopException
port - The host that the desktop is running onparentAppUuid - The UUID of the application to create register this window as a child ofname - The unique name for this window as a child windowwindow - The HWND of the window to control/observelistener - AckListener for external registeringDesktopException - if registration failspublic ExternalWindowObserver(int port,
String parentAppUuid,
String name,
javafx.stage.Stage stage,
AckListener listener)
throws DesktopException
DesktopExceptionpublic String getAppUuid()
public String getName()
public void setUserGesture(boolean userGesture)
userGesture - value for userGesturepublic void setWindowOptions(WindowOptions windowOptions)
windowOptions - optionspublic void dispose()
throws DesktopException
DesktopException - if errors are caught during cleanuppublic void setHasFrame(com.sun.jna.platform.win32.WinDef.HWND hwnd,
boolean hasFrame)
hwnd - Window handlehasFrame - hasFramepublic void onReady()
onReady in interface DesktopStateListenerpublic void onClose(String error)
onClose in interface DesktopStateListenererror - Error message. null for normal closepublic void onError(String reason)
onError in interface DesktopStateListenerreason - Error messagepublic void onMessage(String message)
onMessage in interface DesktopStateListenermessage - Message textpublic void onOutgoingMessage(String message)
onOutgoingMessage in interface DesktopStateListenermessage - Message textpublic DesktopConnection getDesktopConnection()
Copyright © 2019. All rights reserved.