public abstract class WebWindow extends java.lang.Object implements Window, Component.Wrapper, Component.HasXmlDescriptor, WrappedWindow, SecuredActionsHolder, Component.HasIcon, FrameImplementation, WindowImplementation
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.WrapperFrame.MessageMode, Frame.MessageType, Frame.NotificationTypeExpandingLayout.ExpandDirectionComponent.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 com.haulmont.cuba.web.gui.components.WebFrameActionsHolder |
actionsHolder |
protected ActionsPermissions |
actionsPermissions |
protected java.util.Map<java.lang.String,Component> |
allComponents |
protected static java.lang.String |
C_WINDOW_LAYOUT |
protected java.lang.String |
caption |
protected boolean |
closeable |
protected com.vaadin.ui.AbstractOrderedLayout |
component |
protected WindowContext |
context |
protected boolean |
defaultScreenWindow |
protected java.lang.String |
description |
protected DialogOptions |
dialogOptions |
protected org.dom4j.Element |
element |
protected java.util.Set<Facet> |
facets |
protected java.lang.String |
focusComponentId |
protected Screen |
frameOwner |
protected java.lang.String |
icon |
protected Icons |
icons |
protected java.lang.String |
id |
protected java.util.List<Component> |
ownComponents |
protected NavigationState |
resolvedState |
protected int |
urlStateMark |
BROWSE_WINDOW_SUFFIX, CLOSE_ACTION_ID, COMMIT_ACTION_ID, CREATE_WINDOW_SUFFIX, EDITOR_WINDOW_SUFFIX, LOOKUP_WINDOW_SUFFIX, NAME, SELECT_ACTION_IDAUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS| Constructor and Description |
|---|
WebWindow() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Component childComponent)
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 com.vaadin.ui.AbstractOrderedLayout |
createLayout() |
protected void |
disableEventListeners() |
protected void |
enableEventListeners() |
void |
expand(Component component) |
void |
expand(Component component,
java.lang.String height,
java.lang.String width) |
boolean |
findAndFocusChildComponent() |
void |
fireBeforeClose(Window.BeforeCloseEvent event) |
Action |
getAction(java.lang.String id) |
java.util.Collection<Action> |
getActions() |
ActionsPermissions |
getActionsPermissions() |
Component.Alignment |
getAlignment() |
java.lang.String |
getCaption() |
com.vaadin.ui.Component |
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
|
protected Component.Focusable |
getComponentToFocus(java.util.Iterator<Component> componentsIterator) |
com.vaadin.ui.Component |
getComposition() |
protected com.vaadin.ui.ComponentContainer |
getContainer() |
WindowContext |
getContext() |
java.lang.String |
getDescription() |
DialogOptions |
getDialogOptions() |
protected EventHub |
getEventHub() |
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.
|
java.lang.String |
getId()
Component ID as defined in
id attribute |
MarginInfo |
getMargin() |
java.lang.String |
getMaxHeight() |
java.lang.String |
getMaxWidth() |
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() |
Component |
getRegisteredComponent(java.lang.String id)
INTERNAL.
|
NavigationState |
getResolvedState() |
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. |
int |
getUrlStateMark() |
float |
getWidth()
Get component width in
Component.getWidthUnits() |
SizeUnit |
getWidthSizeUnit()
Gets the width property units.
|
WindowManager |
getWindowManager()
Deprecated.
|
org.dom4j.Element |
getXmlDescriptor() |
protected boolean |
handleValidationErrors(ValidationErrors errors) |
int |
indexOf(Component component) |
void |
initUiEventListeners() |
boolean |
isCloseable() |
boolean |
isDefaultScreenWindow() |
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?
|
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 <E> void |
publish(java.lang.Class<E> eventType,
E event) |
void |
registerComponent(Component component)
INTERNAL.
|
void |
remove(Component childComponent)
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 |
setAlignment(Component.Alignment alignment) |
void |
setCaption(java.lang.String caption)
Sets the component's caption.
|
void |
setCloseable(boolean closeable)
Sets the closable status for the window.
|
void |
setContext(FrameContext ctx)
INTERNAL.
|
void |
setDefaultScreenWindow(boolean defaultScreenWindow) |
void |
setDescription(java.lang.String description)
Sets the component's description.
|
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 |
setFrameOwner(Screen controller) |
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.
|
protected void |
setIcons(Icons icons) |
void |
setId(java.lang.String id)
Set component ID
|
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 |
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 |
setResolvedState(NavigationState resolvedState) |
void |
setResponsive(boolean responsive)
Sets component to be responsive by width and height.
|
void |
setSpacing(boolean enabled) |
void |
setStyleName(java.lang.String name)
Sets one or more style names of the component, replacing any
previous styles.
|
void |
setUrlStateMark(int urlStateMark) |
void |
setVisible(boolean visible)
Sets visibility value for the component.
|
void |
setWidth(java.lang.String width)
Set component width in
Component.getWidthSizeUnit()} |
void |
setXmlDescriptor(org.dom4j.Element element) |
void |
unregisterComponent(Component component)
INTERNAL.
|
protected <E> boolean |
unsubscribe(java.lang.Class<E> eventType,
java.util.function.Consumer<E> listener) |
<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.
|
boolean |
validateAll()
Check validity by invoking validators on all components which support them
and show validation result notification.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBeforeCloseWithCloseButtonListener, addBeforeCloseWithShortcutListener, addCloseListener, addCloseWithCommitListener, addListener, applySettings, close, close, closeAndRun, deleteSettings, getSettings, removeBeforeCloseWithCloseButtonListener, removeBeforeCloseWithShortcutListener, removeCloseListener, removeCloseWithCommitListener, removeListener, saveSettingsgetFacetNNgetComponentNNadd, focusFirstComponent, getComponentNN, removegetHeightUnits, getWidthUnits, isEnabledItself, isVisibleItself, requestFocus, setHeightAuto, setHeightFull, setSizeAuto, setSizeFull, setWidthAuto, setWidthFullopenEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openFrame, openFrame, openLookup, openLookup, openLookup, openLookup, openWindow, openWindow, showMessageDialog, showNotification, showNotification, showNotification, showOptionDialog, showOptionDialog, showWebPageprotected static final java.lang.String C_WINDOW_LAYOUT
protected java.lang.String id
protected java.util.Set<Facet> facets
protected java.util.List<Component> ownComponents
protected java.util.Map<java.lang.String,Component> allComponents
protected java.lang.String focusComponentId
protected com.vaadin.ui.AbstractOrderedLayout component
protected Screen frameOwner
protected org.dom4j.Element element
protected WindowContext context
protected java.lang.String icon
protected java.lang.String caption
protected java.lang.String description
protected com.haulmont.cuba.web.gui.components.WebFrameActionsHolder actionsHolder
protected ActionsPermissions actionsPermissions
protected Icons icons
protected DialogOptions dialogOptions
protected boolean closeable
protected int urlStateMark
protected NavigationState resolvedState
protected boolean defaultScreenWindow
protected EventHub getEventHub()
protected <E> void publish(java.lang.Class<E> eventType,
E event)
protected <E> boolean unsubscribe(java.lang.Class<E> eventType,
java.util.function.Consumer<E> listener)
@Inject protected void setIcons(Icons icons)
protected void disableEventListeners()
protected void enableEventListeners()
protected com.vaadin.ui.AbstractOrderedLayout createLayout()
protected com.vaadin.ui.ComponentContainer getContainer()
public void addFacet(Facet facet)
Frame@Nullable public Facet getFacet(java.lang.String id)
Framepublic void removeFacet(Facet facet)
FrameremoveFacet in interface Framefacet - facetpublic java.util.stream.Stream<Facet> getFacets()
public void registerComponent(Component component)
FrameImplementationregisterComponent in interface FrameImplementationpublic void unregisterComponent(Component component)
FrameImplementationunregisterComponent in interface FrameImplementation@Nullable public Component getRegisteredComponent(java.lang.String id)
FrameImplementationgetRegisteredComponent in interface FrameImplementationpublic java.lang.String getStyleName()
ComponentgetStyleName in interface Componentpublic void setStyleName(java.lang.String name)
ComponentsetStyleName in interface Componentname - one or more style names separated by space.public void addStyleName(java.lang.String styleName)
ComponentaddStyleName in interface ComponentstyleName - one or more style names separated by space.public void removeStyleName(java.lang.String styleName)
ComponentremoveStyleName in interface ComponentstyleName - one or more style names separated by space.public <X> X unwrap(java.lang.Class<X> internalComponentClass)
Componentcom.vaadin.ui.TextField vTextField = textField.unwrap(com.vaadin.ui.TextField.class);
public <X> X unwrapComposition(java.lang.Class<X> internalCompositionClass)
Componentcom.vaadin.ui.Layout vLayout = table.unwrapComposition(com.vaadin.ui.Layout.class);
unwrapComposition in interface ComponentX - type of internal classinternalCompositionClass - class of underlying composition implementation based on Vaadin or Swingpublic boolean getSpacing()
getSpacing in interface HasSpacingpublic void setSpacing(boolean enabled)
setSpacing in interface HasSpacingpublic MarginInfo getMargin()
public void setMargin(MarginInfo marginInfo)
public void setMinWidth(java.lang.String minWidth)
WindowsetMinWidth in interface WindowminWidth - minimum widthpublic java.lang.String getMinWidth()
getMinWidth in interface Windowpublic void setMaxWidth(java.lang.String maxWidth)
WindowsetMaxWidth in interface WindowmaxWidth - maximum widthpublic java.lang.String getMaxWidth()
getMaxWidth in interface Windowpublic void setMinHeight(java.lang.String minHeight)
WindowsetMinHeight in interface WindowminHeight - minimum heightpublic java.lang.String getMinHeight()
getMinHeight in interface Windowpublic void setMaxHeight(java.lang.String maxHeight)
WindowsetMaxHeight in interface WindowmaxHeight - maximum heightpublic java.lang.String getMaxHeight()
getMaxHeight in interface Windowpublic void addAction(Action action)
ActionsHolderaddAction in interface ActionsHolderpublic void addAction(Action action, int index)
ActionsHolderaddAction in interface ActionsHolderpublic void removeAction(@Nullable
Action action)
ActionsHolderremoveAction in interface ActionsHolderpublic void removeAction(@Nullable
java.lang.String id)
ActionsHolderremoveAction in interface ActionsHolderpublic void removeAllActions()
ActionsHolderremoveAllActions in interface ActionsHolderpublic java.util.Collection<Action> getActions()
getActions in interface ActionsHolder@Nullable public Action getAction(java.lang.String id)
getAction in interface ActionsHolderpublic boolean isValid()
Framepublic void validate()
throws ValidationException
Framevalidate in interface FrameValidationException - if some components are currently in invalid statepublic boolean validate(java.util.List<Validatable> fields)
Windowpublic boolean validateAll()
WindowvalidateAll in interface FramevalidateAll in interface Windowprotected boolean handleValidationErrors(ValidationErrors errors)
public DialogOptions getDialogOptions()
getDialogOptions in interface WindowOpenMode.DIALOG.public boolean isCloseable()
isCloseable in interface Windowpublic void setCloseable(boolean closeable)
WindowsetCloseable in interface Windowcloseable - closeable flagpublic Screen getFrameOwner()
getFrameOwner in interface FramegetFrameOwner in interface WindowScreen,
ScreenFragmentpublic void setFrameOwner(Screen controller)
setFrameOwner in interface WindowImplementationpublic void initUiEventListeners()
initUiEventListeners in interface WindowImplementationpublic WindowContext getContext()
getContext in interface FramegetContext in interface Windowpublic void setContext(FrameContext ctx)
FrameImplementationsetContext in interface FrameImplementationprotected Component.Focusable getComponentToFocus(java.util.Iterator<Component> componentsIterator)
public java.lang.String getFocusComponent()
getFocusComponent in interface Windowpublic void setFocusComponent(java.lang.String componentId)
WindowsetFocusComponent in interface WindowcomponentId - component's ID in XML. If null, then first focusable component will be focusedpublic Subscription addBeforeWindowCloseListener(java.util.function.Consumer<Window.BeforeCloseEvent> listener)
WindowaddBeforeWindowCloseListener in interface Windowlistener - the listener to registerpublic void removeBeforeWindowCloseListener(java.util.function.Consumer<Window.BeforeCloseEvent> listener)
WindowremoveBeforeWindowCloseListener in interface Windowlistener - the listener to removepublic void fireBeforeClose(Window.BeforeCloseEvent event)
public void addTimer(Timer timer)
WindowTimer component to this screen.
UiComponents factory.
public Timer getTimer(java.lang.String id)
WindowTimer added to this screen.public org.dom4j.Element getXmlDescriptor()
getXmlDescriptor in interface Component.HasXmlDescriptorpublic void setXmlDescriptor(org.dom4j.Element element)
setXmlDescriptor in interface Component.HasXmlDescriptor@Deprecated public WindowManager getWindowManager()
HasWindowManagergetWindowManager in interface HasWindowManagergetWindowManager in interface Windowpublic void add(Component childComponent)
ComponentContaineradd in interface ComponentContainerchildComponent - a component to addpublic void add(Component childComponent, int index)
add in interface OrderedContainerpublic int indexOf(Component component)
indexOf in interface OrderedContainer@Nullable public Component getComponent(int index)
OrderedContainergetComponent in interface OrderedContainerindex - component indexpublic void remove(Component childComponent)
ComponentContainerremove in interface ComponentContainerchildComponent - a component to removepublic void removeAll()
ComponentContainerremoveAll in interface ComponentContainerpublic java.util.Collection<Component> getOwnComponents()
ComponentContainergetOwnComponents in interface ComponentContainerpublic java.util.stream.Stream<Component> getOwnComponentsStream()
ComponentContainergetOwnComponentsStream in interface ComponentContainerpublic java.util.Collection<Component> getComponents()
ComponentContainergetComponents in interface ComponentContainerpublic java.lang.String getId()
Componentid attributepublic void setId(java.lang.String id)
Componentpublic Component getParent()
public void setParent(Component parent)
ComponentComponentContainer.add(Component) is normally used for adding components
to a parent and the used method will call this method implicitly.public boolean isEnabled()
Componentpublic void setEnabled(boolean enabled)
ComponentsetEnabled in interface Componentenabled - enabled flagpublic boolean isResponsive()
ComponentisResponsive in interface Componentpublic void setResponsive(boolean responsive)
ComponentsetResponsive in interface Componentresponsive - responsive flagpublic boolean isVisible()
Componentpublic void setVisible(boolean visible)
ComponentsetVisible in interface Componentvisible - visible flagpublic boolean isVisibleRecursive()
isVisibleRecursive in interface Componentpublic boolean isEnabledRecursive()
isEnabledRecursive in interface Componentpublic float getHeight()
ComponentComponent.getHeightSizeUnit()public void setHeight(java.lang.String height)
ComponentComponent.getHeightUnits()public SizeUnit getHeightSizeUnit()
ComponentgetHeightSizeUnit in interface Componentpublic float getWidth()
ComponentComponent.getWidthUnits()public void setWidth(java.lang.String width)
ComponentComponent.getWidthSizeUnit()}public SizeUnit getWidthSizeUnit()
ComponentgetWidthSizeUnit in interface Componentpublic Component getOwnComponent(java.lang.String id)
ComponentContainergetOwnComponent in interface ComponentContainer@Nullable public Component getComponent(java.lang.String id)
ComponentContainergetComponent in interface ComponentContainerpublic Component.Alignment getAlignment()
getAlignment in interface Componentpublic void setAlignment(Component.Alignment alignment)
setAlignment in interface Componentpublic void expand(Component component, java.lang.String height, java.lang.String width)
expand in interface ExpandingLayoutpublic void expand(Component component)
expand in interface ExpandingLayoutpublic void resetExpanded()
resetExpanded in interface ExpandingLayoutpublic boolean isExpanded(Component component)
isExpanded in interface ExpandingLayoutpublic ExpandingLayout.ExpandDirection getExpandDirection()
getExpandDirection in interface ExpandingLayoutpublic com.vaadin.ui.Component getComponent()
getComponent in interface Component.Wrapperpublic com.vaadin.ui.Component getComposition()
getComposition in interface Component.Wrapperpublic boolean findAndFocusChildComponent()
public java.lang.String getCaption()
getCaption in interface Component.HasCaptionpublic void setCaption(java.lang.String caption)
Component.HasCaptionsetCaption in interface Component.HasCaptioncaption - the new component's captionpublic java.lang.String getDescription()
getDescription in interface Component.HasDescriptionpublic void setDescription(java.lang.String description)
Component.HasDescriptionsetDescription in interface Component.HasDescriptiondescription - the new description to setpublic Frame getFrame()
getFrame in interface Component.BelongToFramepublic void setFrame(Frame frame)
setFrame in interface Component.BelongToFramepublic ActionsPermissions getActionsPermissions()
getActionsPermissions in interface SecuredActionsHolderpublic java.lang.String getIcon()
Component.HasIcongetIcon in interface Component.HasIconpublic void setIcon(java.lang.String icon)
Component.HasIconsetIcon in interface Component.HasIconpublic void setIconFromSet(Icons.Icon icon)
Component.HasIconsetIconFromSet in interface Component.HasIconpublic void setExpandRatio(Component component, float ratio)
SupportsExpandRatiosetExpandRatio in interface SupportsExpandRatiocomponent - component to expand with ratioratio - ratiopublic float getExpandRatio(Component component)
getExpandRatio in interface SupportsExpandRatiocomponent - component for which returns ratiopublic int getUrlStateMark()
public void setUrlStateMark(int urlStateMark)
public NavigationState getResolvedState()
public void setResolvedState(NavigationState resolvedState)
public boolean isDefaultScreenWindow()
public void setDefaultScreenWindow(boolean defaultScreenWindow)