Project

General

Profile

« Previous | Next » 

Revision cd19940f

Added by Katja Luther about 7 years ago

fix details view for authorship cache and referencing objects view

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NameDetailsViewConfiguration.java
1 1
package eu.etaxonomy.taxeditor.preference;
2 2

  
3 3

  
4
import org.eclipse.jface.preference.PreferencePage;
4 5
import org.eclipse.swt.SWT;
5 6
import org.eclipse.swt.events.SelectionAdapter;
6 7
import org.eclipse.swt.events.SelectionEvent;
......
8 9
import org.eclipse.swt.widgets.Button;
9 10
import org.eclipse.swt.widgets.Composite;
10 11
import org.eclipse.swt.widgets.Control;
11

  
12 12
import org.eclipse.ui.IWorkbench;
13 13
import org.eclipse.ui.IWorkbenchPreferencePage;
14
import org.eclipse.jface.preference.PreferencePage;
15 14

  
16 15

  
17 16
public class NameDetailsViewConfiguration extends PreferencePage implements IWorkbenchPreferencePage {
......
19 18
    Composite child ;
20 19
	@Override
21 20
	public void init(IWorkbench workbench) {
22
		
21

  
23 22
	}
24 23

  
25 24
	/*
......
31 30
     */
32 31
    @Override
33 32
    protected Control createContents(Composite parent) {
34
    	
33

  
35 34
    	Composite composite = new Composite(parent, SWT.NULL);
36 35
        composite.setLayout(new GridLayout());
36

  
37
        //boolean isAllowOverride = PreferencesUtil
37 38
        isSimpleDetailsViewActivated = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION);
38 39
        final Button activateCheckButton = new Button(composite, SWT.CHECK);
39 40
        activateCheckButton.setText("Show only a simple name details view");
......
52 53
            }
53 54
         }
54 55
         });
55
         
56

  
56 57
        child  = new Composite(composite, SWT.NULL);
57 58
        child.setLayout(new GridLayout());
58 59
        child.setVisible(isSimpleDetailsViewActivated);
59
		
60

  
60 61
        final Button showTaxon = new Button(child, SWT.CHECK);
61 62
        boolean isShowTaxon = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON);
62 63
        showTaxon.setText("Show taxon of the name");
......
68 69
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON, isShowTaxon);
69 70
              }
70 71
         });
71
         
72

  
72 73
        final Button showLsid = new Button(child, SWT.CHECK);
73 74
        boolean isShowLSID = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID);
74 75
        showLsid.setText("Show Lsid of the name");
......
80 81
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID, isShowLSID);
81 82
              }
82 83
         });
83
        
84

  
84 85
        final Button showNomenclaturalCode = new Button(child, SWT.CHECK);
85 86
        boolean isShowNomenclaturalCode = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE);
86 87
        showNomenclaturalCode.setText("Show the nomenclatural code");
......
92 93
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE, isShowNomenclaturalCode);
93 94
              }
94 95
         });
95
        
96

  
96 97
        final Button showNameCache = new Button(child, SWT.CHECK);
97 98
        boolean isShowNameCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE);
98 99
        showNameCache.setText("Show nameCache of the name (only the scientific name without the author and year)");
......
112 113
             @Override
113 114
             public void widgetSelected(SelectionEvent e) {
114 115
                 boolean isShowAppendedPhrase = showAppendedPhrase.getSelection();
115
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE, isShowAppendedPhrase);
116
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE, isShowAppendedPhrase);
116 117
              }
117 118
         });
118
	
119

  
119 120
        final Button showRank = new Button(child, SWT.CHECK);
120 121
        boolean isShowRank = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK);
121 122
        showRank.setText("Show rank of the name");
......
149 150
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP, isShowAuthorship);
150 151
              }
151 152
         });
152
		
153

  
153 154
        final Button showNomenclaturalRef = new Button(child, SWT.CHECK);
154 155
        boolean isShowNomenclaturalRef = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE);
155 156
        showNomenclaturalRef.setText("Show nomenclatural reference section");
......
161 162
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE, isShowNomenclaturalRef);
162 163
              }
163 164
         });
164
		
165

  
165 166
        final Button showNomenclaturalStatus = new Button(child, SWT.CHECK);
166 167
        boolean isShowNomenclaturalStatus = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS);
167 168
        showNomenclaturalStatus.setText("Show nomenclatural status section");
......
173 174
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS, isShowNomenclaturalStatus);
174 175
              }
175 176
         });
176
		
177

  
177 178
        final Button showProtologue = new Button(child, SWT.CHECK);
178 179
        boolean isShowProtologue = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE);
179 180
        showProtologue.setText("Show protologue section");
......
185 186
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE, isShowProtologue);
186 187
              }
187 188
         });
188
        
189

  
189 190
        final Button showTypeDesignation = new Button(child, SWT.CHECK);
190 191
        boolean isShowTypeDesignation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION);
191 192
        showTypeDesignation.setText("Show name type designation section");
......
197 198
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, isShowTypeDesignation);
198 199
              }
199 200
         });
200
		
201
		
201

  
202

  
202 203
        final Button showNameRelationship = new Button(child, SWT.CHECK);
203 204
        boolean isShowNameRelationship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP);
204 205
        showNameRelationship.setText("Show name relationship section");
......
207 208
             @Override
208 209
             public void widgetSelected(SelectionEvent e) {
209 210
                 boolean isShowNameRelationship = showNameRelationship.getSelection();
210
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, isShowNameRelationship);
211
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP, isShowNameRelationship);
211 212
              }
212 213
         });
213
				
214

  
214 215
        if(isSimpleDetailsViewActivated){
215 216
            child.setEnabled(true);
216 217
        }else{
......
219 220

  
220 221
        return composite;
221 222

  
222
   
223

  
223 224

  
224 225
	}
225 226

  

Also available in: Unified diff