1 package org.simantics.g3d.vtk.preferences;
3 import org.eclipse.jface.preference.*;
4 import org.eclipse.ui.IWorkbenchPreferencePage;
5 import org.eclipse.ui.IWorkbench;
6 import org.simantics.g3d.vtk.Activator;
9 * This class represents a preference page that
10 * is contributed to the Preferences dialog. By
11 * subclassing <samp>FieldEditorPreferencePage</samp>, we
12 * can use the field support built into JFace that allows
13 * us to create a page that is small and knows how to
14 * save, restore and apply itself.
16 * This page is used to modify preferences only. They
17 * are stored in the preference store that belongs to
18 * the main plug-in class. That way, preferences can
19 * be accessed directly via the preference store.
22 public class VTKPreferencePage
23 extends FieldEditorPreferencePage
24 implements IWorkbenchPreferencePage {
26 public VTKPreferencePage() {
28 setPreferenceStore(Activator.getDefault().getPreferenceStore());
29 setDescription("VTK Preferences (DEBUG)");
33 * Creates the field editors. Field editors are abstractions of
34 * the common GUI blocks needed to manipulate various types
35 * of preferences. Each field editor knows how to save and
38 public void createFieldEditors() {
39 addField(new RadioGroupFieldEditor(
40 PreferenceConstants.CLOSE_METHOD,
43 new String[][] { { "On &Editor Close", CloseMethod.ON_CLOSE.toString() },
44 { "On &Last Editor Close", CloseMethod.ON_LAST_CLOSE.toString() },
45 { "&Closing Disabled", CloseMethod.NO_CLOSE.toString() }
46 }, getFieldEditorParent()));
51 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
53 public void init(IWorkbench workbench) {