Search in sources :

Example 1 with CmsBasicDialog

use of org.opencms.ui.components.CmsBasicDialog in project opencms-core by alkacon.

the class CmsAccountsApp method openNewDialog.

/**
 * Opens a dialog for a new item (ou, group or user).<p>
 */
protected void openNewDialog() {
    final Window window = CmsBasicDialog.prepareWindow(DialogWidth.wide);
    CmsBasicDialog dialog = new CmsNewElementDialog(m_cms, m_stateBean.getPath(), window, this);
    window.setContent(dialog);
    window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_ADD_ELEMENT_0));
    A_CmsUI.get().addWindow(window);
}
Also used : Window(com.vaadin.ui.Window) CmsBasicDialog(org.opencms.ui.components.CmsBasicDialog)

Example 2 with CmsBasicDialog

use of org.opencms.ui.components.CmsBasicDialog in project opencms-core by alkacon.

the class CmsSessionsApp method showSendBroadcastDialog.

/**
 * Shows dialog to send broadcast.<p>
 *
 * @param ids of sessions to send broadcast to
 * @param caption of window
 * @param table instance of table to be refreshed after sending broadcast
 */
protected static void showSendBroadcastDialog(Set<String> ids, String caption, final CmsSessionsTable table) {
    final Window window = CmsBasicDialog.prepareWindow();
    window.setCaption(caption);
    CmsBasicDialog dialog = new CmsSendBroadcastDialog(ids, CmsSessionsTable.getCloseRunnable(window, table));
    window.setContent(dialog);
    dialog.setWindowMinFullHeight(500);
    A_CmsUI.get().addWindow(window);
}
Also used : Window(com.vaadin.ui.Window) CmsBasicDialog(org.opencms.ui.components.CmsBasicDialog)

Example 3 with CmsBasicDialog

use of org.opencms.ui.components.CmsBasicDialog in project opencms-core by alkacon.

the class CmsUserInfoDialog method showUserInfo.

/**
 * Shows a dialog with user information.<p>
 *
 * @param user to show information for.
 */
public static void showUserInfo(CmsUser user) {
    final Window window = CmsBasicDialog.prepareWindow(DialogWidth.wide);
    CmsBasicDialog dialog = new CmsUserInfoDialog(user, new Runnable() {

        public void run() {
            window.close();
        }
    });
    window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_MESSAGES_SHOW_USER_0));
    window.setContent(dialog);
    A_CmsUI.get().addWindow(window);
}
Also used : Window(com.vaadin.ui.Window) CmsBasicDialog(org.opencms.ui.components.CmsBasicDialog)

Example 4 with CmsBasicDialog

use of org.opencms.ui.components.CmsBasicDialog in project opencms-core by alkacon.

the class CmsQueuedTable method showResourceDialog.

/**
 * Show resource dialog.<p>
 *
 * @param jobid to show resources for
 */
protected void showResourceDialog(String jobid) {
    CmsPublishResources pResources = new CmsPublishResources(jobid);
    final Window window = CmsBasicDialog.prepareWindow(DialogWidth.wide);
    CmsBasicDialog dialog = new CmsBasicDialog();
    dialog.addButton(new Button(CmsVaadinUtils.getMessageText(org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_CLOSE_0), new com.vaadin.ui.Button.ClickListener() {

        private static final long serialVersionUID = -4216949392648631634L;

        public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
            window.close();
        }
    }), true);
    dialog.setContent(pResources);
    window.setContent(dialog);
    window.setCaption(pResources.getCaption());
    A_CmsUI.get().addWindow(window);
}
Also used : Window(com.vaadin.ui.Window) CmsBasicDialog(org.opencms.ui.components.CmsBasicDialog) Button(com.vaadin.ui.Button) MouseButton(com.vaadin.shared.MouseEventDetails.MouseButton) ItemClickEvent(com.vaadin.v7.event.ItemClickEvent) ItemClickListener(com.vaadin.v7.event.ItemClickEvent.ItemClickListener)

Example 5 with CmsBasicDialog

use of org.opencms.ui.components.CmsBasicDialog in project opencms-core by alkacon.

the class CmsEmbeddedDialogContext method start.

/**
 * @see org.opencms.ui.I_CmsDialogContext#start(java.lang.String, com.vaadin.ui.Component, org.opencms.ui.components.CmsBasicDialog.DialogWidth)
 */
public void start(String title, Component dialog, DialogWidth width) {
    if (dialog != null) {
        m_keepFrameOnClose = false;
        m_window = CmsBasicDialog.prepareWindow(width);
        m_window.setCaption(title);
        m_window.setContent(dialog);
        UI.getCurrent().addWindow(m_window);
        m_window.addCloseListener(new CloseListener() {

            private static final long serialVersionUID = 1L;

            public void windowClose(CloseEvent e) {
                handleWindowClose();
            }
        });
        if (dialog instanceof CmsBasicDialog) {
            ((CmsBasicDialog) dialog).initActionHandler(m_window);
        }
    }
}
Also used : CmsBasicDialog(org.opencms.ui.components.CmsBasicDialog) CloseEvent(com.vaadin.ui.Window.CloseEvent) CloseListener(com.vaadin.ui.Window.CloseListener)

Aggregations

CmsBasicDialog (org.opencms.ui.components.CmsBasicDialog)13 Window (com.vaadin.ui.Window)10 Button (com.vaadin.ui.Button)5 Label (com.vaadin.v7.ui.Label)3 VerticalLayout (com.vaadin.v7.ui.VerticalLayout)3 MouseButton (com.vaadin.shared.MouseEventDetails.MouseButton)2 Component (com.vaadin.ui.Component)2 CloseEvent (com.vaadin.ui.Window.CloseEvent)2 CloseListener (com.vaadin.ui.Window.CloseListener)2 ItemClickEvent (com.vaadin.v7.event.ItemClickEvent)2 ItemClickListener (com.vaadin.v7.event.ItemClickEvent.ItemClickListener)2 ClickEvent (com.vaadin.ui.Button.ClickEvent)1 ClickListener (com.vaadin.ui.Button.ClickListener)1 VerticalLayout (com.vaadin.ui.VerticalLayout)1 HorizontalLayout (com.vaadin.v7.ui.HorizontalLayout)1 IOException (java.io.IOException)1 Collection (java.util.Collection)1 Date (java.util.Date)1 MissingResourceException (java.util.MissingResourceException)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1