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 |
SIZE_MAXHIDE |
static int |
SIZE_MAXIMIZED |
static int |
SIZE_MAXSHOW |
static int |
SIZE_MINIMIZED |
static int |
SIZE_RESTORED |
| 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
|
void |
enterSizeMove()
Simulate WM_ENTERSIZEMOVE
|
void |
exitSizeMove()
Simulate WM_EXITSIZEMOVE
|
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
|
boolean |
onMoving(WindowBounds bounds,
Point mousePosition)
Simulate WM_MOVING event
|
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 |
setWindowOptions(WindowOptions windowOptions)
Set options for the window
|
void |
start() |
public static final int SIZE_MAXHIDE
public static final int SIZE_MAXIMIZED
public static final int SIZE_MAXSHOW
public static final int SIZE_MINIMIZED
public static final int SIZE_RESTORED
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 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 boolean onMoving(WindowBounds bounds, Point mousePosition)
bounds - current window boundsmousePosition - current mouse positionpublic void enterSizeMove()
public void exitSizeMove()
public 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 © 2022. All rights reserved.