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.party.pagemode.PartyRankingOverviewPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override/* w ww .ja v a 2 s. c o m*/ public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getPartyRankingMenuItemFactory().createPartyRankingMenuBar(menuBar); final String pageId = getPageId(parameters); panelContent.addComponent(createDescription()); getPartyRankingMenuItemFactory().createOverviewPage(panelContent); panel.setCaption(OVERVIEW + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_PARTY_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.party.pagemode.PartyRankingPageVisitHistoryPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override/*from w ww. j a v a 2 s . co m*/ public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getPartyRankingMenuItemFactory().createPartyRankingMenuBar(menuBar); final String pageId = getPageId(parameters); adminChartDataManager.createApplicationActionEventPageModeDailySummaryChart(panelContent, NAME); panel.setCaption(PAGE_VISIT_HISTORY + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_PARTY_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.politician.pagemode.PoliticianRankingChartsAllPartiesPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override/* w w w. 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); getPoliticianRankingMenuItemFactory().createPoliticianRankingMenuBar(menuBar); chartDataManager.createChartPanel(panelContent, dataSeriesFactory.createPartyChartTimeSeriesAll(), "All"); panel.setCaption(CHARTS); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_POLITICIAN_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.politician.pagemode.PoliticianRankingChartsCurrentPartiesPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override//from w w w. j av a 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); getPoliticianRankingMenuItemFactory().createPoliticianRankingMenuBar(menuBar); chartDataManager.createChartPanel(panelContent, dataSeriesFactory.createPartyChartTimeSeriesCurrent(), "Current"); panel.setCaption(CHARTS); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_POLITICIAN_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.politician.pagemode.PoliticianRankingDataGridPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override//from w ww.ja v a 2 s.c o m public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getPoliticianRankingMenuItemFactory().createPoliticianRankingMenuBar(menuBar); final String pageId = getPageId(parameters); final DataContainer<ViewRiksdagenPolitician, String> politicianDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenPolitician.class); final BeanItemContainer<ViewRiksdagenPolitician> politicianDataSource = new BeanItemContainer<>( ViewRiksdagenPolitician.class, politicianDataContainer.getAllOrderBy(ViewRiksdagenPolitician_.currentAssignments)); getGridFactory().createBasicBeanItemGrid(panelContent, politicianDataSource, "Politicians", new String[] { "personId", "firstName", "lastName", "party", "bornYear", "totalDaysServed", "currentAssignments", "totalAssignments", "firstAssignmentDate", "lastAssignmentDate", "totalDaysServedParliament", "totalDaysServedCommittee", "totalDaysServedGovernment", "totalDaysServedEu", "active", "activeEu", "activeGovernment", "activeCommittee", "activeParliament", "activeParty", "activeSpeaker", "totalDaysServedSpeaker", "totalDaysServedParty", "totalPartyAssignments", "totalMinistryAssignments", "totalCommitteeAssignments", "totalSpeakerAssignments", "currentPartyAssignments", "currentMinistryAssignments", "currentCommitteeAssignments", "currentSpeakerAssignments", "gender" }, new String[] { "personId", "active", "activeEu", "activeGovernment", "activeCommittee", "activeParliament", "activeParty", "activeSpeaker", "bornYear" }, new PageItemPropertyClickListener(UserViews.POLITICIAN_VIEW_NAME, "personId"), null, null); panel.setCaption(DATAGRID + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_POLITICIAN_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.politician.pagemode.PoliticianRankingOverviewPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override/* w ww . j a v a2s. c om*/ public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getPoliticianRankingMenuItemFactory().createPoliticianRankingMenuBar(menuBar); final String pageId = getPageId(parameters); panelContent.addComponent(createDescription()); getPoliticianRankingMenuItemFactory().createOverviewPage(panelContent); panel.setCaption(OVERVIEW + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_POLITICIAN_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
From source file:com.hack23.cia.web.impl.ui.application.views.user.politician.pagemode.PoliticianRankingPageVisitHistoryPageModContentFactoryImpl.java
License:Apache License
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" }) @Override// w w w .j a va 2s . c o m public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) { final VerticalLayout panelContent = createPanelContent(); getPoliticianRankingMenuItemFactory().createPoliticianRankingMenuBar(menuBar); final String pageId = getPageId(parameters); adminChartDataManager.createApplicationActionEventPageModeDailySummaryChart(panelContent, NAME); panel.setCaption(PAGE_VISIT_HISTORY + parameters); getPageActionEventHelper().createPageEvent(ViewAction.VISIT_POLITICIAN_RANKING_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId); return panelContent; }
From source file:com.ocs.dynamo.ui.component.ErrorView.java
License:Apache License
@Override public void build() { VerticalLayout main = new DefaultVerticalLayout(true, true); Panel panel = new Panel(); panel.setCaption(message("ocs.error.occurred")); main.addComponent(panel);/* w ww. j ava2s . c om*/ VerticalLayout inside = new DefaultVerticalLayout(true, true); panel.setContent(inside); Label errorLabel = new Label(message("ocs.view.unknown")); inside.addComponent(errorLabel); setCompositionRoot(main); }
From source file:com.ocs.dynamo.ui.composite.dialog.BaseModalDialog.java
License:Apache License
private void constructLayout() { this.setModal(true); this.setResizable(false); Panel panel = new Panel(); panel.setCaptionAsHtml(true);/*ww w . j a v a2 s . co m*/ panel.setCaption(getTitle()); this.setContent(panel); VerticalLayout main = new DefaultVerticalLayout(); main.setStyleName("ocsDialog"); panel.setContent(main); doBuild(main); DefaultHorizontalLayout buttonBar = new DefaultHorizontalLayout(); main.addComponent(buttonBar); doBuildButtonBar(buttonBar); }
From source file:com.ocs.dynamo.ui.composite.form.ModelBasedEditForm.java
License:Apache License
/** * Construct the layout (form and panel) for an attribute group * //from www. ja v a2 s .co m * @param parent * the parent component * @param tabs * whether to include the component in a tab sheet * @param tabSheet * the parent tab sheet (only used if the "tabs" parameter is true) * @param caption * caption of the panel or tab sheet * @param lowest * indicates whether this is the lowest level * @return */ private Layout constructAttributeGroupLayout(Layout parent, boolean tabs, TabSheet tabSheet, String caption, boolean lowest) { Layout innerLayout = null; if (lowest) { innerLayout = new FormLayout(); ((FormLayout) innerLayout).setMargin(true); if (!tabs) { ((FormLayout) innerLayout).setStyleName(DynamoConstants.CSS_CLASS_HALFSCREEN); } } else { innerLayout = new DefaultVerticalLayout(true, true); } if (tabs) { tabSheet.addTab(innerLayout, caption); } else { Panel panel = new Panel(); panel.setStyleName("attributePanel"); panel.setCaption(caption); panel.setContent(innerLayout); parent.addComponent(panel); } return innerLayout; }