Java Code Examples for com.vaadin.ui.HorizontalLayout#setSizeFull()
The following examples show how to use
com.vaadin.ui.HorizontalLayout#setSizeFull() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TargetBulkUpdateWindowLayout.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
private void buildLayout() { mainLayout = new VerticalLayout(); mainLayout.setSpacing(Boolean.TRUE); mainLayout.setSizeUndefined(); mainLayout.setWidth("200px"); final HorizontalLayout captionLayout = new HorizontalLayout(); captionLayout.setSizeFull(); captionLayout.addComponents(windowCaption, minimizeButton, closeButton); captionLayout.setExpandRatio(windowCaption, 1.0F); captionLayout.addStyleName("v-window-header"); final HorizontalLayout uploaderLayout = new HorizontalLayout(); uploaderLayout.addComponent(bulkUploader); uploaderLayout.addComponent(linkToSystemConfigHelp); uploaderLayout.setComponentAlignment(linkToSystemConfigHelp, Alignment.BOTTOM_RIGHT); uploaderLayout.setExpandRatio(bulkUploader, 1.0F); uploaderLayout.setSizeFull(); mainLayout.addComponents(captionLayout, dsNamecomboBox, descTextArea, tokenVerticalLayout, descTextArea, progressBar, targetsCountLabel, uploaderLayout); }
Example 2
Source File: TargetDetails.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
private void updateAttributesLayout(final String controllerId) { final VerticalLayout attributesWrapperLayout = getAttributesLayout(); attributesWrapperLayout.removeAllComponents(); if (controllerId == null) { return; } final Map<String, String> attributes = targetManagement.getControllerAttributes(controllerId); final HorizontalLayout attributesRequestLayout = new HorizontalLayout(); attributesRequestLayout.setSizeFull(); final VerticalLayout attributesLayout = new VerticalLayout(); updateAttributesLabelsList(attributesLayout, attributes); updateAttributesUpdateComponents(attributesRequestLayout, attributesLayout, controllerId); attributesWrapperLayout.addComponent(attributesRequestLayout); }
Example 3
Source File: TargetFilterHeader.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private static HorizontalLayout createHeaderFilterIconLayout() { final HorizontalLayout titleFilterIconsLayout = new HorizontalLayout(); titleFilterIconsLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE); titleFilterIconsLayout.setSpacing(false); titleFilterIconsLayout.setMargin(false); titleFilterIconsLayout.setSizeFull(); return titleFilterIconsLayout; }
Example 4
Source File: UploadProgressInfoWindow.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private HorizontalLayout getCaptionLayout() { final HorizontalLayout captionLayout = new HorizontalLayout(); captionLayout.setSizeFull(); captionLayout.setHeight("36px"); captionLayout.addComponents(windowCaption, closeButton); captionLayout.setExpandRatio(windowCaption, 1.0F); captionLayout.addStyleName("v-window-header"); return captionLayout; }
Example 5
Source File: CreateOrUpdateFilterHeader.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private void buildLayout() { captionLayout = new HorizontalLayout(); captionLayout.setDescription(i18n.getMessage("tooltip.click.to.edit")); captionLayout.setId(UIComponentIdProvider.TARGET_FILTER_QUERY_NAME_LAYOUT_ID); titleFilterIconsLayout = new HorizontalLayout(); titleFilterIconsLayout.addComponents(headerCaption, captionLayout); titleFilterIconsLayout.setSpacing(true); final HorizontalLayout breadcrumbLayout = new HorizontalLayout(); breadcrumbLayout.addComponent(breadcrumbButton); breadcrumbLayout.addComponent(new Label(">")); breadcrumbName = new LabelBuilder().buildCaptionLabel(); breadcrumbLayout.addComponent(breadcrumbName); breadcrumbName.addStyleName("breadcrumbPaddingLeft"); final HorizontalLayout titleFilterLayout = new HorizontalLayout(); titleFilterLayout.setSizeFull(); titleFilterLayout.addComponents(titleFilterIconsLayout, closeIcon); titleFilterLayout.setExpandRatio(titleFilterIconsLayout, 1.0F); titleFilterLayout.setComponentAlignment(titleFilterIconsLayout, Alignment.TOP_LEFT); titleFilterLayout.setComponentAlignment(closeIcon, Alignment.TOP_RIGHT); final HorizontalLayout iconLayout = new HorizontalLayout(); iconLayout.setSizeUndefined(); iconLayout.setSpacing(false); iconLayout.addComponents(helpLink, searchIcon, saveButton); final HorizontalLayout queryLayout = new HorizontalLayout(); queryLayout.setSizeUndefined(); queryLayout.setSpacing(true); queryLayout.addComponents(queryTextField, iconLayout); addComponent(breadcrumbLayout); addComponent(titleFilterLayout); addComponent(queryLayout); setSpacing(true); addStyleName(SPUIStyleDefinitions.WIDGET_TITLE); addStyleName("bordered-layout"); }
Example 6
Source File: DistributionSetDetails.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private static VerticalLayout createSoftwareModuleLayout(final String softwareModuleName) { final VerticalLayout verticalLayout = new VerticalLayout(); final HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setSizeFull(); final Label softwareModule = HawkbitCommonUtil.getFormatedLabel(""); softwareModule.setValue(softwareModuleName); softwareModule.setDescription(softwareModuleName); softwareModule.setId(softwareModuleName + "-label"); horizontalLayout.addComponent(softwareModule); horizontalLayout.setExpandRatio(softwareModule, 1F); verticalLayout.addComponent(horizontalLayout); return verticalLayout; }
Example 7
Source File: SoftwareModuleDetailsTable.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private VerticalLayout createSoftModuleLayout(final SoftwareModuleType swModType, final DistributionSet distributionSet, final Set<SoftwareModule> alreadyAssignedSwModules) { final VerticalLayout verticalLayout = new VerticalLayout(); for (final SoftwareModule sw : alreadyAssignedSwModules) { if (swModType.getKey().equals(sw.getType().getKey())) { final HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setSizeFull(); final Label softwareModule = HawkbitCommonUtil.getFormatedLabel(""); final Button reassignSoftModule = SPUIComponentProvider.getButton(sw.getName(), "", "", "", true, FontAwesome.TIMES, SPUIButtonStyleNoBorder.class); reassignSoftModule .addClickListener(event -> unassignSW(event, distributionSet, alreadyAssignedSwModules)); final String softwareModNameVersion = HawkbitCommonUtil.getFormattedNameVersion(sw.getName(), sw.getVersion()); softwareModule.setValue(softwareModNameVersion); softwareModule.setDescription(softwareModNameVersion); softwareModule.setId(sw.getName() + "-label"); horizontalLayout.addComponent(softwareModule); horizontalLayout.setExpandRatio(softwareModule, 1F); if (isUnassignSoftModAllowed && permissionChecker.hasUpdateRepositoryPermission() && !isTargetAssigned && (isSoftModAvaiableForSoftType(alreadyAssignedSwModules, swModType))) { horizontalLayout.addComponent(reassignSoftModule); } verticalLayout.addComponent(horizontalLayout); } } return verticalLayout; }
Example 8
Source File: CommonDialogWindow.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private HorizontalLayout createActionButtonsLayout() { buttonsLayout = new HorizontalLayout(); buttonsLayout.setSizeFull(); buttonsLayout.setSpacing(true); buttonsLayout.setSpacing(true); buttonsLayout.addStyleName("actionButtonsMargin"); createSaveButton(); createCancelButton(); addHelpLink(); return buttonsLayout; }
Example 9
Source File: ChipsterAdminUI.java From chipster with MIT License | 5 votes |
private void buildMainLayout() { this.getPage().setTitle("Chipster admin"); horizontalSplit = new HorizontalLayout(); horizontalSplit.setSizeFull(); setContent(horizontalSplit); horizontalSplit.setHeight(100, Unit.PERCENTAGE); showEmtpyView(); }
Example 10
Source File: CommitteeRankingCurrentCommitteePartiesChartsPageModContentFactoryImpl.java From cia with Apache License 2.0 | 4 votes |
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getCommitteeRankingMenuItemFactory().createCommitteeeRankingMenuBar(menuBar); final String pageId = getPageId(parameters); final HorizontalLayout chartLayout = new HorizontalLayout(); chartLayout.setSizeFull(); chartDataManager.createChartPanel(chartLayout, dataSeriesFactory2.createChartTimeSeriesCurrentCommitteeByParty(), CURRENT_PARTIES_BY_DAYS_SERVED); panelContent.addComponent(chartLayout); panel.setCaption(NAME + "::" + CHARTS + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 11
Source File: DataSummaryOverviewPageModContentFactoryImpl.java From cia with Apache License 2.0 | 4 votes |
@Secured({ "ROLE_ADMIN" }) @Override public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout content = createPanelContent(); getMenuItemFactory().createMainPageMenuBar(menuBar); LabelFactory.createHeader2Label(content, ADMIN_DATA_SUMMARY); final HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setSizeFull(); content.addComponent(horizontalLayout); content.setExpandRatio(horizontalLayout, ContentRatio.LARGE); final DataContainer<ViewAuditDataSummary, Long> dataContainer = getApplicationManager() .getDataContainer(ViewAuditDataSummary.class); getGridFactory().createBasicBeanItemNestedPropertiesGrid(horizontalLayout, ViewAuditDataSummary.class, dataContainer.getAll(), ADMIN_DATA_SUMMARY, null, COLUMN_ORDER, HIDE_COLUMNS, null, null, null); final VerticalLayout overviewLayout = new VerticalLayout(); overviewLayout.setSizeFull(); content.addComponent(overviewLayout); content.setExpandRatio(overviewLayout, ContentRatio.LARGE); final ResponsiveRow grid = RowUtil.createGridLayout(overviewLayout); final RefreshDataViewsRequest refreshRequest = new RefreshDataViewsRequest(); refreshRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId()); final Button refreshViewsButton = new Button(REFRESH_VIEWS, VaadinIcons.REFRESH); refreshViewsButton.addClickListener(new RefreshDataViewsClickListener(refreshRequest)); RowUtil.createRowItem(grid, refreshViewsButton, REFRESH_ALL_VIEWS); final Button updateSearchIndexButton = new Button(UPDATE_SEARCH_INDEX, VaadinIcons.REFRESH); final UpdateSearchIndexRequest updateIndexRequest = new UpdateSearchIndexRequest(); updateIndexRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId()); updateSearchIndexButton.addClickListener(new UpdateSearchIndexClickListener(updateIndexRequest)); RowUtil.createRowItem(grid, updateSearchIndexButton, UPDATE_DOCUMENT_SEARCH_INDEX); final Button removeDataButton = new Button(REMOVE_POLITICIANS, VaadinIcons.DEL); final RemoveDataRequest removePoliticianRequest = new RemoveDataRequest(); removePoliticianRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId()); removePoliticianRequest.setDataType(RemoveDataRequest.DataType.POLITICIAN); removeDataButton.addClickListener(new RemoveDataClickListener(removePoliticianRequest)); RowUtil.createRowItem(grid, removeDataButton, REMOVE_POLITICIANS); final RemoveDataRequest removeDocumentsRequest = new RemoveDataRequest(); removeDocumentsRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId()); removeDocumentsRequest.setDataType(RemoveDataRequest.DataType.DOCUMENTS); final Button removeDocumentsButton = new Button(REMOVE_DOCUMENTS, VaadinIcons.DEL); removeDocumentsButton.addClickListener(new RemoveDataClickListener(removeDocumentsRequest)); RowUtil.createRowItem(grid, removeDocumentsButton, REMOVE_DOCUMENTS); final RemoveDataRequest removeApplicationHistoryRequest = new RemoveDataRequest(); removeApplicationHistoryRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId()); removeApplicationHistoryRequest.setDataType(RemoveDataRequest.DataType.APPLICATION_HISTORY); final Button removeApplicationHistoryButton = new Button(REMOVE_APPLICATION_HISTORY, VaadinIcons.DEL); removeApplicationHistoryButton.addClickListener(new RemoveDataClickListener(removeApplicationHistoryRequest)); RowUtil.createRowItem(grid, removeApplicationHistoryButton, REMOVE_APPLICATION_HISTORY); return content; }
Example 12
Source File: CommitteeRankingCommitteeByPartyChartsPageModContentFactoryImpl.java From cia with Apache License 2.0 | 4 votes |
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getCommitteeRankingMenuItemFactory().createCommitteeeRankingMenuBar(menuBar); final String pageId = getPageId(parameters); final HorizontalLayout chartLayout = new HorizontalLayout(); chartLayout.setSizeFull(); chartDataManager.createChartPanel(chartLayout, dataSeriesFactory.createChartTimeSeriesTotalDaysServedCommitteeByParty(), ALL_PARTIES_TOTAL_DAYS_SERVED); panelContent.addComponent(chartLayout); panel.setCaption(NAME + "::" + CHARTS + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 13
Source File: MinistryRankingAllPartiesChartsPageModContentFactoryImpl.java From cia with Apache License 2.0 | 4 votes |
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getMinistryRankingMenuItemFactory().createMinistryRankingMenuBar(menuBar); final String pageId = getPageId(parameters); final HorizontalLayout chartLayout = new HorizontalLayout(); chartLayout.setSizeFull(); chartDataManager.createChartPanel(chartLayout, dataSeriesFactory.createChartTimeSeriesTotalDaysServedGovernmentByParty(), "All Parties, total days served"); panelContent.addComponent(chartLayout); panel.setCaption(NAME + "::" + CHARTS + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 14
Source File: MinistryRankingCurrentPartiesChartsPageModContentFactoryImpl.java From cia with Apache License 2.0 | 4 votes |
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getMinistryRankingMenuItemFactory().createMinistryRankingMenuBar(menuBar); final String pageId = getPageId(parameters); final HorizontalLayout chartLayout = new HorizontalLayout(); chartLayout.setSizeFull(); chartDataManager.createChartPanel(chartLayout, dataSeriesFactory.createChartTimeSeriesCurrentGovernmentByParty(), "Current Parties, headcount"); panelContent.addComponent(chartLayout); panel.setCaption(NAME + "::" + CHARTS + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 15
Source File: PartyRankingCurrentCommitteeChartsPageModContentFactoryImpl.java From cia with Apache License 2.0 | 4 votes |
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); final String pageId = getPageId(parameters); getPartyRankingMenuItemFactory().createPartyRankingMenuBar(menuBar); final HorizontalLayout chartLayout = new HorizontalLayout(); chartLayout.setSizeFull(); chartDataManager.createChartPanel(chartLayout,dataSeriesFactory.createChartTimeSeriesCurrentCommitteeByParty(),"Current Committee"); panelContent.addComponent(chartLayout); panel.setCaption(NAME + "::" + CHARTS + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_PARTY_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 16
Source File: CommitteeRankingAllCommitteesChartsPageModContentFactoryImpl.java From cia with Apache License 2.0 | 4 votes |
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getCommitteeRankingMenuItemFactory().createCommitteeeRankingMenuBar(menuBar); final String pageId = getPageId(parameters); final HorizontalLayout chartLayout = new HorizontalLayout(); chartLayout.setSizeFull(); chartDataManager.createChartPanel(chartLayout, dataSeriesFactory.createCommitteeChartTimeSeriesAll(), "All"); panelContent.addComponent(chartLayout); panel.setCaption(NAME + "::" + CHARTS + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 17
Source File: MinistryRankingCurrentMinistriesChartsPageModContentFactoryImpl.java From cia with Apache License 2.0 | 4 votes |
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getMinistryRankingMenuItemFactory().createMinistryRankingMenuBar(menuBar); final String pageId = getPageId(parameters); final HorizontalLayout chartLayout = new HorizontalLayout(); chartLayout.setSizeFull(); chartDataManager.createChartPanel(chartLayout,dataSeriesFactory.createMinistryChartTimeSeriesCurrent(), "Current Ministies, by headcount"); panelContent.addComponent(chartLayout); panel.setCaption(NAME + "::" + CHARTS + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 18
Source File: LayoutUsageExample.java From viritin with Apache License 2.0 | 4 votes |
public void layoutCodeExample() { VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.setMargin(true); verticalLayout.setSpacing(true); verticalLayout.setHeight("100%"); HorizontalLayout horizontalLayout = new HorizontalLayout(c, d); horizontalLayout.setWidth("100%"); horizontalLayout.setMargin(false); horizontalLayout.setSpacing(true); verticalLayout.addComponents(a, b, horizontalLayout); setContent(verticalLayout); // Is same as setContent(new MVerticalLayout().withFullHeight().with(a, b, new MHorizontalLayout(c, d).withFullWidth().withMargin(false))); // Or ... VerticalLayout wrapper = new VerticalLayout(); wrapper.setMargin(true); wrapper.setSpacing(true); wrapper.setHeight("100%"); HorizontalLayout toolbar = new HorizontalLayout(c, d); toolbar.setWidth("100%"); toolbar.setMargin(false); toolbar.setSpacing(true); HorizontalLayout wrapper2 = new HorizontalLayout(); wrapper2.addComponent(menu); wrapper2.addComponent(mainContent); wrapper2.setSizeFull(); mainContent.setSizeFull(); wrapper2.setExpandRatio(mainContent, 1); wrapper.addComponents(toolbar, wrapper2); wrapper.setExpandRatio(wrapper2, 1); setContent(wrapper); // Is same as: setContent( new MVerticalLayout(new MHorizontalLayout(c, d).withFullWidth()) .expand( new MHorizontalLayout(menu) .expand(mainContent) ) ); // the expand call takes care of adding component and setting sane // values for layout and the added component }
Example 19
Source File: ArtifactDetailsLayout.java From hawkbit with Eclipse Public License 1.0 | 4 votes |
private void createComponents() { prefixTitleOfArtifactDetails = new Label(); prefixTitleOfArtifactDetails.addStyleName(ValoTheme.LABEL_SMALL); prefixTitleOfArtifactDetails.addStyleName(ValoTheme.LABEL_BOLD); prefixTitleOfArtifactDetails.setSizeUndefined(); titleOfArtifactDetails = new Label(); titleOfArtifactDetails.setId(UIComponentIdProvider.ARTIFACT_DETAILS_HEADER_LABEL_ID); titleOfArtifactDetails.setSizeFull(); titleOfArtifactDetails.setImmediate(true); titleOfArtifactDetails.setWidth("100%"); titleOfArtifactDetails.addStyleName(ValoTheme.LABEL_SMALL); titleOfArtifactDetails.addStyleName("text-bold"); titleOfArtifactDetails.addStyleName("text-cut"); titleOfArtifactDetails.addStyleName("header-caption-right"); headerCaptionLayout = new HorizontalLayout(); headerCaptionLayout.setMargin(false); headerCaptionLayout.setSpacing(true); headerCaptionLayout.setSizeFull(); headerCaptionLayout.addStyleName("header-caption"); headerCaptionLayout.addComponent(prefixTitleOfArtifactDetails); headerCaptionLayout.setComponentAlignment(prefixTitleOfArtifactDetails, Alignment.TOP_LEFT); headerCaptionLayout.setExpandRatio(prefixTitleOfArtifactDetails, 0.0F); headerCaptionLayout.addComponent(titleOfArtifactDetails); headerCaptionLayout.setComponentAlignment(titleOfArtifactDetails, Alignment.TOP_LEFT); headerCaptionLayout.setExpandRatio(titleOfArtifactDetails, 1.0F); maxMinButton = createMaxMinButton(); artifactDetailsTable = createArtifactDetailsTable(); artifactDetailsTable.setContainerDataSource(createArtifactLazyQueryContainer()); addGeneratedColumn(artifactDetailsTable); if (!readOnly) { addGeneratedColumnButton(artifactDetailsTable); } setTableColumnDetails(artifactDetailsTable); }
Example 20
Source File: PoliticianOverviewPageModContentFactoryImpl.java From cia with Apache License 2.0 | 3 votes |
/** * Creates the overview content. * * @param panelContent the panel content * @param personData the person data * @param viewRiksdagenPolitician the view riksdagen politician * @param pageId the page id */ private void createOverviewContent(final VerticalLayout panelContent, final PersonData personData, final ViewRiksdagenPolitician viewRiksdagenPolitician, final String pageId) { LabelFactory.createHeader2Label(panelContent, OVERVIEW); final Link createPoliticianPageLink = getPageLinkFactory().createPoliticianPageLink(personData); panelContent.addComponent(createPoliticianPageLink); final Image image = new Image("", new ExternalResource(personData.getImageUrl192().replace("http://", "https://"))); final HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setSizeFull(); panelContent.addComponent(horizontalLayout); horizontalLayout.addComponent(image); getFormFactory().addFormPanelTextFields(horizontalLayout, viewRiksdagenPolitician, ViewRiksdagenPolitician.class, AS_LIST); final VerticalLayout overviewLayout = new VerticalLayout(); overviewLayout.setSizeFull(); panelContent.addComponent(overviewLayout); panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM); getPoliticianMenuItemFactory().createOverviewPage(overviewLayout, pageId); panelContent.setExpandRatio(createPoliticianPageLink, ContentRatio.SMALL); panelContent.setExpandRatio(horizontalLayout, ContentRatio.GRID); }