@Component(value="cuba_WebWindowManager") @Scope(value="prototype") public class WebWindowManager extends WindowManager
Modifier and Type | Class and Description |
---|---|
class |
WebWindowManager.TabCloseTask |
static interface |
WebWindowManager.WorkAreaContext |
WindowManager.OpenMode, WindowManager.OpenType, WindowManager.WindowCloseListener
Modifier and Type | Field and Description |
---|---|
static int |
HUMANIZED_NOTIFICATION_DELAY_MSEC |
static java.lang.String |
NAME |
static int |
WARNING_NOTIFICATION_DELAY_MSEC |
MAIN_MENU_ACTION_ID
Constructor and Description |
---|
WebWindowManager() |
Modifier and Type | Method and Description |
---|---|
void |
checkModificationsAndCloseAll(java.lang.Runnable runIfOk)
Check modifications and close all screens in all main windows.
|
void |
checkModificationsAndCloseAll(java.lang.Runnable runIfOk,
java.lang.Runnable runIfCancel)
Check modifications and close all screens in all main windows.
|
void |
close(Window window) |
void |
closeAll()
Close all screens in the main window (browser tab) this WindowManager belongs to.
|
void |
closeAllTabbedWindows() |
void |
closeAllTabbedWindowsExcept(com.vaadin.ui.ComponentContainer keepOpened) |
void |
closeAllWindows()
Close all screens in all main windows (browser tabs).
|
com.vaadin.event.ShortcutListener |
createCloseShortcut(Window.TopLevelWindow topLevelWindow) |
com.vaadin.event.ShortcutListener |
createNextWindowTabShortcut(Window.TopLevelWindow topLevelWindow) |
com.vaadin.event.ShortcutListener |
createPreviousWindowTabShortcut(Window.TopLevelWindow topLevelWindow) |
void |
createTopLevelWindow(WindowInfo windowInfo) |
App |
getApp() |
WindowBreadCrumbs |
getBreadCrumbs(com.vaadin.ui.ComponentContainer container) |
java.util.Collection<Window> |
getOpenWindows() |
void |
initDebugIds(Frame frame) |
Window.Editor |
openEditor(WindowInfo windowInfo,
Entity item,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params,
Datasource parentDs) |
Window.Lookup |
openLookup(WindowInfo windowInfo,
Window.Lookup.Handler handler,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params) |
Window |
openWindow(WindowInfo windowInfo,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params) |
void |
selectWindowTab(Window window)
Select tab with window in main tabsheet.
|
void |
setUi(AppUI ui) |
void |
setWindowCaption(Window window,
java.lang.String caption,
java.lang.String description) |
void |
showExceptionDialog(java.lang.Throwable throwable)
Shows exception dialog with default caption, message and displays stacktrace of given throwable.
|
void |
showExceptionDialog(java.lang.Throwable throwable,
java.lang.String caption,
java.lang.String message)
Shows exception dialog with given caption, message and displays stacktrace of given throwable.
|
void |
showFrame(Component parent,
Frame frame) |
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 description.
|
void |
showOptionDialog(java.lang.String title,
java.lang.String message,
Frame.MessageType messageType,
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.
|
getDialogParams, openEditor, openEditor, openEditor, openFrame, openFrame, openFrame, openLookup, openWindow, windowExist
public static final java.lang.String NAME
public static final int HUMANIZED_NOTIFICATION_DELAY_MSEC
public static final int WARNING_NOTIFICATION_DELAY_MSEC
public void setUi(AppUI ui)
public App getApp()
public java.util.Collection<Window> getOpenWindows()
getOpenWindows
in class WindowManager
public Window openWindow(WindowInfo windowInfo, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
openWindow
in class WindowManager
public Window.Lookup openLookup(WindowInfo windowInfo, Window.Lookup.Handler handler, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
openLookup
in class WindowManager
public Window.Editor openEditor(WindowInfo windowInfo, Entity item, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params, Datasource parentDs)
openEditor
in class WindowManager
public void selectWindowTab(Window window)
WindowManager
selectWindowTab
in class WindowManager
public void setWindowCaption(Window window, java.lang.String caption, java.lang.String description)
setWindowCaption
in class WindowManager
public void close(Window window)
close
in class WindowManager
public void checkModificationsAndCloseAll(java.lang.Runnable runIfOk)
runIfOk
- a closure to run after all screens are closedpublic void checkModificationsAndCloseAll(java.lang.Runnable runIfOk, @Nullable java.lang.Runnable runIfCancel)
runIfOk
- a closure to run after all screens are closedrunIfCancel
- a closure to run if there were modifications and a user canceled the operationpublic void closeAllTabbedWindows()
public void closeAllTabbedWindowsExcept(@Nullable com.vaadin.ui.ComponentContainer keepOpened)
public void closeAllWindows()
public void closeAll()
public void showNotification(java.lang.String caption)
WindowManager
Frame.NotificationType#HUMANIZED
. \n
).showNotification
in class WindowManager
caption
- textpublic void showNotification(java.lang.String caption, Frame.NotificationType type)
WindowManager
\n
).showNotification
in class WindowManager
caption
- 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)
WindowManager
\n
).showNotification
in class WindowManager
caption
- captiondescription
- texttype
- defines how to display the notification.
Don't forget to escape data from the database in case of *_HTML
types!public void showMessageDialog(java.lang.String title, java.lang.String message, Frame.MessageType messageType)
WindowManager
\n
) for non HTML messageType.showMessageDialog
in class WindowManager
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)
WindowManager
\n
) for non HTML messageType.showOptionDialog
in class WindowManager
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
- available actionspublic void showExceptionDialog(java.lang.Throwable throwable)
WindowManager
showExceptionDialog
in class WindowManager
throwable
- throwablepublic void showExceptionDialog(java.lang.Throwable throwable, @Nullable java.lang.String caption, @Nullable java.lang.String message)
WindowManager
showExceptionDialog
in class WindowManager
throwable
- throwablecaption
- dialog captionmessage
- dialog messagepublic WindowBreadCrumbs getBreadCrumbs(com.vaadin.ui.ComponentContainer container)
public void showWebPage(java.lang.String url, @Nullable java.util.Map<java.lang.String,java.lang.Object> params)
WindowManager
showWebPage
in class WindowManager
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".public void initDebugIds(Frame frame)
public void createTopLevelWindow(WindowInfo windowInfo)
public com.vaadin.event.ShortcutListener createCloseShortcut(Window.TopLevelWindow topLevelWindow)
public com.vaadin.event.ShortcutListener createNextWindowTabShortcut(Window.TopLevelWindow topLevelWindow)
public com.vaadin.event.ShortcutListener createPreviousWindowTabShortcut(Window.TopLevelWindow topLevelWindow)