01: /* uDig - User Friendly Desktop Internet GIS client
02: * http://udig.refractions.net
03: * (C) 2004, Refractions Research Inc.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation;
08: * version 2.1 of the License.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: */
15: package net.refractions.udig.project.ui.preferences;
16:
17: import net.refractions.udig.project.internal.ProjectPlugin;
18: import net.refractions.udig.project.preferences.PreferenceConstants;
19: import net.refractions.udig.project.ui.internal.Messages;
20:
21: import org.eclipse.jface.preference.BooleanFieldEditor;
22: import org.eclipse.jface.preference.FieldEditorPreferencePage;
23: import org.eclipse.jface.preference.IntegerFieldEditor;
24: import org.eclipse.ui.IWorkbench;
25: import org.eclipse.ui.IWorkbenchPreferencePage;
26:
27: /**
28: * Preferences for Project elements
29: * @author Jesse
30: * @since 1.1.0
31: */
32: public class ProjectPreferencePage extends FieldEditorPreferencePage
33: implements IWorkbenchPreferencePage {
34:
35: public ProjectPreferencePage() {
36: super (GRID);
37: setPreferenceStore(ProjectPlugin.getPlugin()
38: .getPreferenceStore());
39: }
40:
41: @Override
42: protected void createFieldEditors() {
43: BooleanFieldEditor deleteProjectFiles = new BooleanFieldEditor(
44: PreferenceConstants.P_PROJECT_DELETE_FILES,
45: Messages.ProjectPreferencePage_deleteFiles,
46: getFieldEditorParent());
47: addField(deleteProjectFiles);
48: IntegerFieldEditor maxUndo = new IntegerFieldEditor(
49: PreferenceConstants.P_MAX_UNDO,
50: Messages.ProjectPreferencePage_maxundo,
51: getFieldEditorParent());
52: addField(maxUndo);
53: }
54:
55: public void init(IWorkbench workbench) {
56: }
57:
58: }
|