Java Code Examples for com.vaadin.ui.VerticalLayout#addComponent()
The following examples show how to use
com.vaadin.ui.VerticalLayout#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: CountryMenuItemFactoryImpl.java From cia with Apache License 2.0 | 5 votes |
@Override public void createOverviewPage(final VerticalLayout panelContent) { final MenuBar menuBar = new MenuBar(); panelContent.addComponent(menuBar); panelContent.setComponentAlignment(menuBar, Alignment.TOP_LEFT); panelContent.setExpandRatio(menuBar, ContentRatio.LARGE); addSourcesAndIndicatorsToMenu(menuBar.addItem("By Topic",VaadinIcons.LINE_CHART, null), getTopicIndicatorMap()); menuBar.setAutoOpen(true); }
Example 2
Source File: RegexpEditorComponent.java From XACML with MIT License | 5 votes |
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("-1px"); mainLayout.setHeight("-1px"); mainLayout.setMargin(true); mainLayout.setSpacing(true); // top-level component properties setWidth("-1px"); setHeight("-1px"); // textFieldExpression textFieldExpression = new TextField(); textFieldExpression.setCaption("Regular Expression"); textFieldExpression.setImmediate(true); textFieldExpression .setDescription("Create a regular expression used to constrain attribute values."); textFieldExpression.setWidth("-1px"); textFieldExpression.setHeight("-1px"); textFieldExpression.setInvalidAllowed(false); textFieldExpression.setInputPrompt("eg. [a-zA-Z0-9]"); mainLayout.addComponent(textFieldExpression); mainLayout.setExpandRatio(textFieldExpression, 1.0f); // panelTester panelTester = buildPanelTester(); mainLayout.addComponent(panelTester); mainLayout.setExpandRatio(panelTester, 1.0f); return mainLayout; }
Example 3
Source File: RegexpEditorComponent.java From XACML with MIT License | 5 votes |
@AutoGenerated private VerticalLayout buildVerticalLayout_2() { // common part: create layout verticalLayout_2 = new VerticalLayout(); verticalLayout_2.setImmediate(false); verticalLayout_2.setWidth("100.0%"); verticalLayout_2.setHeight("100.0%"); verticalLayout_2.setMargin(false); // textFieldTestValue textFieldTestValue = new TextField(); textFieldTestValue.setCaption("Test Value"); textFieldTestValue.setImmediate(true); textFieldTestValue .setDescription("Enter a value to match against the regular expression."); textFieldTestValue.setWidth("-1px"); textFieldTestValue.setHeight("-1px"); textFieldTestValue.setInputPrompt("eg. example"); verticalLayout_2.addComponent(textFieldTestValue); // buttonTest buttonTest = new Button(); buttonTest.setCaption("Test"); buttonTest.setImmediate(true); buttonTest.setWidth("-1px"); buttonTest.setHeight("-1px"); verticalLayout_2.addComponent(buttonTest); verticalLayout_2.setComponentAlignment(buttonTest, new Alignment(48)); return verticalLayout_2; }
Example 4
Source File: AbstractHawkbitLoginUI.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
protected void checkBrowserSupport(final VerticalLayout loginPanel) { // Check if IE browser is not supported ( < IE11 ) if (isUnsupportedBrowser()) { // Disable sign-in button and display a message signIn.setEnabled(Boolean.FALSE); loginPanel.addComponent(buildUnsupportedMessage()); } }
Example 5
Source File: ExpressionSelectionWindow.java From XACML with MIT License | 5 votes |
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("-1px"); mainLayout.setHeight("-1px"); mainLayout.setMargin(true); mainLayout.setSpacing(true); // top-level component properties setWidth("-1px"); setHeight("-1px"); // optionGroupExpression optionGroupExpression = new OptionGroup(); optionGroupExpression .setCaption("Select One Of The Following Types of Expressions"); optionGroupExpression.setImmediate(false); optionGroupExpression.setWidth("-1px"); optionGroupExpression.setHeight("-1px"); mainLayout.addComponent(optionGroupExpression); // buttonSave buttonSave = new Button(); buttonSave.setCaption("Select"); buttonSave.setImmediate(false); buttonSave.setWidth("-1px"); buttonSave.setHeight("-1px"); mainLayout.addComponent(buttonSave); mainLayout.setComponentAlignment(buttonSave, new Alignment(24)); return mainLayout; }
Example 6
Source File: ExpressionBuilderComponent.java From XACML with MIT License | 5 votes |
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("100%"); mainLayout.setHeight("-1px"); mainLayout.setMargin(true); mainLayout.setSpacing(true); // top-level component properties setWidth("-1px"); setHeight("-1px"); // horizontalLayout_1 horizontalLayout_1 = buildHorizontalLayout_1(); mainLayout.addComponent(horizontalLayout_1); mainLayout.setExpandRatio(horizontalLayout_1, 1.0f); // treeExpressions treeExpressions = new TreeTable(); treeExpressions.setImmediate(false); treeExpressions.setWidth("100.0%"); treeExpressions.setHeight("-1px"); mainLayout.addComponent(treeExpressions); mainLayout.setExpandRatio(treeExpressions, 1.0f); // buttonSave buttonSave = new Button(); buttonSave.setCaption("Save"); buttonSave.setImmediate(true); buttonSave.setWidth("-1px"); buttonSave.setHeight("-1px"); mainLayout.addComponent(buttonSave); mainLayout.setComponentAlignment(buttonSave, new Alignment(48)); return mainLayout; }
Example 7
Source File: RenamePolicyFileWindow.java From XACML with MIT License | 5 votes |
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("-1px"); mainLayout.setHeight("-1px"); mainLayout.setMargin(true); mainLayout.setSpacing(true); // top-level component properties setWidth("-1px"); setHeight("-1px"); // textFieldFilename textFieldFilename = new TextField(); textFieldFilename.setCaption("Policy File Name"); textFieldFilename.setImmediate(false); textFieldFilename.setWidth("-1px"); textFieldFilename.setHeight("-1px"); mainLayout.addComponent(textFieldFilename); // buttonSave buttonSave = new Button(); buttonSave.setCaption("Save"); buttonSave.setImmediate(false); buttonSave.setWidth("-1px"); buttonSave.setHeight("-1px"); mainLayout.addComponent(buttonSave); mainLayout.setComponentAlignment(buttonSave, new Alignment(24)); return mainLayout; }
Example 8
Source File: CustomPIPConfigurationComponent.java From XACML with MIT License | 5 votes |
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("-1px"); mainLayout.setHeight("-1px"); mainLayout.setMargin(false); mainLayout.setSpacing(true); // top-level component properties setWidth("-1px"); setHeight("-1px"); // textFieldClassname textFieldClassname = new TextField(); textFieldClassname.setCaption("Java Classname"); textFieldClassname.setImmediate(false); textFieldClassname .setDescription("Java classname of the code implementing the custom PIP."); textFieldClassname.setWidth("-1px"); textFieldClassname.setHeight("-1px"); textFieldClassname.setInputPrompt("Eg. com.foo.MyPIP"); mainLayout.addComponent(textFieldClassname); mainLayout.setExpandRatio(textFieldClassname, 1.0f); // pipParameterComponent pipParameterComponent = new PIPParameterComponent(this.entity.getEntity()); pipParameterComponent.setImmediate(false); pipParameterComponent.setWidth("-1px"); pipParameterComponent.setHeight("-1px"); mainLayout.addComponent(pipParameterComponent); return mainLayout; }
Example 9
Source File: PIPParameterComponent.java From XACML with MIT License | 5 votes |
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("-1px"); mainLayout.setHeight("-1px"); mainLayout.setMargin(false); mainLayout.setSpacing(true); // top-level component properties setWidth("-1px"); setHeight("-1px"); // horizontalLayout_1 horizontalLayout_1 = buildHorizontalLayout_1(); mainLayout.addComponent(horizontalLayout_1); // tableParameters tableParameters = new Table(); tableParameters.setCaption("Configuration Parameters"); tableParameters.setImmediate(false); tableParameters.setWidth("-1px"); tableParameters.setHeight("-1px"); mainLayout.addComponent(tableParameters); return mainLayout; }
Example 10
Source File: MainView.java From usergrid with Apache License 2.0 | 5 votes |
private VerticalLayout addTabSheet() { VerticalLayout tabLayout = new VerticalLayout(); TabSheet tabSheet = new TabSheet(); tabSheet.setHeight( "100%" ); tabSheetManager = new TabSheetManager( tabSheet ); tabLayout.addComponent( tabSheet ); return tabLayout; }
Example 11
Source File: ObjectTypeSelectionPopup.java From sensorhub with Mozilla Public License 2.0 | 4 votes |
public ObjectTypeSelectionPopup(String title, final Map<String, Class<?>> typeList, final ObjectTypeSelectionCallback callback) { super(title); VerticalLayout layout = new VerticalLayout(); // generate table with type list final Table table = new Table(); table.setSizeFull(); table.setSelectable(true); table.setColumnReorderingAllowed(true); table.addContainerProperty(UIConstants.PROP_NAME, String.class, null); table.setColumnHeaderMode(ColumnHeaderMode.HIDDEN); table.setPageLength(10); table.setMultiSelect(false); final Map<Object, Class<?>> idTypeMap = new HashMap<Object, Class<?>>(); for (Entry<String, Class<?>> item: typeList.entrySet()) { Object id = table.addItem(new Object[] {item.getKey()}, null); idTypeMap.put(id, item.getValue()); } layout.addComponent(table); // add OK button Button okButton = new Button("OK"); okButton.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { Object selectedItemId = table.getValue(); if (selectedItemId != null) { Class<?> clazz = idTypeMap.get(selectedItemId); if (clazz != null) callback.typeSelected(clazz); } close(); } }); layout.addComponent(okButton); layout.setComponentAlignment(okButton, Alignment.MIDDLE_CENTER); setContent(layout); center(); }
Example 12
Source File: NoUserSessionHandler.java From cuba with Apache License 2.0 | 4 votes |
protected void showNoUserSessionDialog(AppUI ui) { Messages messages = beanLocator.get(Messages.class); Connection connection = ui.getApp().getConnection(); //noinspection ConstantConditions Locale locale = connection.getSession().getLocale(); Window dialog = new NoUserSessionExceptionDialog(); dialog.setStyleName("c-nousersession-dialog"); dialog.setCaption(messages.getMainMessage("dialogs.Information", locale)); dialog.setClosable(false); dialog.setResizable(false); dialog.setModal(true); CubaLabel messageLab = new CubaLabel(); messageLab.setWidthUndefined(); messageLab.setValue(messages.getMainMessage("noUserSession.message", locale)); VerticalLayout layout = new VerticalLayout(); layout.setSpacing(true); layout.setMargin(false); layout.setWidthUndefined(); layout.setStyleName("c-nousersession-dialog-layout"); layout.setSpacing(true); dialog.setContent(layout); CubaButton reloginBtn = new CubaButton(); reloginBtn.addStyleName(WebButton.PRIMARY_ACTION_STYLENAME); reloginBtn.addClickListener(event -> relogin()); reloginBtn.setCaption(messages.getMainMessage(Type.OK.getMsgKey())); String iconName = beanLocator.get(Icons.class) .get(Type.OK.getIconKey()); reloginBtn.setIcon(beanLocator.get(IconResolver.class) .getIconResource(iconName)); ClientConfig clientConfig = beanLocator.get(Configuration.class) .getConfig(ClientConfig.class); setClickShortcut(reloginBtn, clientConfig.getCommitShortcut()); reloginBtn.focus(); layout.addComponent(messageLab); layout.addComponent(reloginBtn); layout.setComponentAlignment(reloginBtn, Alignment.BOTTOM_RIGHT); ui.addWindow(dialog); dialog.center(); if (ui.isTestMode()) { dialog.setCubaId("optionDialog"); reloginBtn.setCubaId("reloginBtn"); } if (ui.isPerformanceTestMode()) { dialog.setId(ui.getTestIdManager().getTestId("optionDialog")); reloginBtn.setId(ui.getTestIdManager().getTestId("reloginBtn")); } }
Example 13
Source File: PollingConfigurationView.java From hawkbit with Eclipse Public License 1.0 | 4 votes |
PollingConfigurationView(final VaadinMessageSource i18n, final ControllerPollProperties controllerPollProperties, final TenantConfigurationManagement tenantConfigurationManagement) { this.tenantConfigurationManagement = tenantConfigurationManagement; final Duration minDuration = DurationHelper .formattedStringToDuration(controllerPollProperties.getMinPollingTime()); final Duration maxDuration = DurationHelper .formattedStringToDuration(controllerPollProperties.getMaxPollingTime()); final Duration globalPollTime = DurationHelper.formattedStringToDuration(tenantConfigurationManagement .getGlobalConfigurationValue(TenantConfigurationKey.POLLING_TIME_INTERVAL, String.class)); final Duration globalOverdueTime = DurationHelper.formattedStringToDuration(tenantConfigurationManagement .getGlobalConfigurationValue(TenantConfigurationKey.POLLING_OVERDUE_TIME_INTERVAL, String.class)); final TenantConfigurationValue<String> pollTimeConfValue = tenantConfigurationManagement .getConfigurationValue(TenantConfigurationKey.POLLING_TIME_INTERVAL, String.class); if (!pollTimeConfValue.isGlobal()) { tenantPollTime = DurationHelper.formattedStringToDuration(pollTimeConfValue.getValue()); } final TenantConfigurationValue<String> overdueTimeConfValue = tenantConfigurationManagement .getConfigurationValue(TenantConfigurationKey.POLLING_OVERDUE_TIME_INTERVAL, String.class); if (!overdueTimeConfValue.isGlobal()) { tenantOverdueTime = DurationHelper.formattedStringToDuration(overdueTimeConfValue.getValue()); } final Panel rootPanel = new Panel(); rootPanel.setSizeFull(); rootPanel.addStyleName("config-panel"); final VerticalLayout vLayout = new VerticalLayout(); vLayout.setMargin(true); final Label headerDisSetType = new Label(i18n.getMessage("configuration.polling.title")); headerDisSetType.addStyleName("config-panel-header"); vLayout.addComponent(headerDisSetType); fieldPollTime = DurationConfigField.builder(UIComponentIdProvider.SYSTEM_CONFIGURATION_POLLING) .caption(i18n.getMessage("configuration.polling.time")) .checkBoxTooltip(i18n.getMessage("configuration.polling.custom.value")).range(minDuration, maxDuration) .globalDuration(globalPollTime).tenantDuration(tenantPollTime).build(); fieldPollTime.addChangeListener(this); vLayout.addComponent(fieldPollTime); fieldPollingOverdueTime = DurationConfigField.builder(UIComponentIdProvider.SYSTEM_CONFIGURATION_OVERDUE) .caption(i18n.getMessage("configuration.polling.overduetime")) .checkBoxTooltip(i18n.getMessage("configuration.polling.custom.value")).range(minDuration, maxDuration) .globalDuration(globalOverdueTime).tenantDuration(tenantOverdueTime).build(); fieldPollingOverdueTime.addChangeListener(this); vLayout.addComponent(fieldPollingOverdueTime); rootPanel.setContent(vLayout); setCompositionRoot(rootPanel); }
Example 14
Source File: ServiceDescBasic.java From primecloud-controller with GNU General Public License v2.0 | 4 votes |
@Override public void attach() { addStyleName(Reindeer.PANEL_LIGHT); setHeight("100%"); HorizontalLayout layout = new HorizontalLayout(); layout.setWidth("100%"); layout.setHeight("100%"); layout.setMargin(true); layout.setSpacing(true); layout.addStyleName("service-desc-basic"); setContent(layout); // サービス基本情報 VerticalLayout leftLayout = new VerticalLayout(); leftLayout.setMargin(false); leftLayout.setSpacing(false); leftLayout.setWidth("100%"); leftLayout.setHeight("100%"); left = new BasicInfoOpe(); left.setWidth("100%"); leftLayout.addComponent(left); leftLayout.setExpandRatio(left, 1.0f); layout.addComponent(leftLayout); // 表同士の間隔をあける Label padding = new Label(" "); padding.setWidth("7px"); padding.setHeight("99%"); padding.addStyleName("desc-padding"); layout.addComponent(padding); Label padding2 = new Label(""); padding2.setWidth("1px"); layout.addComponent(padding2); // 割り当てサーバ VerticalLayout rightLayout = new VerticalLayout(); rightLayout.setMargin(false); rightLayout.setSpacing(false); rightLayout.setWidth("100%"); rightLayout.setHeight("100%"); right = new AttachServersOpe(); right.setWidth("100%"); rightLayout.addComponent(right); serverOpe = new ServiceSvrOperation(); rightLayout.addComponent(serverOpe); rightLayout.setExpandRatio(right, 1.0f); layout.addComponent(rightLayout); layout.setExpandRatio(leftLayout, 40); layout.setExpandRatio(rightLayout, 60); }
Example 15
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 16
Source File: CountryRankingOverviewPageModContentFactoryImpl.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(); getCountryMenuItemFactory().createCountryTopicMenu(menuBar); final String pageId = getPageId(parameters); panelContent.addComponent(new Label(OVERVIEW)); getCountryMenuItemFactory().createOverviewPage(panelContent); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COUNTRY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); panel.setCaption(NAME + "::" + OVERVIEW); return panelContent; }
Example 17
Source File: LoadBalancerPanel.java From primecloud-controller with GNU General Public License v2.0 | 4 votes |
@Override public void attach() { setSizeFull(); addStyleName(Reindeer.PANEL_LIGHT); VerticalLayout layout = (VerticalLayout) getContent(); layout.setSizeFull(); layout.addStyleName("loadbalancer-tab"); layout.setSpacing(false); layout.setMargin(false); // スプリットパネル SplitPanel splitPanel = new SplitPanel(); splitPanel.setOrientation(SplitPanel.ORIENTATION_VERTICAL); splitPanel.setSplitPosition(40); splitPanel.setSizeFull(); layout.addComponent(splitPanel); // スプリットパネル上段 VerticalLayout upperLayout = new VerticalLayout(); upperLayout.setSizeFull(); upperLayout.setSpacing(false); upperLayout.setMargin(false); CssLayout upperTopLayout = new CssLayout(); Label label = new Label(ViewProperties.getCaption("label.loadbalancer")); upperTopLayout.setWidth("100%"); upperTopLayout.setMargin(true); upperTopLayout.addStyleName("loadbalancer-table-label"); upperTopLayout.addComponent(label); upperTopLayout.setHeight("28px"); upperLayout.addComponent(upperTopLayout); loadBalancerTable = new LoadBalancerTable(sender); loadBalancerTable.setContainerDataSource(new LoadBalancerDtoContainer()); upperLayout.addComponent(loadBalancerTable); loadBalancerTable.addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { tableRowSelected(event); } }); loadBalancerButtonsBottom = new LoadBalancerButtonsBottom(sender); upperLayout.addComponent(loadBalancerButtonsBottom); upperLayout.setExpandRatio(loadBalancerTable, 10); splitPanel.addComponent(upperLayout); // スプリットパネル下段 loadBalancerDesc = new LoadBalancerDesc(sender); splitPanel.addComponent(loadBalancerDesc); }
Example 18
Source File: UserHomeSecuritySettingsPageModContentFactoryImpl.java From cia with Apache License 2.0 | 3 votes |
@Secured({ "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); userHomeMenuItemFactory.createUserHomeMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, SECURITY_SETTINGS); final VerticalLayout overviewLayout = new VerticalLayout(); overviewLayout.setSizeFull(); panelContent.addComponent(overviewLayout); panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE); final ResponsiveRow grid = RowUtil.createGridLayout(overviewLayout); RowUtil.createRowComponent(grid, createChangePasswordButton(), "Change password"); RowUtil.createRowComponent(grid, createEnableGoogleAuthButton(), "Enable MFA using google authenticator"); RowUtil.createRowComponent(grid, createDisableGoogleAuthButton(), "Disable MFA using google authenticator"); panel.setCaption(NAME + "::" + USERHOME + SECURITY_SETTINGS); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_USER_HOME_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 19
Source File: CommitteeOverviewPageModContentFactoryImpl.java From cia with Apache License 2.0 | 3 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); final ViewRiksdagenCommittee viewRiksdagenCommittee = getItem(parameters); getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, OVERVIEW); final Link addCommitteePageLink = getPageLinkFactory().addCommitteePageLink(viewRiksdagenCommittee); panelContent.addComponent(addCommitteePageLink); getFormFactory().addFormPanelTextFields(panelContent, viewRiksdagenCommittee, ViewRiksdagenCommittee.class, AS_LIST); final VerticalLayout overviewLayout = new VerticalLayout(); overviewLayout.setSizeFull(); panelContent.addComponent(overviewLayout); panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM); getCommitteeMenuItemFactory().createOverviewPage(overviewLayout, pageId); panelContent.setExpandRatio(addCommitteePageLink, ContentRatio.SMALL); panel.setCaption(NAME + "::" + COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 20
Source File: GovernmentBodyOverviewPageModContentFactoryImpl.java From cia with Apache License 2.0 | 3 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); final List<GovernmentBodyAnnualSummary> item = getItem(parameters); if (item != null && !item.isEmpty()) { getGovernmentBodyMenuItemFactory().createGovernmentBodyMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, OVERVIEW); panel.setCaption(NAME + "::" + GOVERNMENT_BODY + pageId); final VerticalLayout overviewLayout = new VerticalLayout(); overviewLayout.setSizeFull(); panelContent.addComponent(overviewLayout); panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM); getGovernmentBodyMenuItemFactory().createOverviewPage(overviewLayout, pageId); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_GOVERNMENT_BODY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); } return panelContent; }