Java Code Examples for com.vaadin.ui.Layout
The following examples show how to use
com.vaadin.ui.Layout. These examples are extracted from open source projects.
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 Project: cia Source File: DocumentPageVisitHistoryPageModContentFactoryImpl.java License: 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); getDocumentMenuItemFactory().createDocumentMenuBar(menuBar, pageId); createPageVisitHistory(NAME, pageId, panelContent); panel.setContent(panelContent); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 2
Source Project: cuba Source File: MainTabSheetActionHandler.java License: Apache License 2.0 | 6 votes |
protected void analyzeLayout(Object target) { Window window = findWindow((Layout) target); if (window != null) { LayoutAnalyzer analyzer = new LayoutAnalyzer(); List<LayoutTip> tipsList = analyzer.analyze(window); if (tipsList.isEmpty()) { Notifications notifications = ComponentsHelper.getScreenContext(window).getNotifications(); notifications.create(NotificationType.HUMANIZED) .withCaption("No layout problems found") .show(); } else { WindowManager wm = (WindowManager) ComponentsHelper.getScreenContext(window).getScreens(); WindowInfo windowInfo = AppBeans.get(WindowConfig.class).getWindowInfo("layoutAnalyzer"); wm.openWindow(windowInfo, WindowManager.OpenType.DIALOG, ParamsMap.of("tipsList", tipsList)); } } }
Example 3
Source Project: cia Source File: PoliticianDocumentActivityPageModContentFactoryImpl.java License: 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.DOCUMENTACTIVITY.toString()); documentChartDataManager.createPersonDocumentHistoryChart(panelContent, viewRiksdagenPolitician.getPersonId()); pageCompleted(parameters, panel, pageId, viewRiksdagenPolitician); return panelContent; }
Example 4
Source Project: cia Source File: PoliticianDocumentHistoryPageModContentFactoryImpl.java License: 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.DOCUMENTHISTORY.toString()); final DataContainer<ViewRiksdagenPoliticianDocument, String> politicianDocumentDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenPoliticianDocument.class); getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenPoliticianDocument.class, politicianDocumentDataContainer.findOrderedListByProperty( ViewRiksdagenPoliticianDocument_.personReferenceId, viewRiksdagenPolitician.getPersonId(), ViewRiksdagenPoliticianDocument_.madePublicDate), DOCUMENTS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null); pageCompleted(parameters, panel, pageId, viewRiksdagenPolitician); return panelContent; }
Example 5
Source Project: cia Source File: PartyMemberHistoryPageModContentFactoryImpl.java License: 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 6
Source Project: cia Source File: PartyCoalitionsAgainstAnnualSummaryChartPageModContentFactoryImpl.java License: 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 7
Source Project: cia Source File: PartyGovernmentRolesPageModContentFactoryImpl.java License: 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, GOVERNMENT_ROLES); final DataContainer<ViewRiksdagenGovermentRoleMember, String> govermentRoleMemberDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenGovermentRoleMember.class); getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenGovermentRoleMember.class, govermentRoleMemberDataContainer.findListByProperty( new Object[] { viewRiksdagenParty.getPartyId(), Boolean.TRUE }, ViewRiksdagenGovermentRoleMember_.party, ViewRiksdagenGovermentRoleMember_.active), GOVERNMENT_ROLES, COLUMN_ORDER, HIDE_COLUMNS, new PageItemPropertyClickListener(UserViews.POLITICIAN_VIEW_NAME, PERSON_ID), null, null); pageCompleted(parameters, panel, pageId, viewRiksdagenParty); return panelContent; }
Example 8
Source Project: cia Source File: PartyLeaderHistoryPageModContentFactoryImpl.java License: 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 9
Source Project: cia Source File: PartyVoteHistoryPageModContentFactoryImpl.java License: 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, VOTE_HISTORY); getGridFactory().createBasicBeanItemNestedPropertiesGrid(panelContent, ViewRiksdagenVoteDataBallotPartySummary.class, viewRiksdagenVoteDataBallotPartySummaryChartDataManager.findByValue(pageId), BALLOTS, NESTED_PROPERTIES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, EMBEDDED_ID_BALLOT_ID, null); pageCompleted(parameters, panel, pageId, viewRiksdagenParty); return panelContent; }
Example 10
Source Project: cia Source File: PartyCurrentLeadersPageModContentFactoryImpl.java License: 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_LEADERS); final DataContainer<ViewRiksdagenPartyRoleMember, String> partyRoleMemberDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenPartyRoleMember.class); getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenPartyRoleMember.class, partyRoleMemberDataContainer.findListByProperty( new Object[] { viewRiksdagenParty.getPartyId(), Boolean.TRUE }, ViewRiksdagenPartyRoleMember_.party, ViewRiksdagenPartyRoleMember_.active), CURRENT_LEADERS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null); pageCompleted(parameters, panel, pageId, viewRiksdagenParty); return panelContent; }
Example 11
Source Project: cia Source File: PartySupportAnnualSummaryChartPageModContentFactoryImpl.java License: 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 12
Source Project: cia Source File: CommitteeDecisionTypeDailySummaryPageModContentFactoryImpl2.java License: 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 ViewRiksdagenCommittee viewRiksdagenCommittee = getItem(parameters); getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, DECISION_TYPE_DAILY_SUMMARY); chartDataManager.createDecisionTypeChart(panelContent, viewRiksdagenCommittee.getEmbeddedId().getOrgCode()); panel.setCaption(NAME + "::" + COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 13
Source Project: cuba Source File: WebWindow.java License: Apache License 2.0 | 5 votes |
@Override public boolean getSpacing() { if (getContainer() instanceof Layout.SpacingHandler) { return ((Layout.SpacingHandler) getContainer()).isSpacing(); } return false; }
Example 14
Source Project: cuba Source File: MainTabSheetActionHandler.java License: Apache License 2.0 | 5 votes |
protected void showInfo(Object target) { AbstractEditor editor = (AbstractEditor) findEditor((Layout) target); Entity entity = editor.getItem(); Metadata metadata = AppBeans.get(Metadata.NAME); MetaClass metaClass = metadata.getSession().getClass(entity.getClass()); new ShowInfoAction().showInfo(entity, metaClass, editor); }
Example 15
Source Project: cia Source File: GovernmentBodyIncomePageModContentFactoryImpl.java License: 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); final List<GovernmentBodyAnnualSummary> list = getItem(parameters); if (list != null && !list.isEmpty()) { final Optional<GovernmentBodyAnnualSummary> governmentBodyAnnualSummary = list.stream().findFirst(); if (governmentBodyAnnualSummary.isPresent()) { getGovernmentBodyMenuItemFactory().createGovernmentBodyMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent,GOVERNMENT_BODIES); governmentBodyChartDataManager.createGovernmentBodyIncomeSummaryChart(panelContent, governmentBodyAnnualSummary.get().getName()); panel.setCaption(NAME + "::" + GOVERNMENT_BODY + governmentBodyAnnualSummary.get().getName()); } getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); } return panelContent; }
Example 16
Source Project: cuba Source File: MainTabSheetActionHandler.java License: Apache License 2.0 | 5 votes |
protected com.haulmont.cuba.gui.components.Window findWindow(Layout layout) { for (Object component : layout) { if (component instanceof WindowBreadCrumbs) { WindowBreadCrumbs breadCrumbs = (WindowBreadCrumbs) component; if (breadCrumbs.getCurrentWindow() != null) { return breadCrumbs.getCurrentWindow(); } } } return null; }
Example 17
Source Project: cia Source File: DocumentActivityPageModContentFactoryImpl.java License: 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_ACTIVITY); if (documentStatusContainer != null && documentStatusContainer.getDocumentActivityContainer() != null && documentStatusContainer.getDocumentActivityContainer().getDocumentActivities() != null) { getGridFactory().createBasicBeanItemGrid(panelContent, DocumentActivityData.class, documentStatusContainer.getDocumentActivityContainer().getDocumentActivities(), DOCUMENT_ACTIVITIES, COLUMN_ORDER, HIDE_COLUMNS, null, null, null); } panel.setContent(panelContent); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 18
Source Project: hawkbit Source File: AbstractGridComponentLayout.java License: Eclipse Public License 1.0 | 5 votes |
/** * Layouts header, grid and optional footer. */ protected void buildLayout() { setSizeFull(); setSpacing(true); setMargin(false); setStyleName("group"); final VerticalLayout gridHeaderLayout = new VerticalLayout(); gridHeaderLayout.setSizeFull(); gridHeaderLayout.setSpacing(false); gridHeaderLayout.setMargin(false); gridHeaderLayout.setStyleName("table-layout"); gridHeaderLayout.addComponent(gridHeader); gridHeaderLayout.setComponentAlignment(gridHeader, Alignment.TOP_CENTER); gridHeaderLayout.addComponent(grid); gridHeaderLayout.setComponentAlignment(grid, Alignment.TOP_CENTER); gridHeaderLayout.setExpandRatio(grid, 1.0F); addComponent(gridHeaderLayout); setComponentAlignment(gridHeaderLayout, Alignment.TOP_CENTER); setExpandRatio(gridHeaderLayout, 1.0F); if (hasFooterSupport()) { final Layout footerLayout = getFooterSupport().createFooterMessageComponent(); addComponent(footerLayout); setComponentAlignment(footerLayout, Alignment.BOTTOM_CENTER); } }
Example 19
Source Project: cia Source File: AgentOperationsOverviewPageModContentFactoryImpl.java License: Apache License 2.0 | 5 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_AGENT_OPERATION); final VerticalLayout overviewLayout = new VerticalLayout(); overviewLayout.setSizeFull(); content.addComponent(overviewLayout); content.setExpandRatio(overviewLayout, ContentRatio.LARGE); final ResponsiveRow grid = RowUtil.createGridLayout(overviewLayout); for (final DataAgentTarget dataAgentTarget : DataAgentTarget.values()) { final Button importDataButton = new Button(MessageFormat.format(BUTTON_PATTERN, DataAgentOperation.IMPORT, dataAgentTarget) , VaadinIcons.BULLSEYE); importDataButton.addClickListener(new StartAgentClickListener(dataAgentTarget, DataAgentOperation.IMPORT)); importDataButton.setId(MessageFormat.format(BUTTON_ID_PATTERN, ViewAction.START_AGENT_BUTTON, DataAgentOperation.IMPORT, dataAgentTarget)); RowUtil.createRowItem(grid, importDataButton, WILL_FETCH_DATA_FROM_SOURCE); } final String pageId = getPageId(parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_ADMIN_AGENT_OPERATION_VIEW, ApplicationEventGroup.ADMIN, NAME, null, pageId); return content; }
Example 20
Source Project: mycollab Source File: MultiFileUpload.java License: GNU Affero General Public License v3.0 | 5 votes |
protected Layout getprogressBarsLayout() { if (progressBars == null) { final VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.setMargin(false); verticalLayout.setSpacing(false); progressBars = verticalLayout; } return progressBars; }
Example 21
Source Project: mycollab Source File: RoleFormLayoutFactory.java License: GNU Affero General Public License v3.0 | 5 votes |
@Override public AbstractComponent getLayout() { ReadViewLayout userAddLayout = new DefaultReadViewLayout(this.title); wrappedLayoutFactory = new RoleInformationLayout(); wrappedLayoutFactory.getLayout().setWidth("100%"); userAddLayout.addBody(wrappedLayoutFactory.getLayout()); Layout bottomPanel = this.createBottomPanel(); if (bottomPanel != null) { userAddLayout.addBottomControls(bottomPanel); } return userAddLayout; }
Example 22
Source Project: cia Source File: CommitteeCurrentMembersHistoryPageModContentFactoryImpl.java License: 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); final ViewRiksdagenCommittee viewRiksdagenCommittee = getItem(parameters); getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, CURRENT_MEMBERS); final DataContainer<ViewRiksdagenCommitteeRoleMember, String> committeeRoleMemberDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenCommitteeRoleMember.class); getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenCommitteeRoleMember.class, committeeRoleMemberDataContainer.findListByProperty( new Object[] { viewRiksdagenCommittee.getEmbeddedId().getDetail(), Boolean.TRUE }, ViewRiksdagenCommitteeRoleMember_.detail, ViewRiksdagenCommitteeRoleMember_.active), CURRENT_MEMBERS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null); panel.setCaption(NAME + "::" + COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 23
Source Project: cia Source File: DocumentPersonReferencesPageModContentFactoryImpl.java License: 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, PERSON_REFERENCES); if (documentStatusContainer != null && documentStatusContainer.getDocumentPersonReferenceContainer() != null && documentStatusContainer.getDocumentPersonReferenceContainer() .getDocumentPersonReferenceList() != null) { getGridFactory().createBasicBeanItemGrid(panelContent, DocumentPersonReferenceData.class, documentStatusContainer.getDocumentPersonReferenceContainer().getDocumentPersonReferenceList(), DOCUMENT_PERSON_REFERENCES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null); } panel.setContent(panelContent); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 24
Source Project: cia Source File: DocumentAttachementsPageModContentFactoryImpl.java License: 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_ATTACHMENTS); if (documentStatusContainer != null && documentStatusContainer.getDocumentAttachmentContainer() != null && documentStatusContainer.getDocumentAttachmentContainer().getDocumentAttachmentList() != null) { getGridFactory().createBasicBeanItemGrid(panelContent, DocumentAttachment.class, documentStatusContainer.getDocumentAttachmentContainer().getDocumentAttachmentList(), DOCUMENT_ATTACHMENTS, COLUMN_ORDER, HIDE_COLUMNS, null, null, null); displayDocumentAttachements(panelContent, documentStatusContainer.getDocumentAttachmentContainer().getDocumentAttachmentList()); } panel.setContent(panelContent); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 25
Source Project: cia Source File: DocumentDetailsPageModContentFactoryImpl.java License: 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_DETAILS); if (documentStatusContainer != null && documentStatusContainer.getDocumentDetailContainer() != null && documentStatusContainer.getDocumentDetailContainer().getDocumentDetailList() != null) { getGridFactory().createBasicBeanItemGrid(panelContent, DocumentDetailData.class, documentStatusContainer.getDocumentDetailContainer().getDocumentDetailList(), DOCUMENT_DETAILS2, COLUMN_ORDER, HIDE_COLUMNS, null, null, null); } panel.setContent(panelContent); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 26
Source Project: cia Source File: CommitteeDocumentHistoryPageModContentFactoryImpl.java License: 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); final ViewRiksdagenCommittee viewRiksdagenCommittee = getItem(parameters); getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, DOCUMENT_HISTORY); final DataContainer<ViewRiksdagenPoliticianDocument, String> politicianDocumentDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenPoliticianDocument.class); getGridFactory() .createBasicBeanItemGrid(panelContent, ViewRiksdagenPoliticianDocument.class, politicianDocumentDataContainer.findOrderedListByProperty(ViewRiksdagenPoliticianDocument_.org, viewRiksdagenCommittee.getEmbeddedId().getOrgCode().replace(" ", "").replace("_", "") .trim(), ViewRiksdagenPoliticianDocument_.madePublicDate), DOCUMENTS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null); panel.setCaption(NAME + "::" + COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 27
Source Project: cia Source File: CommitteeMemberHistoryPageModContentFactoryImpl.java License: 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); final ViewRiksdagenCommittee viewRiksdagenCommittee = getItem(parameters); getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, MEMBER_HISTORY); final DataContainer<ViewRiksdagenCommitteeRoleMember, String> committeeRoleMemberDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenCommitteeRoleMember.class); getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenCommitteeRoleMember.class, committeeRoleMemberDataContainer.getAllBy(ViewRiksdagenCommitteeRoleMember_.detail, viewRiksdagenCommittee.getEmbeddedId().getDetail()), MEMBER_HISTORY, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null); panel.setCaption(NAME + "::" + COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
Example 28
Source Project: mycollab Source File: ProjectMemberInviteViewImpl.java License: GNU Affero General Public License v3.0 | 5 votes |
private Layout createButtonControls() { MButton inviteBtn = new MButton(UserUIContext.getMessage(ProjectMemberI18nEnum.BUTTON_NEW_INVITEE), clickEvent -> { SimpleProjectRole role = roleComboBox.getValue(); ProjectMemberInviteViewImpl.this.fireEvent(new ViewEvent<>(ProjectMemberInviteViewImpl.this, new InviteMembers(inviteUserTokenField.getInviteEmails(), role.getId(), role.getRolename(), messageArea.getValue()))); }).withIcon(VaadinIcons.PAPERPLANE).withStyleName(WebThemes.BUTTON_ACTION); MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CANCEL), clickEvent -> EventBusFactory.getInstance().post(new ProjectMemberEvent.GotoList(this, CurrentProjectVariables.getProjectId()))) .withStyleName(WebThemes.BUTTON_OPTION); return new MHorizontalLayout(cancelBtn, inviteBtn); }
Example 29
Source Project: cuba Source File: WindowBreadCrumbs.java License: Apache License 2.0 | 4 votes |
public void setBeanLocator(BeanLocator beanLocator) { setWidth(100, Unit.PERCENTAGE); setHeightUndefined(); setPrimaryStyleName(C_HEADLINE_CONTAINER); if (workAreaMode == Mode.TABBED) { super.setVisible(false); } Layout logoLayout = createLogoLayout(); linksLayout = createLinksLayout(); linksLayout.setSizeUndefined(); if (workAreaMode == Mode.SINGLE) { Messages messages = beanLocator.get(Messages.NAME); CubaButton closeBtn = new CubaButton(""); closeBtn.setDescription(messages.getMainMessage("windowBreadCrumbs.closeButton.description")); closeBtn.setClickHandler(this::onCloseWindowButtonClick); closeBtn.setIcon(resolveIcon(beanLocator, CubaIcon.CLOSE)); closeBtn.setStyleName("c-closetab-button"); this.closeBtn = closeBtn; } Layout enclosingLayout = createEnclosingLayout(); enclosingLayout.addComponent(linksLayout); addComponent(logoLayout); addComponent(enclosingLayout); boolean controlsVisible = beanLocator.get(Configuration.class) .getConfig(WebConfig.class) .getShowBreadCrumbs(); enclosingLayout.setVisible(controlsVisible); if (closeBtn != null) { addComponent(closeBtn); } }
Example 30
Source Project: cuba Source File: WindowBreadCrumbs.java License: Apache License 2.0 | 4 votes |
protected Layout createEnclosingLayout() { Layout enclosingLayout = new CssLayout(); enclosingLayout.setPrimaryStyleName("c-breadcrumbs-container"); return enclosingLayout; }