Package com.tick42.glue.internal.windows
Class HeadlessWindowManager
java.lang.Object
com.tick42.glue.internal.windows.InteropWindowManager
com.tick42.glue.internal.windows.HeadlessWindowManager
- All Implemented Interfaces:
WindowManager
public class HeadlessWindowManager extends InteropWindowManager
-
Constructor Summary
Constructors Constructor Description HeadlessWindowManager(Interop interop, reactor.core.scheduler.Scheduler scheduler, ChannelContexts channels) -
Method Summary
Modifier and Type Method Description <W> WindowHandle<W>getWindowHandle(W window)Get a window handle for specified window object.<W> booleanisWindowSupported(W window)Checks if this window manager may find the handle of the specified window.CompletionStage<Window>register(WindowHandle<?> handle, Consumer<WindowOptions.Builder<?>> options)Register a window with specified handle and window options.Methods inherited from class com.tick42.glue.internal.windows.InteropWindowManager
list, start, stopMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tick42.glue.desktop.windows.WindowManager
register
-
Constructor Details
-
HeadlessWindowManager
public HeadlessWindowManager(Interop interop, reactor.core.scheduler.Scheduler scheduler, ChannelContexts channels)
-
-
Method Details
-
isWindowSupported
public <W> boolean isWindowSupported(W window)Description copied from interface:WindowManagerChecks if this window manager may find the handle of the specified window.- Type Parameters:
W- the type of the window- Parameters:
window- the window to check for- Returns:
trueif specified window is supported and handle can be obtained,falseotherwise
-
getWindowHandle
Description copied from interface:WindowManagerGet a window handle for specified window object.This method should be called only if
WindowManager.isWindowSupported(Object)returnstrue. OtherwiseWindowManagerExceptionis thrown.- Type Parameters:
W- type of the window- Parameters:
window- window object to extract handle from- Returns:
- window handle, not null
-
register
public CompletionStage<Window> register(WindowHandle<?> handle, Consumer<WindowOptions.Builder<?>> options)Description copied from interface:WindowManagerRegister a window with specified handle and window options.The
handlecan obtained viaWindowManager.getWindowHandle(Object). Registrationoptionsare used to specify things like title, placement, etc. Though this method (andWindowManager.register(WindowHandle)) return aCompletableFutureimplementations will usually be synchronous.- Parameters:
handle- handle of the window to register (usually obtained viaWindowManager.getWindowHandle(Object))options- window registration options callback- Returns:
- stage that will complete when window registration is done
-