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.committee.pagemode.CommitteeRankingAllCommitteesChartsPageModContentFactoryImpl.java

License:Apache License

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

    getCommitteeRankingMenuItemFactory().createCommitteeeRankingMenuBar(menuBar);

    final String pageId = getPageId(parameters);

    final HorizontalLayout chartLayout = new HorizontalLayout();
    chartLayout.setSizeFull();

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

    panelContent.addComponent(chartLayout);

    panel.setCaption(CHARTS + parameters);

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

    return panelContent;

}

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

License:Apache License

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

    getCommitteeRankingMenuItemFactory().createCommitteeeRankingMenuBar(menuBar);

    final String pageId = getPageId(parameters);

    final HorizontalLayout chartLayout = new HorizontalLayout();
    chartLayout.setSizeFull();

    chartDataManager.createChartPanel(chartLayout,
            dataSeriesFactory.createChartTimeSeriesTotalDaysServedCommitteeByParty(),
            ALL_PARTIES_TOTAL_DAYS_SERVED);

    panelContent.addComponent(chartLayout);

    panel.setCaption(CHARTS + parameters);

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

    return panelContent;

}

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

License:Apache License

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

    getCommitteeRankingMenuItemFactory().createCommitteeeRankingMenuBar(menuBar);

    final String pageId = getPageId(parameters);

    final HorizontalLayout chartLayout = new HorizontalLayout();
    chartLayout.setSizeFull();

    chartDataManager.createChartPanel(chartLayout,
            dataSeriesFactory2.createChartTimeSeriesCurrentCommitteeByParty(), CURRENT_PARTIES_HEADCOUNT);

    panelContent.addComponent(chartLayout);

    panel.setCaption(CHARTS + parameters);

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

    return panelContent;

}

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

License:Apache License

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

    getCommitteeRankingMenuItemFactory().createCommitteeeRankingMenuBar(menuBar);

    final String pageId = getPageId(parameters);

    final HorizontalLayout chartLayout = new HorizontalLayout();
    chartLayout.setSizeFull();

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

    panelContent.addComponent(chartLayout);

    panel.setCaption(CHARTS + parameters);

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

    return panelContent;

}

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

License:Apache License

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

    getCommitteeRankingMenuItemFactory().createCommitteeeRankingMenuBar(menuBar);

    final String pageId = getPageId(parameters);

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

    final BeanItemContainer<ViewRiksdagenCommittee> politicianDocumentDataSource = new BeanItemContainer<>(
            ViewRiksdagenCommittee.class,
            dataContainer.getAllOrderBy(ViewRiksdagenCommittee_.currentMemberSize));

    politicianDocumentDataSource.addNestedContainerProperty("embeddedId.detail");
    politicianDocumentDataSource.addNestedContainerProperty("embeddedId.orgCode");

    getGridFactory().createBasicBeanItemGrid(panelContent, politicianDocumentDataSource, "Committees",
            new String[] { "embeddedId.orgCode", "embeddedId.detail", "totalDaysServed", "currentMemberSize",
                    "totalAssignments", "firstAssignmentDate", "active", "lastAssignmentDate" },
            new String[] { "embeddedId", "embeddedId.orgCode", "active" },
            new PageItemPropertyClickListener(UserViews.COMMITTEE_VIEW_NAME, "embeddedId.orgCode"), null, null);

    panel.setCaption(DATAGRID + parameters);

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

    return panelContent;

}

From source file:com.hack23.cia.web.impl.ui.application.views.user.committee.pagemode.CommitteeRankingOverviewPageModContentFactoryImpl.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();

    getCommitteeRankingMenuItemFactory().createCommitteeeRankingMenuBar(menuBar);

    final String pageId = getPageId(parameters);

    panelContent.addComponent(createDescription());

    getCommitteeRankingMenuItemFactory().createOverviewPage(panelContent);

    panel.setCaption(OVERVIEW + parameters);

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

    return panelContent;

}

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

License:Apache License

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

    getCommitteeRankingMenuItemFactory().createCommitteeeRankingMenuBar(menuBar);

    final String pageId = getPageId(parameters);

    adminChartDataManager.createApplicationActionEventPageModeDailySummaryChart(panelContent, NAME);

    panel.setCaption(PAGE_VISIT_HISTORY + parameters);

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

    return panelContent;

}

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

License:Apache License

@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override//  w  ww .  j  a va2s .  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<ViewRiksdagenCommittee, String> dataContainer = getApplicationManager()
            .getDataContainer(ViewRiksdagenCommittee.class);

    final ViewRiksdagenCommittee viewRiksdagenCommittee = dataContainer.load(pageId);

    if (viewRiksdagenCommittee != null) {

        getCommitteeMenuItemFactory().createCommitteeeMenuBar(menuBar, pageId);

        LabelFactory.createHeader2Label(panelContent, ROLE_GHANT);

        final DataContainer<ViewRiksdagenCommitteeRoleMember, String> committeeRoleMemberDataContainer = getApplicationManager()
                .getDataContainer(ViewRiksdagenCommitteeRoleMember.class);

        final List<ViewRiksdagenCommitteeRoleMember> allMembers = committeeRoleMemberDataContainer.getAllBy(
                ViewRiksdagenCommitteeRoleMember_.detail, viewRiksdagenCommittee.getEmbeddedId().getDetail());

        committeeGhantChartManager.createRoleGhant(panelContent, allMembers);

        panel.setCaption(COMMITTEE + viewRiksdagenCommittee.getEmbeddedId().getDetail());
        getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_VIEW, ApplicationEventGroup.USER,
                NAME, parameters, pageId);
    }
    return panelContent;

}

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

License:Apache License

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

    final String pageId = getPageId(parameters);

    panelContent.addComponent(new Label(OVERVIEW));

    getCountryMenuItemFactory().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.country.pagemode.WorldIndicatorsPageModContentFactoryImpl.java

License:Apache License

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

    final String pageId = getPageId(parameters);

    final String indicator = parameters.substring(PageMode.INDICATORS.toString().length() + "/".length(),
            parameters.length());

    createDataIndicatorSummaryChartPanel(panelContent, indicator);

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

    return panelContent;

}