Package com.tick42.glue.desktop.windows
Interface Window
- All Superinterfaces:
AsynchronousCloseable,AutoCloseable
- All Known Subinterfaces:
InternalWindow
- All Known Implementing Classes:
InteropWindow
public interface Window extends AsynchronousCloseable
Glue desktop window.
-
Method Summary
Modifier and Type Method Description CompletionStage<?>addFrameButton(String buttonId, ButtonOptions options)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.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.CompletionStage<?>removeFrameButton(String buttonId)Removes a button from the window frame.Methods inherited from interface com.tick42.glue.core.AsynchronousCloseable
close, closeAsync, onClose
-
Method Details
-
changeTitle
Changes the window title- Parameters:
title- the title to be displayed- Returns:
- completion stage that completes when title is changed, never
null
-
changeChannel
Changes the window channel- Parameters:
channel- the new channel- Returns:
- completion stage that completes when channel is changed, never
null
-
changeBounds
Changes the window position and size- Parameters:
bounds- the new position and window- Returns:
- completion stage that completes when bounds are changed, never
null
-
changeVisibility
Changes the visibility. This also affects the window icon in the taskbar- Parameters:
visible- flag indicating whether the window should be shown or hidden- Returns:
- completion stage that completes when visibility is changed, never
null
-
changeContext
Changes the window context- Parameters:
context- context for the window- Returns:
- completion stage that completes when context is changed, never
null
-
addFrameButton
Adds a button to the window frame.- Parameters:
buttonId- id of the button to addoptions- options for the button to add- Returns:
- completion stage that completes when to button is added, never
null
-
removeFrameButton
Removes a button from the window frame.- Parameters:
buttonId- id of the button to remove- Returns:
- completion stage that completes when the button is removed, never
null
-
onFrameButtonClicked
GlueEvent.Subscription<WindowFrameButtonClickedEvent> onFrameButtonClicked(WindowFrameButtonClickedEvent.Listener listener)Registers a callback to be notified when some button from the window frame is clicked.- Parameters:
listener- callback to be registered- Returns:
- subscription object that can be used to unregister the callback, never
null
-
onHibernated
Registers a callback to be notified when the current layout is about to be suspended/hibernated.- Parameters:
listener- callback to be registered- Returns:
- subscription object that can be used to unregister the callback, never
null
-
onResumed
Registers a callback to be notified when the current layout is about to be resumed.- Parameters:
listener- callback to be registered- Returns:
- subscription object that can be used to unregister the callback, never
null
-
onContextUpdated
Registers a callback to be notified upon context update.- Parameters:
listener- callback to be registered- Returns:
subscription objectthat can be used to unsubscribe from events, nevernull.
-