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.tools.edit.preferences;
16:
17: import net.refractions.udig.project.internal.ProjectPlugin;
18: import net.refractions.udig.tool.edit.internal.Messages;
19: import net.refractions.udig.tools.edit.EditPlugin;
20:
21: import org.eclipse.jface.preference.BooleanFieldEditor;
22: import org.eclipse.jface.preference.FieldEditorPreferencePage;
23: import org.eclipse.jface.preference.IPreferenceStore;
24: import org.eclipse.ui.IWorkbench;
25: import org.eclipse.ui.IWorkbenchPreferencePage;
26:
27: /**
28: * Preferences for setting optional preferences that impact the performance of editing.
29: *
30: * @author Jesse
31: * @since 1.1.0
32: */
33: public class PerformancelPreferences extends FieldEditorPreferencePage
34: implements IWorkbenchPreferencePage {
35:
36: public PerformancelPreferences() {
37: super (GRID);
38: IPreferenceStore store = EditPlugin.getDefault()
39: .getPreferenceStore();
40: setPreferenceStore(store);
41: setDescription(Messages.PerformancelPreferences_description);
42: }
43:
44: @Override
45: protected void createFieldEditors() {
46: addField(new BooleanFieldEditor(
47: PreferenceConstants.P_FILL_POLYGONS,
48: Messages.PerformancelPreferences_fill_polygons,
49: getFieldEditorParent()));
50: addField(new BooleanFieldEditor(
51: PreferenceConstants.P_HIDE_SELECTED_FEATURES,
52: Messages.PerformancelPreferences_hide_features,
53: getFieldEditorParent()));
54: addField(new BooleanFieldEditor(
55: net.refractions.udig.project.preferences.PreferenceConstants.P_SHOW_ANIMATIONS,
56: net.refractions.udig.project.ui.internal.Messages.RenderPreferences_animations,
57: getFieldEditorParent()) {
58:
59: @Override
60: public IPreferenceStore getPreferenceStore() {
61: return ProjectPlugin.getPlugin().getPreferenceStore();
62: }
63: });
64: }
65:
66: public void init(IWorkbench workbench) {
67: }
68:
69: }
|