Example usage for com.vaadin.ui Panel setCaption

List of usage examples for com.vaadin.ui Panel setCaption

Introduction

In this page you can find the example usage for com.vaadin.ui Panel setCaption.

Prototype

@Override
    public void setCaption(String caption) 

Source Link

Usage

From source file:com.hack23.cia.web.impl.ui.application.views.user.parliament.pagemode.ParliamentChartsDocumentActivityByTypePageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*from   w  ww.  j a  v a 2s  .  co  m*/
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    getParliamentMenuItemFactory().createParliamentTopicMenu(menuBar);

    final String pageId = getPageId(parameters);

    documentChartDataManager.createDocumentTypeChart(panelContent);

    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_TEST_CHART_VIEW, ApplicationEventGroup.USER,
            NAME, parameters, pageId);
    panel.setCaption(PARTY_WINNER_DAILY_AVERAGE_FOR_ALL_BALLOTS);

    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.parliament.pagemode.ParliamentChartsPartyAgePageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/* w w  w. j a  v  a 2s  . c  o  m*/
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    getParliamentMenuItemFactory().createParliamentTopicMenu(menuBar);

    final String pageId = getPageId(parameters);

    partyChartDataManager.createPartyAgeChart(panelContent);

    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_TEST_CHART_VIEW, ApplicationEventGroup.USER,
            NAME, parameters, pageId);
    panel.setCaption(PARTY_AGE_DAILY_AVERAGE_FOR_ALL_BALLOTS);

    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.parliament.pagemode.ParliamentChartsPartyGenderPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override//from   w w  w . j a  va 2s  .com
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    getParliamentMenuItemFactory().createParliamentTopicMenu(menuBar);

    final String pageId = getPageId(parameters);

    partyChartDataManager.createPartyGenderChart(panelContent);

    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_TEST_CHART_VIEW, ApplicationEventGroup.USER,
            NAME, parameters, pageId);
    panel.setCaption(PARTY_GENDER_DAILY_AVERAGE_FOR_ALL_BALLOTS);

    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.parliament.pagemode.ParliamentChartsPartyWinnerPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*from   www  .ja v a  2  s . c om*/
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    getParliamentMenuItemFactory().createParliamentTopicMenu(menuBar);

    final String pageId = getPageId(parameters);

    partyChartDataManager.createPartyWinnerChart(panelContent);

    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_TEST_CHART_VIEW, ApplicationEventGroup.USER,
            NAME, parameters, pageId);
    panel.setCaption(PARTY_WINNER_DAILY_AVERAGE_FOR_ALL_BALLOTS);

    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.parliament.pagemode.ParliamentOverviewPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*from   w  w w  .  j a va 2s  .  c  om*/
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();
    getParliamentMenuItemFactory().createParliamentTopicMenu(menuBar);

    final String pageId = getPageId(parameters);

    panelContent.addComponent(new Label(OVERVIEW));

    getParliamentMenuItemFactory().createOverviewPage(panelContent);

    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_TEST_CHART_VIEW, ApplicationEventGroup.USER,
            NAME, parameters, pageId);
    panel.setCaption(OVERVIEW);

    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.party.pagemode.PartyRankingAllPartiesChartsPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override//from  w  w  w.j a  v a2 s  .com
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();

    final String pageId = getPageId(parameters);

    getPartyRankingMenuItemFactory().createPartyRankingMenuBar(menuBar);
    final HorizontalLayout chartLayout = new HorizontalLayout();
    chartLayout.setSizeFull();

    chartDataManager.createChartPanel(chartLayout, dataSeriesFactory.createPartyChartTimeSeriesAll(), "All");

    panelContent.addComponent(chartLayout);

    panel.setCaption(CHARTS + 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.PartyRankingCurrentCommitteeChartsPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override//from ww  w.j av a2  s  .  co m
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();

    final String pageId = getPageId(parameters);

    getPartyRankingMenuItemFactory().createPartyRankingMenuBar(menuBar);
    final HorizontalLayout chartLayout = new HorizontalLayout();
    chartLayout.setSizeFull();

    chartDataManager.createChartPanel(chartLayout,
            dataSeriesFactory.createChartTimeSeriesCurrentCommitteeByParty(), "Current Committee");

    panelContent.addComponent(chartLayout);

    panel.setCaption(CHARTS + 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.PartyRankingCurrentGovernmentChartsPageModContentFactoryImpl.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();

    final String pageId = getPageId(parameters);

    getPartyRankingMenuItemFactory().createPartyRankingMenuBar(menuBar);
    final HorizontalLayout chartLayout = new HorizontalLayout();
    chartLayout.setSizeFull();

    chartDataManager.createChartPanel(chartLayout,
            dataSeriesFactory.createChartTimeSeriesCurrentGovernmentByParty(), "Current Government");

    panelContent.addComponent(chartLayout);

    panel.setCaption(CHARTS + 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.PartyRankingCurrentPartiesChartsPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*from ww  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);

    getPartyRankingMenuItemFactory().createPartyRankingMenuBar(menuBar);
    final HorizontalLayout chartLayout = new HorizontalLayout();
    chartLayout.setSizeFull();

    chartDataManager.createChartPanel(chartLayout, dataSeriesFactory.createPartyChartTimeSeriesCurrent(),
            "Current");

    panelContent.addComponent(chartLayout);

    panel.setCaption(CHARTS + 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.PartyRankingDataGridPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override/*w w w  .  j  a v a  2s .  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);

    final DataContainer<ViewRiksdagenPartySummary, String> dataContainer = getApplicationManager()
            .getDataContainer(ViewRiksdagenPartySummary.class);

    final BeanItemContainer<ViewRiksdagenPartySummary> politicianDocumentDataSource = new BeanItemContainer<>(
            ViewRiksdagenPartySummary.class,
            dataContainer.getAllOrderBy(ViewRiksdagenPartySummary_.currentAssignments));

    getGridFactory().createBasicBeanItemGrid(panelContent, politicianDocumentDataSource, "Parties",
            new String[] { "party", "currentAssignments", "totalActiveGovernment", "totalActiveCommittee",
                    "totalActiveParliament", "totalActiveEu", "active", "firstAssignmentDate",
                    "lastAssignmentDate", "activeEu", "activeGovernment", "activeCommittee", "totalAssignments",
                    "totalDaysServed", "totalDaysServedGovernment", "totalDaysServedCommittee",
                    "activeParliament", "totalDaysServedParliament", "totalDaysServedEu" },
            new String[] { "active", "activeParliament", "activeGovernment", "activeCommittee", "activeEu",
                    "activeParty", "activeSpeaker" },
            new PageItemPropertyClickListener(UserViews.PARTY_VIEW_NAME, "party"), null, null);

    panel.setCaption(DATAGRID + parameters);

    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_PARTY_RANKING_VIEW, ApplicationEventGroup.USER,
            NAME, parameters, pageId);

    return panelContent;

}