Project

General

Profile

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

    
12
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
13
import org.eclipse.jface.preference.BooleanFieldEditor;
14
import org.eclipse.jface.preference.ComboFieldEditor;
15
import org.eclipse.jface.preference.FieldEditorPreferencePage;
16
import org.eclipse.ui.IWorkbench;
17
import org.eclipse.ui.IWorkbenchPreferencePage;
18

    
19
/**
20
 * @author pplitzner
21
 * @date 13.02.2014
22
 *
23
 */
24
public class SpecimenOrObservationPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
25

    
26
    @Override
27
    public void init(IWorkbench workbench) {
28
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
29
    }
30

    
31
    @Override
32
    protected void createFieldEditors() {
33
        addField(new BooleanFieldEditor(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS,
34
                "Taxon determination only on FieldUnit level",
35
                getFieldEditorParent()));
36
        addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION,
37
                "Show \"Collecting Areas\" in \"General\" section of details view",
38
                getFieldEditorParent()));
39
        addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS,
40
                "Show taxon associations of a specimen in the details view",
41
                getFieldEditorParent()));
42
        addField(new ComboFieldEditor(IPreferenceKeys.ALWAYS_OPEN_SPECIMEN_IN_EDITOR,
43
                "Open newly created specimens in specimen editor", new String[][] {
44
                        { "always", MessageDialogWithToggle.ALWAYS }, { "never", MessageDialogWithToggle.NEVER } },
45
                getFieldEditorParent()));
46
    }
47

    
48

    
49
}
(19-19/23)