public class WebWindow extends java.lang.Object implements Window, Component.Wrapper, Component.HasXmlDescriptor, WrappedWindow, Component.Disposable, Component.SecuredActionsHolder, Component.HasIcon
Modifier and Type | Class and Description |
---|---|
static class |
WebWindow.Editor |
static class |
WebWindow.Lookup |
Window.BeforeCloseEvent, Window.BeforeCloseWithCloseButtonEvent, Window.BeforeCloseWithCloseButtonListener, Window.BeforeCloseWithShortcutEvent, Window.BeforeCloseWithShortcutListener, Window.CloseListener, Window.CloseWithCommitListener, Window.Committable, Window.ContentSwitchMode, Window.HasFoldersPane, Window.HasUserIndicator, Window.HasWorkArea, Window.MainWindow, Window.TopLevelWindow, Window.Wrapper
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
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, UNITS_PERCENTAGE, UNITS_PIXELS
Constructor and Description |
---|
WebWindow() |
Modifier and Type | Method and Description |
---|---|
void |
add(Component childComponent) |
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.
|
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
Window.COMMIT_ACTION_ID . |
void |
addListener(Window.CloseListener listener)
Add a listener that will be notified when this screen is closed.
|
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. |
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
|
void |
dispose() |
void |
expand(Component component) |
void |
expand(Component component,
java.lang.String height,
java.lang.String width) |
boolean |
findAndFocusChildComponent() |
void |
fireBeforeCloseWithCloseButton(Window.BeforeCloseWithCloseButtonEvent event) |
void |
fireBeforeCloseWithShortcut(Window.BeforeCloseWithShortcutEvent 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
|
com.vaadin.ui.Component |
getComposition() |
Window.ContentSwitchMode |
getContentSwitchMode()
Returns how the managed main TabSheet switches a tab with this window: hides or unloads its content.
|
WindowContext |
getContext() |
java.lang.String |
getDebugId() |
java.lang.String |
getDescription() |
DialogOptions |
getDialogOptions() |
DialogParams |
getDialogParams()
Deprecated.
|
DsContext |
getDsContext() |
ExpandingLayout.ExpandDirection |
getExpandDirection() |
java.lang.String |
getFocusComponent() |
Frame |
getFrame() |
float |
getHeight()
Get component height in
Component.getHeightUnits() |
int |
getHeightUnits()
Height units:
Component.UNITS_PIXELS , Component.UNITS_PERCENTAGE |
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 |
getMessagesPack() |
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
|
Component |
getParent() |
Component |
getRegisteredComponent(java.lang.String id)
INTERNAL.
|
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() |
int |
getWidthUnits()
Width units:
Component.UNITS_PIXELS , Component.UNITS_PERCENTAGE |
WebWindowManager |
getWindowManager() |
Window |
getWrapper() |
org.dom4j.Element |
getXmlDescriptor() |
int |
indexOf(Component component) |
boolean |
isDefaultScreenWindow() |
boolean |
isDisposed() |
boolean |
isEnabled()
Are the component and its parent enabled?
|
boolean |
isEnabledItself()
Is the component enabled regardless of the parent?
|
boolean |
isExpanded(Component component) |
boolean |
isModified() |
boolean |
isResponsive()
Is the component responsive?
|
boolean |
isValid()
Check validity by invoking validators on all components which support them.
|
boolean |
isVisible()
Are the component and its parent visible?
|
boolean |
isVisibleItself()
Is the component visible regardless of the parent?
|
Window.Editor |
openEditor(Entity item,
WindowManager.OpenType openType)
Open an edit screen for entity instance.
|
Window.Editor |
openEditor(Entity item,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params)
Open an edit screen for entity instance.
|
Window.Editor |
openEditor(Entity item,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params,
Datasource parentDs)
Open an edit screen for entity instance.
|
Window.Editor |
openEditor(java.lang.String windowAlias,
Entity item,
WindowManager.OpenType openType)
Open an edit screen.
|
Window.Editor |
openEditor(java.lang.String windowAlias,
Entity item,
WindowManager.OpenType openType,
Datasource parentDs)
Open an edit screen.
|
Window.Editor |
openEditor(java.lang.String windowAlias,
Entity item,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params)
Open an edit screen.
|
Window.Editor |
openEditor(java.lang.String windowAlias,
Entity item,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params,
Datasource parentDs)
Open an edit screen.
|
Frame |
openFrame(Component parent,
java.lang.String windowAlias)
Load a frame registered in
screens.xml and optionally show it inside a parent component of this
frame. |
Frame |
openFrame(Component parent,
java.lang.String windowAlias,
java.util.Map<java.lang.String,java.lang.Object> params)
Load a frame registered in
screens.xml and optionally show it inside a parent component of this
frame. |
Window.Lookup |
openLookup(java.lang.Class<? extends Entity> entityClass,
Window.Lookup.Handler handler,
WindowManager.OpenType openType)
Open a lookup screen.
|
Window.Lookup |
openLookup(java.lang.Class<? extends Entity> entityClass,
Window.Lookup.Handler handler,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params)
Open a lookup screen.
|
Window.Lookup |
openLookup(java.lang.String windowAlias,
Window.Lookup.Handler handler,
WindowManager.OpenType openType)
Open a lookup screen.
|
Window.Lookup |
openLookup(java.lang.String windowAlias,
Window.Lookup.Handler handler,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params)
Open a lookup screen.
|
Window |
openWindow(java.lang.String windowAlias,
WindowManager.OpenType openType)
Open a simple screen.
|
Window |
openWindow(java.lang.String windowAlias,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params)
Open a simple screen.
|
void |
registerComponent(Component component)
INTERNAL.
|
void |
remove(Component childComponent) |
void |
removeAction(Action action)
Remove the action from the component
|
void |
removeAction(java.lang.String id)
Remove the action by its ID.
|
void |
removeAll() |
void |
removeAllActions()
Remove all actions from the component
|
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) |
void |
removeStyleName(java.lang.String styleName)
Removes one or more style names from component.
|
void |
requestFocus()
Set focus to this component
|
void |
resetExpanded() |
void |
saveSettings()
This method is called by the framework when closing the screen
to save user settings if they have been changed.
|
void |
setAlignment(Component.Alignment alignment) |
void |
setCaption(java.lang.String caption) |
void |
setContentSwitchMode(Window.ContentSwitchMode mode)
Sets how the managed main TabSheet switches a tab with this window: hides or unloads its content.
|
void |
setContext(FrameContext ctx)
INTERNAL.
|
void |
setDebugId(java.lang.String debugId)
INTERNAL.
|
void |
setDefaultScreenWindow(boolean defaultScreenWindow) |
void |
setDescription(java.lang.String description) |
void |
setDsContext(DsContext dsContext)
INTERNAL.
|
void |
setEnabled(boolean enabled)
Set component enabled state
|
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)
Set component ID
|
void |
setMargin(MarginInfo marginInfo) |
void |
setMessagesPack(java.lang.String name)
Set message pack for this frame.
|
void |
setParent(Component parent)
INTERNAL.
Component.Container.add(Component) is normally used for adding components
to a parent and the used method will call this method implicitly. |
void |
setResponsive(boolean responsive)
Set 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 |
setVisible(boolean visible)
Set component visibility
|
void |
setWidth(java.lang.String width)
Set component width in
Component.getWidthUnits() |
void |
setWindowManager(WindowManager windowManager)
INTERNAL.
|
void |
setXmlDescriptor(org.dom4j.Element element) |
void |
showMessageDialog(java.lang.String title,
java.lang.String message,
Frame.MessageType messageType)
Show message dialog with title and message.
|
void |
showNotification(java.lang.String caption)
Show notification with
Frame.NotificationType.HUMANIZED . |
void |
showNotification(java.lang.String caption,
Frame.NotificationType type)
Show notification.
|
void |
showNotification(java.lang.String caption,
java.lang.String description,
Frame.NotificationType type)
Show notification with caption and description.
|
void |
showOptionDialog(java.lang.String title,
java.lang.String message,
Frame.MessageType messageType,
Action[] actions)
Show options dialog with title and message.
|
void |
showOptionDialog(java.lang.String title,
java.lang.String message,
Frame.MessageType messageType,
java.util.List<Action> actions)
Show options dialog with title and message.
|
void |
showWebPage(java.lang.String url,
java.util.Map<java.lang.String,java.lang.Object> params)
Open a web page in browser.
|
void |
stopTimers()
Completely stop and remove timers of the window.
|
void |
unregisterComponent(Component component)
INTERNAL.
|
<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<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.
|
Window |
wrapBy(java.lang.Class<?> wrapperClass) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentNN
getComponentNN
setHeightAuto, setHeightFull, setSizeAuto, setSizeFull, setWidthAuto, setWidthFull
setMargin, setMargin
getActionNN
public java.lang.String getMessagesPack()
getMessagesPack
in interface Frame
public void setMessagesPack(java.lang.String name)
Frame
setMessagesPack
in interface Frame
name
- message pack namepublic void registerComponent(Component component)
Frame
registerComponent
in interface Frame
public void unregisterComponent(Component component)
Frame
unregisterComponent
in interface Frame
@Nullable public Component getRegisteredComponent(java.lang.String id)
Frame
getRegisteredComponent
in interface Frame
public java.lang.String getStyleName()
Component
getStyleName
in interface Component
public void setStyleName(java.lang.String name)
Component
setStyleName
in interface Component
name
- 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 Component.Spacing
public boolean getSpacing()
getSpacing
in interface Component.Spacing
public void setMargin(MarginInfo marginInfo)
setMargin
in interface Component.Margin
public MarginInfo getMargin()
getMargin
in interface Component.Margin
public void addAction(Action action)
Component.ActionsHolder
addAction
in interface Component.ActionsHolder
public void addAction(Action action, int index)
Component.ActionsHolder
addAction
in interface Component.ActionsHolder
public void removeAction(@Nullable Action action)
Component.ActionsHolder
removeAction
in interface Component.ActionsHolder
public void removeAction(@Nullable java.lang.String id)
Component.ActionsHolder
removeAction
in interface Component.ActionsHolder
public void removeAllActions()
Component.ActionsHolder
removeAllActions
in interface Component.ActionsHolder
public java.util.Collection<Action> getActions()
getActions
in interface Component.ActionsHolder
@Nullable public Action getAction(java.lang.String id)
getAction
in interface Component.ActionsHolder
public boolean isValid()
Frame
public void validate() throws ValidationException
Frame
validate
in interface Frame
ValidationException
- if some components are currently in invalid statepublic boolean validate(java.util.List<Component.Validatable> fields)
Window
public boolean validateAll()
Window
validateAll
in interface Frame
validateAll
in interface Window
public WebWindowManager getWindowManager()
getWindowManager
in interface Window
public void setWindowManager(WindowManager windowManager)
Window
setWindowManager
in interface Window
public DialogOptions getDialogOptions()
getDialogOptions
in interface Window
WindowManager.OpenMode.DIALOG
.@Deprecated public DialogParams getDialogParams()
getDialogParams
in interface Frame
DialogParams
that will be used for opening next window in modal mode.
init()
method of a screen, which is being opened in WindowManager.OpenType#DIALOG
mode, affects the current
screen itself.public Window openWindow(java.lang.String windowAlias, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
Frame
openWindow
in interface Frame
windowAlias
- screen ID as defined in screens.xml
openType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerpublic Window openWindow(java.lang.String windowAlias, WindowManager.OpenType openType)
Frame
openWindow
in interface Frame
windowAlias
- screen ID as defined in screens.xml
openType
- how to open the screenpublic Window.Editor openEditor(Entity item, WindowManager.OpenType openType)
Frame
openEditor
in interface Frame
item
- entity to editopenType
- how to open the screenpublic Window.Editor openEditor(Entity item, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
Frame
openEditor
in interface Frame
item
- entity to editopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerpublic Window.Editor openEditor(Entity item, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params, Datasource parentDs)
Frame
openEditor
in interface Frame
item
- entity to editopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerparentDs
- if this parameter is not null, the editor will commit edited instance into this
datasource instead of directly to databasepublic Window.Editor openEditor(java.lang.String windowAlias, Entity item, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params, Datasource parentDs)
Frame
openEditor
in interface Frame
windowAlias
- screen ID as defined in screens.xml
item
- entity to editopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerparentDs
- if this parameter is not null, the editor will commit edited instance into this
datasource instead of directly to databasepublic Window.Editor openEditor(java.lang.String windowAlias, Entity item, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
Frame
openEditor
in interface Frame
windowAlias
- screen ID as defined in screens.xml
item
- entity to editopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerpublic Window.Editor openEditor(java.lang.String windowAlias, Entity item, WindowManager.OpenType openType, Datasource parentDs)
Frame
openEditor
in interface Frame
windowAlias
- screen ID as defined in screens.xml
item
- entity to editopenType
- how to open the screenparentDs
- if this parameter is not null, the editor will commit edited instance into this
datasource instead of directly to databasepublic Window.Editor openEditor(java.lang.String windowAlias, Entity item, WindowManager.OpenType openType)
Frame
openEditor
in interface Frame
windowAlias
- screen ID as defined in screens.xml
item
- entity to editopenType
- how to open the screenpublic Window.Lookup openLookup(java.lang.Class<? extends Entity> entityClass, Window.Lookup.Handler handler, WindowManager.OpenType openType)
Frame
openLookup
in interface Frame
entityClass
- required class of entityhandler
- is invoked when selection confirmed and the lookup screen closesopenType
- how to open the screenpublic Window.Lookup openLookup(java.lang.Class<? extends Entity> entityClass, Window.Lookup.Handler handler, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
Frame
openLookup
in interface Frame
entityClass
- required class of entityhandler
- is invoked when selection confirmed and the lookup screen closesopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerpublic Window.Lookup openLookup(java.lang.String windowAlias, Window.Lookup.Handler handler, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
Frame
openLookup
in interface Frame
windowAlias
- screen ID as defined in screens.xml
handler
- is invoked when selection confirmed and the lookup screen closesopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerpublic Window.Lookup openLookup(java.lang.String windowAlias, Window.Lookup.Handler handler, WindowManager.OpenType openType)
Frame
openLookup
in interface Frame
windowAlias
- screen ID as defined in screens.xml
handler
- is invoked when selection confirmed and the lookup screen closesopenType
- how to open the screenpublic Frame openFrame(Component parent, java.lang.String windowAlias)
Frame
screens.xml
and optionally show it inside a parent component of this
frame.public Frame openFrame(Component parent, java.lang.String windowAlias, java.util.Map<java.lang.String,java.lang.Object> params)
Frame
screens.xml
and optionally show it inside a parent component of this
frame.openFrame
in interface Frame
parent
- if specified, all parent's subcomponents will be removed and the frame will be addedwindowAlias
- frame ID as defined in screens.xml
params
- parameters to be passed into the frame's controller init
methodpublic void showMessageDialog(java.lang.String title, java.lang.String message, Frame.MessageType messageType)
Frame
\n
).showMessageDialog
in interface Frame
title
- dialog titlemessage
- textmessageType
- defines how to display the dialog.
Don't forget to escape data from the database in case of *_HTML
types!public void showOptionDialog(java.lang.String title, java.lang.String message, Frame.MessageType messageType, Action[] actions)
Frame
\n
).showOptionDialog
in interface Frame
title
- dialog titlemessage
- textmessageType
- defines how to display the dialog.
Don't forget to escape data from the database in case of *_HTML
types!actions
- array of actions that represent options. For standard options consider use of
DialogAction
instances.public void showOptionDialog(java.lang.String title, java.lang.String message, Frame.MessageType messageType, java.util.List<Action> actions)
Frame
\n
).showOptionDialog
in interface Frame
title
- dialog titlemessage
- textmessageType
- defines how to display the dialog.
Don't forget to escape data from the database in case of *_HTML
types!actions
- list of actions that represent options. For standard options consider use of
DialogAction
instances.public void showNotification(java.lang.String caption)
Frame
showNotification
in interface Frame
caption
- notification textpublic void showNotification(java.lang.String caption, Frame.NotificationType type)
Frame
\n
) for non HTML type.showNotification
in interface Frame
caption
- notification texttype
- defines how to display the notification.
Don't forget to escape data from the database in case of *_HTML
types!public void showNotification(java.lang.String caption, java.lang.String description, Frame.NotificationType type)
Frame
\n
) for non HTML type.showNotification
in interface Frame
caption
- notification textdescription
- notification descriptiontype
- defines how to display the notification.
Don't forget to escape data from the database in case of *_HTML
types!public void showWebPage(java.lang.String url, @Nullable java.util.Map<java.lang.String,java.lang.Object> params)
Frame
showWebPage
in interface Frame
url
- URL of the pageparams
- optional parameters.
target
- String value used as the target name in a
window.open call in the client. This means that special values such as
"_blank", "_self", "_top", "_parent" have special meaning. If not specified, "_blank" is used. width
- Integer value specifying the width of the browser window in pixelsheight
- Integer value specifying the height of the browser window in pixelsborder
- String value specifying the border style of the window of the browser window.
Possible values are "DEFAULT", "MINIMAL", "NONE".Desktop client doesn't support any parameters and just ignores them.
public WindowContext getContext()
getContext
in interface Frame
getContext
in interface Window
public void setContext(FrameContext ctx)
Frame
setContext
in interface Frame
public DsContext getDsContext()
getDsContext
in interface Frame
DsContext
of the current frame or windowpublic void setDsContext(DsContext dsContext)
Frame
setDsContext
in interface Frame
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 addListener(Window.CloseListener listener)
Window
addListener
in interface Window
listener
- listener instancepublic void removeListener(Window.CloseListener listener)
removeListener
in interface Window
public void addCloseListener(Window.CloseListener listener)
Window
addCloseListener
in interface Window
listener
- listener instancepublic void removeCloseListener(Window.CloseListener listener)
removeCloseListener
in interface Window
public void addCloseWithCommitListener(Window.CloseWithCommitListener listener)
Window
Window.COMMIT_ACTION_ID
.addCloseWithCommitListener
in interface Window
listener
- listener instancepublic void removeCloseWithCommitListener(Window.CloseWithCommitListener listener)
removeCloseWithCommitListener
in interface Window
public void addBeforeCloseWithShortcutListener(Window.BeforeCloseWithShortcutListener listener)
Window
addBeforeCloseWithShortcutListener
in interface Window
listener
- the listener to registerpublic void removeBeforeCloseWithShortcutListener(Window.BeforeCloseWithShortcutListener listener)
Window
removeBeforeCloseWithShortcutListener
in interface Window
listener
- the listener to removepublic void fireBeforeCloseWithShortcut(Window.BeforeCloseWithShortcutEvent event)
public void addBeforeCloseWithCloseButtonListener(Window.BeforeCloseWithCloseButtonListener listener)
Window
addBeforeCloseWithCloseButtonListener
in interface Window
listener
- the listener to registerpublic void removeBeforeCloseWithCloseButtonListener(Window.BeforeCloseWithCloseButtonListener listener)
Window
removeBeforeCloseWithCloseButtonListener
in interface Window
listener
- the listener to removepublic void fireBeforeCloseWithCloseButton(Window.BeforeCloseWithCloseButtonEvent event)
public void applySettings(Settings settings)
Window
applySettings
in interface Window
public void addTimer(Timer timer)
Window
Timer
component to this screen.
ComponentsFactory.createTimer()
method.
public Timer getTimer(java.lang.String id)
Window
Timer
added to this screen.public void stopTimers()
public Settings getSettings()
getSettings
in interface Window
public org.dom4j.Element getXmlDescriptor()
getXmlDescriptor
in interface Component.HasXmlDescriptor
public void setXmlDescriptor(org.dom4j.Element element)
setXmlDescriptor
in interface Component.HasXmlDescriptor
public void add(Component childComponent)
add
in interface Component.Container
public void add(Component childComponent, int index)
add
in interface Component.OrderedContainer
public int indexOf(Component component)
indexOf
in interface Component.OrderedContainer
@Nullable public Component getComponent(int index)
Component.OrderedContainer
getComponent
in interface Component.OrderedContainer
index
- component indexpublic void remove(Component childComponent)
remove
in interface Component.Container
public void removeAll()
removeAll
in interface Component.Container
public java.util.Collection<Component> getOwnComponents()
Component.Container
getOwnComponents
in interface Component.Container
public java.util.Collection<Component> getComponents()
Component.Container
getComponents
in interface Component.Container
public java.lang.String getId()
Component
id
attributepublic void setId(java.lang.String id)
Component
public Component getParent()
public void setParent(Component parent)
Component
Component.Container.add(Component)
is normally used for adding components
to a parent and the used method will call this method implicitly.public java.lang.String getDebugId()
getDebugId
in interface Component
public void setDebugId(java.lang.String debugId)
Component
setDebugId
in interface Component
public boolean isEnabled()
Component
public void setEnabled(boolean enabled)
Component
setEnabled
in interface Component
public boolean isResponsive()
Component
isResponsive
in interface Component
public void setResponsive(boolean responsive)
Component
setResponsive
in interface Component
public boolean isVisible()
Component
public void setVisible(boolean visible)
Component
setVisible
in interface Component
public boolean isVisibleItself()
Component
isVisibleItself
in interface Component
public boolean isEnabledItself()
Component
isEnabledItself
in interface Component
public void requestFocus()
Component
requestFocus
in interface Component
public float getHeight()
Component
Component.getHeightUnits()
public int getHeightUnits()
Component
Component.UNITS_PIXELS
, Component.UNITS_PERCENTAGE
getHeightUnits
in interface Component
public void setHeight(java.lang.String height)
Component
Component.getHeightUnits()
public float getWidth()
Component
Component.getWidthUnits()
public int getWidthUnits()
Component
Component.UNITS_PIXELS
, Component.UNITS_PERCENTAGE
getWidthUnits
in interface Component
public void setWidth(java.lang.String width)
Component
Component.getWidthUnits()
public Component getOwnComponent(java.lang.String id)
Component.Container
getOwnComponent
in interface Component.Container
@Nullable public Component getComponent(java.lang.String id)
Component.Container
getComponent
in interface Component.Container
public Component.Alignment getAlignment()
getAlignment
in interface Component
public void setAlignment(Component.Alignment alignment)
setAlignment
in interface Component
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 com.vaadin.ui.Component getComponent()
getComponent
in interface Component.Wrapper
public com.vaadin.ui.Component getComposition()
getComposition
in interface Component.Wrapper
public void closeAndRun(java.lang.String actionId, java.lang.Runnable runnable)
Window
closeAndRun
in interface Window
public boolean close(java.lang.String actionId, boolean force)
Window
DsContext
,
and force=false, the confirmation dialog will be shown.close
in interface Window
actionId
- action ID that will be propagated to attached Window.CloseListener
s.
Use Window.COMMIT_ACTION_ID
if some changes have just been committed, or
Window.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 changespublic boolean close(java.lang.String actionId)
Window
DsContext
,
the confirmation dialog will be shown.close
in interface Window
actionId
- action ID that will be propagated to attached Window.CloseListener
s.
Use Window.COMMIT_ACTION_ID
if some changes have just been committed, or
Window.CLOSE_ACTION_ID
otherwise. These constants are recognized by various mechanisms of the
framework.public boolean findAndFocusChildComponent()
public boolean isModified()
public void saveSettings()
Window
saveSettings
in interface Window
public void deleteSettings()
Window
deleteSettings
in interface Window
public java.lang.String getCaption()
getCaption
in interface Component.HasCaption
public void setCaption(java.lang.String caption)
setCaption
in interface Component.HasCaption
public java.lang.String getDescription()
getDescription
in interface Component.HasCaption
public void setDescription(java.lang.String description)
setDescription
in interface Component.HasCaption
public Frame getFrame()
getFrame
in interface Component.BelongToFrame
public void setFrame(Frame frame)
setFrame
in interface Component.BelongToFrame
public Window wrapBy(java.lang.Class<?> wrapperClass)
wrapBy
in interface WrappedWindow
public Window getWrapper()
getWrapper
in interface WrappedWindow
public void dispose()
dispose
in interface Component.Disposable
public boolean isDisposed()
isDisposed
in interface Component.Disposable
public ActionsPermissions getActionsPermissions()
getActionsPermissions
in interface Component.SecuredActionsHolder
public 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 Window.ContentSwitchMode getContentSwitchMode()
Window
getContentSwitchMode
in interface Window
Window.ContentSwitchMode
enum valuespublic void setContentSwitchMode(Window.ContentSwitchMode mode)
Window
Note that: a method invocation will take effect only if cuba.web.mainTabSheetMode
property
is set to 'MANAGED'.
setContentSwitchMode
in interface Window
mode
- one of the Window.ContentSwitchMode
enum valuespublic boolean isDefaultScreenWindow()
public void setDefaultScreenWindow(boolean defaultScreenWindow)