本文整理汇总了Java中com.vaadin.ui.Panel.setCaption方法的典型用法代码示例。如果您正苦于以下问题:Java Panel.setCaption方法的具体用法?Java Panel.setCaption怎么用?Java Panel.setCaption使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.Panel
的用法示例。
在下文中一共展示了Panel.setCaption方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildPreview
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
private Component buildPreview() {
previewLabel = new Label();
previewLabel.setSizeFull();
Panel panel = new Panel(previewLabel);
panel.setCaption("Preview");
panel.setSizeFull();
panel.addStyleName(ValoTheme.PANEL_BORDERLESS);
panel.addStyleName("addon-code");
return panel;
}
示例2: addChart
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
/**
* Adds the chart.
*
* @param content
* the content
* @param caption
* the caption
* @param chart
* the chart
* @param fullPage
* the full page
*/
protected final void addChart(final AbstractOrderedLayout content,final String caption, final DCharts chart, final boolean fullPage) {
final HorizontalLayout horizontalLayout = new HorizontalLayout();
final int browserWindowWidth = getChartWindowWidth();
final int browserWindowHeight = getChartWindowHeight(fullPage);
horizontalLayout.setWidth(browserWindowWidth, Unit.PIXELS);
horizontalLayout.setHeight(browserWindowHeight, Unit.PIXELS);
horizontalLayout.setMargin(true);
horizontalLayout.setSpacing(false);
horizontalLayout.addStyleName("v-layout-content-overview-panel-level1");
final Panel formPanel = new Panel();
formPanel.setSizeFull();
formPanel.setContent(horizontalLayout);
formPanel.setCaption(caption);
content.addComponent(formPanel);
content.setExpandRatio(formPanel, ContentRatio.LARGE);
chart.setWidth(100, Unit.PERCENTAGE);
chart.setHeight(100, Unit.PERCENTAGE);
chart.setMarginRight(CHART_RIGHT_MARGIN);
chart.setMarginLeft(CHART_LEFT_MARGIN);
chart.setMarginBottom(CHART_BOTTOM_MARGIN_SIZE);
chart.setMarginTop(CHART_TOP_MARGIN_SIZE);
horizontalLayout.addComponent(chart);
chart.setCaption(caption);
}
示例3: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
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);
getGridFactory().createBasicBeanItemNestedPropertiesGrid(panelContent, ViewRiksdagenCommittee.class, dataContainer.getAllOrderBy(ViewRiksdagenCommittee_.currentMemberSize),
COMMITTEES, NESTED_PROPERTIES,
COLUMN_ORDER, HIDE_COLUMNS,
LISTENER, null, null);
panel.setCaption(NAME + "::" + DATAGRID);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_COMMITTEE_RANKING_VIEW, ApplicationEventGroup.USER, NAME,
parameters, pageId);
return panelContent;
}
示例4: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Secured({ "ROLE_ANONYMOUS" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
final VerticalLayout content = createPanelContent();
final String pageId = getPageId(parameters);
getMenuItemFactory().createMainPageMenuBar(menuBar);
final VerticalLayout registerLayout = new VerticalLayout();
registerLayout.setSizeFull();
final Panel formPanel = new Panel();
formPanel.setSizeFull();
registerLayout.addComponent(formPanel);
final FormLayout formContent = new FormLayout();
formPanel.setContent(formContent);
final RegisterUserRequest reqisterRequest = new RegisterUserRequest();
reqisterRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
reqisterRequest.setUsername("");
reqisterRequest.setEmail("");
reqisterRequest.setCountry("");
reqisterRequest.setUserpassword("");
final ClickListener reqisterListener = new RegisterUserClickListener(reqisterRequest);
getFormFactory().addRequestInputFormFields(formContent, reqisterRequest,
RegisterUserRequest.class,
AS_LIST, REGISTER,
reqisterListener);
final VerticalLayout overviewLayout = new VerticalLayout();
overviewLayout.setSizeFull();
content.addComponent(overviewLayout);
content.setExpandRatio(overviewLayout, ContentRatio.LARGE);
final ResponsiveRow grid = createGridLayout(overviewLayout);
createRowComponent(grid,registerLayout,"Register a new user");
panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MAIN_VIEW, ApplicationEventGroup.USER,
CommonsViews.MAIN_VIEW_NAME, parameters, pageId);
return content;
}
示例5: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@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);
panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
getMenuItemFactory().createMainPageMenuBar(menuBar);
LabelFactory.createHeader2Label(panelContent, "MainOverview");
getMenuItemFactory().createOverviewPage(panelContent);
panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MAIN_VIEW, ApplicationEventGroup.USER,
CommonsViews.MAIN_VIEW_NAME, parameters, pageId);
return panelContent;
}
示例6: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@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 DataContainer<ViewRiksdagenVoteDataBallotSummary, RiksdagenVoteDataBallotEmbeddedId> dataContainer = getApplicationManager()
.getDataContainer(ViewRiksdagenVoteDataBallotSummary.class);
final DataContainer<ViewRiksdagenVoteDataBallotPartySummary, RiksdagenVoteDataBallotPartyEmbeddedId> dataPartyContainer = getApplicationManager()
.getDataContainer(ViewRiksdagenVoteDataBallotPartySummary.class);
final DataContainer<ViewRiksdagenCommitteeBallotDecisionSummary, ViewRiksdagenCommitteeBallotDecisionEmbeddedId> dataDecisionContainer = getApplicationManager()
.getDataContainer(ViewRiksdagenCommitteeBallotDecisionSummary.class);
final List<ViewRiksdagenVoteDataBallotSummary> ballots = dataContainer.findListByEmbeddedProperty(
ViewRiksdagenVoteDataBallotSummary.class, ViewRiksdagenVoteDataBallotSummary_.embeddedId,
RiksdagenVoteDataBallotEmbeddedId.class, RiksdagenVoteDataBallotEmbeddedId_.ballotId, pageId);
final List<ViewRiksdagenVoteDataBallotPartySummary> partyBallotList = dataPartyContainer.findListByEmbeddedProperty(
ViewRiksdagenVoteDataBallotPartySummary.class, ViewRiksdagenVoteDataBallotPartySummary_.embeddedId,
RiksdagenVoteDataBallotPartyEmbeddedId.class, RiksdagenVoteDataBallotPartyEmbeddedId_.ballotId, pageId);
final List<ViewRiksdagenCommitteeBallotDecisionSummary> decisionSummaries = dataDecisionContainer
.getAllBy(ViewRiksdagenCommitteeBallotDecisionSummary_.ballotId, pageId);
if (!ballots.isEmpty()) {
getBallotMenuItemFactory().createBallotMenuBar(menuBar, pageId);
LabelFactory.createHeader2Label(panelContent,OVERVIEW);
for (final ViewRiksdagenVoteDataBallotSummary viewRiksdagenVoteDataBallotSummary : ballots) {
if (!decisionSummaries.isEmpty()) {
getFormFactory().addFormPanelTextFields(panelContent, decisionSummaries.get(FIRST_OBJECT),
ViewRiksdagenCommitteeBallotDecisionSummary.class,
AS_LIST);
} else {
getFormFactory().addFormPanelTextFields(panelContent, viewRiksdagenVoteDataBallotSummary,
ViewRiksdagenVoteDataBallotSummary.class,
AS_LIST2);
}
}
getGridFactory().createBasicBeanItemNestedPropertiesGrid(panelContent, ViewRiksdagenVoteDataBallotPartySummary.class,
partyBallotList, PARTY_BALLOT_SUMMARY,
NESTED_PROPERTIES,
COLUMN_ORDER,
HIDE_COLUMNS,
LISTENER, EMBEDDED_ID_PARTY, null);
final VerticalLayout overviewLayout = new VerticalLayout();
overviewLayout.setSizeFull();
panelContent.addComponent(overviewLayout);
panelContent.setExpandRatio(overviewLayout, ContentRatio.LARGE_FORM);
getBallotMenuItemFactory().createOverviewPage(overviewLayout, pageId);
panel.setCaption(NAME + "::" + BALLOT + pageId);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_BALLOT_VIEW, ApplicationEventGroup.USER, NAME,
parameters, pageId);
}
return panelContent;
}
示例7: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
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);
getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenPolitician.class, politicianDataContainer.getAllOrderBy(ViewRiksdagenPolitician_.currentAssignments),
POLITICIANS,
COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
panel.setCaption(NAME + "::" + DATAGRID);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_POLITICIAN_RANKING_VIEW, ApplicationEventGroup.USER,
NAME, parameters, pageId);
return panelContent;
}
示例8: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
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(NAME + "::" + OVERVIEW);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_PARTY_RANKING_VIEW, ApplicationEventGroup.USER, NAME,
parameters, pageId);
return panelContent;
}
示例9: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
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 DataContainer<ViewRiksdagenMinistry, String> dataContainer = getApplicationManager()
.getDataContainer(ViewRiksdagenMinistry.class);
getGridFactory().createBasicBeanItemGrid(panelContent, ViewRiksdagenMinistry.class, dataContainer.getAllOrderBy(ViewRiksdagenMinistry_.currentMemberSize),
MINISTRIES,
COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);
panel.setCaption(NAME + "::" + DATAGRID);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER,
NAME, parameters, pageId);
return panelContent;
}
示例10: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
final VerticalLayout panelContent = createPanelContent();
getMinistryRankingMenuItemFactory().createMinistryRankingMenuBar(menuBar);
final String pageId = getPageId(parameters);
panel.setCaption(NAME + "::" + GOVERNMENT_BODIES + parameters);
governmentBodyChartDataManager.createMinistryGovernmentBodyHeadcountSummaryChart(panelContent);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_RANKING_VIEW, ApplicationEventGroup.USER, NAME,
parameters, pageId);
return panelContent;
}
示例11: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Secured({ "ROLE_ANONYMOUS" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
final VerticalLayout content = createPanelContent();
final String pageId = getPageId(parameters);
panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
getMenuItemFactory().createMainPageMenuBar(menuBar);
final VerticalLayout loginLayout = new VerticalLayout();
loginLayout.setSizeFull();
final Panel formPanel = new Panel();
formPanel.setSizeFull();
loginLayout.addComponent(formPanel);
final FormLayout formContent = new FormLayout();
formContent.setIcon(VaadinIcons.SIGN_IN);
formPanel.setContent(formContent);
final LoginRequest loginRequest = new LoginRequest();
loginRequest.setOtpCode("");
loginRequest.setEmail("");
loginRequest.setUserpassword("");
loginRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
final ClickListener loginListener = new ApplicationLoginListener(loginRequest);
getFormFactory().addRequestInputFormFields(formContent, loginRequest,
LoginRequest.class,
AS_LIST, LOGIN,
loginListener);
final VerticalLayout overviewLayout = new VerticalLayout();
overviewLayout.setSizeFull();
content.addComponent(overviewLayout);
content.setExpandRatio(overviewLayout, ContentRatio.LARGE);
final ResponsiveRow grid = createGridLayout(overviewLayout);
createRowComponent(grid,loginLayout,REGISTER_A_NEW_USER);
panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MAIN_VIEW, ApplicationEventGroup.USER,
CommonsViews.MAIN_VIEW_NAME, parameters, pageId);
return content;
}
示例12: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
final VerticalLayout content = createPanelContent();
final String pageId = getPageId(parameters);
panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
getMenuItemFactory().createMainPageMenuBar(menuBar);
createPageVisitHistory(NAME,pageId,content);
panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MAIN_VIEW, ApplicationEventGroup.USER,
CommonsViews.MAIN_VIEW_NAME, parameters, pageId);
return content;
}
示例13: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
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_PARLIAMENT_RANKING_VIEW, ApplicationEventGroup.USER, NAME,
parameters, pageId);
panel.setCaption(NAME + "::" + PARTY_AGE_DAILY_AVERAGE_FOR_ALL_BALLOTS);
return panelContent;
}
示例14: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@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 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(NAME + "::" + MINISTRY + viewRiksdagenMinistry.getNameId());
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME,
parameters, pageId);
}
return panelContent;
}
示例15: createContent
import com.vaadin.ui.Panel; //导入方法依赖的package包/类
@Secured({ "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);
userHomeMenuItemFactory.createUserHomeMenuBar(menuBar, pageId);
LabelFactory.createHeader2Label(panelContent, USER_EVENTS);
final Long userIdFromSecurityContext = UserContextUtil.getUserInternalIdFromSecurityContext();
if (userIdFromSecurityContext == null) {
UI.getCurrent().getNavigator().navigateTo(CommonsViews.MAIN_VIEW_NAME);
} else {
final DataContainer<UserAccount, Long> dataContainer = getApplicationManager().getDataContainer(UserAccount.class);
final UserAccount userAccount = dataContainer.load(userIdFromSecurityContext);
final DataContainer<ApplicationActionEvent, Long> eventDataContainer = getApplicationManager().getDataContainer(ApplicationActionEvent.class);
getGridFactory().createBasicBeanItemGrid(panelContent, ApplicationActionEvent.class, eventDataContainer.findOrderedListByProperty(ApplicationActionEvent_.userId,userAccount.getUserId(),ApplicationActionEvent_.createdDate),
APPLICATION_ACTION_EVENT,
COLUMN_ORDER, HIDE_COLUMNS,
LISTENER, null, null);
}
panel.setCaption(NAME + "::" + USERHOME + USER_EVENTS);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_USER_HOME_VIEW, ApplicationEventGroup.USER, NAME,
parameters, pageId);
return panelContent;
}