The FieldEditorPreferencePage
supports other types of field editor. These different types of editor include
BooleanFieldEditor
,
ColorFieldEditor
, ScaleFieldEditor
,
FileFieldEditor
,
DirectoryFieldEditor
,
PathEditor
, and
RadioGroupFieldEditor
. Add a sample of each of these types to the ClockPreferencePage
page to find out what they can store. Perform the following steps:
Open the
createFieldEditors()
method of theClockPreferencePage
and add the following code at the bottom of the method:addField(new BooleanFieldEditor("tick","Boolean value",getFieldEditorParent())); addField(new ColorFieldEditor("colour", "Favourite colour",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...