List of usage examples for com.vaadin.v7.ui HorizontalLayout setComponentAlignment
@Override
public void setComponentAlignment(Component childComponent, Alignment alignment)
From source file:org.jpos.qi.InfoDialog.java
License:Open Source License
public InfoDialog(String caption, String info) { super(caption); setWidth("350px"); setModal(true);//from www .j a v a2 s. c o m setResizable(false); close.setStyleName(ValoTheme.BUTTON_SMALL); VerticalLayout content = new VerticalLayout(); content.setMargin(true); content.setSpacing(true); setContent(content); if (info != null) { Label l = new Label(info); l.setContentMode(ContentMode.HTML); content.addComponent(l); } HorizontalLayout hl = new HorizontalLayout(); hl.setMargin(new MarginInfo(true, false, false, false)); hl.setSpacing(true); hl.setWidth("100%"); hl.addComponent(close); hl.setComponentAlignment(close, Alignment.BOTTOM_RIGHT); content.addComponent(hl); }