List of usage examples for com.vaadin.ui Window Window
public Window(String caption)
From source file:com.example.MyVaadinApplication.java
License:Apache License
@Override public void init() { window = new Window("My Vaadin Application"); setMainWindow(window);//from w w w . j a va 2 s.c o m window.addComponent(new ExpenseTable()); }
From source file:com.example.vaadin.MyVaadinApplication.java
License:Apache License
@Override public void init() { getDetails();//from ww w . ja v a 2s .c o m this.getContext().addTransactionListener(this); this.mainWindow = new Window("My Vaadin Application"); this.setMainWindow(mainWindow); mainWindow.setContent(new LoginScreen(this)); }
From source file:com.expressui.core.MainApplication.java
License:Open Source License
/** * Opens a separate error Window with the full stack trace of a throwable * and error box highlighting the root cause message. * * @param throwable full stack trace of this throwable is displayed in error Window *//*from w w w . ja va 2 s.com*/ public void openErrorWindow(Throwable throwable) { showError(ExceptionUtils.getRootCauseMessage(throwable)); String message = ExceptionUtils.getFullStackTrace(throwable); Window errorWindow = new Window(uiMessageSource.getMessage("mainApplication.errorWindowCaption")); errorWindow.addStyleName("opaque"); VerticalLayout layout = (VerticalLayout) errorWindow.getContent(); layout.setSpacing(true); layout.setWidth("100%"); errorWindow.setWidth("100%"); errorWindow.setModal(true); Label label = new Label(message); label.setContentMode(Label.CONTENT_PREFORMATTED); layout.addComponent(label); errorWindow.setClosable(true); errorWindow.setScrollable(true); getMainWindow().addWindow(errorWindow); }
From source file:com.expressui.core.view.entityselect.EntitySelect.java
License:Open Source License
/** * Opens a popup window with this component. *///from w w w . ja va2 s .c om public void open() { popupWindow = new Window(getTypeCaption()); popupWindow.addStyleName("e-entity-select-window"); popupWindow.addStyleName("opaque"); VerticalLayout layout = (VerticalLayout) popupWindow.getContent(); layout.setMargin(true); layout.setSpacing(true); layout.setSizeUndefined(); popupWindow.setSizeUndefined(); popupWindow.setModal(true); popupWindow.setClosable(true); getResults().getEntityQuery().clear(); getResults().search(); configurePopupWindow(popupWindow); popupWindow.addComponent(this); getMainApplication().getMainWindow().addWindow(popupWindow); onDisplay(); }
From source file:com.expressui.core.view.export.ExportForm.java
License:Open Source License
/** * Pops up this export form./*from w ww . j av a2 s . c o m*/ */ public void open() { popupWindow = new Window(getTypeCaption()); popupWindow.addStyleName("e-export-form-window"); popupWindow.addStyleName("opaque"); VerticalLayout layout = (VerticalLayout) popupWindow.getContent(); layout.setMargin(true); layout.setSpacing(true); layout.setSizeUndefined(); popupWindow.setSizeUndefined(); popupWindow.setModal(false); popupWindow.setClosable(true); popupWindow.addComponent(this); getMainApplication().getMainWindow().addWindow(popupWindow); onDisplay(); }
From source file:com.fatminds.vaadin_cmis_integration.demo.AddonDemoApplication.java
License:Apache License
@Override protected void initSpringApplication(ConfigurableWebApplicationContext arg0) { window = new Window("CMIS / Alfresco integration"); setMainWindow(window);//from w w w .j ava 2 s .c om DemoPage demo = new DemoPage(); window.addComponent(demo); demo.init(); }
From source file:com.foc.vaadin.FocCentralPanel.java
License:Apache License
@Override public void addUtilityPanel(IRightPanel utilityPanel) { if (utilityPanel != null) { try {//from w ww .j av a 2s. c o m Component utilityPanelAsComponent = (Component) utilityPanel; // Window window = getParent(Window.class); utilityWindow = new Window("Dictionary"); utilityWindow.setSizeFull(); utilityWindow.setWidth(utilityPanelAsComponent.getWidth(), utilityPanelAsComponent.getWidthUnits()); utilityWindow.setHeight(utilityPanelAsComponent.getHeight(), utilityPanelAsComponent.getHeightUnits()); utilityWindow.setContent(utilityPanelAsComponent); getUI().addWindow(utilityWindow); } catch (Exception e) { Globals.logException(e); } } }
From source file:com.foo.AwesomeTestApplication.java
License:Apache License
@Override public void init() { final Window window = new Window("Awesome application to test AwesomeRichTextArea"); setMainWindow(window);//from w ww.j av a2 s. co m final AwesomeRichTextArea awesomeRichTextArea = new AwesomeRichTextArea(); window.addComponent(awesomeRichTextArea); Button button = new Button("Show me what is selected"); button.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { window.showNotification("Selected text is: " + awesomeRichTextArea.getSelectedText()); } }); window.addComponent(button); }
From source file:com.garyclayburg.vconsole.TargetWindows.java
License:Open Source License
void showTargetWindow(User selectedUser, final String entitledTarget) { Window window = targetWindows.get(entitledTarget); if (window == null) { //only generate new window if user clicked on it - no new windows from policy update UI ui = UI.getCurrent();//from www .ja v a 2 s. com if (ui != null) { window = new Window(entitledTarget); window.setWidth("300px"); targetWindows.put(entitledTarget, window); window.addCloseListener(new Window.CloseListener() { @Override public void windowClose(Window.CloseEvent e) { targetWindows.remove(entitledTarget); } }); ui.addWindow(window); } else { return; } } populateTarget(selectedUser, entitledTarget); }
From source file:com.garyclayburg.vconsole.VConsole.java
License:Open Source License
public VConsole() { exceptionWindow = new Window("policy exception"); notifications = new Window("Policy errors"); scriptErrorsLock = new Object(); }