Package com.tick42.glue.internal.windows
Class InteropWindow
java.lang.Object
com.tick42.glue.internal.windows.InteropWindow
- All Implemented Interfaces:
AsynchronousCloseable,Window,InternalWindow,AutoCloseable
public class InteropWindow extends Object implements InternalWindow
-
Method Summary
Modifier and Type Method Description CompletionStage<?>addFrameButton(String buttonId, ButtonOptions buttonOptions)Adds a button to the window frame.CompletionStage<?>changeBounds(Bounds bounds)Changes the window position and sizeCompletionStage<?>changeChannel(String channel)Changes the window channelCompletionStage<?>changeContext(Map<String,Object> context)Changes the window contextCompletionStage<?>changeTitle(String title)Changes the window titleCompletionStage<?>changeVisibility(boolean visible)Changes the visibility.CompletionStage<Void>closeAsync()Initiates a shutdown.CompletionStage<Void>onClose()Return a stage that will complete whenAsynchronousCloseable.closeAsync()is called and shutdown completes.AsynchronousCloseableonContextUpdated(WindowContextUpdatedEvent.Listener listener)Registers a callback to be notified upon context update.GlueEvent.Subscription<WindowFrameButtonClickedEvent>onFrameButtonClicked(WindowFrameButtonClickedEvent.Listener listener)Registers a callback to be notified when some button from the window frame is clicked.GlueEvent.Subscription<WindowHibernateEvent>onHibernated(WindowHibernateEvent.Listener listener)Registers a callback to be notified when the current layout is about to be suspended/hibernated.GlueEvent.Subscription<WindowResumedEvent>onResumed(WindowResumedEvent.Listener listener)Registers a callback to be notified when the current layout is about to be resumed.InternalWindowPeerpeer()CompletionStage<?>removeFrameButton(String buttonId)Removes a button from the window frame.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tick42.glue.core.AsynchronousCloseable
close
-
Method Details
-
peer
- Specified by:
peerin interfaceInternalWindow
-
changeContext
Description copied from interface:WindowChanges the window context- Specified by:
changeContextin interfaceWindow- Parameters:
context- context for the window- Returns:
- completion stage that completes when context is changed, never
null
-
changeChannel
Description copied from interface:WindowChanges the window channel- Specified by:
changeChannelin interfaceWindow- Parameters:
channel- the new channel- Returns:
- completion stage that completes when channel is changed, never
null
-
addFrameButton
Description copied from interface:WindowAdds a button to the window frame.- Specified by:
addFrameButtonin interfaceWindow- Parameters:
buttonId- id of the button to addbuttonOptions- options for the button to add- Returns:
- completion stage that completes when to button is added, never
null
-
removeFrameButton
Description copied from interface:WindowRemoves a button from the window frame.- Specified by:
removeFrameButtonin interfaceWindow- Parameters:
buttonId- id of the button to remove- Returns:
- completion stage that completes when the button is removed, never
null
-
onFrameButtonClicked
public GlueEvent.Subscription<WindowFrameButtonClickedEvent> onFrameButtonClicked(WindowFrameButtonClickedEvent.Listener listener)Description copied from interface:WindowRegisters a callback to be notified when some button from the window frame is clicked.- Specified by:
onFrameButtonClickedin interfaceWindow- Parameters:
listener- callback to be registered- Returns:
- subscription object that can be used to unregister the callback, never
null
-
onHibernated
public GlueEvent.Subscription<WindowHibernateEvent> onHibernated(WindowHibernateEvent.Listener listener)Description copied from interface:WindowRegisters a callback to be notified when the current layout is about to be suspended/hibernated.- Specified by:
onHibernatedin interfaceWindow- Parameters:
listener- callback to be registered- Returns:
- subscription object that can be used to unregister the callback, never
null
-
onResumed
Description copied from interface:WindowRegisters a callback to be notified when the current layout is about to be resumed. -
onContextUpdated
Description copied from interface:WindowRegisters a callback to be notified upon context update.- Specified by:
onContextUpdatedin interfaceWindow- Parameters:
listener- callback to be registered- Returns:
subscription objectthat can be used to unsubscribe from events, nevernull.
-
changeVisibility
Description copied from interface:WindowChanges the visibility. This also affects the window icon in the taskbar- Specified by:
changeVisibilityin interfaceWindow- Parameters:
visible- flag indicating whether the window should be shown or hidden- Returns:
- completion stage that completes when visibility is changed, never
null
-
changeTitle
Description copied from interface:WindowChanges the window title- Specified by:
changeTitlein interfaceWindow- Parameters:
title- the title to be displayed- Returns:
- completion stage that completes when title is changed, never
null
-
changeBounds
Description copied from interface:WindowChanges the window position and size- Specified by:
changeBoundsin interfaceWindow- Parameters:
bounds- the new position and window- Returns:
- completion stage that completes when bounds are changed, never
null
-
onClose
Description copied from interface:AsynchronousCloseableReturn a stage that will complete whenAsynchronousCloseable.closeAsync()is called and shutdown completes.- Specified by:
onClosein interfaceAsynchronousCloseable- Returns:
- a stage that will complete when shutdown is complete, never
null
-
closeAsync
Description copied from interface:AsynchronousCloseableInitiates a shutdown.- Specified by:
closeAsyncin interfaceAsynchronousCloseable- Returns:
- a stage that will complete when shutdown is complete, never
null
-