The FieldEditorPreferencePage
supports other types of field editors. These different types include BooleanFieldEditor
, ColorFieldEditor
, ScaleFieldEditor
, FileFieldEditor
, DirectoryFieldEditor
, PathEditor
, and RadioGroupFieldEditor
. Add a sample of each of these types to the Clock preference page to find out what they can store.
Open the
createFieldEditors
method ofClockPreferencePage
and add the following at the bottom of the method:addField(new BooleanFieldEditor("tick", "Boolean value", getFieldEditorParent())); addField(new ColorFieldEditor("color", "Favorite color", getFieldEditorParent())); addField(new ScaleFieldEditor("scale", "Scale", getFieldEditorParent(), 0, 360, 10, 90)); addField(new FileFieldEditor("file", "Pick a file", getFieldEditorParent())); addField(new DirectoryFieldEditor("dir", "Pick a directory", getFieldEditorParent())); addField(new PathEditor("path", "Path", "Directory", getFieldEditorParent())); addField(new RadioGroupFieldEditor...