List of usage examples for com.vaadin.ui Alignment BOTTOM_CENTER
Alignment BOTTOM_CENTER
To view the source code for com.vaadin.ui Alignment BOTTOM_CENTER.
Click Source Link
From source file:org.eclipse.hawkbit.ui.common.grid.AbstractGridLayout.java
License:Open Source License
private void buildLayout() { setSizeFull();/*from ww w . jav a 2 s . c o m*/ setSpacing(true); setMargin(false); setStyleName("group"); final VerticalLayout tableHeaderLayout = new VerticalLayout(); tableHeaderLayout.setSizeFull(); tableHeaderLayout.setSpacing(false); tableHeaderLayout.setMargin(false); tableHeaderLayout.setStyleName("table-layout"); tableHeaderLayout.addComponent(tableHeader); tableHeaderLayout.setComponentAlignment(tableHeader, Alignment.TOP_CENTER); tableHeaderLayout.addComponent(grid); tableHeaderLayout.setComponentAlignment(grid, Alignment.TOP_CENTER); tableHeaderLayout.setExpandRatio(grid, 1.0f); addComponent(tableHeaderLayout); setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER); setExpandRatio(tableHeaderLayout, 1.0f); if (hasCountMessage()) { final HorizontalLayout rolloutGroupTargetsCountLayout = createCountMessageComponent(); addComponent(rolloutGroupTargetsCountLayout); setComponentAlignment(rolloutGroupTargetsCountLayout, Alignment.BOTTOM_CENTER); } }
From source file:org.eclipse.hawkbit.ui.filtermanagement.FilterManagementView.java
License:Open Source License
private void buildFilterDetailOrCreateView() { removeAllComponents();//from w w w . j a v a 2 s . c o m final VerticalLayout tableHeaderLayout = new VerticalLayout(); tableHeaderLayout.setSizeFull(); tableHeaderLayout.setSpacing(false); tableHeaderLayout.setMargin(false); tableHeaderLayout.setStyleName("table-layout"); tableHeaderLayout.addComponent(createNewFilterHeader); tableHeaderLayout.setComponentAlignment(createNewFilterHeader, Alignment.TOP_CENTER); tableHeaderLayout.addComponent(createNewFilterTable); tableHeaderLayout.setComponentAlignment(createNewFilterTable, Alignment.TOP_CENTER); tableHeaderLayout.setExpandRatio(createNewFilterTable, 1.0F); addComponent(tableHeaderLayout); setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER); setExpandRatio(tableHeaderLayout, 1.0F); final HorizontalLayout targetsCountmessageLabelLayout = addTargetFilterMessageLabel(); addComponent(targetsCountmessageLabelLayout); setComponentAlignment(targetsCountmessageLabelLayout, Alignment.BOTTOM_CENTER); }
From source file:org.eclipse.hawkbit.ui.menu.DashboardMenu.java
License:Open Source License
private Component buildContent() { final VerticalLayout dashboardMenuLayout = new VerticalLayout(); dashboardMenuLayout.setSizeFull();//from w w w . ja v a 2 s .co m final VerticalLayout menuContent = getMenuLayout(); menuContent.addComponent(buildUserMenu(uiProperties)); menuContent.addComponent(buildToggleButton()); final VerticalLayout menus = buildMenuItems(); final VerticalLayout links = buildLinksAndVersion(); menus.addComponent(links); menus.setComponentAlignment(links, Alignment.BOTTOM_CENTER); menus.setExpandRatio(links, 1.0F); menuContent.addComponent(menus); menuContent.setExpandRatio(menus, 1.0F); dashboardMenuLayout.addComponent(menuContent); return dashboardMenuLayout; }
From source file:org.eclipse.hawkbit.ui.menu.DashboardMenu.java
License:Open Source License
private VerticalLayout buildLinksAndVersion() { final VerticalLayout links = new VerticalLayout(); links.setSpacing(true);/*w ww .j a v a 2s . co m*/ links.addStyleName("links"); final String linkStyle = "v-link"; if (!uiProperties.getLinks().getDocumentation().getRoot().isEmpty()) { final Link docuLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_DOCUMENTATION, i18n.getMessage("link.documentation.name"), uiProperties.getLinks().getDocumentation().getRoot(), FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle); docuLink.setSizeFull(); links.addComponent(docuLink); links.setComponentAlignment(docuLink, Alignment.BOTTOM_CENTER); } if (!uiProperties.getLinks().getUserManagement().isEmpty()) { final Link userManagementLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_USERMANAGEMENT, i18n.getMessage("link.usermanagement.name"), uiProperties.getLinks().getUserManagement(), FontAwesome.USERS, "_blank", linkStyle); links.addComponent(userManagementLink); userManagementLink.setSizeFull(); links.setComponentAlignment(userManagementLink, Alignment.BOTTOM_CENTER); } if (!uiProperties.getLinks().getSupport().isEmpty()) { final Link supportLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_SUPPORT, i18n.getMessage("link.support.name"), uiProperties.getLinks().getSupport(), FontAwesome.ENVELOPE_O, "", linkStyle); supportLink.setSizeFull(); links.addComponent(supportLink); links.setComponentAlignment(supportLink, Alignment.BOTTOM_CENTER); } final Component buildVersionInfo = buildVersionInfo(); links.addComponent(buildVersionInfo); links.setComponentAlignment(buildVersionInfo, Alignment.BOTTOM_CENTER); links.setSizeFull(); links.setHeightUndefined(); return links; }
From source file:org.escidoc.browser.elabsmodul.views.DatePickerWindow.java
License:Open Source License
public DatePickerWindow(String caption, Callback callback) { super(caption); this.callback = callback; createInLineDateField();/*from www .ja v a 2 s . c o m*/ Preconditions.checkNotNull(this.dateField, "InlineDateField is null"); final VerticalLayout verticalLayout = new VerticalLayout(); HorizontalLayout buttonLayout; verticalLayout.addComponent(createOptionGroup()); verticalLayout.addComponent(new Label("<p/>", Label.CONTENT_XHTML)); verticalLayout.addComponent(createInputField()); verticalLayout.addComponent(new Label("<hr/>", Label.CONTENT_XHTML)); verticalLayout.addComponent(this.dateField); verticalLayout.addComponent(new Label("<p/>", Label.CONTENT_XHTML)); verticalLayout.addComponent(buttonLayout = createButtonLayout()); verticalLayout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_CENTER); addComponent(verticalLayout); setWidth("330px"); setHeight("440px"); setModal(true); setClosable(false); setResizable(true); setScrollable(false); }
From source file:org.inakirj.imagerulette.screens.DicePlayView.java
License:Open Source License
/** * Sets the layout.// www . ja v a 2 s. co m */ private void setLayout() { mainLayout = new VerticalLayout(); mainLayout.setWidth(100, Unit.PERCENTAGE); FileResource resource = new FileResource(new File( VaadinService.getCurrent().getBaseDirectory().getAbsolutePath() + "/WEB-INF/image/nope.png")); Image none = new Image("", resource); randomImgToBeReplaced = none; randomImgToBeReplaced.setWidth(78, Unit.PIXELS); randomImgToBeReplaced.setHeight(81, Unit.PIXELS); randomImgToBeReplaced.addStyleName("random-image"); imageLayout = new HorizontalLayout(); imageLayout.addComponent(randomImgToBeReplaced); imageLayout.setWidth(100, Unit.PERCENTAGE); imageLayout.setComponentAlignment(randomImgToBeReplaced, Alignment.TOP_CENTER); Button rollBtn = new Button(); rollBtn.addClickListener(e -> onPickABallClick()); rollBtn.setWidth(25, Unit.PERCENTAGE); rollBtn.setHeight(50, Unit.PIXELS); rollBtn.setIcon(FontAwesome.CUBE); rollBtn.addStyleName("dice-button-roll"); mainLayout.addComponent(imageLayout); mainLayout.addComponent(rollBtn); mainLayout.setComponentAlignment(rollBtn, Alignment.BOTTOM_CENTER); calculateStats(); addComponent(mainLayout); }
From source file:org.jdal.vaadin.auth.LoginView.java
License:Apache License
@Override protected Component buildPanel() { Label greeting = new Label(getMessage("loginView.greeting")); greeting.addStyleName("jd-login-greeting"); greeting.addStyleName(Reindeer.LABEL_H2); Label applicationNameLabel = new Label(getMessage(applicationName)); applicationNameLabel.addStyleName("jd-login-appname"); applicationNameLabel.addStyleName(Reindeer.LABEL_H2); applicationNameLabel.setSizeUndefined(); loginButton.addClickListener(this); loginButton.setCaption(getMessage("loginView.loginButtonCaption")); loginButton.addStyleName("jd-login-button"); // add shortcut listener for enter key loginButton.addShortcutListener(new ShortcutListener("Sign In", KeyCode.ENTER, null) { @Override/* w w w . j av a 2 s.c om*/ public void handleAction(Object sender, Object target) { loginButton.click(); } }); Image image = null; HorizontalLayout imageWrapper = null; if (applicationIcon != null) { image = new Image(null, applicationIcon); image.setSizeUndefined(); image.setStyleName("jd-login-icon"); imageWrapper = new HorizontalLayout(); imageWrapper.setMargin(false); imageWrapper.addComponent(image); imageWrapper.setComponentAlignment(image, Alignment.MIDDLE_CENTER); } BoxFormBuilder fb = new BoxFormBuilder(); fb.setDefaultWidth(BoxFormBuilder.SIZE_FULL); fb.row(); fb.startBox(); fb.setFixedHeight(); fb.row(false); fb.add(greeting, Alignment.TOP_LEFT); fb.add(applicationNameLabel, Alignment.TOP_RIGHT); fb.endBox(); // add application icon if (image != null) { fb.row(BoxFormBuilder.SIZE_FULL); fb.add(imageWrapper, BoxFormBuilder.SIZE_FULL, Alignment.MIDDLE_CENTER); } fb.row(); fb.startBox(); fb.row(30); fb.add(errorLabel, BoxFormBuilder.SIZE_FULL, Alignment.BOTTOM_CENTER); fb.endBox(); fb.row(); fb.startBox(); fb.setFixedHeight(); fb.row(); fb.add(username, getMessage("loginView.username"), Alignment.BOTTOM_CENTER); fb.add(password, getMessage("loginView.password"), Alignment.BOTTOM_CENTER); fb.add(loginButton, 100, Alignment.BOTTOM_CENTER); fb.endBox(); Component form = fb.getForm(); form.setWidth(this.getWidth(), Unit.PIXELS); form.setHeight(getHeight(), Unit.PIXELS); form.setStyleName("jd-login"); return form; }
From source file:org.jpos.qi.components.DateRangeComponent.java
License:Open Source License
public DateRangeComponent(String defaultRangeKey, boolean dateRangeEnabled) { app = (QI) UI.getCurrent();/*from w w w .ja va2 s . c om*/ setSpacing(true); setSizeUndefined(); datePickerFrom = createDatePicker(app.getMessage("from").toUpperCase()); datePickerTo = createDatePicker(app.getMessage("to").toUpperCase()); addComponents(datePickerFrom, datePickerTo); if (dateRangeEnabled) { dateRanges = createDateRanges(); dateRanges.setValue(defaultRangeKey); addComponent(dateRanges); } refreshBtn = new Button(app.getMessage("refresh")); refreshBtn.setIcon(VaadinIcons.REFRESH); refreshBtn.setStyleName(ValoTheme.BUTTON_SMALL); refreshBtn.setSizeUndefined(); refreshBtn.addClickListener(createRefreshListener()); addComponent(refreshBtn); setComponentAlignment(refreshBtn, Alignment.BOTTOM_CENTER); }
From source file:org.jpos.qi.minigl.AccountsView.java
License:Open Source License
@Override protected HorizontalLayout createHeader(String title) { HorizontalLayout header = super.createHeader(title); if (isGeneralView()) { Label refDebit = new Label(FontAwesome.SQUARE.getHtml() + " DEBIT accounts"); Label refCredit = new Label(FontAwesome.SQUARE.getHtml() + " CREDIT accounts"); refDebit.setContentMode(ContentMode.HTML); refCredit.setContentMode(ContentMode.HTML); refDebit.setStyleName("debit-color"); refCredit.setStyleName("credit-color"); refDebit.addStyleName(ValoTheme.LABEL_SMALL); refCredit.addStyleName(ValoTheme.LABEL_SMALL); Button collapse = new Button(getApp().getMessage("collapseAll"), event -> { ((TreeGrid) getGrid()).collapse(expandedItems.toArray()); });/*from ww w. ja va2 s.co m*/ collapse.setStyleName(ValoTheme.BUTTON_LINK); collapse.addStyleName(ValoTheme.BUTTON_SMALL); HorizontalLayout l = new HorizontalLayout(refDebit, refCredit, collapse); l.setSpacing(true); l.setComponentAlignment(refDebit, Alignment.BOTTOM_CENTER); l.setComponentAlignment(refCredit, Alignment.BOTTOM_CENTER); l.setComponentAlignment(collapse, Alignment.BOTTOM_CENTER); header.addComponent(l); header.setComponentAlignment(l, Alignment.MIDDLE_RIGHT); } return header; }
From source file:org.jpos.qi.minigl.NewEntryForm.java
License:Open Source License
public NewEntryForm(GLTransaction transaction, TransactionsHelper helper, EntryGrid entryGrid) { super();// w w w .j ava 2 s . c om try { this.transaction = transaction.clone(); } catch (CloneNotSupportedException e) { // Log error and ignore. Clone should be supported. QI.getQI().getLog().error(e); } this.journal = transaction.getJournal(); this.helper = helper; this.app = QI.getQI(); this.entryGrid = entryGrid; setStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING); setSpacing(true); setWidthUndefined(); GLEntry entry = new GLEntry(); binder = new Binder(GLEntry.class); createAndBindFields(binder); binder.setBean(entry); binder.setReadOnly(true); addEntryBtn = new Button(app.getMessage("addEntry")); addEntryBtn.addClickListener(addEntryClickListener(binder)); addEntryBtn.setEnabled(false); addEntryBtn.setStyleName(ValoTheme.BUTTON_FRIENDLY); addComponent(addEntryBtn); setComponentAlignment(addEntryBtn, Alignment.BOTTOM_CENTER); }