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.FieldEditorPreferencePage;
22: import org.eclipse.jface.preference.RadioGroupFieldEditor;
23: import org.eclipse.ui.IWorkbench;
24: import org.eclipse.ui.IWorkbenchPreferencePage;
25:
26: /**
27: * Preferences for Layer elements
28: * @author Jesse
29: * @since 1.1.0
30: */
31: public class LayerPreferencePage extends FieldEditorPreferencePage
32: implements IWorkbenchPreferencePage {
33:
34: public LayerPreferencePage() {
35: super (GRID);
36: setPreferenceStore(ProjectPlugin.getPlugin()
37: .getPreferenceStore());
38: }
39:
40: @Override
41: protected void createFieldEditors() {
42: RadioGroupFieldEditor layerSelectionColours = new RadioGroupFieldEditor(
43: PreferenceConstants.P_HIGHLIGHT,
44: Messages.LayerPreferences_highlight,
45: 1,
46: new String[][] {
47: { Messages.LayerPreferences_none,
48: PreferenceConstants.P_HIGHLIGHT_NONE },
49: {
50: Messages.LayerPreferences_foreground,
51: PreferenceConstants.P_HIGHLIGHT_FOREGROUND },
52: {
53: Messages.LayerPreferences_background,
54: PreferenceConstants.P_HIGHLIGHT_BACKGROUND } },
55: getFieldEditorParent(), true);
56: addField(layerSelectionColours);
57: }
58:
59: public void init(IWorkbench workbench) {
60: }
61:
62: }
|