public interface Window extends Frame, Component.HasCaption, Component.HasIcon
Modifier and Type | Interface and Description |
---|---|
static class |
Window.BeforeCloseEvent
Event sent right before the window is closed by an external (relative to the window content) action,
like the button in the window tab or by the Esc keyboard shortcut.
|
static class |
Window.BeforeCloseWithCloseButtonEvent
Deprecated.
|
static class |
Window.BeforeCloseWithShortcutEvent
Deprecated.
|
static interface |
Window.CloseListener
Listener to be notified when a screen is closed.
|
static interface |
Window.CloseOrigin
Marker interface for all window close types, which describes the way a window was closed.
|
static interface |
Window.CloseWithCommitListener
Listener to be notified when a screen is closed with actionId
COMMIT_ACTION_ID . |
static interface |
Window.Committable
Represents a window that can be committed on close.
|
static class |
Window.ContentSwitchMode
Defines how the managed main TabSheet switches a tab with the given window: hides or unloads its content.
|
static interface |
Window.Editor<T extends Entity>
Deprecated.
|
static interface |
Window.HasFoldersPane |
static interface |
Window.HasUserIndicator |
static interface |
Window.HasWorkArea |
static interface |
Window.Lookup<T extends Entity>
Deprecated.
|
static interface |
Window.TopLevelWindow
Deprecated.
Is not required for screen controllers anymore
|
static interface |
Window.Wrapper
Deprecated.
|
Frame.MessageMode, Frame.MessageType, Frame.NotificationType
ExpandingLayout.ExpandDirection
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BROWSE_WINDOW_SUFFIX |
static java.lang.String |
CLOSE_ACTION_ID
Constant that should be passed to
close(String) and close(String, boolean) methods when
the screen is closed without commit. |
static java.lang.String |
COMMIT_ACTION_ID
Constant that should be passed to
close(String) and close(String, boolean) methods when
the screen is closed after commit of changes. |
static java.lang.String |
CREATE_WINDOW_SUFFIX |
static java.lang.String |
EDITOR_WINDOW_SUFFIX |
static java.lang.String |
LOOKUP_WINDOW_SUFFIX |
static java.lang.String |
NAME
Deprecated.
|
static java.lang.String |
SELECT_ACTION_ID
Constant that passed to
close(String) and close(String, boolean) methods when
the lookup screen is closed with selected items. |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
Modifier and Type | Method and Description |
---|---|
default void |
addBeforeCloseWithCloseButtonListener(java.util.function.Consumer<Window.BeforeCloseWithCloseButtonEvent> listener)
Deprecated.
|
default void |
addBeforeCloseWithShortcutListener(java.util.function.Consumer<Window.BeforeCloseWithShortcutEvent> listener)
Deprecated.
|
Subscription |
addBeforeWindowCloseListener(java.util.function.Consumer<Window.BeforeCloseEvent> listener)
Registers a new before window close listener.
|
default void |
addCloseListener(Window.CloseListener listener)
Deprecated.
Use
Screen.addAfterCloseListener(Consumer) instead. |
default void |
addCloseWithCommitListener(Window.CloseWithCommitListener listener)
Deprecated.
Use
Screen.addAfterCloseListener(Consumer) instead. |
default void |
addListener(Window.CloseListener listener)
Deprecated.
Use
Screen.addAfterCloseListener(Consumer) instead. |
void |
addTimer(Timer timer)
Deprecated.
Use
Frame.addFacet(Facet) instead |
default void |
applySettings(Settings settings)
This method is called by the framework after opening the screen to apply user settings to all components.
|
default boolean |
close(java.lang.String actionId)
Deprecated.
|
default boolean |
close(java.lang.String actionId,
boolean force)
Deprecated.
|
default void |
closeAndRun(java.lang.String actionId,
java.lang.Runnable runnable)
Deprecated.
Use
getFrameOwner() and trigger Screen.close(CloseAction) instead. |
default void |
deleteSettings()
This method is called by the framework on reset to defaults action
|
WindowContext |
getContext() |
DialogOptions |
getDialogOptions()
Deprecated.
|
java.lang.String |
getFocusComponent() |
Screen |
getFrameOwner() |
java.lang.String |
getMaxHeight() |
java.lang.String |
getMaxWidth() |
java.lang.String |
getMinHeight() |
java.lang.String |
getMinWidth() |
default Settings |
getSettings() |
Timer |
getTimer(java.lang.String id)
Deprecated.
Use
Frame.getFacet(String) instead |
WindowManager |
getWindowManager()
Deprecated.
Use
Screens and Notifications instead. |
boolean |
isCloseable() |
default void |
removeBeforeCloseWithCloseButtonListener(java.util.function.Consumer<Window.BeforeCloseWithCloseButtonEvent> listener)
Deprecated.
|
default void |
removeBeforeCloseWithShortcutListener(java.util.function.Consumer<Window.BeforeCloseWithShortcutEvent> listener)
Deprecated.
|
void |
removeBeforeWindowCloseListener(java.util.function.Consumer<Window.BeforeCloseEvent> listener)
Deprecated.
Use
Subscription instead |
default void |
removeCloseListener(Window.CloseListener listener)
Deprecated.
|
default void |
removeCloseWithCommitListener(Window.CloseWithCommitListener listener)
Deprecated.
|
default void |
removeListener(Window.CloseListener listener)
Deprecated.
|
default void |
saveSettings()
This method is called by the framework when closing the screen
to save user settings if they have been changed.
|
void |
setCloseable(boolean closeable)
Sets the closable status for the window.
|
void |
setFocusComponent(java.lang.String componentId)
Set a component to be focused after the screen is opened.
|
void |
setMaxHeight(java.lang.String maxHeight)
Sets maximum CSS height for window layout.
|
void |
setMaxWidth(java.lang.String maxWidth)
Sets maximum CSS width for window layout.
|
void |
setMinHeight(java.lang.String minHeight)
Sets minimum CSS height for window layout.
|
void |
setMinWidth(java.lang.String minWidth)
Sets minimum CSS width for window layout.
|
boolean |
validate(java.util.List<Validatable> fields)
Check validity by invoking validators on specified components which support them
and show validation result notification.
|
boolean |
validateAll()
Check validity by invoking validators on all components which support them
and show validation result notification.
|
addFacet, getFacet, getFacetNN, getFacets, isValid, removeFacet, validate
expand, expand, getExpandDirection, isExpanded, resetExpanded
add, getComponent, getComponentNN, indexOf
add, add, focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStream, remove, remove, removeAll
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, getWidthUnits, isEnabled, isEnabledItself, isEnabledRecursive, isResponsive, isVisible, isVisibleItself, isVisibleRecursive, removeStyleName, requestFocus, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
getFrame, setFrame
getSpacing, setSpacing
getMargin, setMargin, setMargin, setMargin
addAction, addAction, getAction, getActionNN, getActions, getSubPart, removeAction, removeAction, removeAllActions
getIcon, setIcon, setIconFromSet
getCaption, setCaption
getDescription, setDescription
openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openFrame, openFrame, openLookup, openLookup, openLookup, openLookup, openWindow, openWindow, showMessageDialog, showNotification, showNotification, showNotification, showOptionDialog, showOptionDialog, showWebPage
getExpandRatio, setExpandRatio
@Deprecated static final java.lang.String NAME
static final java.lang.String COMMIT_ACTION_ID
close(String)
and close(String, boolean)
methods when
the screen is closed after commit of changes. Propagated to Window.CloseListener.windowClosed(java.lang.String)
.static final java.lang.String CLOSE_ACTION_ID
close(String)
and close(String, boolean)
methods when
the screen is closed without commit. Propagated to Window.CloseListener.windowClosed(java.lang.String)
.static final java.lang.String SELECT_ACTION_ID
close(String)
and close(String, boolean)
methods when
the lookup screen is closed with selected items. Propagated to Window.CloseListener.windowClosed(java.lang.String)
.static final java.lang.String BROWSE_WINDOW_SUFFIX
static final java.lang.String LOOKUP_WINDOW_SUFFIX
static final java.lang.String EDITOR_WINDOW_SUFFIX
static final java.lang.String CREATE_WINDOW_SUFFIX
void setCloseable(boolean closeable)
closeable
- closeable flagboolean isCloseable()
void setMinWidth(java.lang.String minWidth)
minWidth
- minimum widthjava.lang.String getMinWidth()
void setMaxWidth(java.lang.String maxWidth)
maxWidth
- maximum widthjava.lang.String getMaxWidth()
void setMinHeight(java.lang.String minHeight)
minHeight
- minimum heightjava.lang.String getMinHeight()
void setMaxHeight(java.lang.String maxHeight)
maxHeight
- maximum heightjava.lang.String getMaxHeight()
Screen getFrameOwner()
getFrameOwner
in interface Frame
Screen
,
ScreenFragment
WindowContext getContext()
getContext
in interface Frame
@Deprecated default void addListener(Window.CloseListener listener)
Screen.addAfterCloseListener(Consumer)
instead.listener
- listener instance@Deprecated default void removeListener(Window.CloseListener listener)
@Deprecated default void addCloseListener(Window.CloseListener listener)
Screen.addAfterCloseListener(Consumer)
instead.listener
- listener instance@Deprecated default void removeCloseListener(Window.CloseListener listener)
@Deprecated default void addCloseWithCommitListener(Window.CloseWithCommitListener listener)
Screen.addAfterCloseListener(Consumer)
instead.COMMIT_ACTION_ID
.listener
- listener instance@Deprecated default void removeCloseWithCommitListener(Window.CloseWithCommitListener listener)
default void applySettings(Settings settings)
default void saveSettings()
default void deleteSettings()
void setFocusComponent(java.lang.String componentId)
componentId
- component's ID in XML. If null, then first focusable component will be focusedjava.lang.String getFocusComponent()
default Settings getSettings()
@Deprecated default boolean close(java.lang.String actionId)
DsContext
,
the confirmation dialog will be shown.
AbstractWindow.preClose(String)
actionId
- action ID that will be propagated to attached Window.CloseListener
s.
Use COMMIT_ACTION_ID
if some changes have just been committed, or
CLOSE_ACTION_ID
otherwise. These constants are recognized by various mechanisms of the
framework.@Deprecated default boolean close(java.lang.String actionId, boolean force)
DsContext
,
and force=false, the confirmation dialog will be shown.actionId
- action ID that will be propagated to attached Window.CloseListener
s.
Use COMMIT_ACTION_ID
if some changes have just been committed, or
CLOSE_ACTION_ID
otherwise. These constants are recognized by various mechanisms of the
framework.force
- if true, no confirmation dialog will be shown even if the screen has uncommitted changes@Deprecated default void closeAndRun(java.lang.String actionId, java.lang.Runnable runnable)
getFrameOwner()
and trigger Screen.close(CloseAction)
instead.@Deprecated void addTimer(Timer timer)
Frame.addFacet(Facet)
insteadTimer
component to this screen.
UiComponents
factory.
timer
- Timer instance@Nullable @Deprecated Timer getTimer(java.lang.String id)
Frame.getFacet(String)
insteadTimer
added to this screen.id
- timer IDboolean validate(java.util.List<Validatable> fields)
boolean validateAll()
validateAll
in interface Frame
@Deprecated WindowManager getWindowManager()
Screens
and Notifications
instead.HasWindowManager
getWindowManager
in interface HasWindowManager
@Deprecated DialogOptions getDialogOptions()
OpenMode.DIALOG
.Subscription addBeforeWindowCloseListener(java.util.function.Consumer<Window.BeforeCloseEvent> listener)
listener
- the listener to register@Deprecated void removeBeforeWindowCloseListener(java.util.function.Consumer<Window.BeforeCloseEvent> listener)
Subscription
insteadlistener
- the listener to remove@Deprecated default void addBeforeCloseWithShortcutListener(java.util.function.Consumer<Window.BeforeCloseWithShortcutEvent> listener)
listener
- the listener to register@Deprecated default void removeBeforeCloseWithShortcutListener(java.util.function.Consumer<Window.BeforeCloseWithShortcutEvent> listener)
listener
- the listener to remove@Deprecated default void addBeforeCloseWithCloseButtonListener(java.util.function.Consumer<Window.BeforeCloseWithCloseButtonEvent> listener)
listener
- the listener to register@Deprecated default void removeBeforeCloseWithCloseButtonListener(java.util.function.Consumer<Window.BeforeCloseWithCloseButtonEvent> listener)
listener
- the listener to remove