com.vaadin.ui.VerticalLayout Java Examples
The following examples show how to use
com.vaadin.ui.VerticalLayout.
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: UserHomeSecuritySettingsPageModContentFactoryImpl.java From cia with Apache License 2.0 | 6 votes |
/** * Creates the change password button. * * @return the vertical layout */ private VerticalLayout createChangePasswordButton() { final VerticalLayout formLayout = new VerticalLayout(); formLayout.setSizeFull(); final Panel formPanel = new Panel(); formPanel.setSizeFull(); formLayout.addComponent(formPanel); final FormLayout formContent = new FormLayout(); formPanel.setContent(formContent); final ChangePasswordRequest request = new ChangePasswordRequest(); request.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId()); request.setCurrentPassword(""); request.setNewPassword(""); request.setRepeatNewPassword(""); final ClickListener listener = new ChangePasswordClickListener(request); getFormFactory().addRequestInputFormFields(formContent, request, ChangePasswordRequest.class, Arrays.asList("currentPassword","newPassword","repeatNewPassword"), "Change password", listener); return formLayout; }
Example #2
Source File: PolicyWorkspace.java From XACML with MIT License | 6 votes |
@AutoGenerated private VerticalLayout buildVerticalLayoutLeftPanel() { // common part: create layout verticalLayoutLeftPanel = new VerticalLayout(); verticalLayoutLeftPanel.setImmediate(false); verticalLayoutLeftPanel.setWidth("100.0%"); verticalLayoutLeftPanel.setHeight("100.0%"); verticalLayoutLeftPanel.setMargin(true); verticalLayoutLeftPanel.setSpacing(true); // horizontalLayoutLeftToolbar horizontalLayoutLeftToolbar = buildHorizontalLayoutLeftToolbar(); verticalLayoutLeftPanel.addComponent(horizontalLayoutLeftToolbar); // treeWorkspace treeWorkspace = new TreeTable(); treeWorkspace.setImmediate(true); treeWorkspace.setWidth("100.0%"); treeWorkspace.setHeight("100.0%"); verticalLayoutLeftPanel.addComponent(treeWorkspace); verticalLayoutLeftPanel.setExpandRatio(treeWorkspace, 1.0f); return verticalLayoutLeftPanel; }
Example #3
Source File: PartyCurrentMembersPageModContentFactoryImpl.java From cia with Apache License 2.0 | 6 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 ViewRiksdagenParty viewRiksdagenParty = getItem(parameters); getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, CURRENT_MEMBERS); final DataContainer<ViewRiksdagenPolitician, String> politicianDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenPolitician.class); getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenPolitician.class, politicianDataContainer.findListByProperty( new Object[] { viewRiksdagenParty.getPartyId(), Boolean.TRUE }, ViewRiksdagenPolitician_.party, ViewRiksdagenPolitician_.active), POLITICIANS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null); pageCompleted(parameters, panel, pageId, viewRiksdagenParty); return panelContent; }
Example #4
Source File: HomeViewImpl.java From Vaadin4Spring-MVP-Sample-SpringSecurity with Apache License 2.0 | 6 votes |
@Override public void postConstruct() { super.postConstruct(); content = new VerticalLayout(); content.setSpacing(true); content.setMargin(true); setCompositionRoot(content); caption = new Label("This is Home View", ContentMode.HTML); caption.addStyleName(ValoTheme.LABEL_H2); content.addComponent(caption); loginInfo = new Label("This is Home View", ContentMode.HTML); loginInfo.addStyleName(ValoTheme.LABEL_H2); content.addComponent(loginInfo); }
Example #5
Source File: PartyLeaderHistoryPageModContentFactoryImpl.java From cia with Apache License 2.0 | 6 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 ViewRiksdagenParty viewRiksdagenParty = getItem(parameters); getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, LEADER_HISTORY); final DataContainer<ViewRiksdagenPartyRoleMember, String> partyRoleMemberDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenPartyRoleMember.class); getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenPartyRoleMember.class, partyRoleMemberDataContainer.getAllBy(ViewRiksdagenPartyRoleMember_.party, viewRiksdagenParty.getPartyId()), LEADER_HISTORY2, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null); pageCompleted(parameters, panel, pageId, viewRiksdagenParty); return panelContent; }
Example #6
Source File: DemoUI.java From gantt with Apache License 2.0 | 6 votes |
@Override protected void init(VaadinRequest request) { ganttListener = null; createGantt(); MenuBar menu = controlsMenuBar(); Panel controls = createControls(); Component wrapper = UriFragmentWrapperFactory.wrapByUriFragment(UI.getCurrent().getPage().getUriFragment(), gantt); if (wrapper instanceof GanttListener) { ganttListener = (GanttListener) wrapper; } final VerticalLayout layout = new VerticalLayout(); layout.setStyleName("demoContentLayout"); layout.setMargin(false); layout.setSizeFull(); layout.addComponent(menu); layout.addComponent(controls); layout.addComponent(wrapper); layout.setExpandRatio(wrapper, 1); setContent(layout); }
Example #7
Source File: GovernmentBodyChartDataManagerImpl.java From cia with Apache License 2.0 | 6 votes |
@Override public void createGovernmentBodyHeadcountSummaryChart(final VerticalLayout content) { final Map<Integer, List<GovernmentBodyAnnualSummary>> map = esvApi.getData(); final DataSeries dataSeries = new DataSeries(); final Series series = new Series(); series.addSeries(new XYseries().setLabel(ALL_GOVERNMENT_BODIES)); dataSeries.newSeries(); for (final Entry<Integer, List<GovernmentBodyAnnualSummary>> entry : map.entrySet()) { addDataSerieValue(dataSeries, entry, entry.getValue().stream().mapToInt(GovernmentBodyAnnualSummary::getHeadCount).sum()); } addChart(content, ANNUAL_HEADCOUNT_TOTAL_ALL_GOVERNMENT_BODIES, new DCharts().setDataSeries(dataSeries) .setOptions(getChartOptions().createOptionsXYDateFloatLogYAxisLegendOutside(series)).show(), true); }
Example #8
Source File: PartyMemberHistoryPageModContentFactoryImpl.java From cia with Apache License 2.0 | 6 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 ViewRiksdagenParty viewRiksdagenParty = getItem(parameters); getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, MEMBER_HISTORY); final DataContainer<ViewRiksdagenPolitician, String> politicianDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenPolitician.class); getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenPolitician.class, politicianDataContainer.getAllBy(ViewRiksdagenPolitician_.party, viewRiksdagenParty.getPartyId()), POLITICIANS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null); pageCompleted(parameters, panel, pageId, viewRiksdagenParty); return panelContent; }
Example #9
Source File: PartyCoalitionsAgainstAnnualSummaryChartPageModContentFactoryImpl.java From cia with Apache License 2.0 | 6 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 ViewRiksdagenParty viewRiksdagenParty = getItem(parameters); getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, TITLE); chartDataManager.createPartyChart(panelContent,pageId); pageCompleted(parameters, panel, pageId, viewRiksdagenParty); return panelContent; }
Example #10
Source File: AdminUI.java From sensorhub with Mozilla Public License 2.0 | 6 votes |
protected void buildModuleList(VerticalLayout layout, final Class<?> configType) { ModuleRegistry reg = SensorHub.getInstance().getModuleRegistry(); // build bean items and add them to container MyBeanItemContainer<ModuleConfig> container = new MyBeanItemContainer<ModuleConfig>(ModuleConfig.class); for (IModule<?> module: reg.getLoadedModules()) { ModuleConfig config = module.getConfiguration().clone(); if (configType.isAssignableFrom(config.getClass())) container.addBean(config); } moduleConfigLists.put(configType, container); displayModuleList(layout, container, configType); }
Example #11
Source File: PoliticianVotesHistoryPageModContentFactoryImpl.java From cia with Apache License 2.0 | 6 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 ViewRiksdagenPolitician viewRiksdagenPolitician = getItem(parameters); getPoliticianMenuItemFactory().createPoliticianMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, PoliticianPageMode.VOTEHISTORY.toString()); getGridFactory().createBasicBeanItemNestedPropertiesGrid(panelContent, ViewRiksdagenVoteDataBallotPoliticianSummary.class, viewRiksdagenVoteDataBallotPoliticianSummaryChartDataManager .findByValue(viewRiksdagenPolitician.getPersonId()), BALLOTS, NESTED_PROPERTIES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, EMBEDDED_ID_BALLOT_ID, null); pageCompleted(parameters, panel, pageId, viewRiksdagenPolitician); return panelContent; }
Example #12
Source File: DocumentMenuItemFactoryImpl.java From cia with Apache License 2.0 | 6 votes |
@Override public void createOverviewPage(final VerticalLayout panelContent, final String pageId) { final ResponsiveRow grid = RowUtil.createGridLayout(panelContent); createButtonLink(grid,DOCUMENT_ACTIVITY_TEXT, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTACTIVITY.toString(), pageId), DOCUMENT_ACTIVITIES); createButtonLink(grid,PERSON_REFERENCES, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.PERSONREFERENCES.toString(), pageId), PERSON_REFERENCES); createButtonLink(grid,DOCUMENT_DETAILS, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTDETAILS.toString(), pageId), DOCUMENT_DETAILS); createButtonLink(grid,DOCUMENT_DATA, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTDATA.toString(), pageId), COMPLETE_DOCUMENT_AS_TEXT); createButtonLink(grid,DOCUMENT_REFERENCES, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTREFERENCES.toString(), pageId), DOCUMENT_REFERENCES); createButtonLink(grid,DOCUMENT_DECISION, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTDECISION.toString(), pageId), DOCUMENT_DECISIONS); createButtonLink(grid,DOCUMENT_ATTACHEMENTS, VaadinIcons.FILE, new PageModeMenuCommand(UserViews.DOCUMENT_VIEW_NAME, DocumentPageMode.DOCUMENTATTACHMENTS.toString(), pageId), ATTACHEMENTS); }
Example #13
Source File: ServiceDescDetail.java From primecloud-controller with GNU General Public License v2.0 | 5 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-detail"); setContent(layout); VerticalLayout leftLayout = new VerticalLayout(); leftLayout.setMargin(false); leftLayout.setSpacing(false); leftLayout.setWidth("250px"); leftLayout.setHeight("100%"); left = new DetailInfoOpe(); left.setWidth("250px"); leftLayout.addComponent(left); leftLayout.setExpandRatio(left, 1.0f); layout.addComponent(leftLayout); right = new DetailParameters(); right.setWidth("100%"); right.setHeight("100%"); layout.addComponent(right); layout.setExpandRatio(right, 100); }
Example #14
Source File: AttributeStandardSelectorComponent.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"); // comboBoxCategories comboBoxCategories = new ComboBox(); comboBoxCategories.setCaption("Select A Category"); comboBoxCategories.setImmediate(false); comboBoxCategories.setWidth("-1px"); comboBoxCategories.setHeight("-1px"); comboBoxCategories.setInvalidAllowed(false); comboBoxCategories.setRequired(true); mainLayout.addComponent(comboBoxCategories); mainLayout.setExpandRatio(comboBoxCategories, 1.0f); // horizontalLayout_2 horizontalLayout_2 = buildHorizontalLayout_2(); mainLayout.addComponent(horizontalLayout_2); mainLayout.setExpandRatio(horizontalLayout_2, 1.0f); return mainLayout; }
Example #15
Source File: SimpleBoxFormBuilder.java From jdal with Apache License 2.0 | 5 votes |
/** * Reset the form builder to reuse for creating a new panel */ public void reset() { columns = new ArrayList<VerticalLayout>(); columnsWidth = new ArrayList<Integer>(); rowsHeight = new ArrayList<Integer>(); container = Box.createHorizontalBox(); index = 0; rows = 0; }
Example #16
Source File: DocumentReferencesPageModContentFactoryImpl.java From cia with Apache License 2.0 | 5 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); getDocumentMenuItemFactory().createDocumentMenuBar(menuBar, pageId); final DataContainer<DocumentStatusContainer, String> documentStatusContainerDataContainer = getApplicationManager() .getDataContainer(DocumentStatusContainer.class); final DocumentStatusContainer documentStatusContainer = documentStatusContainerDataContainer .findByQueryProperty(DocumentStatusContainer.class, DocumentStatusContainer_.document, DocumentData.class, DocumentData_.id, pageId); LabelFactory.createHeader2Label(panelContent, DOCUMENT_REFERENCES); if (documentStatusContainer != null && documentStatusContainer.getDocumentReferenceContainer() != null && documentStatusContainer.getDocumentReferenceContainer().getDocumentReferenceList() != null) { getGridFactory().createBasicBeanItemGrid(panelContent, DocumentReferenceData.class, documentStatusContainer.getDocumentReferenceContainer().getDocumentReferenceList(), DOCUMENT_REFERENCES2, COLUMN_ORDER, HIDE_COLUMNS, null, null, null); } panel.setContent(panelContent); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example #17
Source File: AttributeSelectionWindow.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("-1px"); verticalLayout_2.setHeight("-1px"); verticalLayout_2.setMargin(true); verticalLayout_2.setSpacing(true); // textFieldIssuer textFieldIssuer = new TextField(); textFieldIssuer.setCaption("Issuer"); textFieldIssuer.setImmediate(false); textFieldIssuer.setWidth("-1px"); textFieldIssuer.setHeight("-1px"); verticalLayout_2.addComponent(textFieldIssuer); // checkBoxMustBePresent checkBoxMustBePresent = new CheckBox(); checkBoxMustBePresent.setCaption("Attribute Must Be Present"); checkBoxMustBePresent.setImmediate(false); checkBoxMustBePresent.setWidth("-1px"); checkBoxMustBePresent.setHeight("-1px"); verticalLayout_2.addComponent(checkBoxMustBePresent); return verticalLayout_2; }
Example #18
Source File: SPUIComponentProvider.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
/** * Layout of tabs in detail tabsheet. * * @return VerticalLayout */ public static VerticalLayout getDetailTabLayout() { final VerticalLayout layout = new VerticalLayout(); layout.setSpacing(true); layout.setMargin(true); layout.setImmediate(true); return layout; }
Example #19
Source File: LoginView.java From gazpachoquest with GNU General Public License v3.0 | 5 votes |
protected HorizontalLayout createCompositionRootx() { VerticalLayout loginPanel = new VerticalLayout(); loginPanel.setSpacing(true); loginPanel.setWidth("400px"); Label header = new Label("Enter your invitation to start the questionnair"); header.addStyleName(Reindeer.LABEL_H1); loginPanel.addComponent(header); invitation = new TextField("Invitation"); invitation.setWidth("100%"); invitation.focus(); invitation.setValue("YAS5ICHRBE"); loginPanel.addComponent(invitation); HorizontalLayout buttons = new HorizontalLayout(); buttons.setSpacing(true); loginPanel.addComponent(buttons); loginPanel.setComponentAlignment(buttons, Alignment.MIDDLE_RIGHT); login = new Button("Start"); login.setClickShortcut(KeyCode.ENTER); login.addStyleName(Reindeer.BUTTON_DEFAULT); login.addClickListener(createLoginButtonListener()); buttons.addComponent(login); HorizontalLayout viewLayout = new HorizontalLayout(); viewLayout.addComponent(loginPanel); viewLayout.setComponentAlignment(loginPanel, Alignment.MIDDLE_CENTER); viewLayout.setSizeFull(); viewLayout.addStyleName(Reindeer.LAYOUT_BLUE); setSizeFull(); return viewLayout; }
Example #20
Source File: RolloutConfigurationView.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private void init() { final Panel rootPanel = new Panel(); rootPanel.setSizeFull(); rootPanel.addStyleName("config-panel"); final VerticalLayout vLayout = new VerticalLayout(); vLayout.setMargin(true); vLayout.setSizeFull(); final Label header = new Label(i18n.getMessage("configuration.rollout.title")); header.addStyleName("config-panel-header"); vLayout.addComponent(header); final GridLayout gridLayout = new GridLayout(3, 1); gridLayout.setSpacing(true); gridLayout.setImmediate(true); gridLayout.setColumnExpandRatio(1, 1.0F); gridLayout.setSizeFull(); approvalCheckbox = SPUIComponentProvider.getCheckBox("", "", null, false, ""); approvalCheckbox.setId(UIComponentIdProvider.ROLLOUT_APPROVAL_ENABLED_CHECKBOX); approvalCheckbox.setValue(approvalConfigurationItem.isConfigEnabled()); approvalCheckbox.addValueChangeListener(this); approvalConfigurationItem.addChangeListener(this); gridLayout.addComponent(approvalCheckbox, 0, 0); gridLayout.addComponent(approvalConfigurationItem, 1, 0); final Link linkToApprovalHelp = SPUIComponentProvider.getHelpLink(i18n, uiProperties.getLinks().getDocumentation().getRollout()); gridLayout.addComponent(linkToApprovalHelp, 2, 0); gridLayout.setComponentAlignment(linkToApprovalHelp, Alignment.BOTTOM_RIGHT); vLayout.addComponent(gridLayout); rootPanel.setContent(vLayout); setCompositionRoot(rootPanel); }
Example #21
Source File: AbstractHawkbitLoginUI.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private void addFooter(final VerticalLayout rootLayout) { final Resource resource = context .getResource("classpath:/VAADIN/themes/" + UI.getCurrent().getTheme() + "/layouts/footer.html"); try (final InputStream resourceStream = resource.getInputStream()) { final CustomLayout customLayout = new CustomLayout(resourceStream); customLayout.setSizeUndefined(); rootLayout.addComponent(customLayout); rootLayout.setComponentAlignment(customLayout, Alignment.BOTTOM_LEFT); } catch (final IOException ex) { LOG.error("Footer file cannot be loaded", ex); } }
Example #22
Source File: FilterManagementView.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private void viewListView() { removeAllComponents(); final VerticalLayout tableListViewLayout = new VerticalLayout(); tableListViewLayout.setSizeFull(); tableListViewLayout.setSpacing(false); tableListViewLayout.setMargin(false); tableListViewLayout.setStyleName("table-layout"); tableListViewLayout.addComponent(targetFilterHeader); tableListViewLayout.setComponentAlignment(targetFilterHeader, Alignment.TOP_CENTER); tableListViewLayout.addComponent(targetFilterTable); tableListViewLayout.setComponentAlignment(targetFilterTable, Alignment.TOP_CENTER); tableListViewLayout.setExpandRatio(targetFilterTable, 1.0F); addComponent(tableListViewLayout); }
Example #23
Source File: ServerDesc.java From primecloud-controller with GNU General Public License v2.0 | 5 votes |
@Override public void attach() { setWidth("100%"); setHeight("100%"); setCaption(ViewProperties.getCaption("panel.serverDesc")); addStyleName(Reindeer.PANEL_LIGHT); addStyleName("server-desc-panel"); VerticalLayout layout = (VerticalLayout) getContent(); layout.setWidth("100%"); layout.setHeight("100%"); layout.setMargin(false); layout.setSpacing(false); layout.addStyleName("server-desc-layout"); tab = new TabSheet(); tab.addStyleName(Reindeer.TABSHEET_BORDERLESS); tab.setWidth("100%"); tab.setHeight("100%"); addComponent(tab); // 基本情報タブ serverDescBasic = new ServerDescBasic(sender); tab.addTab(serverDescBasic, ViewProperties.getCaption("tab.serverDescBasic"), Icons.BASIC.resource()); // 詳細情報タブ serverDescDetail = new ServerDescDetail(); tab.addTab(serverDescDetail, ViewProperties.getCaption("tab.serverDescDetail"), Icons.DETAIL.resource()); tab.addListener(new SelectedTabChangeListener() { @Override public void selectedTabChange(SelectedTabChangeEvent event) { ServerDesc.this.selectedTabChange(event); } }); }
Example #24
Source File: UploadArtifactView.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private VerticalLayout createDetailsAndUploadLayout() { detailAndUploadLayout = new VerticalLayout(); detailAndUploadLayout.addComponent(artifactDetailsLayout); detailAndUploadLayout.setComponentAlignment(artifactDetailsLayout, Alignment.TOP_CENTER); detailAndUploadLayout.setExpandRatio(artifactDetailsLayout, 1.0F); if (permChecker.hasCreateRepositoryPermission()) { detailAndUploadLayout.addComponent(dropAreaLayout.getDropAreaWrapper()); } detailAndUploadLayout.setSizeFull(); detailAndUploadLayout.addStyleName("group"); detailAndUploadLayout.setSpacing(true); return detailAndUploadLayout; }
Example #25
Source File: ReportDataSource.java From chipster with MIT License | 5 votes |
private static void updateCompUI(final ReportView view, final List<ServerStatusMessage> statuses, final ReportDataSource reportDataSource) { view.updateUI(new Runnable() { @Override public void run() { VerticalLayout layout = view.getCompLayout(); layout.removeAllComponents(); Collections.sort(statuses, new Comparator<ServerStatusMessage>() { @Override public int compare(ServerStatusMessage m1, ServerStatusMessage m2) { int hostComparison = m1.getHost().compareTo(m2.getHost()); int idComparison = m1.getHostId().compareTo(m2.getHostId()); if (hostComparison != 0) { return hostComparison; } return idComparison; } }); for (ServerStatusMessage serverStatus : statuses) { Label title = view.createReportLabel("Comp " + serverStatus.getHost() + " (" + serverStatus.getHostId() + ")" + " "); Button shutdownButton = view.createReportButton("Stop gracefully"); shutdownButton.addClickListener(new StopClickListener(view, reportDataSource, serverStatus.getHostId())); HorizontalLayout titleRow = new HorizontalLayout(); titleRow.addComponent(title); titleRow.addComponent(shutdownButton); Label reportLabel = view.createReportLabel( serverStatus.toString()); layout.addComponent(titleRow); layout.addComponent(reportLabel); } } }); }
Example #26
Source File: ApplyEditorWindow.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"); // horizontalLayout_1 horizontalLayout_1 = buildHorizontalLayout_1(); mainLayout.addComponent(horizontalLayout_1); // tableFunction tableFunction = new Table(); tableFunction.setCaption("Select A Function"); tableFunction.setImmediate(false); tableFunction.setWidth("100.0%"); tableFunction.setHeight("-1px"); tableFunction.setInvalidAllowed(false); tableFunction.setRequired(true); mainLayout.addComponent(tableFunction); mainLayout.setExpandRatio(tableFunction, 1.0f); // buttonSelect buttonSelect = new Button(); buttonSelect.setCaption("Select and Continue"); buttonSelect.setImmediate(true); buttonSelect.setWidth("-1px"); buttonSelect.setHeight("-1px"); mainLayout.addComponent(buttonSelect); mainLayout.setComponentAlignment(buttonSelect, new Alignment(48)); return mainLayout; }
Example #27
Source File: ObligationAdviceEditorWindow.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); // tableExpressions tableExpressions = new TreeTable(); tableExpressions.setCaption("Expressions"); tableExpressions.setImmediate(false); tableExpressions.setWidth("100%"); tableExpressions.setHeight("-1px"); mainLayout.addComponent(tableExpressions); mainLayout.setExpandRatio(tableExpressions, 1.0f); // buttonSave buttonSave = new Button(); buttonSave.setCaption("Save"); buttonSave.setImmediate(false); buttonSave.setWidth("-1px"); buttonSave.setHeight("-1px"); mainLayout.addComponent(buttonSave); mainLayout.setComponentAlignment(buttonSave, new Alignment(48)); return mainLayout; }
Example #28
Source File: SimpleBoxFormBuilder.java From jdal with Apache License 2.0 | 5 votes |
public void add(Component c, String label, int width, Alignment alignment) { if (rows == 0 && rowsHeight.isEmpty()) { log.warn("You must call row() before adding components. I will add a row with default height for you"); row(); } if (label != null) c.setCaption(label); VerticalLayout column = getColumn(); column.addComponent(c); index++; setWidth(width); if (alignment != null) { column.setComponentAlignment(c, alignment); } if (rowCellSpand) { c.setWidth(100, Unit.PERCENTAGE); } if (useTabIndex && c instanceof Field) { ((Field<?>) c).setTabIndex(tabIndex++); } }
Example #29
Source File: GovernmentBodyChartDataManagerImpl.java From cia with Apache License 2.0 | 5 votes |
@Override public void createGovernmentBodyExpenditureSummaryChart(final VerticalLayout content, final String name) { final Map<String, List<GovernmentBodyAnnualOutcomeSummary>> collect = esvApi.getGovernmentBodyReport().get(name) .stream().filter(p -> p.getDescriptionFields().get(ANSLAGSPOSTSNAMN) != null) .collect(Collectors.groupingBy(t -> t.getDescriptionFields().get(ANSLAGSPOSTSNAMN))); addAnnualData(content, name, ANNUAL_EXPENDITURE, collect); }
Example #30
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; }