當前位置: 首頁>>代碼示例>>Java>>正文


Java Panel.setCaption方法代碼示例

本文整理匯總了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;
}
 
開發者ID:moberwasserlechner,項目名稱:vaadin-medium-editor,代碼行數:12,代碼來源:AddonDemoUI.java

示例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);
}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:45,代碼來源:AbstractChartDataManagerImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:27,代碼來源:CommitteeRankingDataGridPageModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:48,代碼來源:MainViewRegisterPageModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:22,代碼來源:MainViewOverviewPageModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:74,代碼來源:BallotOverviewPageModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:25,代碼來源:PoliticianRankingDataGridPageModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:22,代碼來源:PartyRankingOverviewPageModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:25,代碼來源:MinistryRankingDataGridPageModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:21,代碼來源:MinistryRankingGovernmentBodiesPageModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:51,代碼來源:MainViewLoginPageModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:22,代碼來源:MainViewPageVisitHistoryPageModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:19,代碼來源:ParliamentChartsPartyAgePageModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:30,代碼來源:MinistryGovernmentBodiesModContentFactoryImpl.java

示例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;

}
 
開發者ID:Hack23,項目名稱:cia,代碼行數:40,代碼來源:UserHomeApplicationEventsPageModContentFactoryImpl.java


注:本文中的com.vaadin.ui.Panel.setCaption方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。