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);
}
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);
}
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);
}
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);
}
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);
}
}
}
Aggregations