Java Code Examples for com.vaadin.ui.HorizontalLayout#addComponent()
The following examples show how to use
com.vaadin.ui.HorizontalLayout#addComponent() .
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: TargetDetails.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
private HorizontalLayout getSecurityTokenLayout(final String securityToken) { final HorizontalLayout securityTokenLayout = new HorizontalLayout(); final Label securityTableLbl = new Label( SPUIComponentProvider.getBoldHTMLText(getI18n().getMessage("label.target.security.token")), ContentMode.HTML); securityTableLbl.addStyleName(SPUIDefinitions.TEXT_STYLE); securityTableLbl.addStyleName("label-style"); final TextField securityTokentxt = new TextField(); securityTokentxt.addStyleName(ValoTheme.TEXTFIELD_BORDERLESS); securityTokentxt.addStyleName(ValoTheme.TEXTFIELD_TINY); securityTokentxt.addStyleName("targetDtls-securityToken"); securityTokentxt.addStyleName(SPUIDefinitions.TEXT_STYLE); securityTokentxt.setCaption(null); securityTokentxt.setNullRepresentation(""); securityTokentxt.setValue(securityToken); securityTokentxt.setReadOnly(true); securityTokenLayout.addComponent(securityTableLbl); securityTokenLayout.addComponent(securityTokentxt); return securityTokenLayout; }
Example 2
Source File: AbstractGridHeader.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
private void buildLayout() { final HorizontalLayout titleFilterIconsLayout = createHeaderFilterIconLayout(); titleFilterIconsLayout.addComponents(headerCaptionLayout); if (isAllowSearch() && isRollout()) { titleFilterIconsLayout.addComponents(searchField, searchResetIcon); titleFilterIconsLayout.setExpandRatio(headerCaptionLayout, 0.3F); titleFilterIconsLayout.setExpandRatio(searchField, 0.7F); } if (hasCreatePermission() && isRollout()) { titleFilterIconsLayout.addComponent(addButton); titleFilterIconsLayout.setComponentAlignment(addButton, Alignment.TOP_LEFT); } if (showCloseButton()) { titleFilterIconsLayout.addComponent(closeButton); titleFilterIconsLayout.setComponentAlignment(closeButton, Alignment.TOP_RIGHT); } titleFilterIconsLayout.setHeight("40px"); addComponent(titleFilterIconsLayout); addStyleName("bordered-layout"); addStyleName("no-border-bottom"); }
Example 3
Source File: FormDialog.java From jdal with Apache License 2.0 | 6 votes |
public void init() { setContent(form); getContent().setSizeUndefined(); center(); acceptButtonListener = new AcceptButtonListener(); cancelButtonListener = new CancelButtonListener(); HorizontalLayout buttonLayout = new HorizontalLayout(); Button acceptButton = FormUtils.newButton(acceptButtonListener); Button cancelButton = FormUtils.newButton(cancelButtonListener); buttonLayout.setSpacing(true); buttonLayout.addComponent(acceptButton); buttonLayout.addComponent(cancelButton); HorizontalLayout footer = new HorizontalLayout(); footer.addComponent(buttonLayout); footer.setSizeFull(); footer.setComponentAlignment(buttonLayout, Alignment.TOP_CENTER); form.setFooter(footer); form.setSizeFull(); form.getLayout().setSizeFull(); }
Example 4
Source File: FormUtils.java From jdal with Apache License 2.0 | 5 votes |
/** * Add a default commit/discard buttons to a form * @param f the Form */ public static void addOKCancelButtons(Form f) { Button ok = newOKButton(f); Button cancel = newCancelButton(f); HorizontalLayout hl = new HorizontalLayout(); hl.setSpacing(true); hl.addComponent(ok); hl.addComponent(cancel); HorizontalLayout footer = new HorizontalLayout(); footer.setWidth("100%"); footer.addComponent(hl); footer.setComponentAlignment(hl, Alignment.TOP_CENTER); f.setFooter(footer); }
Example 5
Source File: ServerDescDetail.java From primecloud-controller with GNU General Public License v2.0 | 5 votes |
@Override public void attach() { setHeight("100%"); addStyleName(Reindeer.PANEL_LIGHT); VerticalLayout panel = (VerticalLayout) getContent(); panel.setWidth("100%"); panel.setHeight("100%"); panel.setMargin(true); panel.setSpacing(false); panel.addStyleName("server-desc-detail"); HorizontalLayout layout = new HorizontalLayout(); layout.setWidth("100%"); layout.setHeight("100%"); layout.setMargin(true); layout.setSpacing(true); layout.addStyleName("server-desc-detail"); left = new DetailInfo(); left.setWidth("200px"); layout.addComponent(left); right = new DetailParameters(); right.setWidth("100%"); right.setHeight("100%"); layout.addComponent(right); layout.setExpandRatio(right, 100); panel.addComponent(layout); panel.setExpandRatio(layout, 1.0f); }
Example 6
Source File: TimeLogComp.java From mycollab with GNU Affero General Public License v3.0 | 5 votes |
protected TimeLogComp() { this.itemTimeLoggingService = AppContextUtil.getSpringBean(ItemTimeLoggingService.class); this.withMargin(false); HorizontalLayout header = new MHorizontalLayout().withStyleName("info-hdr"); header.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); ELabel dateInfoHeader = ELabel.html(VaadinIcons.CLOCK.getHtml() + " " + UserUIContext.getMessage(TimeTrackingI18nEnum.SUB_INFO_TIME)); header.addComponent(dateInfoHeader); if (hasEditPermission()) { MButton editBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_EDIT), clickEvent -> showEditTimeWindow(beanItem)).withStyleName(WebThemes.BUTTON_LINK); header.addComponent(editBtn); } header.addComponent(ELabel.fontIcon(VaadinIcons.QUESTION_CIRCLE).withDescription(UserUIContext.getMessage (TimeTrackingI18nEnum.TIME_EXPLAIN_HELP)).withStyleName(WebThemes.INLINE_HELP)); this.addComponent(header); layout = new GridLayout(2, 3); layout.setSpacing(true); layout.setWidth("100%"); layout.setMargin(new MarginInfo(false, false, false, true)); layout.setColumnExpandRatio(1, 1.0f); this.addComponent(layout); }
Example 7
Source File: AbstractHawkbitUI.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private HorizontalLayout buildViewTitle() { final HorizontalLayout viewHeadercontent = new HorizontalLayout(); viewHeadercontent.setWidth("100%"); viewHeadercontent.addStyleName("view-header-layout"); viewTitle = new Label(); viewTitle.setWidth("100%"); viewTitle.setStyleName("header-content"); viewHeadercontent.addComponent(viewTitle); viewHeadercontent.addComponent(notificationUnreadButton); viewHeadercontent.setComponentAlignment(notificationUnreadButton, Alignment.MIDDLE_RIGHT); return viewHeadercontent; }
Example 8
Source File: SPUIComponentProvider.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
/** * Method to CreateName value labels. * * @param label * as string * @param values * as string * @return HorizontalLayout */ public static HorizontalLayout createNameValueLayout(final String label, final String... values) { final String valueStr = StringUtils.arrayToDelimitedString(values, " "); final Label nameValueLabel = new Label( label ); nameValueLabel.setContentMode(ContentMode.TEXT); nameValueLabel.addStyleName(SPUIDefinitions.TEXT_STYLE); nameValueLabel.addStyleName("text-bold"); nameValueLabel.setSizeUndefined(); final Label valueStrLabel = new Label(valueStr); valueStrLabel.setWidth("100%"); valueStrLabel.addStyleName("text-cut"); valueStrLabel.addStyleName(SPUIDefinitions.TEXT_STYLE); valueStrLabel.addStyleName(LABEL_STYLE); final HorizontalLayout nameValueLayout = new HorizontalLayout(); nameValueLayout.setMargin(false); nameValueLayout.setSpacing(true); nameValueLayout.setSizeFull(); nameValueLayout.addComponent(nameValueLabel); nameValueLayout.setComponentAlignment(nameValueLabel, Alignment.TOP_LEFT); nameValueLayout.setExpandRatio(nameValueLabel, 0.0F); nameValueLayout.addComponent(valueStrLabel); nameValueLayout.setComponentAlignment(valueStrLabel, Alignment.TOP_LEFT); nameValueLayout.setExpandRatio(valueStrLabel, 1.0F); return nameValueLayout; }
Example 9
Source File: DefaultGridHeader.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
/** * Builds the title HorizontalLayout containing two labels. * * @return title as HorizontalLayout */ protected HorizontalLayout buildTitleHorizontalLayout() { prefixText = new Label(); prefixText.setValue(titleText); prefixText.addStyleName(ValoTheme.LABEL_SMALL); prefixText.addStyleName(ValoTheme.LABEL_BOLD); prefixText.setSizeUndefined(); title = new Label(); title.setSizeFull(); title.setImmediate(true); title.setWidth("100%"); title.addStyleName(ValoTheme.LABEL_SMALL); title.addStyleName("text-bold"); title.addStyleName("text-cut"); title.addStyleName("header-caption-right"); prefixWithTitle = new HorizontalLayout(); prefixWithTitle.setMargin(false); prefixWithTitle.setSpacing(true); prefixWithTitle.setSizeFull(); prefixWithTitle.addStyleName("header-caption"); prefixWithTitle.addComponent(prefixText); prefixWithTitle.setComponentAlignment(prefixText, Alignment.TOP_LEFT); prefixWithTitle.setExpandRatio(prefixText, 0.0F); prefixWithTitle.addComponent(title); prefixWithTitle.setComponentAlignment(title, Alignment.TOP_LEFT); prefixWithTitle.setExpandRatio(title, 1.0F); return prefixWithTitle; }
Example 10
Source File: RolloutListHeader.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
@Override protected HorizontalLayout getHeaderCaptionLayout() { final Label headerCaption = new LabelBuilder().name(getHeaderCaption()).buildCaptionLabel(); final HorizontalLayout headerCaptionLayout = new HorizontalLayout(); headerCaptionLayout.addComponent(headerCaption); return headerCaptionLayout; }
Example 11
Source File: CertificateAuthenticationConfigurationItem.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
public CertificateAuthenticationConfigurationItem(final TenantConfigurationManagement tenantConfigurationManagement, final VaadinMessageSource i18n) { super(TenantConfigurationKey.AUTHENTICATION_MODE_HEADER_ENABLED, tenantConfigurationManagement, i18n); super.init("label.configuration.auth.header"); configurationEnabled = isConfigEnabled(); detailLayout = new VerticalLayout(); detailLayout.setImmediate(true); final HorizontalLayout caRootAuthorityLayout = new HorizontalLayout(); caRootAuthorityLayout.setSpacing(true); final Label caRootAuthorityLabel = new LabelBuilder().name(i18n.getMessage("label.configuration.auth.hashField")).buildLabel(); caRootAuthorityLabel.setDescription( i18n.getMessage("label.configuration.auth.hashField.tooltip")); caRootAuthorityLabel.setWidthUndefined(); caRootAuthorityTextField = new TextFieldBuilder(TenantConfiguration.VALUE_MAX_SIZE).buildTextComponent(); caRootAuthorityTextField.setWidth("100%"); caRootAuthorityTextField.addTextChangeListener(event -> caRootAuthorityChanged()); caRootAuthorityLayout.addComponent(caRootAuthorityLabel); caRootAuthorityLayout.setExpandRatio(caRootAuthorityLabel, 0); caRootAuthorityLayout.addComponent(caRootAuthorityTextField); caRootAuthorityLayout.setExpandRatio(caRootAuthorityTextField, 1); caRootAuthorityLayout.setWidth("100%"); detailLayout.addComponent(caRootAuthorityLayout); if (isConfigEnabled()) { caRootAuthorityTextField.setValue(getCaRootAuthorityValue()); setDetailVisible(true); } }
Example 12
Source File: PDPManagement.java From XACML with MIT License | 5 votes |
@AutoGenerated private HorizontalLayout buildHorizontalLayoutToolbar() { // common part: create layout horizontalLayoutToolbar = new HorizontalLayout(); horizontalLayoutToolbar.setImmediate(false); horizontalLayoutToolbar.setWidth("-1px"); horizontalLayoutToolbar.setHeight("-1px"); horizontalLayoutToolbar.setMargin(true); horizontalLayoutToolbar.setSpacing(true); // buttonCreate buttonCreate = new Button(); buttonCreate.setCaption("Create Group"); buttonCreate.setImmediate(false); buttonCreate.setWidth("-1px"); buttonCreate.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonCreate); // buttonRemove buttonRemove = new Button(); buttonRemove.setCaption("Remove Group"); buttonRemove.setImmediate(false); buttonRemove.setWidth("-1px"); buttonRemove.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonRemove); return horizontalLayoutToolbar; }
Example 13
Source File: RangeEditorComponent.java From XACML with MIT License | 5 votes |
@AutoGenerated private HorizontalLayout buildHorizontalLayout_2() { // common part: create layout horizontalLayout_2 = new HorizontalLayout(); horizontalLayout_2.setImmediate(false); horizontalLayout_2.setWidth("-1px"); horizontalLayout_2.setHeight("-1px"); horizontalLayout_2.setMargin(false); horizontalLayout_2.setSpacing(true); // comboBoxMax comboBoxMax = new ComboBox(); comboBoxMax.setCaption("Maximum Type"); comboBoxMax.setImmediate(true); comboBoxMax.setDescription("Select the type for the maximum."); comboBoxMax.setWidth("-1px"); comboBoxMax.setHeight("-1px"); horizontalLayout_2.addComponent(comboBoxMax); // textFieldMax textFieldMax = new TextField(); textFieldMax.setCaption("Maximum Value"); textFieldMax.setImmediate(true); textFieldMax.setDescription("Enter a value for the maxmum."); textFieldMax.setWidth("-1px"); textFieldMax.setHeight("-1px"); textFieldMax.setInvalidAllowed(false); textFieldMax.setInputPrompt("eg. 100"); horizontalLayout_2.addComponent(textFieldMax); return horizontalLayout_2; }
Example 14
Source File: OaExpressionsEditorComponent.java From XACML with MIT License | 5 votes |
@AutoGenerated private HorizontalLayout buildHorizontalLayout_1() { // common part: create layout horizontalLayout_1 = new HorizontalLayout(); horizontalLayout_1.setImmediate(false); horizontalLayout_1.setWidth("-1px"); horizontalLayout_1.setHeight("-1px"); horizontalLayout_1.setMargin(false); horizontalLayout_1.setSpacing(true); // buttonadd buttonadd = new Button(); buttonadd.setCaption("Add"); buttonadd.setImmediate(true); buttonadd.setWidth("-1px"); buttonadd.setHeight("-1px"); horizontalLayout_1.addComponent(buttonadd); // buttonRemove buttonRemove = new Button(); buttonRemove.setCaption("Remove"); buttonRemove.setImmediate(true); buttonRemove.setDescription("Remove selected expression(s)."); buttonRemove.setWidth("-1px"); buttonRemove.setHeight("-1px"); horizontalLayout_1.addComponent(buttonRemove); return horizontalLayout_1; }
Example 15
Source File: LoginView.java From gazpachoquest with GNU General Public License v3.0 | 4 votes |
protected CssLayout createCompositionRoot() { CssLayout root = new CssLayout(); root.setSizeFull(); root.addStyleName(Reindeer.LAYOUT_BLUE); VerticalLayout loginLayout = new VerticalLayout(); loginLayout.setSizeFull(); loginLayout.addStyleName("login-layout"); root.addComponent(loginLayout); final CssLayout loginPanel = new CssLayout(); loginPanel.addStyleName("login-panel"); loginLayout.addComponent(loginPanel); HorizontalLayout labels = new HorizontalLayout(); labels.setWidth("100%"); labels.setMargin(true); labels.addStyleName("labels"); loginPanel.addComponent(labels); Label welcome = new Label("Welcome"); welcome.setSizeUndefined(); welcome.addStyleName(Reindeer.LABEL_H2); labels.addComponent(welcome); labels.setComponentAlignment(welcome, Alignment.MIDDLE_LEFT); Label title = new Label("Gazpacho Quest"); title.setSizeUndefined(); title.addStyleName(Reindeer.LABEL_H1); labels.addComponent(title); labels.setComponentAlignment(title, Alignment.MIDDLE_RIGHT); HorizontalLayout fields = new HorizontalLayout(); fields.setWidth("100%"); fields.setSpacing(true); fields.setMargin(true); fields.addStyleName("fields"); invitation = new TextField("Invitation"); invitation.setSizeUndefined(); invitation.focus(); // invitation.setValue("YAS5ICHRBE"); fields.addComponent(invitation); login = new Button("Start"); login.addClickListener(createLoginButtonListener()); fields.addComponent(login); fields.setComponentAlignment(login, Alignment.BOTTOM_LEFT); loginPanel.addComponent(fields); return root; }
Example 16
Source File: StorageAdminPanel.java From sensorhub with Mozilla Public License 2.0 | 4 votes |
@Override public void build(final MyBeanItem<ModuleConfig> beanItem, final IRecordStorageModule<?> storage) { super.build(beanItem, storage); if (storage != null) { // section layout final GridLayout form = new GridLayout(); form.setWidth(100.0f, Unit.PERCENTAGE); form.setMargin(false); form.setSpacing(true); // section title form.addComponent(new Label("")); HorizontalLayout titleBar = new HorizontalLayout(); titleBar.setSpacing(true); Label sectionLabel = new Label("Data Store Content"); sectionLabel.addStyleName(STYLE_H3); sectionLabel.addStyleName(STYLE_COLORED); titleBar.addComponent(sectionLabel); titleBar.setComponentAlignment(sectionLabel, Alignment.MIDDLE_LEFT); // refresh button to show latest record Button refreshButton = new Button("Refresh"); refreshButton.setDescription("Reload data from storage"); refreshButton.setIcon(REFRESH_ICON); refreshButton.addStyleName(STYLE_QUIET); titleBar.addComponent(refreshButton); titleBar.setComponentAlignment(refreshButton, Alignment.MIDDLE_LEFT); refreshButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { buildDataPanel(form, storage); } }); form.addComponent(titleBar); // add I/O panel buildDataPanel(form, storage); addComponent(form); } }
Example 17
Source File: PagingUtilImpl.java From cia with Apache License 2.0 | 4 votes |
/** * Creates the paging controls. * * @param content the content * @param name the name * @param pageId the page id * @param size the size * @param pageNr the page nr * @param resultPerPage the result per page */ @Override public void createPagingControls(final AbstractOrderedLayout content, final String name, final String pageId, final Long size, final int pageNr, final int resultPerPage) { final HorizontalLayout pagingControls = new HorizontalLayout(); pagingControls.setSpacing(true); pagingControls.setMargin(true); final long maxPages = (size +resultPerPage-1) / resultPerPage; final StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(PAGE_HEADER) .append(pageNr) .append(PAGE_SEPARATOR) .append(maxPages) .append(PAGES_TOTAL_RESULTS) .append(size) .append(RESULTS_PER_PAGE) .append(resultPerPage) .append(SHOW); final Label pageInfo = new Label(stringBuilder.toString()); pagingControls.addComponent(pageInfo); pagingControls.setExpandRatio(pageInfo, ContentRatio.SMALL); if (pageNr > PAGE_ONE) { addPagingLink(PREVIOUS_PAGE,name, pageId, pageNr -1L,pagingControls); } if (maxPages > PAGE_ONE && pageNr < maxPages) { addPagingLink(NEXT_PAGE,name, pageId, pageNr +1L,pagingControls); } if (maxPages > LIMIT_FOR_DISPLAYING_START_END_LINKS && pageNr > PAGE_ONE) { addPagingLink(FIRST_PAGE,name, pageId, 1,pagingControls); } if (maxPages > LIMIT_FOR_DISPLAYING_START_END_LINKS && pageNr < maxPages) { addPagingLink(LAST_PAGE,name, pageId, maxPages,pagingControls); } content.addComponent(pagingControls); content.setExpandRatio(pagingControls, ContentRatio.SMALL2); }
Example 18
Source File: ExpressionBuilderComponent.java From XACML with MIT License | 4 votes |
@AutoGenerated private HorizontalLayout buildHorizontalLayout_1() { // common part: create layout horizontalLayout_1 = new HorizontalLayout(); horizontalLayout_1.setImmediate(false); horizontalLayout_1.setWidth("-1px"); horizontalLayout_1.setHeight("-1px"); horizontalLayout_1.setMargin(false); horizontalLayout_1.setSpacing(true); // buttonAddExpression buttonAddExpression = new Button(); buttonAddExpression.setCaption("Add Expression"); buttonAddExpression.setImmediate(true); buttonAddExpression.setWidth("-1px"); buttonAddExpression.setHeight("-1px"); horizontalLayout_1.addComponent(buttonAddExpression); // buttonDeleteExpression buttonDeleteExpression = new Button(); buttonDeleteExpression.setCaption("Delete Expression"); buttonDeleteExpression.setImmediate(true); buttonDeleteExpression.setWidth("-1px"); buttonDeleteExpression.setHeight("-1px"); horizontalLayout_1.addComponent(buttonDeleteExpression); // buttonClearAll buttonClearAll = new Button(); buttonClearAll.setCaption("Clear All"); buttonClearAll.setImmediate(true); buttonClearAll.setDescription("Clears all the expressions."); buttonClearAll.setWidth("-1px"); buttonClearAll.setHeight("-1px"); horizontalLayout_1.addComponent(buttonClearAll); // checkBoxShortName checkBoxShortName = new CheckBox(); checkBoxShortName.setCaption("Display Short XACML ID's"); checkBoxShortName.setImmediate(false); checkBoxShortName .setDescription("If checked, the right-most string of the function and datatype URI's will only be displayed."); checkBoxShortName.setWidth("-1px"); checkBoxShortName.setHeight("-1px"); horizontalLayout_1.addComponent(checkBoxShortName); return horizontalLayout_1; }
Example 19
Source File: PagingUtilImpl.java From cia with Apache License 2.0 | 2 votes |
/** * Adds the paging link. * * @param label the label * @param name the name * @param pageId the page id * @param maxPages the max pages * @param pagingControls the paging controls */ private void addPagingLink(final String label, final String name, final String pageId, final long maxPages, final HorizontalLayout pagingControls) { final Link previousPageLink = pageLinkFactory.createAdminPagingLink(label,name, pageId, String.valueOf(maxPages)); pagingControls.addComponent(previousPageLink); pagingControls.setExpandRatio(previousPageLink, ContentRatio.SMALL); }
Example 20
Source File: AdminAgencyPageModContentFactoryImpl.java From cia with Apache License 2.0 | 2 votes |
@Secured({ "ROLE_ADMIN" }) @Override public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout content = createPanelContent(); final String pageId = getPageId(parameters); final int pageNr= getPageNr(parameters); getMenuItemFactory().createMainPageMenuBar(menuBar); LabelFactory.createHeader2Label(content,ADMIN_AGENCY); final DataContainer<Agency, Long> dataContainer = getApplicationManager().getDataContainer(Agency.class); final List<Agency> pageOrderBy = dataContainer.getPageOrderBy(pageNr,DEFAULT_RESULTS_PER_PAGE,Agency_.agencyName); getPagingUtil().createPagingControls(content,NAME,pageId, dataContainer.getSize(), pageNr, DEFAULT_RESULTS_PER_PAGE); getGridFactory().createBasicBeanItemGrid(content, Agency.class,pageOrderBy, AGENCY, AGENCY_GRID_COLUMN_ORDER, AGENCY_GRID_HIDE_COLUMNS, AGENCY_GRID_LISTENER, null, AGENCY_GRID_COLLECTION_PROPERTY_CONVERTERS); if (pageId != null && !pageId.isEmpty()) { final VerticalLayout leftLayout = new VerticalLayout(); leftLayout.setSizeFull(); final VerticalLayout rightLayout = new VerticalLayout(); rightLayout.setSizeFull(); final HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setWidth(ContentSize.FULL_SIZE); content.addComponent(horizontalLayout); content.setExpandRatio(horizontalLayout, ContentRatio.LARGE_FORM); horizontalLayout.addComponent(leftLayout); horizontalLayout.addComponent(rightLayout); final Agency agency = dataContainer.load(Long.valueOf(pageId)); if (agency != null) { getFormFactory().addFormPanelTextFields(leftLayout, agency, Agency.class, AGENCY_FORM_FIELDS); getGridFactory().createBasicBeanItemGrid(rightLayout,Portal.class, agency.getPortals(), PORTAL, PORTAL_GRID_COLUMN_ORDER, PORTAL_GRID_HIDE_COLUMNS, PORTAL_GRID_LISTENER, null, null); } } getPageActionEventHelper().createPageEvent(ViewAction.VISIT_ADMIN_AGENCY_VIEW, ApplicationEventGroup.ADMIN, NAME, null, pageId); return content; }