简体   繁体   English

Eclipse JFace FieldEditor日期?

[英]Eclipse JFace FieldEditor for Dates?

I'm building a preferences editor for my Eclipse RCP application using the existing IWorkbenchPreferencePage framework (see http://www.eclipse.org/articles/Article-Field-Editors/field_editors.html for a good tutorial). 我正在使用现有的IWorkbenchPreferencePage框架为我的Eclipse RCP应用程序构建首选项编辑器(请参阅http://www.eclipse.org/articles/Article-Field-Editors/field_editors.html以获得一个很好的教程)。

It has editors for a number of different types of data: 它拥有许多不同类型数据的编辑器:

  • BooleanFieldEditor BooleanFieldEditor
  • IntegerFieldEditor IntegerFieldEditor
  • StringFieldEditor StringFieldEditor
  • RadioGroupFieldEditor RadioGroupFieldEditor
  • ColorFieldEditor ColorFieldEditor
  • FontFieldEditor FontFieldEditor
  • DirectoryFieldEditor DirectoryFieldEditor
  • FileFieldEditor FileFieldEditor
  • PathEditor PathEditor

However, one thing which doesn't seem to exist is a nice DateFieldEditor (ideally with a button to bring up a calendar to allow choosing of a particular date). 但是,似乎不存在的一件事是一个不错的DateFieldEditor(理想情况下是一个按钮,用于显示日历以允许选择特定日期)。

So my question is, does such a org.eclipse.jface.preference.FieldEditor subclass exist, either in standard JFace or in a 3rd party plugin or project? 所以我的问题是,在标准JFace或第三方插件或项目中是否存在这样的org.eclipse.jface.preference.FieldEditor子类?

Alternatively, even a SWT calendar component would be useful, because I could build the rest on top of that pretty easily. 或者,即使是SWT日历组件也是有用的,因为我可以很容易地构建其余组件。

JFace doesn't have such a FieldEditor . JFace没有这样的FieldEditor But there is an official feature request for a DateFieldEditor that even has a basic implementation attached to it. 但是有一个DateFieldEditor的官方功能请求,它甚至附加了一个基本实现。 At the very least you could use that as a template to create your own field editor, if it doesn't work for you as is. 至少你可以使用它作为模板来创建自己的字段编辑器,如果它不适合你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM