List of usage examples for com.vaadin.ui Window Window
public Window(String caption)
From source file:com.cib.statementstamper.StatementstamperApplication.java
License:Open Source License
@Override public void init() { Window mainWindow = new Window("Statement Stamper"); mainWindow.addComponent(new StatementStamperMainWindow()); setMainWindow(mainWindow);// w ww . java 2s. c om }
From source file:com.coatl.vaadin.abc.ixABCDialogos.java
public void abrirCrear() { cerrarDialogos();/*w w w . j a va 2 s. c o m*/ defFormaCrear = getFormaCrear(); Window subWindow = new Window("Crear"); subWindow.setContent(defFormaCrear.getComponente()); getIxUI().addWindow(subWindow); subWindow.center(); this.defFormaCrear.setVentana(subWindow); }
From source file:com.coatl.vaadin.abc.ixABCDialogos.java
public void abrirEditar() { cerrarDialogos();// w w w.jav a 2 s .co m defFormaEditar = getFormaEditar(); Window subWindow = new Window("Editar"); subWindow.setContent(defFormaEditar.getComponente()); getIxUI().addWindow(subWindow); subWindow.center(); this.defFormaEditar.setVentana(subWindow); }
From source file:com.coatl.vaadin.abc.ixABCDialogos.java
public void abrirBorrar() { if (defFormaEditar == null) { return;/*from w ww .j a v a2 s .c o m*/ } Map m = defFormaEditar.getMapa(); cerrarDialogos(); defFormaBorrar = getFormaBorrar(); defFormaBorrar.vaciarMapa(m); Window subWindow = new Window("Borrar"); subWindow.setContent(defFormaBorrar.getComponente()); getIxUI().addWindow(subWindow); subWindow.center(); this.defFormaBorrar.setVentana(subWindow); }
From source file:com.compomics.jtraml.web.TramlConverterApplication.java
License:Apache License
@Override public void init() { logger.debug("opening new jTraML session"); // initiate the window window = new Window("TraML converter"); setTheme("jtraml"); // Create a temporary folder for this application iTempDir = Files.createTempDir(); initLayout();//ww w . j a va 2 s .c om // Create a tracker for vaadin.com domain. GoogleAnalyticsTracker tracker = new GoogleAnalyticsTracker("UA-23742568-1", "ugent.be"); // Create a parameter handler for iParameterHandler = new FileParameterHandler(iInputForm.getConversionJobOptions(), this, iInputForm); window.addParameterHandler(iParameterHandler); // Add only one tracker per window. window.addComponent(tracker); // Track the page view tracker.trackPageview("/jtraml"); tracker.trackPageview("/jtraml2"); setMainWindow(window); parseSessionId(); }
From source file:com.compomics.sigpep.webapp.MyVaadinApplication.java
License:Apache License
@Override public void init() { iApplication = this; iSigPepSessionFactory = ApplicationLocator.getInstance().getApplication().getSigPepSessionFactory(); //add theme//from w w w. ja va 2s. com setTheme("sigpep"); //add main window Window lMainwindow = new Window("Sigpep Application"); setMainWindow(lMainwindow); lMainwindow.addStyleName("v-app-my"); //add notification component iNotifique = new Notifique(Boolean.FALSE); CustomOverlay lCustomOverlay = new CustomOverlay(iNotifique, getMainWindow()); getMainWindow().addComponent(lCustomOverlay); //add form help iFormHelp = new FormHelp(); iFormHelp.setFollowFocus(Boolean.TRUE); this.getMainWindow().getContent().addComponent(iFormHelp); //add panels iCenterLeft = new Panel(); iCenterLeft.addStyleName(Reindeer.PANEL_LIGHT); iCenterLeft.setHeight("400px"); iCenterLeft.setWidth("100%"); iCenterRight = new Panel(); iCenterRight.addStyleName(Reindeer.PANEL_LIGHT); iCenterRight.setHeight("400px"); iCenterRight.setWidth("75%"); //add form tabs iFormTabSheet = new FormTabSheet(this); iCenterLeft.addComponent(iFormTabSheet); iBottomLayoutResults = new VerticalLayout(); if (PropertiesConfigurationHolder.showTestDemoFolder()) { Button lButton = new Button("load test data"); lButton.addListener(new Button.ClickListener() { public void buttonClick(Button.ClickEvent event) { new BackgroundThread().run(); } }); iBottomLayoutResults.addComponent(lButton); } // Add the selector component iSelectionComponent = new TransitionSelectionComponent(MyVaadinApplication.this); iCenterRight.addComponent(iSelectionComponent); iHeaderLayout = new HorizontalLayout(); iHeaderLayout.setSizeFull(); iHeaderLayout.setHeight("100px"); iHeaderLayout.addStyleName("v-header"); VerticalLayout lVerticalLayout = new VerticalLayout(); GridLayout lGridLayout = new GridLayout(2, 1); lGridLayout.setSpacing(true); lGridLayout.setSizeFull(); lGridLayout.addComponent(iCenterLeft, 0, 0); lGridLayout.setComponentAlignment(iCenterLeft, Alignment.TOP_LEFT); lGridLayout.addComponent(iCenterRight, 1, 0); lGridLayout.setComponentAlignment(iCenterRight, Alignment.TOP_CENTER); lVerticalLayout.addComponent(iHeaderLayout); lVerticalLayout.addComponent(lGridLayout); lVerticalLayout.addComponent(iBottomLayoutResults); lVerticalLayout.setComponentAlignment(iHeaderLayout, Alignment.MIDDLE_CENTER); lVerticalLayout.setComponentAlignment(lGridLayout, Alignment.MIDDLE_CENTER); lVerticalLayout.setComponentAlignment(iBottomLayoutResults, Alignment.MIDDLE_CENTER); lMainwindow.addComponent(lVerticalLayout); lMainwindow.addComponent(pusher); // Create a tracker for vaadin.com domain. String lDomainName = PropertiesConfigurationHolder.getInstance().getString("analytics.domain"); String lPageId = PropertiesConfigurationHolder.getInstance().getString("analytics.page"); GoogleAnalyticsTracker tracker = new GoogleAnalyticsTracker("UA-26252212-1", lDomainName); lMainwindow.addComponent(tracker); tracker.trackPageview(lPageId); /** * Sets an UncaughtExceptionHandler and executes the thread by the ExecutorsService */ Thread.setDefaultUncaughtExceptionHandler(new MyUncaughtExceptionHandler()); parseSessionId(); }
From source file:com.concur.ui.WebApp.java
License:Apache License
private Window createWindow() { FormLayout fl = new FormLayout(); // final SessionGuard sg = new SessionGuard(); // sg.setKeepalive(true); // fl.addComponent(sg); fl.setSizeFull();/*from www. java 2s . c o m*/ fl.setMargin(true); fl.addComponent(new Label("<h2>ATS Tuple Store -- Demo App<h2/>", Label.CONTENT_XML)); actionField = new NativeSelect("Action:"); actionField.addItem("Authenticate"); actionField.addItem("GetTuple"); actionField.addItem("PutTuple"); actionField.addItem("GetConfigurations"); actionField.select("Authenticate"); fl.addComponent(actionField); tokenField = new TextField("Authentication Token:"); tokenField.setColumns(40); fl.addComponent(tokenField); tupleKeyField = new TextField("TupleKey:"); tupleKeyField.setColumns(40); fl.addComponent(tupleKeyField); tupleDataArea = new TextArea("TupleData:"); tupleDataArea.setColumns(40); tupleDataArea.setRows(5); fl.addComponent(tupleDataArea); Button b = new Button("Send Request"); b.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { submit(); } }); fl.addComponent(b); final Window w = new Window("ATS Tuple Store -- DEMO"); w.setContent(fl); return w; }
From source file:com.concur.ui.WebApp.java
License:Apache License
private void submit() { String action = (String) actionField.getValue(); String token = (String) tokenField.getValue(); String tupleKey = (String) tupleKeyField.getValue(); String tupleData = (String) tupleDataArea.getValue(); if (!"Authenticate".equals(action) && "".equals(token.trim())) // if not logging in & not logged in {/*from ww w . j ava 2s . c om*/ w.showNotification("Authentication Required"); return; } String xml = WsXml.cmd(action, token, tupleKey, tupleData); String responseXml = Http.post(Config.getWsUrl(), xml); XmlMap xmlMap = XmlHandler.parse(responseXml).get("response"); final XmlMap status = xmlMap.get("status"); if (!"0".equals(status.getText("statuscode"))) { w.showNotification("Web Service call failed -- " + status.getText("statusmsg")); return; } if ("Authenticate".equals(action)) { tokenField.setValue(xmlMap.getText("token")); } else if ("GetTuple".equals(action)) { tupleDataArea.setValue(xmlMap.getText("tupledata")); } else if ("PutTuple".equals(action)) { w.showNotification("OK"); } else if ("GetConfigurations".equals(action)) { List<XmlMap> tuples = xmlMap.get("config").getAll("tuple"); Window subWin = new Window("Configurations"); subWin.setHeight("400px"); subWin.setWidth("400px"); subWin.center(); subWin.setModal(true); for (XmlMap tuple : tuples) { String text = tuple.getText("key") + " ==> " + tuple.getText("data"); subWin.addComponent(new Label(text)); } w.addWindow(subWin); } }
From source file:com.conx.logistics.kernel.ui.editors.vaadin.tests.MyVaadinApplication.java
License:Apache License
@Override public void init() { window = new Window("My Vaadin Application"); setMainWindow(window);/* ww w . j a v a 2s.com*/ Button button = new Button("Click Me!"); button.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { window.addComponent(new Label("Thank you for clicking!!!")); } }); window.addComponent(button); }
From source file:com.digitallabs.demos.Vaadin6BootstrapThemeDemo.java
License:Apache License
@Override public void init() { setTheme("bootstrap"); window = new Window("My Vaadin Application"); setMainWindow(window);/* www . j a v a2 s.c om*/ Button button = new Button("Click Me"); button.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { window.addComponent(new Label("Thank you for clicking")); } }); CssLayout container = new CssLayout(); container.setWidth("100%"); container.addStyleName("container"); typography(container); tables(container); forms(container); buttons(container); window.setContent(container); }