当前位置: 首页>>代码示例>>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;未经允许,请勿转载。