List of usage examples for com.vaadin.ui VerticalLayout setHeightUndefined
@Override public void setHeightUndefined()
From source file:lifetime.component.welcome.HomeView.java
License:Apache License
private Component getSearchView() { searchText.setWidth("50%"); VerticalLayout layout = new VerticalLayout(searchText, searchButton); layout.setWidth("100%"); layout.setHeightUndefined(); layout.setMargin(true);// w w w .ja v a 2 s. c om layout.setComponentAlignment(searchText, Alignment.MIDDLE_CENTER); layout.setComponentAlignment(searchButton, Alignment.MIDDLE_CENTER); return layout; }
From source file:org.eclipse.hawkbit.ui.menu.DashboardMenu.java
License:Open Source License
private VerticalLayout buildLinksAndVersion() { final VerticalLayout links = new VerticalLayout(); links.setSpacing(true);/*from w w w . j av a 2 s .co m*/ links.addStyleName("links"); final String linkStyle = "v-link"; if (!uiProperties.getLinks().getDocumentation().getRoot().isEmpty()) { final Link docuLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_DOCUMENTATION, i18n.getMessage("link.documentation.name"), uiProperties.getLinks().getDocumentation().getRoot(), FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle); docuLink.setSizeFull(); links.addComponent(docuLink); links.setComponentAlignment(docuLink, Alignment.BOTTOM_CENTER); } if (!uiProperties.getLinks().getUserManagement().isEmpty()) { final Link userManagementLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_USERMANAGEMENT, i18n.getMessage("link.usermanagement.name"), uiProperties.getLinks().getUserManagement(), FontAwesome.USERS, "_blank", linkStyle); links.addComponent(userManagementLink); userManagementLink.setSizeFull(); links.setComponentAlignment(userManagementLink, Alignment.BOTTOM_CENTER); } if (!uiProperties.getLinks().getSupport().isEmpty()) { final Link supportLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_SUPPORT, i18n.getMessage("link.support.name"), uiProperties.getLinks().getSupport(), FontAwesome.ENVELOPE_O, "", linkStyle); supportLink.setSizeFull(); links.addComponent(supportLink); links.setComponentAlignment(supportLink, Alignment.BOTTOM_CENTER); } final Component buildVersionInfo = buildVersionInfo(); links.addComponent(buildVersionInfo); links.setComponentAlignment(buildVersionInfo, Alignment.BOTTOM_CENTER); links.setSizeFull(); links.setHeightUndefined(); return links; }
From source file:pl.exsio.plupload.examples.AbstractExample.java
License:Open Source License
private VerticalLayout getActionPane() { VerticalLayout layout = new VerticalLayout(); layout.setSizeFull();//from w w w.j ava2 s.c o m layout.setHeightUndefined(); this.decorateActionPane(layout); return layout; }
From source file:probe.com.view.body.quantdatasetsoverview.diseasegroupsfilters.DiseaseGroupsListFilter.java
/** * * @param Quant_Central_Manager//from w ww. j a va 2 s. c o m */ public DiseaseGroupsListFilter(final QuantCentralManager Quant_Central_Manager) { this.Quant_Central_Manager = Quant_Central_Manager; this.setWidth("450px"); // this.Quant_Central_Manager.registerFilterListener(DiseaseGroupsListFilter.this); // this.updatePatientGroups(Quant_Central_Manager.getFilteredDatasetsList()); // String[] pgArr = merge(patGr1, patGr2); this.patientGroupIFilter = new ListSelectDatasetExplorerFilter(1, "Disease Group I", Quant_Central_Manager.getSelectedHeatMapRows()); initGroupsIFilter(); this.patientGroupIIFilter = new ListSelectDatasetExplorerFilter(2, "Disease Group II", Quant_Central_Manager.getSelectedHeatMapColumns()); initGroupsIIFilter(); diseaseGroupsSet = new LinkedHashSet<String>(); diseaseGroupsSet.addAll(Quant_Central_Manager.getSelectedHeatMapRows()); this.addComponent(patientGroupIIFilter); diseaseGroupsFilterBtn = new Button("Disease Groups"); diseaseGroupsFilterBtn.setStyleName(Reindeer.BUTTON_LINK); diseaseGroupsFilterBtn.addClickListener(DiseaseGroupsListFilter.this); VerticalLayout popupBody = new VerticalLayout(); VerticalLayout filtersConatinerLayout = new VerticalLayout(); filtersConatinerLayout.setSpacing(true); filtersConatinerLayout.setWidth("500px"); filtersConatinerLayout.setHeightUndefined(); popupBody.addComponent(filtersConatinerLayout); HorizontalLayout btnLayout = new HorizontalLayout(); popupBody.addComponent(btnLayout); btnLayout.setSpacing(true); btnLayout.setMargin(new MarginInfo(false, false, true, true)); Button applyFilters = new Button("Apply"); applyFilters.setDescription("Apply the selected filters"); applyFilters.setPrimaryStyleName("resetbtn"); applyFilters.setWidth("50px"); applyFilters.setHeight("24px"); btnLayout.addComponent(applyFilters); applyFilters.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { popupWindow.close(); } }); Button resetFiltersBtn = new Button("Reset"); resetFiltersBtn.setPrimaryStyleName("resetbtn"); btnLayout.addComponent(resetFiltersBtn); resetFiltersBtn.setWidth("50px"); resetFiltersBtn.setHeight("24px"); resetFiltersBtn.setDescription("Reset all applied filters"); resetFiltersBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { Quant_Central_Manager.resetFiltersListener(); } }); popupWindow = new Window() { @Override public void close() { if (updateManager) { updateSelectionManager(studiesIndexes); } popupWindow.setVisible(false); } }; popupWindow.setContent(popupBody); popupWindow.setWindowMode(WindowMode.NORMAL); popupWindow.setWidth((540) + "px"); popupWindow.setHeight((500) + "px"); popupWindow.setVisible(false); popupWindow.setResizable(false); popupWindow.setClosable(false); popupWindow.setStyleName(Reindeer.WINDOW_LIGHT); popupWindow.setModal(true); popupWindow.setDraggable(false); popupWindow.center(); popupWindow.setCaption( "<font color='gray' style='font-weight: bold;!important'> Disease Groups Comparisons</font>"); UI.getCurrent().addWindow(popupWindow); popupWindow.center(); popupWindow.setCaptionAsHtml(true); popupWindow.setClosable(true); this.setHeightUndefined(); filtersConatinerLayout.addComponent(DiseaseGroupsListFilter.this); filtersConatinerLayout.setComponentAlignment(DiseaseGroupsListFilter.this, Alignment.BOTTOM_CENTER); // Quant_Central_Manager.setSelectedHeatMapRows(selectedRows); // Quant_Central_Manager.setSelectedHeatMapColumns(selectedColumns); }
From source file:probe.com.view.body.quantdatasetsoverview.diseasegroupsfilters.PopupInteractiveDSFiltersLayout.java
/** * * @param interactivePieChartFiltersContainerLayout *///from www . j av a 2s . c o m public PopupInteractiveDSFiltersLayout( final StudiesPieChartFiltersContainerLayout interactivePieChartFiltersContainerLayout) { VerticalLayout datasetExplorerFiltersIcon = new VerticalLayout(); // datasetExplorerFiltersIcon.setWidth("45px"); // datasetExplorerFiltersIcon.setHeight("24px"); // Label btnTitle = new Label("Studies"); // datasetExplorerFiltersIcon.addComponent(btnTitle); datasetExplorerFiltersIcon.setStyleName("studyexplorer"); datasetExplorerFiltersIcon.setDescription("Dataset expolorer filter"); this.addComponent(datasetExplorerFiltersIcon); this.setComponentAlignment(datasetExplorerFiltersIcon, Alignment.BOTTOM_LEFT); datasetExplorerFiltersIcon.addLayoutClickListener(PopupInteractiveDSFiltersLayout.this); this.setHeightUndefined(); int height = Page.getCurrent().getBrowserWindowHeight() - 100; int width = Page.getCurrent().getBrowserWindowWidth() - 100; VerticalLayout popupBody = new VerticalLayout(); popupBody.setWidth((width) + "px"); popupBody.setHeightUndefined(); popupBody.setStyleName(Reindeer.LAYOUT_WHITE); this.interactivePieChartFiltersContainerLayout = interactivePieChartFiltersContainerLayout; popupWindow = new Window() { @Override public void close() { interactivePieChartFiltersContainerLayout.updateSelectionManager(true); popupWindow.setVisible(false); } }; popupWindow.setContent(popupBody); popupWindow.setWindowMode(WindowMode.NORMAL); popupWindow.setWidth((width + 40) + "px"); popupWindow.setHeight((height) + "px"); popupWindow.setVisible(false); popupWindow.setResizable(false); popupWindow.setClosable(false); popupWindow.setStyleName(Reindeer.WINDOW_LIGHT); popupWindow.setModal(true); popupWindow.setDraggable(false); popupWindow.center(); popupWindow.setCaption( "<font color='gray' style='font-weight: bold;!important'> Dataset Explorer Filters</font>"); UI.getCurrent().addWindow(popupWindow); popupWindow.setPositionX(30); popupWindow.setPositionY(40); popupWindow.setCaptionAsHtml(true); popupWindow.setClosable(true); popupBody.setMargin(true); popupBody.setSpacing(true); popupBody.addComponent(interactivePieChartFiltersContainerLayout); }
From source file:probe.com.view.body.quantdatasetsoverview.diseasegroupsfilters.PopupRecombineDiseaseGroups.java
private void initPopupLayout() { int h = 0;//(default_DiseaseCat_DiseaseGroupMap.size() * 33) + 300; for (Map<String, String> m : default_DiseaseCat_DiseaseGroupMap.values()) { if (h < m.size()) { h = m.size();/*from w w w. j a v a 2 s. c o m*/ } } h = (h * 26) + 200; int w = 700; if (Page.getCurrent().getBrowserWindowHeight() - 280 < h) { h = Page.getCurrent().getBrowserWindowHeight() - 280; } if (Page.getCurrent().getBrowserWindowWidth() < w) { w = Page.getCurrent().getBrowserWindowWidth(); } popupWindow.setWidth(w + "px"); popupWindow.setHeight(h + "px"); popupBodyLayout.setWidth((w - 50) + "px"); Set<String> diseaseSet = Quant_Central_Manager.getDiseaseCategorySet(); diseaseTypeSelectionList.setDescription("Select disease category"); for (String disease : diseaseSet) { diseaseTypeSelectionList.addItem(disease); diseaseTypeSelectionList.setItemCaption(disease, (disease)); } HorizontalLayout diseaseCategorySelectLayout = new HorizontalLayout(); diseaseCategorySelectLayout.setWidthUndefined(); diseaseCategorySelectLayout.setHeight("50px"); diseaseCategorySelectLayout.setSpacing(true); diseaseCategorySelectLayout.setMargin(true); popupBodyLayout.addComponent(diseaseCategorySelectLayout); popupBodyLayout.setComponentAlignment(diseaseCategorySelectLayout, Alignment.TOP_LEFT); Label title = new Label("Disease Category"); title.setStyleName(Reindeer.LABEL_SMALL); diseaseCategorySelectLayout.addComponent(title); diseaseCategorySelectLayout.setComponentAlignment(title, Alignment.BOTTOM_CENTER); diseaseTypeSelectionList.setWidth("200px"); diseaseTypeSelectionList.setNullSelectionAllowed(false); diseaseTypeSelectionList.setValue("All"); diseaseTypeSelectionList.setImmediate(true); diseaseCategorySelectLayout.addComponent(diseaseTypeSelectionList); diseaseCategorySelectLayout.setComponentAlignment(diseaseTypeSelectionList, Alignment.TOP_LEFT); diseaseTypeSelectionList.setStyleName("diseaseselectionlist"); diseaseTypeSelectionList.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { boolean showAll = false; String value = event.getProperty().getValue().toString(); if (value.equalsIgnoreCase("All")) { showAll = true; } for (String dName : diseaseGroupsGridLayoutMap.keySet()) { if (dName.equalsIgnoreCase(value) || showAll) { diseaseGroupsGridLayoutMap.get(dName).setVisible(true); } else { diseaseGroupsGridLayoutMap.get(dName).setVisible(false); } } } }); VerticalLayout diseaseGroupsNamesContainer = new VerticalLayout(); diseaseGroupsNamesContainer.setWidth("100%"); diseaseGroupsNamesContainer.setHeightUndefined(); popupBodyLayout.addComponent(diseaseGroupsNamesContainer); diseaseGroupsNamesContainer.setStyleName(Reindeer.LAYOUT_WHITE); GridLayout diseaseNamesHeader = new GridLayout(2, 1); diseaseNamesHeader.setWidth("100%"); diseaseNamesHeader.setHeightUndefined(); diseaseNamesHeader.setSpacing(true); diseaseNamesHeader.setMargin(new MarginInfo(true, false, true, false)); diseaseGroupsNamesContainer.addComponent(diseaseNamesHeader); Label col1Label = new Label("Group Name"); diseaseNamesHeader.addComponent(col1Label, 0, 0); col1Label.setStyleName(Reindeer.LABEL_SMALL); Label col2Label = new Label("Suggested Name"); diseaseNamesHeader.addComponent(col2Label, 1, 0); col2Label.setStyleName(Reindeer.LABEL_SMALL); Panel diseaseGroupsNamesFrame = new Panel(); diseaseGroupsNamesFrame.setWidth("100%"); diseaseGroupsNamesFrame.setHeight((h - 200) + "px"); diseaseGroupsNamesContainer.addComponent(diseaseGroupsNamesFrame); diseaseGroupsNamesFrame.setStyleName(Reindeer.PANEL_LIGHT); VerticalLayout diseaseNamesUpdateContainerLayout = new VerticalLayout(); for (String diseaseCategory : diseaseSet) { if (diseaseCategory.equalsIgnoreCase("All")) { continue; } HorizontalLayout diseaseNamesUpdateContainer = initDiseaseNamesUpdateContainer(diseaseCategory); diseaseNamesUpdateContainerLayout.addComponent(diseaseNamesUpdateContainer); diseaseGroupsGridLayoutMap.put(diseaseCategory, diseaseNamesUpdateContainer); } diseaseGroupsNamesFrame.setContent(diseaseNamesUpdateContainerLayout); HorizontalLayout btnLayout = new HorizontalLayout(); btnLayout.setMargin(true); btnLayout.setSpacing(true); Button resetFiltersBtn = new Button("Reset"); resetFiltersBtn.setPrimaryStyleName("resetbtn"); btnLayout.addComponent(resetFiltersBtn); resetFiltersBtn.setWidth("50px"); resetFiltersBtn.setHeight("24px"); resetFiltersBtn.setDescription("Reset group names to default"); resetFiltersBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { resetToDefault(); } }); Button resetToOriginalBtn = new Button("Publications Names"); resetToOriginalBtn.setPrimaryStyleName("resetbtn"); btnLayout.addComponent(resetToOriginalBtn); resetToOriginalBtn.setWidth("150px"); resetToOriginalBtn.setHeight("24px"); resetToOriginalBtn.setDescription("Reset group names to original publication names"); resetToOriginalBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { resetToPublicationsNames(); } }); Button applyFilters = new Button("Update"); applyFilters.setDescription("Update disease groups with the selected names"); applyFilters.setPrimaryStyleName("resetbtn"); applyFilters.setWidth("50px"); applyFilters.setHeight("24px"); btnLayout.addComponent(applyFilters); applyFilters.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { updateGroups(); } }); popupBodyLayout.addComponent(btnLayout); popupBodyLayout.setComponentAlignment(btnLayout, Alignment.MIDDLE_RIGHT); resetToDefault(); }
From source file:probe.com.view.body.welcomelayout.PublicationsInformationWindow.java
public PublicationsInformationWindow(List<Object[]> publicationList) { int height = Page.getCurrent().getBrowserWindowHeight() - 100; int width = Page.getCurrent().getBrowserWindowWidth() - 100; int columnNum = width / 250; width = columnNum * 250;/*from w ww .ja v a 2s. c o m*/ VerticalLayout popupBodyWrapper = new VerticalLayout(); popupBodyWrapper.setWidth("100%"); popupBodyWrapper.setHeight("100%"); VerticalLayout popupBody = new VerticalLayout(); popupBody.setWidth((width) + "px"); popupBody.setHeightUndefined(); popupBody.setStyleName(Reindeer.LAYOUT_WHITE); popupBody.setMargin(true); popupBody.setSpacing(true); popupBodyWrapper.addComponent(popupBody); popupBodyWrapper.setComponentAlignment(popupBody, Alignment.TOP_CENTER); popupWindow = new Window() { @Override public void close() { popupWindow.setVisible(false); } }; popupWindow.setContent(popupBodyWrapper); popupWindow.setWindowMode(WindowMode.NORMAL); popupWindow.setWidth((width + 22) + "px"); popupWindow.setVisible(false); popupWindow.setResizable(false); popupWindow.setClosable(false); popupWindow.setStyleName(Reindeer.WINDOW_LIGHT); popupWindow.setModal(true); popupWindow.setDraggable(false); popupWindow.setCaption( "<font color='gray' style='font-weight: bold;!important'> Publication Information</font>"); UI.getCurrent().addWindow(popupWindow); popupWindow.center(); popupWindow.setCaptionAsHtml(true); popupWindow.setClosable(true); GridLayout publicationContainer = new GridLayout(); publicationContainer.setWidth("100%"); publicationContainer.setSpacing(true); publicationContainer.setMargin(true); popupBody.addComponent(publicationContainer); publicationContainer.setColumns(columnNum); publicationContainer.setRows(publicationList.size()); this.addLayoutClickListener(PublicationsInformationWindow.this); int row = 0; int col = 0; for (Object[] obj : publicationList) { VerticalLayout publicationLayout = initPublicationLayout(obj); String btnName = "<font size=1 >" + obj[0].toString() + "</font><br/>" + obj[1].toString() + "<br/><font size=1 >" + obj[2].toString() + "</font><br/><font size=1 >#Proteins: " + obj[5].toString() /*+ "/" + obj[5].toString() + */ + " #Peptides: " + obj[7].toString() /*+ "/" + obj[7].toString() +*/ + "</font>"; PopupInfoBtn publicationBtn = new PopupInfoBtn(publicationLayout, btnName, obj[1].toString()); publicationContainer.addComponent(publicationBtn, col++, row); publicationContainer.setComponentAlignment(publicationBtn, Alignment.TOP_CENTER); if (col >= columnNum) { row++; col = 0; } } height = Math.min((++row * 85) + 200, height); popupWindow.setHeight((height) + "px"); }
From source file:probe.com.view.body.welcomelayout.PublicationsInformationWindow.java
private VerticalLayout initPublicationLayout(Object[] publicationData) { VerticalLayout publicationlayout = new VerticalLayout(); publicationlayout.setWidth("500px"); publicationlayout.setHeightUndefined(); publicationlayout.setSpacing(true);//from w ww. j a va2s . c o m publicationlayout.setMargin(new MarginInfo(false, false, false, false)); publicationlayout.setStyleName("publicationstyle"); Label pubmedIdLabel = new Label( "<h5>Pubmed Id: <a href='http://www.ncbi.nlm.nih.gov/pubmed/" + publicationData[0].toString() + "' target='_blank' ><font style:'text-decoration:underline !important;'>" + publicationData[0].toString() + "</font></a></h5>"); pubmedIdLabel.setContentMode(ContentMode.HTML); publicationlayout.addComponent(pubmedIdLabel); pubmedIdLabel.setHeight("40px"); Label proteinsNumLabel = new Label("<h5>#Proteins: " + publicationData[5].toString() + "</h5>"); proteinsNumLabel.setDescription("Number of publication proteins " + publicationData[4].toString()); proteinsNumLabel.setContentMode(ContentMode.HTML); publicationlayout.addComponent(proteinsNumLabel); proteinsNumLabel.setHeight("40px"); Label uproteinsNumLabel = new Label( "<h5>#Publication Specific Proteins: " + publicationData[4].toString() + "</h5>"); uproteinsNumLabel .setDescription("Number of publication specific proteins " + publicationData[4].toString()); uproteinsNumLabel.setContentMode(ContentMode.HTML); publicationlayout.addComponent(uproteinsNumLabel); uproteinsNumLabel.setHeight("40px"); Label PeptidesNumLabel = new Label("<h5>#Peptides: " + publicationData[7].toString() + "</h5>"); PeptidesNumLabel.setContentMode(ContentMode.HTML); publicationlayout.addComponent(PeptidesNumLabel); PeptidesNumLabel.setDescription("Number of publication peptides " + publicationData[7].toString()); PeptidesNumLabel.setHeight("40px"); Label uPeptidesNumLabel = new Label( "<h5>#Publication Specific Peptides: " + publicationData[6].toString() + "</h5>"); uPeptidesNumLabel.setContentMode(ContentMode.HTML); publicationlayout.addComponent(uPeptidesNumLabel); uPeptidesNumLabel .setDescription("Number of publication specific peptides " + publicationData[6].toString()); uPeptidesNumLabel.setHeight("40px"); Label titleLabel = new Label( "<textarea rows='5' cols='52' readonly >" + publicationData[3].toString() + "</textarea>"); titleLabel.setContentMode(ContentMode.HTML); publicationlayout.addComponent(titleLabel); titleLabel.setHeight("100px"); return publicationlayout; }
From source file:probe.com.view.body.welcomelayout.StudiesInformationWindow.java
public StudiesInformationWindow(Set<QuantDatasetObject> dsObjects, Map<String, String> diseaseHashedColorMap) { int height = Page.getCurrent().getBrowserWindowHeight() - 100; int width = Page.getCurrent().getBrowserWindowWidth() - 100; VerticalLayout popupBody = new VerticalLayout(); popupBody.setWidth((width - 20) + "px"); popupBody.setHeightUndefined(); popupBody.setStyleName(Reindeer.LAYOUT_WHITE); popupBody.setMargin(true);//from w ww . j a va 2 s . co m popupBody.setSpacing(true); popupWindow = new Window() { @Override public void close() { popupWindow.setVisible(false); } }; popupWindow.setContent(popupBody); popupWindow.setWindowMode(WindowMode.NORMAL); popupWindow.setWidth((width) + "px"); popupWindow.setHeight((height) + "px"); popupWindow.setVisible(false); popupWindow.setResizable(false); popupWindow.setClosable(false); popupWindow.setStyleName(Reindeer.WINDOW_LIGHT); popupWindow.setModal(true); popupWindow.setDraggable(false); popupWindow.center(); popupWindow.setCaption( "<font color='gray' style='font-weight: bold;!important'> Datasets Information</font>"); UI.getCurrent().addWindow(popupWindow); popupWindow.center(); popupWindow.setCaptionAsHtml(true); popupWindow.setClosable(true); this.addLayoutClickListener(StudiesInformationWindow.this); Map<Integer, DatasetInformationOverviewLayout> datasetInfoLayoutDSIndexMap = new HashMap<Integer, DatasetInformationOverviewLayout>(); for (QuantDatasetObject quantDs : dsObjects) { DatasetInformationOverviewLayout datasetInfoLayout = new DatasetInformationOverviewLayout(width - 40, diseaseHashedColorMap); datasetInfoLayout.updateDatasetForm(quantDs); // datasetInfoLayout.setWidth(width-40+"px"); datasetInfoLayoutDSIndexMap.put(quantDs.getDsKey(), datasetInfoLayout); } StudyPopupLayout studiesPopupLayout = new StudyPopupLayout(datasetInfoLayoutDSIndexMap); popupBody.addComponent(studiesPopupLayout); popupBody.setComponentAlignment(studiesPopupLayout, Alignment.TOP_CENTER); studiesPopupLayout.setInformationData(dsObjects); }
From source file:probe.com.view.core.PopupInfoBtn.java
private VerticalLayout initPopupLayout(VerticalLayout popupLayout, String header) { VerticalLayout popupBodyWrapper = new VerticalLayout(); popupBodyWrapper.setWidth("100%"); popupBodyWrapper.setHeight("100%"); VerticalLayout popupBodyLayout = new VerticalLayout(); popupBodyLayout.setWidth((popupLayout.getWidth() + 2) + "px"); popupBodyLayout.setHeightUndefined(); popupBodyLayout.setStyleName("pupupbody"); popupBodyLayout.setSpacing(true);/*from w w w . j a v a 2s . c o m*/ HorizontalLayout titleLayout = new HorizontalLayout(); titleLayout.setWidthUndefined(); titleLayout.setHeight("40px"); popupBodyLayout.addComponent(titleLayout); popupBodyLayout.addLayoutClickListener(this); Label label = new Label("<b>" + header + "</b>"); label.setStyleName("comparisonHeaders"); label.setContentMode(ContentMode.HTML); label.setWidth((popupLayout.getWidth() - 17) + "px"); titleLayout.addComponent(label); VerticalLayout closeBtn = new VerticalLayout(); closeBtn.setWidth("16px"); closeBtn.setHeight("16px"); closeBtn.setStyleName("closepanelbtn"); closeBtn.addLayoutClickListener(this); titleLayout.addComponent(closeBtn); titleLayout.setComponentAlignment(closeBtn, Alignment.TOP_RIGHT); popupLayout.setMargin(true); popupLayout.setSpacing(true); popupBodyLayout.addComponent(popupLayout); popupBodyWrapper.addComponent(popupBodyLayout); popupBodyWrapper.setComponentAlignment(popupBodyLayout, Alignment.MIDDLE_CENTER); return popupBodyWrapper; }