public class AbstractWindow extends Screen implements Window, LegacyFrame, Component.HasXmlDescriptor, Window.Wrapper, SecuredActionsHolder, ChangeTracker
Screen.AfterCloseEvent, Screen.AfterDetachEvent, Screen.AfterInitEvent, Screen.AfterShowEvent, Screen.BeforeCloseEvent, Screen.BeforeShowEvent, Screen.InitEvent
Window.BeforeCloseEvent, Window.BeforeCloseWithCloseButtonEvent, Window.BeforeCloseWithShortcutEvent, Window.CloseListener, Window.CloseOrigin, Window.CloseWithCommitListener, Window.Committable, Window.ContentSwitchMode, Window.Editor<T extends Entity>, Window.HasFoldersPane, Window.HasUserIndicator, Window.HasWorkArea, Window.Lookup<T extends Entity>, Window.TopLevelWindow, Window.Wrapper
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 |
---|---|
protected Frame |
frame |
protected Messages |
messages |
static java.lang.String |
UNKNOWN_CLOSE_ACTION_ID |
BROWSE_WINDOW_SUFFIX, CLOSE_ACTION_ID, COMMIT_ACTION_ID, CREATE_WINDOW_SUFFIX, EDITOR_WINDOW_SUFFIX, LOOKUP_WINDOW_SUFFIX, NAME, SELECT_ACTION_ID
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
NO_OPTIONS, WINDOW_CLOSE_ACTION, WINDOW_COMMIT_AND_CLOSE_ACTION, WINDOW_DISCARD_AND_CLOSE_ACTION
Constructor and Description |
---|
AbstractWindow() |
Modifier and Type | Method and Description |
---|---|
void |
add(Component component)
Adds a component to this container.
|
void |
add(Component childComponent,
int index) |
void |
addAction(Action action)
Add an action to the component
|
void |
addAction(Action action,
int index)
Add an action to the component with index.
|
Subscription |
addBeforeWindowCloseListener(java.util.function.Consumer<Window.BeforeCloseEvent> listener)
Registers a new before window close listener.
|
void |
addFacet(Facet facet)
Registers the passed non-visual component in the frame.
|
void |
addStyleName(java.lang.String styleName)
Adds one or more style names to this component.
|
void |
addTimer(Timer timer)
Add a
Timer component to this screen. |
protected void |
afterShow(Screen.AfterShowEvent event) |
void |
applySettings(Settings settings)
This method is called when the screen is opened to restore settings saved in the database for the current user.
|
protected void |
beforeClose(Screen.BeforeCloseEvent event) |
OperationResult |
closeWithDiscard()
Ignores the unsaved changes and closes the screen with
FrameOwner.WINDOW_DISCARD_AND_CLOSE_ACTION action. |
void |
deleteSettings()
Deletes screen settings associated with this screen.
|
void |
expand(Component component) |
void |
expand(Component component,
java.lang.String height,
java.lang.String width) |
protected java.lang.String |
formatMessage(java.lang.String key,
java.lang.Object... params)
Get localized message from the message pack associated with this frame or window, and use it as a format
string for parameters provided.
|
Action |
getAction(java.lang.String id) |
java.util.Collection<Action> |
getActions() |
ActionsPermissions |
getActionsPermissions() |
Component.Alignment |
getAlignment() |
java.lang.String |
getCaption() |
<T> T |
getCompanion() |
java.lang.Object |
getComponent() |
Component |
getComponent(int index)
Returns the component at the given position.
|
Component |
getComponent(java.lang.String id)
Get component belonging to the whole components tree below this container.
|
java.util.Collection<Component> |
getComponents()
Get all components belonging to the whole components tree below this container
|
java.lang.Object |
getComposition() |
Window.ContentSwitchMode |
getContentSwitchMode() |
WindowContext |
getContext() |
java.lang.String |
getDescription()
Screen description is used by the framework to show some specified information, e.g.
|
DialogOptions |
getDialogOptions() |
DsContext |
getDsContext() |
ExpandingLayout.ExpandDirection |
getExpandDirection() |
float |
getExpandRatio(Component component) |
Facet |
getFacet(java.lang.String id)
Finds registered facet by ID.
|
java.util.stream.Stream<Facet> |
getFacets() |
java.lang.String |
getFocusComponent() |
Frame |
getFrame() |
Screen |
getFrameOwner() |
float |
getHeight()
Get component height in
Component.getHeightSizeUnit() |
SizeUnit |
getHeightSizeUnit()
Gets the height property units.
|
java.lang.String |
getIcon()
Get icon source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.
|
MarginInfo |
getMargin() |
java.lang.String |
getMaxHeight() |
java.lang.String |
getMaxWidth() |
protected java.lang.String |
getMessage(java.lang.String key)
Get localized message from the message pack associated with this frame or window.
|
java.lang.String |
getMessagesPack() |
java.lang.String |
getMinHeight() |
java.lang.String |
getMinWidth() |
Component |
getOwnComponent(java.lang.String id)
Get component directly owned by this container.
|
java.util.Collection<Component> |
getOwnComponents()
Get all components directly owned by this container
|
java.util.stream.Stream<Component> |
getOwnComponentsStream()
Get stream of components directly owned by this container
|
Component |
getParent() |
protected int |
getScreenHashCode(Screen screen) |
Settings |
getSettings() |
boolean |
getSpacing() |
java.lang.String |
getStyleName()
Styles implementation is client-type-specific.
|
Timer |
getTimer(java.lang.String id)
Returns a
Timer added to this screen. |
float |
getWidth()
Get component width in
Component.getWidthUnits() |
SizeUnit |
getWidthSizeUnit()
Gets the width property units.
|
WindowManager |
getWindowManager()
|
Frame |
getWrappedFrame() |
Window |
getWrappedWindow()
INTERNAL.
|
org.dom4j.Element |
getXmlDescriptor() |
protected boolean |
handleValidationErrors(ValidationErrors errors) |
boolean |
hasUnsavedChanges() |
int |
indexOf(Component component) |
void |
init(java.util.Map<java.lang.String,java.lang.Object> params)
Called by the framework after creation of all components and before showing the screen.
|
protected void |
init(Screen.InitEvent initEvent) |
boolean |
isAttributeAccessControlEnabled()
Whether automatic applying of attribute access rules enabled.
|
boolean |
isCloseable() |
boolean |
isEnabled()
Is the component enabled?
Note that this method only returns the status of the component and does not take parents into account. |
boolean |
isEnabledRecursive() |
boolean |
isExpanded(Component component) |
boolean |
isResponsive()
Is the component responsive?
|
protected boolean |
isSameScreen(Screen openedScreen)
Compares this screen with an already opened screen.
|
boolean |
isValid()
Check validity by invoking validators on all components which support them.
|
boolean |
isVisible()
Is the component visible?
A component is visible only if all its parents are also visible. |
boolean |
isVisibleRecursive() |
protected void |
postValidate(ValidationErrors errors)
Hook to be implemented in subclasses.
|
protected boolean |
preClose(java.lang.String actionId)
Hook to be implemented in subclasses.
|
void |
ready()
Hook to be implemented in subclasses.
|
void |
remove(Component component)
Removes a component from this container.
|
void |
removeAction(Action action)
Remove the action from the component
|
void |
removeAction(java.lang.String id)
Remove the action by its ID.
|
void |
removeAll()
Removes all components from this container.
|
void |
removeAllActions()
Remove all actions from the component
|
void |
removeBeforeWindowCloseListener(java.util.function.Consumer<Window.BeforeCloseEvent> listener)
Removes a previously added listener.
|
void |
removeFacet(Facet facet)
Removes the non-visual component from the frame.
|
void |
removeStyleName(java.lang.String styleName)
Removes one or more style names from component.
|
void |
resetExpanded() |
void |
saveSettings()
This method is called when the screen is closed to save the screen settings to the database.
|
void |
setAlignment(Component.Alignment alignment) |
void |
setCaption(java.lang.String caption)
Set the screen caption.
|
void |
setCloseable(boolean closeable)
Sets the closable status for the window.
|
void |
setCompanion(java.lang.Object companion)
INTERNAL.
|
void |
setContentSwitchMode(Window.ContentSwitchMode mode) |
void |
setDescription(java.lang.String description)
Screen description is used by the framework to show some specified information, e.g.
|
void |
setDsContext(DsContext dsContext)
INTERNAL.
|
void |
setEnabled(boolean enabled)
Sets the component enabled state.
|
void |
setExpandRatio(Component component,
float ratio)
Sets expand ratio for the component.
|
void |
setFocusComponent(java.lang.String componentId)
Set a component to be focused after the screen is opened.
|
void |
setFrame(Frame frame) |
void |
setHeight(java.lang.String height)
Set component height in
Component.getHeightUnits() |
void |
setIcon(java.lang.String icon)
Set an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.
|
void |
setIconFromSet(Icons.Icon icon)
Set an icon from an icon set.
|
void |
setId(java.lang.String id)
Sets id of the screen.
|
void |
setMargin(MarginInfo marginInfo) |
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 |
setMessagesPack(java.lang.String name) |
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.
|
void |
setParent(Component parent)
INTERNAL.
ComponentContainer.add(Component) is normally used for adding components
to a parent and the used method will call this method implicitly. |
void |
setResponsive(boolean responsive)
Sets component to be responsive by width and height.
|
void |
setSpacing(boolean enabled) |
void |
setStyleName(java.lang.String styleName)
Sets one or more style names of the component, replacing any
previous styles.
|
void |
setVisible(boolean visible)
Sets visibility value for the component.
|
void |
setWidth(java.lang.String width)
Set component width in
Component.getWidthSizeUnit() } |
protected void |
setWindow(Window window) |
void |
setXmlDescriptor(org.dom4j.Element element) |
protected void |
showValidationErrors(ValidationErrors errors) |
<X> X |
unwrap(java.lang.Class<X> internalComponentClass)
Get client specific component instance.
|
<X> X |
unwrapComposition(java.lang.Class<X> internalCompositionClass)
Get the outmost external container of client specific component instance.
|
void |
validate()
Check validity by invoking validators on all components which support them.
|
boolean |
validate(java.util.List<Validatable> fields)
Check validity by invoking validators on specified components which support them
and show validation result notification.
|
protected void |
validateAdditionalRules(ValidationErrors errors) |
boolean |
validateAll()
Check validity by invoking validators on all components which support them
and show validation result notification.
|
addAfterCloseListener, addAfterDetachListener, addAfterInitListener, addAfterShowListener, addBeforeCloseListener, addBeforeShowListener, addInitListener, addUrlParamsChangeListener, applyDataLoadingSettings, close, closeWithDefaultAction, fireEvent, getBeanLocator, getEventHub, getExtensions, getId, getScreenData, getUiEventListeners, getWindow, isMultipleOpen, isSaveScreenHistoryOnClose, isSaveSettingsOnClose, setBeanLocator, setExtensions, setScreenData, setUiEventListeners, show
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addBeforeCloseWithCloseButtonListener, addBeforeCloseWithShortcutListener, addCloseListener, addCloseWithCommitListener, addListener, close, close, closeAndRun, removeBeforeCloseWithCloseButtonListener, removeBeforeCloseWithShortcutListener, removeCloseListener, removeCloseWithCommitListener, removeListener
getFacetNN
getComponentNN
add, focusFirstComponent, getComponentNN, remove
getHeightUnits, getId, getWidthUnits, isEnabledItself, isVisibleItself, requestFocus, setHeightAuto, setHeightFull, setSizeAuto, setSizeFull, setWidthAuto, setWidthFull
getActionNN, getSubPart
openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openFrame, openFrame, openLookup, openLookup, openLookup, openLookup, openWindow, openWindow, showMessageDialog, showNotification, showNotification, showNotification, showOptionDialog, showOptionDialog, showWebPage
public static final java.lang.String UNKNOWN_CLOSE_ACTION_ID
protected Frame frame
@Inject protected Messages messages
public WindowManager getWindowManager()
HasWindowManager
getWindowManager
in interface HasWindowManager
getWindowManager
in interface Window
public Frame getWrappedFrame()
getWrappedFrame
in interface Frame.Wrapper
@Order(value=110) @Subscribe protected void init(Screen.InitEvent initEvent)
@Order(value=110) @Subscribe protected void afterShow(Screen.AfterShowEvent event)
@Order(value=110) @Subscribe protected void beforeClose(Screen.BeforeCloseEvent event)
public OperationResult closeWithDiscard()
FrameOwner.WINDOW_DISCARD_AND_CLOSE_ACTION
action.public boolean hasUnsavedChanges()
hasUnsavedChanges
in interface ChangeTracker
public void init(java.util.Map<java.lang.String,java.lang.Object> params)
params
- parameters passed from caller's code, usually from
HasWindowManager.openWindow(String, WindowManager.OpenType)
and similar methods, or set in
screens.xml
for this registered screenpublic void setId(java.lang.String id)
Screen
public Component getParent()
public void setParent(Component parent)
Component
ComponentContainer.add(Component)
is normally used for adding components
to a parent and the used method will call this method implicitly.public boolean isEnabled()
Component
public boolean isEnabledRecursive()
isEnabledRecursive
in interface Component
public void setEnabled(boolean enabled)
Component
setEnabled
in interface Component
enabled
- enabled flagpublic boolean isVisible()
Component
public void setVisible(boolean visible)
Component
setVisible
in interface Component
visible
- visible flagpublic boolean isVisibleRecursive()
isVisibleRecursive
in interface Component
public float getHeight()
Component
Component.getHeightSizeUnit()
public SizeUnit getHeightSizeUnit()
Component
getHeightSizeUnit
in interface Component
public void setHeight(java.lang.String height)
Component
Component.getHeightUnits()
public float getWidth()
Component
Component.getWidthUnits()
public SizeUnit getWidthSizeUnit()
Component
getWidthSizeUnit
in interface Component
public void setWidth(java.lang.String width)
Component
Component.getWidthSizeUnit()
}public Component.Alignment getAlignment()
getAlignment
in interface Component
public void setAlignment(Component.Alignment alignment)
setAlignment
in interface Component
public boolean isResponsive()
Component
isResponsive
in interface Component
public void setResponsive(boolean responsive)
Component
setResponsive
in interface Component
responsive
- responsive flagpublic java.lang.String getIcon()
Component.HasIcon
getIcon
in interface Component.HasIcon
public void setIcon(java.lang.String icon)
Component.HasIcon
setIcon
in interface Component.HasIcon
public void setIconFromSet(Icons.Icon icon)
Component.HasIcon
setIconFromSet
in interface Component.HasIcon
public void add(Component component)
ComponentContainer
add
in interface ComponentContainer
component
- a component to addpublic void remove(Component component)
ComponentContainer
remove
in interface ComponentContainer
component
- a component to removepublic void removeAll()
ComponentContainer
removeAll
in interface ComponentContainer
public Component getOwnComponent(java.lang.String id)
ComponentContainer
getOwnComponent
in interface ComponentContainer
@Nullable public Component getComponent(java.lang.String id)
ComponentContainer
getComponent
in interface ComponentContainer
public java.util.Collection<Component> getOwnComponents()
ComponentContainer
getOwnComponents
in interface ComponentContainer
public java.util.stream.Stream<Component> getOwnComponentsStream()
ComponentContainer
getOwnComponentsStream
in interface ComponentContainer
public java.util.Collection<Component> getComponents()
ComponentContainer
getComponents
in interface ComponentContainer
public java.lang.Object getComponent()
getComponent
in interface Component.Wrapper
public java.lang.Object getComposition()
getComposition
in interface Component.Wrapper
public void expand(Component component, java.lang.String height, java.lang.String width)
expand
in interface ExpandingLayout
public void expand(Component component)
expand
in interface ExpandingLayout
public void resetExpanded()
resetExpanded
in interface ExpandingLayout
public boolean isExpanded(Component component)
isExpanded
in interface ExpandingLayout
public ExpandingLayout.ExpandDirection getExpandDirection()
getExpandDirection
in interface ExpandingLayout
public java.lang.String getMessagesPack()
getMessagesPack
in interface LegacyFrame
public void setMessagesPack(java.lang.String name)
setMessagesPack
in interface LegacyFrame
protected java.lang.String getMessage(java.lang.String key)
key
- message keyMessages.getMessage(String, String)
protected java.lang.String formatMessage(java.lang.String key, java.lang.Object... params)
key
- message keyparams
- parameter valuesMessages.formatMessage(String, String, Object...)
public boolean isValid()
Frame
isValid
in interface Frame
isValid
in interface LegacyFrame
public void validate() throws ValidationException
Frame
validate
in interface Frame
validate
in interface LegacyFrame
ValidationException
- if some components are currently in invalid statepublic void add(Component childComponent, int index)
add
in interface OrderedContainer
public int indexOf(Component component)
indexOf
in interface OrderedContainer
@Nullable public Component getComponent(int index)
OrderedContainer
getComponent
in interface OrderedContainer
index
- component index@Nullable public <T> T getCompanion()
getCompanion
in interface LegacyFrame
public void setCompanion(java.lang.Object companion)
public Frame getFrame()
getFrame
in interface Component.BelongToFrame
public void setFrame(Frame frame)
setFrame
in interface Component.BelongToFrame
public java.lang.String getStyleName()
Component
getStyleName
in interface Component
public void setStyleName(java.lang.String styleName)
Component
setStyleName
in interface Component
styleName
- one or more style names separated by space.public void addStyleName(java.lang.String styleName)
Component
addStyleName
in interface Component
styleName
- one or more style names separated by space.public void removeStyleName(java.lang.String styleName)
Component
removeStyleName
in interface Component
styleName
- one or more style names separated by space.public <X> X unwrap(java.lang.Class<X> internalComponentClass)
Component
com.vaadin.ui.TextField vTextField = textField.unwrap(com.vaadin.ui.TextField.class);
public <X> X unwrapComposition(java.lang.Class<X> internalCompositionClass)
Component
com.vaadin.ui.Layout vLayout = table.unwrapComposition(com.vaadin.ui.Layout.class);
unwrapComposition
in interface Component
X
- type of internal classinternalCompositionClass
- class of underlying composition implementation based on Vaadin or Swingpublic void setSpacing(boolean enabled)
setSpacing
in interface HasSpacing
public boolean getSpacing()
getSpacing
in interface HasSpacing
public void setMargin(MarginInfo marginInfo)
public MarginInfo getMargin()
public void addAction(Action action)
ActionsHolder
addAction
in interface ActionsHolder
public void addAction(Action action, int index)
ActionsHolder
addAction
in interface ActionsHolder
public void removeAction(@Nullable Action action)
ActionsHolder
removeAction
in interface ActionsHolder
public void removeAction(@Nullable java.lang.String id)
ActionsHolder
removeAction
in interface ActionsHolder
public void removeAllActions()
ActionsHolder
removeAllActions
in interface ActionsHolder
public java.util.Collection<Action> getActions()
getActions
in interface ActionsHolder
@Nullable public Action getAction(java.lang.String id)
getAction
in interface ActionsHolder
public org.dom4j.Element getXmlDescriptor()
getXmlDescriptor
in interface Component.HasXmlDescriptor
getXmlDescriptor
in interface LegacyFrame
public void setXmlDescriptor(org.dom4j.Element element)
setXmlDescriptor
in interface Component.HasXmlDescriptor
setXmlDescriptor
in interface LegacyFrame
public void setCloseable(boolean closeable)
Window
setCloseable
in interface Window
closeable
- closeable flagpublic boolean isCloseable()
isCloseable
in interface Window
public void setMinWidth(java.lang.String minWidth)
Window
setMinWidth
in interface Window
minWidth
- minimum widthpublic java.lang.String getMinWidth()
getMinWidth
in interface Window
public void setMaxWidth(java.lang.String maxWidth)
Window
setMaxWidth
in interface Window
maxWidth
- maximum widthpublic java.lang.String getMaxWidth()
getMaxWidth
in interface Window
public void setMinHeight(java.lang.String minHeight)
Window
setMinHeight
in interface Window
minHeight
- minimum heightpublic java.lang.String getMinHeight()
getMinHeight
in interface Window
public void setMaxHeight(java.lang.String maxHeight)
Window
setMaxHeight
in interface Window
maxHeight
- maximum heightpublic java.lang.String getMaxHeight()
getMaxHeight
in interface Window
public Screen getFrameOwner()
getFrameOwner
in interface Frame
getFrameOwner
in interface Window
Screen
,
ScreenFragment
public WindowContext getContext()
getContext
in interface Frame
getContext
in interface Window
getContext
in interface LegacyFrame
public DsContext getDsContext()
getDsContext
in interface LegacyFrame
DsContext
of the current frame or windowpublic void setDsContext(DsContext dsContext)
LegacyFrame
setDsContext
in interface LegacyFrame
public java.lang.String getCaption()
getCaption
in interface Component.HasCaption
setCaption(String)
public void setCaption(java.lang.String caption)
init(java.util.Map)
, overrides the value from XML.setCaption
in interface Component.HasCaption
caption
- captionpublic java.lang.String getDescription()
getDescription
in interface Component.HasDescription
public void setDescription(java.lang.String description)
setDescription
in interface Component.HasDescription
description
- the new description to setpublic Window getWrappedWindow()
getWrappedWindow
in interface Window.Wrapper
public void applySettings(Settings settings)
You can override it to restore custom settings.
For example:
public void applySettings(Settings settings) { super.applySettings(settings); String visible = settings.get(hintBox.getId()).attributeValue("visible"); if (visible != null) hintBox.setVisible(Boolean.valueOf(visible)); }
applySettings
in interface Window
applySettings
in class Screen
settings
- settings object loaded from the database for the current userpublic void saveSettings()
saveSettings
in interface Window
saveSettings
in class Screen
public void deleteSettings()
Screen
deleteSettings
in interface Window
deleteSettings
in class Screen
public Settings getSettings()
getSettings
in interface Window
getSettings
in class Screen
public void setFocusComponent(java.lang.String componentId)
Window
setFocusComponent
in interface Window
componentId
- component's ID in XML. If null, then first focusable component will be focusedpublic java.lang.String getFocusComponent()
getFocusComponent
in interface Window
public void addTimer(Timer timer)
Window
Timer
component to this screen.
UiComponents
factory.
public Timer getTimer(java.lang.String id)
Window
Timer
added to this screen.public boolean validate(java.util.List<Validatable> fields)
Window
public DialogOptions getDialogOptions()
getDialogOptions
in interface Window
OpenMode.DIALOG
.public boolean isAttributeAccessControlEnabled()
public void ready()
protected void postValidate(ValidationErrors errors)
validateAll()
at the end of standard validation.errors
- the list of validation errors. Caller fills it by errors found during the default validation.
Overridden method should add into it errors found by custom validation.protected boolean preClose(java.lang.String actionId)
actionId
- a string that is passed to one of Screen.close(com.haulmont.cuba.gui.screen.CloseAction)
methods by calling code to identify itself.
Can be an Action
ID, or a constant like Window.COMMIT_ACTION_ID
or
Window.CLOSE_ACTION_ID
.protected void validateAdditionalRules(ValidationErrors errors)
protected void showValidationErrors(ValidationErrors errors)
protected boolean isSameScreen(Screen openedScreen)
Screen
isSameScreen
in class Screen
openedScreen
- already opened screenprotected int getScreenHashCode(Screen screen)
public boolean validateAll()
postValidate(ValidationErrors)
hook to
support additional validation.
You should override this method in subclasses ONLY if you want to completely replace the validation process,
otherwise use postValidate(ValidationErrors)
.
validateAll
in interface Frame
validateAll
in interface Window
validateAll
in interface LegacyFrame
protected boolean handleValidationErrors(ValidationErrors errors)
public ActionsPermissions getActionsPermissions()
getActionsPermissions
in interface SecuredActionsHolder
public Window.ContentSwitchMode getContentSwitchMode()
public void setContentSwitchMode(Window.ContentSwitchMode mode)
public Subscription addBeforeWindowCloseListener(java.util.function.Consumer<Window.BeforeCloseEvent> listener)
Window
addBeforeWindowCloseListener
in interface Window
listener
- the listener to registerpublic void removeBeforeWindowCloseListener(java.util.function.Consumer<Window.BeforeCloseEvent> listener)
Window
removeBeforeWindowCloseListener
in interface Window
listener
- the listener to removepublic void setExpandRatio(Component component, float ratio)
SupportsExpandRatio
setExpandRatio
in interface SupportsExpandRatio
component
- component to expand with ratioratio
- ratiopublic float getExpandRatio(Component component)
getExpandRatio
in interface SupportsExpandRatio
component
- component for which returns ratiopublic void addFacet(Facet facet)
Frame
@Nullable public Facet getFacet(java.lang.String id)
Frame
public void removeFacet(Facet facet)
Frame
removeFacet
in interface Frame
facet
- facet