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


Java JSpinnerDateEditor類代碼示例

本文整理匯總了Java中com.toedter.calendar.JSpinnerDateEditor的典型用法代碼示例。如果您正苦於以下問題:Java JSpinnerDateEditor類的具體用法?Java JSpinnerDateEditor怎麽用?Java JSpinnerDateEditor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


JSpinnerDateEditor類屬於com.toedter.calendar包,在下文中一共展示了JSpinnerDateEditor類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: DateChooserPanel

import com.toedter.calendar.JSpinnerDateEditor; //導入依賴的package包/類
public DateChooserPanel() {
	setName("JDateChooser");

	GridBagLayout gridbag = new GridBagLayout();
	GridBagConstraints c = new GridBagConstraints();
	c.fill = GridBagConstraints.BOTH;

	setLayout(gridbag);

	components = new JComponent[6];
	components[0] = new JDateChooser();
	components[1] = new JDateChooser();
	((JDateChooser) components[1]).getJCalendar().getDayChooser()
			.addDateEvaluator(new BirthdayEvaluator());
	((JDateChooser) components[1]).getJCalendar().getDayChooser()
			.addDateEvaluator(new TestDateEvaluator());
	((JDateChooser) components[1]).getJCalendar().setTodayButtonVisible(
			true);
	((JDateChooser) components[1]).getJCalendar().setNullDateButtonVisible(
			true);

	components[2] = new JDateChooser(new Date());
	components[3] = new JDateChooser(null, null, null,
			new JSpinnerDateEditor());
	components[4] = new JDateChooser("yyyy/MM/dd", "####/##/##", '_');
	components[5] = new DemoTable();

	addEntry("Default", components[0], gridbag);
	addEntry("Default (with addons)", components[1], gridbag);
	addEntry("Default with date set", components[2], gridbag);
	addEntry("Spinner Editor", components[3], gridbag);
	addEntry("Explicite date pattern and mask", components[4], gridbag);
	addEntry("Table with date editors", components[5], gridbag);
}
 
開發者ID:hinsenchan,項目名稱:fil_project_mgmt_app_v2,代碼行數:35,代碼來源:DateChooserPanel.java


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