本文整理了Java中com.vaadin.ui.Window.setCaption()
方法的一些代码示例,展示了Window.setCaption()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.setCaption()
方法的具体详情如下:
包路径:com.vaadin.ui.Window
类名称:Window
方法名:setCaption
暂无
代码示例来源:origin: KrailOrg/krail
/**
* Sets the caption of the message dialog.
*
* @param caption The caption of the message dialog
* @return The {@link MessageBox} instance itself
*/
public MessageBox withCaption(String caption) {
window.setCaption(caption);
return this;
}
代码示例来源:origin: org.opencms/opencms-core
public void buttonClick(ClickEvent event) {
window.setContent(oldContent);
window.setCaption(oldCaption);
window.center();
}
代码示例来源:origin: nz.co.senanque/madura-vaadinsupport
public void afterPropertiesSet() throws Exception {
MessageSourceAccessor messageSourceAccessor = new MessageSourceAccessor(m_messageSource);
getMainWindow().setCaption(messageSourceAccessor.getMessage("title", null,"title"));
for (ViewManaged viewManaged: getInitialLayouts())
{
views.put(viewManaged.getClass().getName(), (ComponentContainer)viewManaged);
if (isAdjustCaptions())
{
I18nCaptionHelper.switchCaptions((Component)viewManaged, messageSourceAccessor);
}
viewManaged.setViewManager(this);
}
}
代码示例来源:origin: org.opencms/opencms-core
@Override
public void start(String title, Component dialog, DialogWidth style) {
if (dialog != null) {
m_window = CmsBasicDialog.prepareWindow(style);
m_window.setCaption(title);
m_window.setContent(dialog);
UI.getCurrent().addWindow(m_window);
if (dialog instanceof CmsBasicDialog) {
((CmsBasicDialog)dialog).initActionHandler(m_window);
}
}
}
代码示例来源:origin: org.opencms/opencms-core
/**
* @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_window = CmsBasicDialog.prepareWindow(width);
m_window.setCaption(title);
m_window.setContent(dialog);
UI.getCurrent().addWindow(m_window);
if (dialog instanceof CmsBasicDialog) {
((CmsBasicDialog)dialog).initActionHandler(m_window);
}
}
}
代码示例来源:origin: viritin/viritin
protected void addEntity(String stringInput) {
final ET newInstance = instantiateOption(stringInput);
if (newInstanceForm != null) {
String caption = "Add new " + elementType.getSimpleName();
newInstanceForm.setEntity(newInstance);
newInstanceForm.setSavedHandler(this);
newInstanceForm.setResetHandler(this);
Window w = newInstanceForm.openInModalPopup();
w.setWidth("70%");
w.setCaption(caption);
} else {
onSave(newInstance);
}
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
@Override
protected void addNewItem(final ClickEvent event) {
final Window addSoftwareModule = softwareModuleAddUpdateWindow.createAddSoftwareModuleWindow();
addSoftwareModule.setCaption(i18n.getMessage("caption.create.new", i18n.getMessage("caption.software.module")));
UI.getCurrent().addWindow(addSoftwareModule);
addSoftwareModule.setVisible(Boolean.TRUE);
}
代码示例来源:origin: eclipse/hawkbit
@Override
protected void addNewItem(final ClickEvent event) {
final Window addSoftwareModule = softwareModuleAddUpdateWindow.createAddSoftwareModuleWindow();
addSoftwareModule.setCaption(i18n.getMessage("caption.create.new", i18n.getMessage("caption.software.module")));
UI.getCurrent().addWindow(addSoftwareModule);
addSoftwareModule.setVisible(Boolean.TRUE);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework
public Window buildAndOpen() {
Window window = new Window();
window.setCaption(this.title);
window.setContent(this.build());
window.center();
window.setModal(this.modal);
UI.getCurrent().addWindow(window);
return window;
}
}
代码示例来源:origin: eclipse/hawkbit
@Override
protected void addNewItem(final ClickEvent event) {
targetAddUpdateWindow.resetComponents();
final Window addTargetWindow = targetAddUpdateWindow.createNewWindow();
addTargetWindow.setCaption(i18n.getMessage("caption.create.new", i18n.getMessage("caption.target")));
UI.getCurrent().addWindow(addTargetWindow);
addTargetWindow.setVisible(Boolean.TRUE);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
@Override
protected void addNewItem(final ClickEvent event) {
targetAddUpdateWindow.resetComponents();
final Window addTargetWindow = targetAddUpdateWindow.createNewWindow();
addTargetWindow.setCaption(i18n.getMessage("caption.create.new", i18n.getMessage("caption.target")));
UI.getCurrent().addWindow(addTargetWindow);
addTargetWindow.setVisible(Boolean.TRUE);
}
代码示例来源:origin: org.opencms/opencms-core
/**
* @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_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);
}
}
}
代码示例来源:origin: org.opencms/opencms-core
/**
* 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();
}
代码示例来源:origin: org.opencms/opencms-core
/**
* @see org.opencms.ui.I_CmsDialogContext#start(java.lang.String, com.vaadin.ui.Component)
*/
public void start(String title, Component dialog, DialogWidth style) {
if (dialog != null) {
CmsAppWorkplaceUi.get().disableGlobalShortcuts();
m_window = CmsBasicDialog.prepareWindow(style);
m_window.setCaption(title);
m_window.setContent(dialog);
CmsAppWorkplaceUi.get().addWindow(m_window);
if (dialog instanceof CmsBasicDialog) {
((CmsBasicDialog)dialog).initActionHandler(m_window);
}
}
}
代码示例来源:origin: org.opencms/opencms-core
/**
* @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);
}
}
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
@Override
protected void onEdit(final ClickEvent event) {
final Window addSoftwareModule = softwareModuleAddUpdateWindow
.createUpdateSoftwareModuleWindow(getSelectedBaseEntityId());
addSoftwareModule
.setCaption(getI18n().getMessage("caption.update", getI18n().getMessage("caption.software.module")));
UI.getCurrent().addWindow(addSoftwareModule);
addSoftwareModule.setVisible(Boolean.TRUE);
}
代码示例来源:origin: eclipse/hawkbit
@Override
protected void onEdit(final ClickEvent event) {
final Window addSoftwareModule = softwareModuleAddUpdateWindow
.createUpdateSoftwareModuleWindow(getSelectedBaseEntityId());
addSoftwareModule
.setCaption(getI18n().getMessage("caption.update", getI18n().getMessage("caption.software.module")));
UI.getCurrent().addWindow(addSoftwareModule);
addSoftwareModule.setVisible(Boolean.TRUE);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void openWindow() {
final Window targetWindow = targetAddUpdateWindowLayout.getWindow(getSelectedBaseEntity().getControllerId());
if (targetWindow == null) {
return;
}
targetWindow.setCaption(getI18n().getMessage("caption.update", getI18n().getMessage("caption.target")));
UI.getCurrent().addWindow(targetWindow);
targetWindow.setVisible(Boolean.TRUE);
}
代码示例来源:origin: eclipse/hawkbit
private void openWindow() {
final Window targetWindow = targetAddUpdateWindowLayout.getWindow(getSelectedBaseEntity().getControllerId());
if (targetWindow == null) {
return;
}
targetWindow.setCaption(getI18n().getMessage("caption.update", getI18n().getMessage("caption.target")));
UI.getCurrent().addWindow(targetWindow);
targetWindow.setVisible(Boolean.TRUE);
}
代码示例来源:origin: org.opencms/opencms-core
/**
* Shows the error dialog.<p>
*
* @param message the error message
* @param t the error to be displayed
* @param onClose executed on close
*/
public static void showErrorDialog(String message, Throwable t, Runnable onClose) {
Window window = prepareWindow(DialogWidth.wide);
window.setCaption(Messages.get().getBundle(A_CmsUI.get().getLocale()).key(Messages.GUI_ERROR_0));
window.setContent(new CmsErrorDialog(message, t, onClose, window));
A_CmsUI.get().addWindow(window);
}
内容来源于网络,如有侵权,请联系作者删除!