List of usage examples for com.vaadin.ui HorizontalLayout setStyleName
@Override public void setStyleName(String style)
From source file:your.company.MyVaadinApplication.java
License:Apache License
public HorizontalLayout createToolbar() { share.setIcon(new ThemeResource("icons/32/users.png")); help.setIcon(new ThemeResource("icons/32/help.png")); newContact.setIcon(new ThemeResource("icons/32/document-add.png")); search.setIcon(new ThemeResource("icons/32/folder-add.png")); HorizontalLayout lo = new HorizontalLayout(); lo.addComponent(newContact);/*ww w . ja va2s .c o m*/ lo.addComponent(search); lo.addComponent(share); lo.addComponent(help); lo.setMargin(true); lo.setSpacing(true); lo.setStyleName("toolbar"); search.addListener((Button.ClickListener) this); newContact.addListener((Button.ClickListener) this); share.addListener((Button.ClickListener) this); help.addListener((Button.ClickListener) this); return lo; }