public interface Window extends Frame, Component.HasCaption, Component.HasIcon
Modifier and Type | Interface and Description |
---|---|
static class |
Window.BeforeCloseEvent |
static class |
Window.BeforeCloseWithCloseButtonEvent
An event that is fired before a screen is closed with one of the following approaches:
screen's close button, bread crumbs, TabSheet tabs' close actions (Close, Close All, Close Others).
|
static interface |
Window.BeforeCloseWithCloseButtonListener
Listener to be notified when a screen is closed with one of the following approaches:
screen's close button, bread crumbs, TabSheet tabs' close actions (Close, Close All, Close Others).
|
static class |
Window.BeforeCloseWithShortcutEvent
An event that is fired before a screen is closed with
ClientConfig.getCloseShortcut() . |
static interface |
Window.BeforeCloseWithShortcutListener
Listener to be notified when a screen is closed with
ClientConfig.getCloseShortcut() . |
static interface |
Window.CloseListener
Listener to be notified when a screen is 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
Represents an edit screen.
|
static interface |
Window.HasFoldersPane |
static interface |
Window.HasUserIndicator |
static interface |
Window.HasWorkArea |
static interface |
Window.Lookup
Represents a lookup screen.
|
static interface |
Window.MainWindow |
static interface |
Window.TopLevelWindow
Marker interface implemented by top-level windows of the application: login window and main window.
|
static interface |
Window.Wrapper
INTERNAL.
|
Frame.MessageMode, Frame.MessageType, Frame.NotificationType, Frame.UiEventListenersHolder
ExpandingLayout.ExpandDirection
Component.ActionOwner, Component.ActionsHolder, Component.Alignment, Component.BelongToFrame, Component.Buffered, Component.ChildEditableController, Component.Collapsable, Component.Container, Component.ContextHelpIconClickEvent, Component.Disposable, Component.Editable, Component.EditableChangeEvent, Component.EditableChangeListener, Component.EditableChangeNotifier, Component.ExpandedStateChangeEvent, Component.ExpandedStateChangeListener, Component.Focusable, Component.HasBorder, Component.HasButtonsPanel, Component.HasCaption, Component.HasContextHelp, Component.HasFormatter, Component.HasIcon, Component.HasInputPrompt, Component.HasNamedComponents, Component.HasOptionsStyleProvider, Component.HasPresentations, Component.HasRowsCount, Component.HasSettings, Component.HasValue, Component.HasXmlDescriptor, Component.LayoutClickEvent, Component.LayoutClickListener, Component.LayoutClickNotifier, Component.Margin, Component.MouseEventDetails, Component.OptionsStyleProvider, Component.OrderedContainer, Component.OuterMargin, Component.SecuredActionsHolder, Component.ShortcutAction, Component.ShortcutNotifier, Component.ShortcutTriggeredEvent, Component.Spacing, Component.UiPermissionAware, Component.Validatable, Component.ValueChangeEvent, Component.ValueChangeListener
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
Name that is used to register a client type specific screen implementation in
ComponentsFactory |
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, UNITS_PERCENTAGE, UNITS_PIXELS
Modifier and Type | Method and Description |
---|---|
void |
addBeforeCloseWithCloseButtonListener(Window.BeforeCloseWithCloseButtonListener listener)
Register a new before close with close button listener.
|
void |
addBeforeCloseWithShortcutListener(Window.BeforeCloseWithShortcutListener listener)
Register a new before close with shortcut listener.
|
void |
addCloseListener(Window.CloseListener listener)
Add a listener that will be notified when this screen is closed.
|
void |
addCloseWithCommitListener(Window.CloseWithCommitListener listener)
Add a listener that will be notified when this screen is closed with actionId
COMMIT_ACTION_ID . |
void |
addListener(Window.CloseListener listener)
Deprecated.
|
void |
addTimer(Timer timer)
Add a
Timer component to this screen. |
void |
applySettings(Settings settings)
This method is called by the framework after opening the screen to apply user settings to all components.
|
boolean |
close(java.lang.String actionId)
Close the screen.
|
boolean |
close(java.lang.String actionId,
boolean force)
Close the screen.
|
void |
closeAndRun(java.lang.String actionId,
java.lang.Runnable runnable)
INTERNAL.
|
void |
deleteSettings()
This method is called by the framework on reset to defaults action
|
Window.ContentSwitchMode |
getContentSwitchMode()
Returns how the managed main TabSheet switches a tab with this window: hides or unloads its content.
|
WindowContext |
getContext() |
DialogOptions |
getDialogOptions() |
java.lang.String |
getFocusComponent() |
Settings |
getSettings() |
Timer |
getTimer(java.lang.String id)
Returns a
Timer added to this screen. |
WindowManager |
getWindowManager() |
void |
removeBeforeCloseWithCloseButtonListener(Window.BeforeCloseWithCloseButtonListener listener)
Removes a previously registered before close with close button listener.
|
void |
removeBeforeCloseWithShortcutListener(Window.BeforeCloseWithShortcutListener listener)
Removes a previously registered before close with shortcut listener.
|
void |
removeCloseListener(Window.CloseListener listener) |
void |
removeCloseWithCommitListener(Window.CloseWithCommitListener listener) |
void |
removeListener(Window.CloseListener listener)
Deprecated.
|
void |
saveSettings()
This method is called by the framework when closing the screen
to save user settings if they have been changed.
|
void |
setContentSwitchMode(Window.ContentSwitchMode mode)
Sets how the managed main TabSheet switches a tab with this window: hides or unloads its content.
|
void |
setFocusComponent(java.lang.String componentId)
Set a component to be focused after the screen is opened.
|
void |
setWindowManager(WindowManager windowManager)
INTERNAL.
|
boolean |
validate(java.util.List<Component.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.
|
getDialogParams, getDsContext, getMessagesPack, getRegisteredComponent, isValid, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openFrame, openFrame, openLookup, openLookup, openLookup, openLookup, openWindow, openWindow, registerComponent, setContext, setDsContext, setMessagesPack, showMessageDialog, showNotification, showNotification, showNotification, showOptionDialog, showOptionDialog, showWebPage, unregisterComponent, validate
expand, expand, getExpandDirection, isExpanded, resetExpanded
add, getComponent, getComponentNN, indexOf
add, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, remove, removeAll
addStyleName, getAlignment, getDebugId, getHeight, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthUnits, isEnabled, isEnabledItself, isResponsive, isVisible, isVisibleItself, removeStyleName, requestFocus, setAlignment, setDebugId, 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, removeAction, removeAction, removeAllActions
getIcon, setIcon, setIconFromSet
getCaption, getDescription, setCaption, setDescription
static final java.lang.String NAME
ComponentsFactory
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
WindowContext getContext()
getContext
in interface Frame
@Deprecated void addListener(Window.CloseListener listener)
addCloseListener(CloseListener)
listener
- listener instance@Deprecated void removeListener(Window.CloseListener listener)
void addCloseListener(Window.CloseListener listener)
listener
- listener instancevoid removeCloseListener(Window.CloseListener listener)
void addCloseWithCommitListener(Window.CloseWithCommitListener listener)
COMMIT_ACTION_ID
.listener
- listener instancevoid removeCloseWithCommitListener(Window.CloseWithCommitListener listener)
void applySettings(Settings settings)
void saveSettings()
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()
Settings getSettings()
boolean close(java.lang.String actionId)
DsContext
,
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.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 changesvoid closeAndRun(java.lang.String actionId, java.lang.Runnable runnable)
void addTimer(Timer timer)
Timer
component to this screen.
ComponentsFactory.createTimer()
method.
timer
- Timer instance@Nullable Timer getTimer(java.lang.String id)
Timer
added to this screen.id
- timer IDboolean validate(java.util.List<Component.Validatable> fields)
boolean validateAll()
validateAll
in interface Frame
WindowManager getWindowManager()
void setWindowManager(WindowManager windowManager)
DialogOptions getDialogOptions()
WindowManager.OpenMode.DIALOG
.Window.ContentSwitchMode getContentSwitchMode()
Window.ContentSwitchMode
enum valuesvoid setContentSwitchMode(Window.ContentSwitchMode mode)
Note that: a method invocation will take effect only if cuba.web.mainTabSheetMode
property
is set to 'MANAGED'.
mode
- one of the Window.ContentSwitchMode
enum valuesvoid addBeforeCloseWithShortcutListener(Window.BeforeCloseWithShortcutListener listener)
listener
- the listener to registervoid removeBeforeCloseWithShortcutListener(Window.BeforeCloseWithShortcutListener listener)
listener
- the listener to removevoid addBeforeCloseWithCloseButtonListener(Window.BeforeCloseWithCloseButtonListener listener)
listener
- the listener to registervoid removeBeforeCloseWithCloseButtonListener(Window.BeforeCloseWithCloseButtonListener listener)
listener
- the listener to remove