- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.haulmont.cuba.gui.WindowManager
类的一些代码示例,展示了WindowManager
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WindowManager
类的具体详情如下:
包路径:com.haulmont.cuba.gui.WindowManager
类名称:WindowManager
[英]Legacy window manager.
[中]遗留窗口管理器。
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Open a simple screen.
*
* @param windowAlias screen ID as defined in {@code screens.xml}
* @param openType how to open the screen
* @return created window
*
* @deprecated Use {@link Screens} bean instead.
*/
@Deprecated
default AbstractWindow openWindow(String windowAlias, WindowManager.OpenType openType) {
WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME);
WindowInfo windowInfo = windowConfig.getWindowInfo(windowAlias);
return (AbstractWindow) getWindowManager().openWindow(windowInfo, openType);
}
代码示例来源:origin: com.haulmont.addon.admintools/cuba-at-gui
@Override
protected void doHandle(String className, String message, @Nullable Throwable throwable, WindowManager windowManager) {
windowManager.showNotification(message, Frame.NotificationType.ERROR);
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Show options dialog with title and message. <br>
* Message supports line breaks ({@code \n}).
*
* @param title dialog title
* @param message text
* @param messageType defines how to display the dialog.
* Don't forget to escape data from the database in case of {@code *_HTML} types!
* @param actions array of actions that represent options. For standard options consider use of
* {@link DialogAction} instances.
*
* @deprecated Use {@link Dialogs} bean instead.
*/
@Deprecated
default void showOptionDialog(String title, String message, Frame.MessageType messageType, Action[] actions) {
getWindowManager().showOptionDialog(title, message, messageType, actions);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void handleAction(com.vaadin.event.Action action, Object sender, Object target) {
if (initialized) {
if (saveSettingsAction == action) {
Screen screen = getFrameOwner();
UiControllerUtils.saveSettings(screen);
} else if (restoreToDefaultsAction == action) {
Screen screen = getFrameOwner();
UiControllerUtils.deleteSettings(screen);
} else if (analyzeAction == action) {
LayoutAnalyzer analyzer = new LayoutAnalyzer();
List<LayoutTip> tipsList = analyzer.analyze(WebDialogWindow.this);
if (tipsList.isEmpty()) {
getWindowManager().showNotification("No layout problems found", Frame.NotificationType.HUMANIZED);
} else {
WindowConfig windowConfig = beanLocator.get(WindowConfig.NAME);
WindowInfo windowInfo = windowConfig.getWindowInfo("layoutAnalyzer");
getWindowManager().openWindow(windowInfo, WindowManager.OpenType.DIALOG, ParamsMap.of("tipsList", tipsList));
}
}
}
}
}
代码示例来源:origin: com.haulmont.reports/reports-gui
wm.showOptionDialog(messages.getMessage(ReportGuiManager.class, "notifications.confirmPrintSelectedheader"),
messages.getMessage(ReportGuiManager.class, "notifications.confirmPrintSelected"),
Frame.MessageType.CONFIRMATION,
wm.showOptionDialog(messages.getMessage(ListPrintFormAction.class, "notifications.confirmPrintAllheader"),
messages.getMessage(ListPrintFormAction.class, "notifications.confirmPrintAll"),
Frame.MessageType.CONFIRMATION, new Action[]{yesAction, cancelAction});
} else {
wm.showNotification(messages.getMessage(ReportGuiManager.class, "notifications.noSelectedEntity"),
Frame.NotificationType.HUMANIZED);
代码示例来源:origin: com.haulmont.cuba/cuba-web
wm.showNotification(messages.getMainMessage("OpenAction.objectIsDeleted"),
Frame.NotificationType.HUMANIZED);
return;
AbstractEditor editor = (AbstractEditor) wm.openEditor(
windowConfig.getWindowInfo(windowAlias),
entity,
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void onApplicationEvent(AppLoggedInEvent event) {
App app = event.getApp();
Connection connection = app.getConnection();
if (connection.isAuthenticated()
&& !isLoggedInWithExternalAuth(connection.getSessionNN())) {
User user = connection.getSessionNN().getUser();
// Change password on logon
if (Boolean.TRUE.equals(user.getChangePasswordAtNextLogon())) {
WindowManager wm = app.getWindowManager();
for (Window window : wm.getOpenWindows()) {
window.setEnabled(false);
}
WindowInfo changePasswordDialog = windowConfig.getWindowInfo("sec$User.changePassword");
Window changePasswordWindow = wm.openWindow(changePasswordDialog,
WindowManager.OpenType.DIALOG.closeable(false),
ParamsMap.of("cancelEnabled", Boolean.FALSE));
changePasswordWindow.addCloseListener(actionId -> {
for (Window window : wm.getOpenWindows()) {
window.setEnabled(true);
}
});
}
}
}
}
代码示例来源:origin: com.haulmont.reports/reports-gui
WindowInfo windowInfo = AppBeans.get(WindowConfig.class).getWindowInfo("report$Report.run");
wm.openLookup(windowInfo, items -> {
if (CollectionUtils.isNotEmpty(items)) {
Report report = (Report) items.iterator().next();
wm.showNotification(
messages.getMessage(ReportGuiManager.class, "report.notFoundReports"),
Frame.NotificationType.HUMANIZED);
代码示例来源:origin: com.haulmont.cuba/cuba-gui
Screen screen = windowManager.create(screenId,
openType.getOpenMode(),
new MapScreenOptions(params));
windowManager.showNotification(messages.getMainMessage("actions.Related.FilterNotFound"),
Frame.NotificationType.WARNING);
windowManager.showNotification(messages.getMainMessage("actions.Related.NotSelected"),
Frame.NotificationType.HUMANIZED);
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Open an edit screen for entity instance.
*
* @param item entity to edit
* @param openType how to open the screen
* @return created window
*
* @deprecated Use {@link ScreenBuilders} bean instead.
*/
@Deprecated
default AbstractEditor openEditor(Entity item, WindowManager.OpenType openType) {
WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME);
WindowInfo editorScreen = windowConfig.getEditorScreen(item);
return (AbstractEditor) getWindowManager().openEditor(editorScreen, item, openType);
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Open a lookup screen.
*
* @param entityClass required class of entity
* @param handler is invoked when selection confirmed and the lookup screen closes
* @param openType how to open the screen
* @param params parameters to pass to {@code init()} method of the screen's controller
* @return created window
*
* @deprecated Use {@link ScreenBuilders} bean instead.
*/
@Deprecated
default AbstractLookup openLookup(Class<? extends Entity> entityClass, Window.Lookup.Handler handler,
WindowManager.OpenType openType, Map<String, Object> params) {
WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME);
WindowInfo lookupScreen = windowConfig.getLookupScreen(entityClass);
return (AbstractLookup) getWindowManager().openLookup(lookupScreen, handler, openType, params);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void showComponentName(WindowManager windowManager, String title, String message) {
windowManager.showMessageDialog(title, message, Frame.MessageType.CONFIRMATION);
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
wm.showNotification(
messages.getMainMessage("OpenAction.objectIsDeleted"),
Frame.NotificationType.HUMANIZED);
AbstractEditor editor = (AbstractEditor) wm.openEditor(
windowConfig.getWindowInfo(windowAlias),
entity,
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Open an edit screen.
*
* @param windowAlias screen ID as defined in {@code screens.xml}
* @param item entity to edit
* @param openType how to open the screen
* @return created window
*
* @deprecated Use {@link ScreenBuilders} bean instead.
*/
@Deprecated
default AbstractEditor openEditor(String windowAlias, Entity item, WindowManager.OpenType openType) {
WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME);
WindowInfo windowInfo = windowConfig.getWindowInfo(windowAlias);
return (AbstractEditor) getWindowManager().openEditor(windowInfo, item, openType);
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Open a lookup screen.
*
* @param entityClass required class of entity
* @param handler is invoked when selection confirmed and the lookup screen closes
* @param openType how to open the screen
* @return created window
*
* @deprecated Use {@link ScreenBuilders} bean instead.
*/
@Deprecated
default AbstractLookup openLookup(Class<? extends Entity> entityClass, Window.Lookup.Handler handler,
WindowManager.OpenType openType) {
WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME);
WindowInfo lookupScreen = windowConfig.getLookupScreen(entityClass);
return (AbstractLookup) getWindowManager().openLookup(lookupScreen, handler, openType);
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Show message dialog with title and message. <br>
* Message supports line breaks ({@code \n}).
*
* @param title dialog title
* @param message text
* @param messageType defines how to display the dialog.
* Don't forget to escape data from the database in case of {@code *_HTML} types!
*
* @deprecated Use {@link Dialogs} bean instead.
*/
@Deprecated
default void showMessageDialog(String title, String message, Frame.MessageType messageType) {
getWindowManager().showMessageDialog(title, message, messageType);
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Open a simple screen.
*
* @param windowAlias screen ID as defined in {@code screens.xml}
* @param openType how to open the screen
* @param params parameters to pass to {@code init()} method of the screen's controller
* @return created window
*
* @deprecated Use {@link Screens} bean instead.
*/
@Deprecated
default AbstractWindow openWindow(String windowAlias, WindowManager.OpenType openType, Map<String, Object> params) {
WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME);
WindowInfo windowInfo = windowConfig.getWindowInfo(windowAlias);
return (AbstractWindow) getWindowManager().openWindow(windowInfo, openType, params);
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
@Override
protected void doHandle(String className, String message, @Nullable Throwable throwable, WindowManager windowManager) {
String msg = messages.getMessage(getClass(), "accessDenied.message");
windowManager.showNotification(msg, Frame.NotificationType.ERROR);
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Show options dialog with title and message. <br>
* Message supports line breaks ({@code \n}).
*
* @param title dialog title
* @param message text
* @param messageType defines how to display the dialog.
* Don't forget to escape data from the database in case of {@code *_HTML} types!
* @param actions list of actions that represent options. For standard options consider use of
* {@link DialogAction} instances.
*
* @deprecated Use {@link Dialogs} bean instead.
*/
@Deprecated
default void showOptionDialog(String title, String message, Frame.MessageType messageType, List<Action> actions) {
getWindowManager().showOptionDialog(title, message, messageType, actions.toArray(new Action[0]));
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Open an edit screen for entity instance.
*
* @param item entity to edit
* @param openType how to open the screen
* @param params parameters to pass to {@code init()} method of the screen's controller
* @return created window
*
* @deprecated Use {@link ScreenBuilders} bean instead.
*/
@Deprecated
default AbstractEditor openEditor(Entity item, WindowManager.OpenType openType,
Map<String, Object> params) {
WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME);
WindowInfo editorScreen = windowConfig.getEditorScreen(item);
return (AbstractEditor) getWindowManager().openEditor(editorScreen, item, openType, params);
}
我使用 WindowManager 添加了一个 View 。 它正确地显示了我想做的事情, 但我有一个问题。 这就是问题。 后退键不影响在android组件下(如事件) 我想要的是我添加的 View
I have drawn an overlay using WindowManager. it's width and height are WindowManager.LayoutParams.MA
我正在开发一个锁屏应用程序,我在服务中使用 WindowManager 添加一个 View 。我已经在 list 文件中为所有 Activity 设置了 Orientation PORTRAIT,但这
我在服务中有一个 WindowManger,我添加了一些标志: params = new WindowManager.LayoutParams( WindowManager.LayoutPar
这是我的代码: params = new WindowManager.LayoutParams( WindowManager.LayoutParams.FLAG_FULLSCREEN,
出于某种原因,我不断收到错误膨胀类消息,因为我正在尝试实现 引起:java.lang.NullPointerException 在 pap.crowslanding.GameView.(GameVie
我正在将 WPF 与当前最新、最好的版本 Caliburn.Micro (1.4.1) 一起使用。我用IWindowManager.ShowWindow(...)打开一个新的无模式窗口: privat
我正在尝试使用 WindowManager 覆盖屏幕,它运行良好,但覆盖屏幕不会覆盖页脚,而是覆盖标题。 这是我的代码。 wm = (WindowManager) getSystemService(C
我使用 wordpress,目前正在为 tinymce-editor 编写一个插件。我使用 windowmanager.open() 函数来显示一个模态,但是我不知道如何在这个模态中隐藏 ok 按钮。
我正在使用此代码通过调暗来更改 Activity 的亮度。 WindowManager.LayoutParams layoutParameters = getWindow().getAttribute
我对由 windowmanager 提供支持的 float 窗口有疑问。它停在屏幕边界处,但我希望它通过。 void startF(int x, int y) { removePopup();
我正在尝试使用 windowManager.open({...}) 创建一个模态窗口,它将有一个(可能很长)项目列表。确保它正确显示的唯一方法是将固定高度设置为模态并使其内容可滚动。 Document
WindowManager.removeViewImmediate() 的文档包含警告(强调我的): Special variation of ViewManager.removeView(View)
我有一个服务。我已经使用 WindowManager 在服务运行期间显示一些 UI。此外,我在此服务的生命周期内显示通知。 下面是我的服务类 public class DemoService exte
我(我希望)在为 Google TV 进行一些开发时遇到了一些小问题 我想要做的是我希望能够在右下角显示一个小窗口,这很好..问题是我不确定如何摆脱后台的屏幕保护程序 这是我目前的代码。 pu
显示在屏幕上的窗口 public class FlatingViewService extends Service{ public static WindowManager windowM
我已经针对同一问题查找了几个帖子,但似乎无法解决我的问题。我在整个应用程序中都使用了微调器,它们运行良好。当我尝试在弹出窗口中使用微调器时,选择它时出现错误。弹出窗口用于添加引用,我已经声明了一个全局
我的应用程序在特定时间向用户显示一个按钮作为 TYPE_SYSTEM_ALERT,我试图让用户 move 它。触摸和 move Action 确实使用以下代码注册,但按钮不会 move 。我错过了什么
有人可以在下面详细解释一下吗, 1- What is the use of ActivityManager & WindowManager? 2- What is the difference bet
我正在开发用于背景视频录制 的应用程序,这就是我使用 WindowManager 的原因,但它对我不起作用。出现以下错误: 08-23 15:38:21.021: E/AndroidRuntime(4
我是一名优秀的程序员,十分优秀!