/** * Customizes the button alignment. * * @param alignment The new button alignment * @return The {@link MessageBox} instance */ public MessageBox withButtonAlignment(Alignment alignment) { if (alignment != null) { mainLayout.setComponentAlignment(buttonLayout, alignment); } return this; }
private void addLoginForm(final VerticalLayout rootLayout) { final Component loginForm = buildLoginForm(); rootLayout.addComponent(loginForm); rootLayout.setComponentAlignment(loginForm, Alignment.MIDDLE_CENTER); }
public static Layout VERTICAL_CENTERED(final Component...components) { VerticalLayout layout = new VerticalLayout(); //layout.addStyleName(Style.Rating.FIELDS); for (Component component : components) { if (component != null) { layout.addComponent(component); layout.setComponentAlignment(component, Alignment.MIDDLE_CENTER); } } return layout; }
private void addLoginForm(final VerticalLayout rootLayout) { final Component loginForm = buildLoginForm(); rootLayout.addComponent(loginForm); rootLayout.setComponentAlignment(loginForm, Alignment.MIDDLE_CENTER); }
@Override public Component getComponent() { VerticalLayout verticalLayout = new VerticalLayout(); Label label = new Label("The specified dashlet could not be found!"); verticalLayout.addComponent(label); verticalLayout.setComponentAlignment(label, Alignment.MIDDLE_CENTER); return verticalLayout; } };
@Override public Component initContent() { final VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
protected void removeCancelButtonAndAddMenuBar() { targetTagTableLayout.removeComponent(cancelTagButton); targetTagTableLayout.addComponent(menu, 0); targetTagTableLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT); filterByButtons.removeUpdateAndDeleteColumn(); }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
protected void removeCancelButtonAndAddMenuBar() { targetTagTableLayout.removeComponent(cancelTagButton); targetTagTableLayout.addComponent(menu, 0); targetTagTableLayout.setComponentAlignment(menu, Alignment.TOP_RIGHT); filterByButtons.removeUpdateAndDeleteColumn(); }
protected void removeMenuBarAndAddCancelButton() { targetTagTableLayout.removeComponent(menu); targetTagTableLayout.addComponent(createCancelButtonForUpdateOrDeleteTag(), 0); targetTagTableLayout.setComponentAlignment(cancelTagButton, Alignment.TOP_RIGHT); }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
protected void removeMenuBarAndAddCancelButton() { targetTagTableLayout.removeComponent(menu); targetTagTableLayout.addComponent(createCancelButtonForUpdateOrDeleteTag(), 0); targetTagTableLayout.setComponentAlignment(cancelTagButton, Alignment.TOP_RIGHT); }
private void addFooter(final VerticalLayout rootLayout) { final Resource resource = context .getResource("classpath:/VAADIN/themes/" + UI.getCurrent().getTheme() + "/layouts/footer.html"); try (final InputStream resourceStream = resource.getInputStream()) { final CustomLayout customLayout = new CustomLayout(resourceStream); customLayout.setSizeUndefined(); rootLayout.addComponent(customLayout); rootLayout.setComponentAlignment(customLayout, Alignment.BOTTOM_LEFT); } catch (final IOException ex) { LOG.error("Footer file cannot be loaded", ex); } }
private void addFooter(final VerticalLayout rootLayout) { final Resource resource = context .getResource("classpath:/VAADIN/themes/" + UI.getCurrent().getTheme() + "/layouts/footer.html"); try (final InputStream resourceStream = resource.getInputStream()) { final CustomLayout customLayout = new CustomLayout(resourceStream); customLayout.setSizeUndefined(); rootLayout.addComponent(customLayout); rootLayout.setComponentAlignment(customLayout, Alignment.BOTTOM_LEFT); } catch (final IOException ex) { LOG.error("Footer file cannot be loaded", ex); } }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(step); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(combo); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
protected void initSelectButton() { final Button selectButton = new Button(i18nManager.getMessage(Messages.USER_SELECT_GROUPS)); addComponent(selectButton); ((VerticalLayout) getContent()).setComponentAlignment(selectButton, Alignment.BOTTOM_RIGHT); selectButton.addListener(new ClickListener() { public void buttonClick(ClickEvent event) { fireEvent(new SubmitEvent(selectButton, SubmitEvent.SUBMITTED)); close(); } }); }
protected void addDropPanel() { Panel dropPanel = new Panel(); DragAndDropWrapper dragAndDropWrapper = new DragAndDropWrapper(dropPanel); dragAndDropWrapper.setDropHandler(this); dragAndDropWrapper.setWidth("80%"); addComponent(dragAndDropWrapper); setComponentAlignment(dragAndDropWrapper, Alignment.MIDDLE_CENTER); Label dropLabel = new Label(i18nManager.getMessage(Messages.UPLOAD_DROP)); dropLabel.setSizeUndefined(); dropPanel.addComponent(dropLabel); ((VerticalLayout)dropPanel.getContent()).setComponentAlignment(dropLabel, Alignment.MIDDLE_CENTER); }