Project

General

Profile

Download (1.79 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2014 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.preference;
10

    
11
import org.eclipse.jface.preference.BooleanFieldEditor;
12
import org.eclipse.jface.preference.FieldEditorPreferencePage;
13
import org.eclipse.ui.IWorkbench;
14
import org.eclipse.ui.IWorkbenchPreferencePage;
15

    
16
/**
17
 * @author pplitzner
18
 * @date 13.02.2014
19
 *
20
 */
21
public class SpecimenOrObservationPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
22

    
23
    @Override
24
    public void init(IWorkbench workbench) {
25
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
26
    }
27

    
28
    @Override
29
    protected void createFieldEditors() {
30
        if (getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_SPECIMEN_PREF)) {
31
            addField(new BooleanFieldEditor(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS,
32
                    "Taxon determination only on FieldUnit level",
33
                    getFieldEditorParent()));
34
            addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION,
35
                    "Show \"Collecting Areas\" in \"General\" section of details view",
36
                    getFieldEditorParent()));
37
            addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS,
38
                    "Show taxon associations of a specimen in the details view",
39
                    getFieldEditorParent()));
40
        } else {
41
            setDescription("The CDM settings don't allow to set the preferences for editing specimen locally. If you need to make local settings, please ask an administrator.");
42
        }
43

    
44
    }
45

    
46

    
47
}
(22-22/26)