本文整理了Java中com.vaadin.ui.Window.setContent()
方法的一些代码示例,展示了Window.setContent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.setContent()
方法的具体详情如下:
包路径:com.vaadin.ui.Window
类名称:Window
方法名:setContent
暂无
代码示例来源:origin: nz.co.senanque/madura-vaadinsupport
public void switchScreen(String viewName, ComponentContainer newView) {
ComponentContainer view;
if (newView != null) {
view = newView;
views.put(viewName, newView);
} else
view = views.get(viewName);
getMainWindow().setContent(view);
}
代码示例来源:origin: nz.co.senanque/madura-vaadinsupport
public void popScreen() {
getMainWindow().setContent(screenStack.pop());
}
代码示例来源:origin: net.sf.itcb.common/itcb-common-web-vaadin
@Override
public void setInitRequest(ServletRequest servletRequest) {
this.servletInitRequest=servletRequest;
ComponentContainer layout =initLayout();
if(layout != null) {
window.setContent(layout);
}
if(mapping == null) {
this.mapping = new ConcurrentHashMap<String, ItcbComponent>();
}
contentContainer = getContentContainer();
}
代码示例来源:origin: org.opencms/opencms-core
public void buttonClick(ClickEvent event) {
window.setContent(oldContent);
window.setCaption(oldCaption);
window.center();
}
代码示例来源:origin: com.haulmont.thirdparty/popupbutton
public void buttonClick(ClickEvent event) {
Window w = new Window();
w.center();
w.setContent(createPopupButton());
addWindow(w);
}
});
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void createUnreadMessagesLayout() {
final VerticalLayout notificationsLayout = new VerticalLayout();
notificationsLayout.setMargin(true);
notificationsLayout.setSpacing(true);
final Label title = new Label(i18n.getMessage(TITLE));
title.addStyleName(ValoTheme.LABEL_H3);
title.addStyleName(ValoTheme.LABEL_NO_MARGIN);
notificationsLayout.addComponent(title);
unreadNotifications.values().stream().forEach(value -> createNotification(notificationsLayout, value));
notificationsWindow.setContent(notificationsLayout);
}
代码示例来源:origin: eclipse/hawkbit
private void createUnreadMessagesLayout() {
final VerticalLayout notificationsLayout = new VerticalLayout();
notificationsLayout.setMargin(true);
notificationsLayout.setSpacing(true);
final Label title = new Label(i18n.getMessage(TITLE));
title.addStyleName(ValoTheme.LABEL_H3);
title.addStyleName(ValoTheme.LABEL_NO_MARGIN);
notificationsLayout.addComponent(title);
unreadNotifications.values().stream().forEach(value -> createNotification(notificationsLayout, value));
notificationsWindow.setContent(notificationsLayout);
}
代码示例来源: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.eclipse.hawkbit/hawkbit-ui
/**
* 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;
}
}
代码示例来源: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: org.aperteworkflow/editor
private void refreshWindow(ComponentContainer header, ComponentContainer windowContainer) {
mainWindow.removeAllComponents();
VerticalLayout main = new VerticalLayout();
main.setMargin(true);
main.setSpacing(true);
main.addComponent(header);
main.addComponent(windowContainer);
mainWindow.setContent(main);
}
代码示例来源: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: org.aperteworkflow/editor
@Override
public void init() {
Window mainWindow = new Window("");
setMainWindow(mainWindow);
mainWindow.removeAllComponents();
HorizontalLayout main = new HorizontalLayout();
main.setSpacing(true);
main.setMargin(true);
main.setWidth(100, Sizeable.UNITS_PERCENTAGE);
mainWindow.setContent(main);
}
代码示例来源: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.ikasan/ikasan-dashboard-jar
public void buttonClick(Button.ClickEvent event)
{
ReplayStatusPanel panel = new ReplayStatusPanel(getReplayEvents(), (ReplayService) replayService, platformConfigurationService, topologyService);
Window window = new Window("Replay Events");
window.setHeight("80%");
window.setWidth("80%");
window.setModal(true);
window.setContent(panel);
UI.getCurrent().addWindow(window);
}
});
代码示例来源: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
/**
* 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);
}
代码示例来源:origin: org.opennms.features/jmxconfiggenerator.webui
/**
* Creates the main window and adds the header, main and button panels to
* it.
*/
private void initMainWindow() {
Window window = new Window("JmxConfigGenerator GUI Tool");
VerticalLayout layout = new VerticalLayout();
layout.addComponent(headerPanel);
layout.addComponent(contentPanel);
// content Panel should use most of the space :)
layout.setExpandRatio(contentPanel, 1);
window.setContent(layout);
window.getContent().setSizeFull();
window.setSizeFull();
addWindow(window);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework
public Window build() {
Window dialog = new Window();
dialog.addStyleName("light-box");
dialog.setDraggable(false);
dialog.setResizable(false);
dialog.setModal(true);
dialog.setWidth(95, Sizeable.Unit.PERCENTAGE);
CssLayout contentWrapper = new CssLayout(content);
contentWrapper.setSizeFull();
contentWrapper.setStyleName("light-box-content");
dialog.setContent(contentWrapper);
dialog.center();
return dialog;
}
内容来源于网络,如有侵权,请联系作者删除!