List of usage examples for com.vaadin.ui FormLayout addComponents
@Override public void addComponents(Component... components)
From source file:dhbw.clippinggorilla.userinterface.windows.NewSourceWindow.java
public Component getFirstStage() { Label header = new Label(Language.get(Word.RSS)); header.addStyleName(ValoTheme.LABEL_H1); FormLayout forms = new FormLayout(); forms.setSizeFull();//from w w w . j a v a 2s . com TextField rssField = new TextField(Language.get(Word.RSS)); rssField.setWidth("750px"); forms.addComponents(rssField); Runnable cancel = () -> close(); Runnable next = () -> validateFirstStage(rssField.getValue()); VerticalLayout windowLayout = new VerticalLayout(); windowLayout.addComponents(header, forms, getFooter(cancel, next)); windowLayout.setComponentAlignment(header, Alignment.MIDDLE_CENTER); return windowLayout; }
From source file:info.magnolia.ui.form.field.component.AbstractBaseItemContentPreviewComponent.java
License:Open Source License
@Override public Component refreshContentDetail(Item item) { FormLayout fileInfo = new FormLayout(); fileInfo.setSizeUndefined();/* w ww . ja v a2s.c om*/ fileInfo.addStyleName("file-details"); try { List<Component> res = createFieldDetail(item); fileInfo.addComponents(res.toArray(new Component[res.size()])); } catch (RepositoryException e) { log.warn("Could not get the related File node", e); } return fileInfo; }