List of usage examples for com.vaadin.ui Layout setSizeUndefined
public void setSizeUndefined();
From source file:com.arcusys.liferay.vaadinplugin.ui.DetailsWindow.java
License:Apache License
private Layout createVaadinDetails() { Layout vaadinDetailLayout = new VerticalLayout(); vaadinDetailLayout.setWidth("900px"); VerticalLayout vaadinDetails = new VerticalLayout(); vaadinDetails.setMargin(new MarginInfo(true, true, false, true)); Version currentVersion = ControlPanelPortletUtil.getPortalVaadinVersion(); VaadinVersion currentVaadinInfo = VaadinVersion.getVaadinVersion(currentVersion); Collection<VaadinFileInfo> fileInfos = currentVaadinInfo.getVaadinFilesInfo(); Collections.sort((List<VaadinFileInfo>) fileInfos, new Comparator<VaadinFileInfo>() { @Override/* www . j a v a 2s .c om*/ public int compare(VaadinFileInfo o1, VaadinFileInfo o2) { if (o1 == null) return -1; if (o2 == null) return 1; return o1.getOrderPriority().compareTo(o2.getOrderPriority()); } }); for (VaadinFileInfo info : fileInfos) { VerticalLayout infoLayout = new VerticalLayout(); infoLayout.setCaption(info.getName()); infoLayout.setMargin(new MarginInfo(false, true, true, false)); Layout versionLayout = new HorizontalLayout(); versionLayout.setSizeUndefined(); versionLayout.addComponent(new Label("Version: ")); String vaadinJarVersion; try { vaadinJarVersion = ControlPanelPortletUtil.getPortalVaadinJarVersion( info.getPlace() + ControlPanelPortletUtil.FileSeparator + info.getName()); } catch (Exception ex) { vaadinJarVersion = ""; log.warn("Version for " + vaadinJarVersion + " couldn't be read.", ex); } versionLayout.addComponent(new Label(vaadinJarVersion)); infoLayout.addComponent(versionLayout); Layout pathLayout = new HorizontalLayout(); pathLayout.setSizeUndefined(); pathLayout.addComponent(new Label("Path: ")); String path = info.getPlace(); pathLayout.addComponent(new Label(path)); infoLayout.addComponent(pathLayout); vaadinDetails.addComponent(infoLayout); } vaadinDetailLayout.addComponent(vaadinDetails); return vaadinDetailLayout; }
From source file:com.esofthead.mycollab.module.project.view.milestone.MilestoneAddViewImpl.java
License:Open Source License
@Override protected ComponentContainer createButtonControls() { final Layout controlButtons = (new EditFormControlsGenerator<>(editForm)).createButtonControls(); controlButtons.setSizeUndefined(); return controlButtons; }
From source file:com.esofthead.mycollab.module.project.view.task.TaskAddViewImpl.java
License:Open Source License
@Override protected ComponentContainer createButtonControls() { final Layout controlButtons = (new EditFormControlsGenerator<>(editForm)).createButtonControls(true, true, true);//from w ww .j a va2 s . com controlButtons.setSizeUndefined(); return controlButtons; }
From source file:com.purebred.core.view.EntityForm.java
License:Open Source License
@PostConstruct @Override/*from ww w . j a v a 2s . c om*/ public void postConstruct() { super.postConstruct(); addStyleName("p-entity-form"); List<ToManyRelationship> toManyRelationships = getViewableToManyRelationships(); if (toManyRelationships.size() > 0) { toManyRelationshipTabs = new TabSheet(); toManyRelationshipTabs.setSizeUndefined(); for (ToManyRelationship toManyRelationship : toManyRelationships) { toManyRelationshipTabs.addTab(toManyRelationship); labelDepot.putFieldLabel(getEntityType().getName(), toManyRelationship.getResults().getChildPropertyId(), "Relationship", toManyRelationship.getResults().getEntityCaption()); } Layout layout = new HorizontalLayout(); layout.setSizeUndefined(); Label label = new Label(" ", Label.CONTENT_XHTML); layout.addComponent(label); layout.addComponent(toManyRelationshipTabs); addComponent(layout); } }
From source file:pl.exsio.frameset.vaadin.ui.support.component.data.common.DataComponent.java
License:Open Source License
private Layout buildForm(final I item, final C container, final Window formWindow, final int mode) { F form = this.instantiateForm(item, container, formWindow, mode); this.formatForm(form); VerticalLayout mainLayout = new VerticalLayout(); Layout formLayout = this.decorateForm(form, item, mode); formLayout.setSizeUndefined(); formLayout.setStyleName("frameset-dc-window-form-wrapper"); if (formLayout instanceof MarginHandler) { ((MarginHandler) formLayout).setMargin(new MarginInfo(false, true, false, true)); }// w ww . ja v a2s .c o m Layout controls = this.decorateFormControls( this.createFormControls(item, form, container, formWindow, mode), item, form, container, formWindow, mode); mainLayout.addComponent(formLayout); mainLayout.addComponent(controls); mainLayout.setExpandRatio(formLayout, 10); mainLayout.setExpandRatio(controls, 1); mainLayout.setSizeUndefined(); return mainLayout; }