/** * Sets whether the Popover is automatically closed when the user clicks * (taps) outside of it. Note that no close button is displayed by default, * so some other way to close the window must be arranged if set to * <code>false</code>. * * @param closable * true to allow the user to close the Popover by tapping outside * of it */ @Override public void setClosable(boolean closable) { super.setClosable(closable); }
@Override public ViewWindowConfigurator closable(boolean closable) { getInstance().setClosable(closable); return this; }
private void decorateWindow(final Window window) { if (id != null) { window.setId(id); } if (SPUIDefinitions.CONFIRMATION_WINDOW.equals(type)) { window.setDraggable(false); window.setClosable(true); window.addStyleName(SPUIStyleDefinitions.CONFIRMATION_WINDOW_CAPTION); } else if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) { window.setDraggable(true); window.setClosable(true); } }
private void decorateWindow(final Window window) { if (id != null) { window.setId(id); } if (SPUIDefinitions.CONFIRMATION_WINDOW.equals(type)) { window.setDraggable(false); window.setClosable(true); window.addStyleName(SPUIStyleDefinitions.CONFIRMATION_WINDOW_CAPTION); } else if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) { window.setDraggable(true); window.setClosable(true); } }
public static Window modalWindow(String title, ComponentContainer content) { Window window = new Window(title, content); window.setClosable(false); window.setModal(true); window.setSizeUndefined(); return window; }
/** * Build window based on type. * * @return Window */ public Window buildWindow() { final Window window = new Window(caption); window.setContent(content); window.setSizeUndefined(); window.setModal(true); window.setResizable(false); decorateWindow(window); if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) { window.setClosable(false); } return window; } }
/** * Build window based on type. * * @return Window */ public Window buildWindow() { final Window window = new Window(caption); window.setContent(content); window.setSizeUndefined(); window.setModal(true); window.setResizable(false); decorateWindow(window); if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) { window.setClosable(false); } return window; } }
/** * @see org.opencms.ui.actions.I_CmsWorkplaceAction#executeAction(org.opencms.ui.I_CmsDialogContext) */ public void executeAction(final I_CmsDialogContext context) { CmsUserInfo dialog = new CmsUserInfo(new I_UploadListener() { public void onUploadFinished(List<String> uploadedFiles) { handleUpload(uploadedFiles, context); } }, context); Multimap<String, String> params = A_CmsUI.get().getParameters(); int top = 55; int left = 0; if (params.containsKey("left")) { String buttonLeft = params.get("left").iterator().next(); left = Integer.parseInt(buttonLeft) - 290; } final Window window = new Window(); window.setModal(false); window.setClosable(true); window.setResizable(false); window.setContent(dialog); context.setWindow(window); window.addStyleName(OpenCmsTheme.DROPDOWN); UI.getCurrent().addWindow(window); window.setPosition(left, top); }
/** * Replaces the ui content with a single dialog.<p> * * @param caption the caption * @param dialog the dialog content */ public void setContentToDialog(String caption, CmsBasicDialog dialog) { setContent(new Label()); Window window = CmsBasicDialog.prepareWindow(DialogWidth.narrow); window.setContent(dialog); window.setCaption(caption); window.setClosable(false); addWindow(window); window.center(); }
private void createNotificationWindow() { notificationsWindow = new Window(); notificationsWindow.setWidth(300.0F, Unit.PIXELS); notificationsWindow.addStyleName(STYLE_POPUP); notificationsWindow.addStyleName(STYLE_NO_CLOSEBOX); notificationsWindow.setClosable(true); notificationsWindow.setResizable(false); notificationsWindow.setDraggable(false); notificationsWindow.setId(UIComponentIdProvider.NOTIFICATION_UNREAD_POPUP_ID); notificationsWindow.addCloseListener(event -> refreshCaption()); notificationsWindow.addBlurListener(this::closeWindow); }
private void createNotificationWindow() { notificationsWindow = new Window(); notificationsWindow.setWidth(300.0F, Unit.PIXELS); notificationsWindow.addStyleName(STYLE_POPUP); notificationsWindow.addStyleName(STYLE_NO_CLOSEBOX); notificationsWindow.setClosable(true); notificationsWindow.setResizable(false); notificationsWindow.setDraggable(false); notificationsWindow.setId(UIComponentIdProvider.NOTIFICATION_UNREAD_POPUP_ID); notificationsWindow.addCloseListener(event -> refreshCaption()); notificationsWindow.addBlurListener(this::closeWindow); }
window.setClosable(true); window.setResizable(false);
window.setClosable(true); window.setResizable(false);
/** * Replaces the ui content with a single dialog.<p> * * TODO: In the future this should only handle window creation, refactor dialog contents to CmsBasicDialog * * @param caption the caption * @param component the dialog content */ public void setContentToDialog(String caption, Component component) { setContent(new Label()); Window window = CmsBasicDialog.prepareWindow(DialogWidth.narrow); CmsBasicDialog dialog = new CmsBasicDialog(); VerticalLayout result = new VerticalLayout(); dialog.setContent(result); window.setContent(dialog); window.setCaption(caption); window.setClosable(false); addWindow(window); window.center(); if (component instanceof I_CmsHasButtons) { I_CmsHasButtons hasButtons = (I_CmsHasButtons)component; for (Button button : hasButtons.getButtons()) { dialog.addButton(button); } } result.addComponent(component); }
window.setClosable(false); window.setModal(true); window.setResizable(false);
/** * Shows the password reset dialog.<p> */ public void showPasswordResetDialog() { String caption = CmsVaadinUtils.getMessageText(Messages.GUI_PWCHANGE_FORGOT_PASSWORD_0); A_CmsUI r = A_CmsUI.get(); r.setContent(new Label()); Window window = CmsBasicDialog.prepareWindow(DialogWidth.narrow); CmsBasicDialog dialog = new CmsBasicDialog(); VerticalLayout result = new VerticalLayout(); dialog.setContent(result); window.setContent(dialog); window.setCaption(caption); window.setClosable(true); final CmsForgotPasswordDialog forgotPassword = new CmsForgotPasswordDialog(); window.addCloseListener(new CloseListener() { /** Serial version id. */ private static final long serialVersionUID = 1L; public void windowClose(CloseEvent e) { forgotPassword.cancel(); } }); for (Button button : forgotPassword.getButtons()) { dialog.addButton(button); } r.addWindow(window); window.center(); VerticalLayout vl = result; vl.addComponent(forgotPassword); }
window.setClosable(false); window.setResizable(false);
org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_OK_0)); window.setContent(panel); window.setClosable(false); window.setResizable(false); A_CmsUI.get().addWindow(window);
.getArtifactoryDetailsLabelId(softwareModule.getName() + "." + softwareModule.getVersion(), getI18n())); artifactDtlsWindow.setCaptionAsHtml(true); artifactDtlsWindow.setClosable(true); artifactDtlsWindow.setResizable(true); artifactDtlsWindow.setImmediate(true);
.getArtifactoryDetailsLabelId(softwareModule.getName() + "." + softwareModule.getVersion(), getI18n())); artifactDtlsWindow.setCaptionAsHtml(true); artifactDtlsWindow.setClosable(true); artifactDtlsWindow.setResizable(true); artifactDtlsWindow.setImmediate(true);