List of usage examples for com.vaadin.ui Panel setCaption
@Override public void setCaption(String caption)
From source file:com.hack23.cia.web.impl.ui.application.views.user.goverment.pagemode.MinistryCurrentMembersPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override//from ww w.j ava 2s . c o m public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); final String pageId = getPageId(parameters); final DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenMinistry.class); final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId); if (viewRiksdagenMinistry != null) { getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, CURRENT_MEMBERS); final DataContainer<ViewRiksdagenGovermentRoleMember, String> govermentRoleMemberDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenGovermentRoleMember.class); final BeanItemContainer<ViewRiksdagenGovermentRoleMember> currentMembersMemberDataSource = new BeanItemContainer<>( ViewRiksdagenGovermentRoleMember.class, govermentRoleMemberDataContainer.findListByProperty( new Object[] { viewRiksdagenMinistry.getNameId(), Boolean.TRUE }, ViewRiksdagenGovermentRoleMember_.detail, ViewRiksdagenGovermentRoleMember_.active)); getGridFactory().createBasicBeanItemGrid(panelContent, currentMembersMemberDataSource, CURRENT_MEMBERS, new String[] { "roleCode", "roleId", "personId", "firstName", "lastName", "party", "active", "totalDaysServed", "detail", "fromDate", "toDate" }, new String[] { "roleId", "personId", "detail", "active" }, new PageItemPropertyClickListener(UserViews.POLITICIAN_VIEW_NAME, "personId"), null, null); panel.setCaption(MINISTRY + viewRiksdagenMinistry.getNameId()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); } return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.goverment.pagemode.MinistryDocumentActivityPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override/*from www.ja va 2s .com*/ public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); final String pageId = getPageId(parameters); final DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenMinistry.class); final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId); if (viewRiksdagenMinistry != null) { getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, DOCUMENT_ACTIVITY); chartDataManager.createDocumentHistoryChartByOrg(panelContent, viewRiksdagenMinistry.getNameId()); panel.setCaption(MINISTRY + viewRiksdagenMinistry.getNameId()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); } return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.goverment.pagemode.MinistryDocumentHistoryPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override//from w w w.j av a2 s . c om public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); final String pageId = getPageId(parameters); final DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenMinistry.class); final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId); if (viewRiksdagenMinistry != null) { getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, DOCUMENT_HISTORY); final DataContainer<ViewRiksdagenPoliticianDocument, String> politicianDocumentDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenPoliticianDocument.class); final BeanItemContainer<ViewRiksdagenPoliticianDocument> politicianDocumentDataSource = new BeanItemContainer<>( ViewRiksdagenPoliticianDocument.class, politicianDocumentDataContainer.findOrderedListByProperty(ViewRiksdagenPoliticianDocument_.org, viewRiksdagenMinistry.getNameId(), ViewRiksdagenPoliticianDocument_.madePublicDate)); getGridFactory().createBasicBeanItemGrid(panelContent, politicianDocumentDataSource, "Documents", new String[] { "id", "docId", "personReferenceId", "roleDescription", "org", "label", "rm", "madePublicDate", "numberValue", "title", "subTitle", "tempLabel", "orderNumber", "documentType", "subType", "status", "partyShortCode", "referenceName" }, new String[] { "id", "numberValue", "orderNumber", "tempLabel", "personReferenceId", "org", "roleDescription", "label", "subTitle", "docId" }, new PageItemPropertyClickListener(UserViews.DOCUMENT_VIEW_NAME, "docId"), null, null); panel.setCaption(MINISTRY + viewRiksdagenMinistry.getNameId()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); } return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.goverment.pagemode.MinistryGovernmentBodiesModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override//w ww.j av a 2s.com public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); final String pageId = getPageId(parameters); final DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenMinistry.class); final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId); if (viewRiksdagenMinistry != null) { getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, GOVERNMENT_BODIES); governmentBodyChartDataManager.createMinistryGovernmentBodyHeadcountSummaryChart(panelContent, viewRiksdagenMinistry.getNameId()); panel.setCaption(MINISTRY + viewRiksdagenMinistry.getNameId()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); } return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.goverment.pagemode.MinistryMemberHistoryPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override// w w w . j a v a 2s . co m public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); final String pageId = getPageId(parameters); final DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenMinistry.class); final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId); if (viewRiksdagenMinistry != null) { getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, MEMBER_HISTORY); final DataContainer<ViewRiksdagenGovermentRoleMember, String> govermentRoleMemberDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenGovermentRoleMember.class); final BeanItemContainer<ViewRiksdagenGovermentRoleMember> govermentRoleMemberDataSource = new BeanItemContainer<>( ViewRiksdagenGovermentRoleMember.class, govermentRoleMemberDataContainer .getAllBy(ViewRiksdagenGovermentRoleMember_.detail, viewRiksdagenMinistry.getNameId())); getGridFactory().createBasicBeanItemGrid(panelContent, govermentRoleMemberDataSource, MEMBER_HISTORY, new String[] { "roleCode", "roleId", "personId", "firstName", "lastName", "party", "active", "totalDaysServed", "detail", "fromDate", "toDate" }, new String[] { "roleId", "personId", "detail" }, new PageItemPropertyClickListener(UserViews.POLITICIAN_VIEW_NAME, "personId"), null, null); panel.setCaption(MINISTRY + viewRiksdagenMinistry.getNameId()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); } return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.goverment.pagemode.MinistryOverviewPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override/*from w ww.j a va 2 s . c om*/ public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); final String pageId = getPageId(parameters); final DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenMinistry.class); final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId); if (viewRiksdagenMinistry != null) { getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId); LabelFactory.createHeader2Label(panelContent, OVERVIEW); final VerticalLayout overviewLayout = new VerticalLayout(); overviewLayout.setSizeFull(); panelContent.addComponent(overviewLayout); panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM); getMinistryMenuItemFactory().createOverviewPage(overviewLayout, pageId); final Link addMinistryPageLink = getPageLinkFactory().addMinistryPageLink(viewRiksdagenMinistry); panelContent.addComponent(addMinistryPageLink); getFormFactory().addFormPanelTextFields(panelContent, new BeanItem<>(viewRiksdagenMinistry), ViewRiksdagenMinistry.class, Arrays.asList(new String[] { "nameId", "active", "firstAssignmentDate", "lastAssignmentDate", "totalAssignments", "totalDaysServed", "currentMemberSize" })); panelContent.setExpandRatio(addMinistryPageLink, ContentRatio.SMALL); panel.setCaption(MINISTRY + viewRiksdagenMinistry.getNameId()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); } return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.goverment.pagemode.MinistryPageVisitHistoryPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override/*from w w w . j a v a2 s. c o m*/ public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); final String pageId = getPageId(parameters); final DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenMinistry.class); final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId); if (viewRiksdagenMinistry != null) { getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId); createPageVisitHistory(NAME, pageId, panelContent); panel.setCaption(MINISTRY + viewRiksdagenMinistry.getNameId()); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); } return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.goverment.pagemode.MinistryRankingAllMinistriesChartsPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override/*from w ww . j a va 2 s . co m*/ 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.createMinistryChartTimeSeriesAll(), "All"); panelContent.addComponent(chartLayout); panel.setCaption(CHARTS + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.goverment.pagemode.MinistryRankingAllPartiesChartsPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override/* w w w .jav a 2s .c o m*/ public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getMinistryRankingMenuItemFactory().createMinistryRankingMenuBar(menuBar); final String pageId = getPageId(parameters); final HorizontalLayout chartLayout = new HorizontalLayout(); chartLayout.setSizeFull(); chartDataManager.createChartPanel(chartLayout, dataSeriesFactory.createChartTimeSeriesTotalDaysServedGovernmentByParty(), "All Parties, total days served"); panelContent.addComponent(chartLayout); panel.setCaption(CHARTS + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.goverment.pagemode.MinistryRankingAllRolesChartsPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override/*from w w w. j a va 2 s.c o m*/ 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(); final DataContainer<ViewRiksdagenGovermentRoleMember, String> govermentRoleMemberDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenGovermentRoleMember.class); final List<ViewRiksdagenGovermentRoleMember> allMembers = govermentRoleMemberDataContainer.getAll(); ministryGhantChartManager.createRoleGhant(panelContent, allMembers); panel.setCaption(CHARTS + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }