List of usage examples for com.vaadin.ui VerticalLayout setMargin
@Override public void setMargin(boolean enabled)
From source file:com.terralcode.gestion.frontend.view.panel.species.SpeciesPanel.java
private void openElementSelector() { Window window = new Window(this.windowTitle); window.setModal(true);// www . jav a 2 s.com VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.setMargin(true); window.setContent(verticalLayout); BeanItem beanItem = new BeanItem<>(customer); fieldGroup = new BeanFieldGroup<>(CustomerCRM.class); fieldGroup.setItemDataSource(beanItem); OptionGroup og = new OptionGroup(); og.setConverter(new SetToListConverter()); og.setContainerDataSource(containerSpecies); og.setNullSelectionAllowed(false); og.setMultiSelect(true); og.setImmediate(true); //tcs.setLeftColumnCaption("Disponibles"); //tcs.setRightColumnCaption("Seleccionados"); fieldGroup.bind(og, "species"); // TwinColSelect tcs = new TwinColSelect(); // tcs.setConverter(new SetToListConverter()); // tcs.setContainerDataSource(containerSpecies); // tcs.setNullSelectionAllowed(false); // tcs.setMultiSelect(true); // tcs.setImmediate(true); // tcs.setLeftColumnCaption("Disponibles"); // tcs.setRightColumnCaption("Seleccionados"); // fieldGroup.bind(tcs, "species"); verticalLayout.addComponent(og); verticalLayout.addComponent(createOkTradesButton(window)); getUI().addWindow(window); }
From source file:com.terralcode.gestion.frontend.view.widgets.appointment.AppointmentComplaintsPanel.java
private void openComplaintWindow(Complaint complaint) { WebBrowser webBrowser = Page.getCurrent().getWebBrowser(); Window window = new Window("Registro de Queja"); window.setModal(true);//from w ww . j av a2s. c om if (webBrowser.getScreenWidth() < 1024) { window.setSizeFull(); } else { window.setHeight(90.0f, Unit.PERCENTAGE); window.setWidth(90.0f, Unit.PERCENTAGE); } // TextField nameField = new TextField(); // nameField.setInputPrompt("Introduzca el ttulo de la queja"); // nameField.setWidth("100%"); TextArea notesArea = new TextArea(); notesArea.setInputPrompt("Introduzca el contenido de la queja"); notesArea.setSizeFull(); // CheckBox doneField = new CheckBox("Atendido"); HorizontalLayout horizontal = new HorizontalLayout(); horizontal.setSpacing(true); horizontal.addComponent(createDeleteButton(window)); horizontal.addComponent(createOkButton(window)); VerticalLayout layout = new VerticalLayout(); layout.setSizeFull(); layout.setMargin(true); layout.addComponent(complaintType); layout.addComponent(notesArea); // layout.addComponent(doneField); layout.addComponent(horizontal); layout.setComponentAlignment(horizontal, Alignment.MIDDLE_RIGHT); layout.setExpandRatio(complaintType, 1); layout.setExpandRatio(notesArea, 8); // layout.setExpandRatio(doneField, 1); layout.setExpandRatio(horizontal, 1); BeanItem beanItem = new BeanItem<>(complaint); fieldGroup = new BeanFieldGroup<>(Complaint.class); fieldGroup.setItemDataSource(beanItem); fieldGroup.bind(complaintType, "complaintType"); fieldGroup.bind(notesArea, "notes"); // fieldGroup.bind(doneField, "done"); window.setContent(layout); getUI().addWindow(window); // Window windowComplaint = new Window(complaintView); // WidgetActions actions = new WidgetActions(){ // // @Override // public void saveAction() { // refreshBind(); // windowComplaint.close(); // } // // @Override // public void deleteAction() { // appointment.getComplaints().remove(complaint); // refreshBind(); // windowComplaint.close(); // } // // }; // complaintView.bind(complaint); // complaintView.setActions(actions); // getUI().addWindow(windowComplaint); }
From source file:com.thingtrack.konekti.view.web.workbench.Main.java
License:Apache License
@Override protected void initSpringApplication(ConfigurableWebApplicationContext context) { // set konekti theme setTheme("konekti"); // get global konekti configuration getConfiguration();//from w ww . ja v a 2s .c om // set main Window window = new MainWindow(name, configureI18n()); window.setStyleName("background"); setMainWindow(window); // set full size and none margin for the default window layout VerticalLayout mainLayout = (VerticalLayout) window.getContent(); mainLayout.setSizeFull(); mainLayout.setMargin(false); // Create the views createViews(); // add Konekti Layout mainLayout.addComponent(sliderView); // add module listener to list bundle install/uninstall moduleService.addListener(this); // add user change listener konektiLayout.getMenuLayout().addListenerUserChange(this); // set jira issue collector button generateJIRAIssueCollector(); // define MenuLayout Message listeners konektiLayout.getMenuLayout().addListenerApplicationClose(new IApplicationCloseEventListener() { @Override public void close() { moduleService.removeListener(Main.this); WebApplicationContext webApplicationContext = (WebApplicationContext) getMainWindow() .getApplication().getContext(); webApplicationContext.getHttpSession().invalidate(); getMainWindow().getApplication().close(); } }); }
From source file:com.trivago.mail.pigeon.web.components.templates.ModalAddTemplate.java
License:Apache License
private void assembleHelpComponents(final Panel helpRootPanel) { VerticalLayout vHelpLayout = new VerticalLayout(); Link velocityLink = new Link("Velocity User Guide", new ExternalResource("http://velocity.apache.org/engine/releases/velocity-1.7/user-guide.html")); velocityLink.setTargetName("_blank"); Label helpText1 = new Label( "<p>You can find the basic template language user guide at the vendors homepage.</p>", Label.CONTENT_XHTML); Label helpText2 = new Label( "<p>The standard set of commands is enriched with our application specific variables." + "Those will help you to get the newsletter personalized. See below for a list of variables and and macros.</p>", Label.CONTENT_XHTML); Accordion accordion = new Accordion(); // Sender// www . j ava 2 s.c om StringBuilder senderText = new StringBuilder("<dl>"); senderText.append("<dt>sender.uuid.id</dt><dd>The unique id of the sender</dd>"); senderText.append("<dt>sender.name</dt><dd>The name of the sender</dd>"); senderText.append("<dt>sender.email.from</dt><dd>The 'from' eMail of the sender</dd>"); senderText.append("<dt>sender.email.replyto</dt><dd>The reply-to eMail of the sender</dd>"); senderText.append("</dl>"); Label senderLabel = new Label(senderText.toString(), Label.CONTENT_XHTML); VerticalLayout senderBox = new VerticalLayout(); senderBox.addComponent(senderLabel); senderBox.setMargin(true); accordion.addTab(senderBox).setCaption("Sender"); // Recipient StringBuilder recipientText = new StringBuilder("<dl>"); recipientText.append("<dt>recipient.uuid.id</dt><dd>The unique id of the recipient</dd>"); recipientText.append( "<dt>recipient.uuid.external</dt><dd>The external (e.g. imported from the live system) id of the recipient</dd>"); recipientText.append("<dt>recipient.name</dt><dd>The name of the recipient</dd>"); recipientText.append("<dt>recipient.email</dt><dd>The eMail of the recipient</dd>"); recipientText.append("<dt>recipient.name.title</dt><dd>The reply-to eMail of the sender</dd>"); recipientText.append("<dt>recipient.name.first</dt><dd>The reply-to eMail of the sender</dd>"); recipientText.append("<dt>recipient.name.last</dt><dd>The reply-to eMail of the sender</dd>"); recipientText.append("<dt>recipient.gender</dt><dd>The reply-to eMail of the sender</dd>"); recipientText.append("<dt>recipient.birthday</dt><dd>The reply-to eMail of the sender</dd>"); recipientText.append("<dt>recipient.language</dt><dd>The reply-to eMail of the sender</dd>"); recipientText.append("<dt>recipient.location.city</dt><dd>The reply-to eMail of the sender</dd>"); recipientText.append("<dt>recipient.location.country</dt><dd>The reply-to eMail of the sender</dd>"); recipientText.append("</dl>"); Label recipientLabel = new Label(recipientText.toString(), Label.CONTENT_XHTML); VerticalLayout recipientBox = new VerticalLayout(); recipientBox.addComponent(recipientLabel); recipientBox.setMargin(true); accordion.addTab(recipientBox).setCaption("Recipient"); // Mail StringBuilder mailText = new StringBuilder("<dl>"); mailText.append("<dt>recipient.uuid.id</dt><dd>The unique id of the recipient</dd>"); mailText.append( "<dt>recipient.uuid.external</dt><dd>The external (e.g. imported from the live system) id of the recipient</dd>"); mailText.append("</dl>"); Label mailLabel = new Label(mailText.toString(), Label.CONTENT_XHTML); VerticalLayout mailBox = new VerticalLayout(); mailBox.addComponent(mailLabel); mailBox.setMargin(true); accordion.addTab(mailBox).setCaption("Mail"); // Campaign StringBuilder campaignText = new StringBuilder("<dl>"); campaignText.append("<dt>recipient.uuid.id</dt><dd>The unique id of the recipient</dd>"); campaignText.append( "<dt>recipient.uuid.external</dt><dd>The external (e.g. imported from the live system) id of the recipient</dd>"); campaignText.append("<dt>recipient.name</dt><dd>The name of the recipient</dd>"); campaignText.append("<dt>recipient.email</dt><dd>The eMail of the recipient</dd>"); campaignText.append("<dt>sender.email.replyto</dt><dd>The reply-to eMail of the sender</dd>"); campaignText.append("</dl>"); Label campaignLabel = new Label(campaignText.toString(), Label.CONTENT_XHTML); VerticalLayout campaignBox = new VerticalLayout(); campaignBox.addComponent(campaignLabel); campaignBox.setMargin(true); accordion.addTab(campaignBox).setCaption("Campaign"); vHelpLayout.addComponent(helpText1); vHelpLayout.addComponent(velocityLink); vHelpLayout.addComponent(helpText2); vHelpLayout.addComponent(accordion); helpRootPanel.addComponent(vHelpLayout); }
From source file:com.trivago.mail.pigeon.web.components.wizard.setup.SetupWizardComponent.java
License:Apache License
public SetupWizardComponent() { wizard = new Wizard(); wizard.addStep(new WizardGreetingPageComponent(), "start"); wizard.addStep(new WizardAddSenderComponent(), "sender"); wizard.addStep(new WizardAddRecipientGroupComponent(), "recipientgroup"); wizard.addStep(new WizardFinishedComponent(), "done"); wizard.setUriFragmentEnabled(false); wizard.addListener(this); wizard.setHeight("600px"); wizard.setWidth("800px"); VerticalLayout vl = new VerticalLayout(); vl.setSizeFull();//from w ww.j a va 2s.c om vl.setMargin(true); vl.addComponent(wizard); vl.setComponentAlignment(wizard, Alignment.TOP_CENTER); setCompositionRoot(vl); }
From source file:com.trivago.mail.pigeon.web.MainApp.java
License:Apache License
public void setNewsletterList() { NewsletterList newsletterList = new NewsletterList(); VerticalLayout nlLayout = new VerticalLayout(); nlLayout.addComponent(newsletterList); nlLayout.setMargin(true); clearWindow();/*from ww w . java2 s. co m*/ window.addComponent(nlLayout); }
From source file:com.trivago.mail.pigeon.web.MainApp.java
License:Apache License
public void setSenderList() { SenderList senderList = new SenderList(); VerticalLayout slLayout = new VerticalLayout(); slLayout.addComponent(senderList);//w ww. j a v a 2 s . c om slLayout.setMargin(true); clearWindow(); window.addComponent(slLayout); }
From source file:com.trivago.mail.pigeon.web.MainApp.java
License:Apache License
public void setRecipientGroupList() { GroupList groupList = new GroupList(); VerticalLayout rgLayout = new VerticalLayout(); rgLayout.addComponent(groupList);/*from ww w .j av a2 s . c o m*/ rgLayout.setMargin(true); clearWindow(); window.addComponent(rgLayout); }
From source file:com.trivago.mail.pigeon.web.MainApp.java
License:Apache License
public void setRecipientList() { RecipientList recipientList = new RecipientList(); VerticalLayout rLayout = new VerticalLayout(); rLayout.addComponent(recipientList); rLayout.setMargin(true); clearWindow();/*from ww w . j a v a 2s .co m*/ window.addComponent(rLayout); }
From source file:com.trivago.mail.pigeon.web.MainApp.java
License:Apache License
public void setTemplateList() { TemplateList templateList = new TemplateList(); VerticalLayout tlLayout = new VerticalLayout(); tlLayout.addComponent(templateList); tlLayout.setMargin(true); clearWindow();//from w w w .ja v a 2 s . c om window.addComponent(tlLayout); }