1 |
6b5ad34c
|
Patric Plitzner
|
/**
|
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 |
256fbc69
|
Katja Luther
|
import org.eclipse.swt.SWT;
|
12 |
185eb33b
|
Katja Luther
|
import org.eclipse.swt.events.SelectionAdapter;
|
13 |
|
|
import org.eclipse.swt.events.SelectionEvent;
|
14 |
256fbc69
|
Katja Luther
|
import org.eclipse.swt.layout.GridData;
|
15 |
185eb33b
|
Katja Luther
|
import org.eclipse.swt.widgets.Button;
|
16 |
|
|
import org.eclipse.swt.widgets.Composite;
|
17 |
|
|
import org.eclipse.swt.widgets.Control;
|
18 |
256fbc69
|
Katja Luther
|
import org.eclipse.swt.widgets.Label;
|
19 |
6b5ad34c
|
Patric Plitzner
|
|
20 |
256fbc69
|
Katja Luther
|
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
|
21 |
185eb33b
|
Katja Luther
|
import eu.etaxonomy.taxeditor.l10n.Messages;
|
22 |
|
|
import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
|
23 |
256fbc69
|
Katja Luther
|
import eu.etaxonomy.taxeditor.store.CdmStore;
|
24 |
|
|
|
25 |
6b5ad34c
|
Patric Plitzner
|
/**
|
26 |
|
|
* @author pplitzner
|
27 |
|
|
* @date 13.02.2014
|
28 |
|
|
*
|
29 |
|
|
*/
|
30 |
185eb33b
|
Katja Luther
|
public class SpecimenOrObservationPreferences extends CdmPreferencePage {
|
31 |
6b5ad34c
|
Patric Plitzner
|
|
32 |
c4c36f8e
|
Patrick Plitzner
|
private static final String LOCAL_SETTINGS_NOT_ALLOWED = "The CDM settings don't allow to set the preferences for the display of specimen and obeservations locally. If you need to make local settings, please ask an administrator.";
|
33 |
|
|
private static final String DESCRIPTION = "Set the preferences for the display of specimen and observations.";
|
34 |
|
|
|
35 |
185eb33b
|
Katja Luther
|
protected boolean isShowSpecimenRelatedIssues;
|
36 |
|
|
protected boolean allowOverrideShowSpecimenRelatedIssues;
|
37 |
|
|
protected boolean overrideShowSpecimenRelatedIssues;
|
38 |
|
|
protected boolean isShowCollectingAreaInGeneralSection;
|
39 |
|
|
protected boolean allowOverrideShowCollectingAreaInGeneralSection;
|
40 |
|
|
protected boolean overrideShowCollectionAreaInGeneralSection;
|
41 |
|
|
protected boolean isDeterminationOnlyForFieldUnits;
|
42 |
|
|
protected boolean allowOverrideDeterminationOnlyForFieldUnits;
|
43 |
|
|
protected boolean overrideDeterminationOnlyForFieldUnits;
|
44 |
|
|
protected boolean isShowTaxonAssociation;
|
45 |
|
|
protected boolean allowOverrideShowTaxonAssociation;
|
46 |
|
|
protected boolean overrideShowTaxonAssociation;
|
47 |
|
|
protected boolean isShowLifeForm;
|
48 |
|
|
protected boolean allowOverrideShowLifeForm;
|
49 |
|
|
protected boolean overrideShowLifeForm;
|
50 |
|
|
Composite composite;
|
51 |
06699fe1
|
Katja Luther
|
|
52 |
|
|
|
53 |
6b5ad34c
|
Patric Plitzner
|
@Override
|
54 |
672874ab
|
Patrick Plitzner
|
public void init() {
|
55 |
|
|
super.init();
|
56 |
06699fe1
|
Katja Luther
|
// setPreferenceStore(PreferencesUtil.getPreferenceStore());
|
57 |
c786c70d
|
Patrick Plitzner
|
if(!CdmStore.isActive()){
|
58 |
|
|
return;
|
59 |
|
|
}
|
60 |
185eb33b
|
Katja Luther
|
|
61 |
|
|
|
62 |
|
|
}
|
63 |
|
|
|
64 |
|
|
/**
|
65 |
|
|
* {@inheritDoc}
|
66 |
|
|
*/
|
67 |
|
|
@Override
|
68 |
|
|
protected Control createContents(Composite parent) {
|
69 |
|
|
getValues();
|
70 |
|
|
|
71 |
|
|
boolean isEditingAllowed = true;
|
72 |
|
|
if(!isAdminPreference){
|
73 |
|
|
CdmPreferenceCache cache = CdmPreferenceCache.instance();
|
74 |
|
|
CdmPreference showSpecimenPref = cache.get(EditorPreferencePredicate.ShowSpecimen.getKey());
|
75 |
|
|
if (showSpecimenPref != null){
|
76 |
|
|
if (!showSpecimenPref.isAllowOverride() ){
|
77 |
|
|
Label label = new Label(parent, SWT.NONE);
|
78 |
|
|
label.setText(LOCAL_SETTINGS_NOT_ALLOWED);
|
79 |
|
|
isEditingAllowed = false;
|
80 |
|
|
|
81 |
|
|
}
|
82 |
|
|
}
|
83 |
|
|
}
|
84 |
|
|
|
85 |
|
|
Label label = new Label(parent, SWT.NONE);
|
86 |
|
|
label.setText(DESCRIPTION);
|
87 |
|
|
Composite titleComp = createComposite(parent);
|
88 |
914fe91d
|
Katja Luther
|
GridData gridData = createTextGridData();
|
89 |
185eb33b
|
Katja Luther
|
|
90 |
914fe91d
|
Katja Luther
|
Label separator= new Label(titleComp, SWT.HORIZONTAL | SWT.SEPARATOR);
|
91 |
|
|
separator.setLayoutData(gridData);
|
92 |
|
|
separator.setVisible(false);
|
93 |
185eb33b
|
Katja Luther
|
final Button showSpecimenButton = new Button(titleComp, SWT.CHECK);
|
94 |
|
|
|
95 |
|
|
showSpecimenButton.setText(Messages.DatabasePreferncesPage_Show_Specimen);
|
96 |
|
|
|
97 |
|
|
showSpecimenButton.setSelection(isShowSpecimenRelatedIssues);
|
98 |
|
|
showSpecimenButton.addSelectionListener(new SelectionAdapter(){
|
99 |
|
|
@Override
|
100 |
|
|
public void widgetSelected(SelectionEvent e) {
|
101 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
102 |
185eb33b
|
Katja Luther
|
isShowSpecimenRelatedIssues = showSpecimenButton.getSelection();
|
103 |
|
|
if(isShowSpecimenRelatedIssues){
|
104 |
|
|
composite.setVisible(true);
|
105 |
|
|
composite.setEnabled(true);
|
106 |
|
|
}else{
|
107 |
|
|
composite.setVisible(false);
|
108 |
|
|
composite.setEnabled(false);
|
109 |
|
|
}
|
110 |
|
|
}
|
111 |
|
|
});
|
112 |
|
|
Button allowOverrideIsShowSpecimenRelatedIssuesButton = createAllowOverrideButton(titleComp);
|
113 |
914fe91d
|
Katja Luther
|
|
114 |
|
|
|
115 |
185eb33b
|
Katja Luther
|
if (isAdminPreference){
|
116 |
|
|
allowOverrideIsShowSpecimenRelatedIssuesButton.setSelection(allowOverrideShowSpecimenRelatedIssues);
|
117 |
|
|
allowOverrideIsShowSpecimenRelatedIssuesButton.addSelectionListener(new SelectionAdapter(){
|
118 |
|
|
@Override
|
119 |
|
|
public void widgetSelected(SelectionEvent e) {
|
120 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
121 |
185eb33b
|
Katja Luther
|
allowOverrideShowSpecimenRelatedIssues = allowOverrideIsShowSpecimenRelatedIssuesButton.getSelection();
|
122 |
|
|
}
|
123 |
|
|
});
|
124 |
|
|
}else{
|
125 |
|
|
allowOverrideIsShowSpecimenRelatedIssuesButton.setSelection(overrideShowSpecimenRelatedIssues);
|
126 |
|
|
allowOverrideIsShowSpecimenRelatedIssuesButton.addSelectionListener(new SelectionAdapter(){
|
127 |
|
|
@Override
|
128 |
|
|
public void widgetSelected(SelectionEvent e) {
|
129 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
130 |
185eb33b
|
Katja Luther
|
overrideShowSpecimenRelatedIssues = allowOverrideIsShowSpecimenRelatedIssuesButton.getSelection();
|
131 |
|
|
}
|
132 |
|
|
});
|
133 |
|
|
if (!allowOverrideShowSpecimenRelatedIssues){
|
134 |
|
|
showSpecimenButton.setEnabled(false);
|
135 |
|
|
allowOverrideIsShowSpecimenRelatedIssuesButton.setEnabled(false);
|
136 |
|
|
}
|
137 |
|
|
}
|
138 |
|
|
composite = createComposite(parent);
|
139 |
|
|
composite.setEnabled(isShowSpecimenRelatedIssues);
|
140 |
914fe91d
|
Katja Luther
|
gridData = createTextGridData();
|
141 |
185eb33b
|
Katja Luther
|
|
142 |
914fe91d
|
Katja Luther
|
separator= new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
|
143 |
185eb33b
|
Katja Luther
|
separator.setLayoutData(gridData);
|
144 |
|
|
|
145 |
|
|
final Button showCollectingAreaInGeneralSectionButton = new Button(composite, SWT.CHECK);
|
146 |
|
|
|
147 |
|
|
showCollectingAreaInGeneralSectionButton.setText(Messages.DatabasePreferncesPage_Show_Collecting_Areas_in_general_section);
|
148 |
|
|
|
149 |
|
|
showCollectingAreaInGeneralSectionButton.setSelection(isShowCollectingAreaInGeneralSection);
|
150 |
|
|
showCollectingAreaInGeneralSectionButton.addSelectionListener(new SelectionAdapter(){
|
151 |
|
|
@Override
|
152 |
|
|
public void widgetSelected(SelectionEvent e) {
|
153 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
154 |
185eb33b
|
Katja Luther
|
isShowCollectingAreaInGeneralSection = showCollectingAreaInGeneralSectionButton.getSelection();
|
155 |
|
|
|
156 |
|
|
}
|
157 |
|
|
});
|
158 |
|
|
Button allowOverrideShowCollectingAreaButton = createAllowOverrideButton(composite);
|
159 |
|
|
if (isAdminPreference){
|
160 |
|
|
allowOverrideShowCollectingAreaButton.setSelection(allowOverrideShowCollectingAreaInGeneralSection);
|
161 |
|
|
allowOverrideShowCollectingAreaButton.addSelectionListener(new SelectionAdapter(){
|
162 |
|
|
@Override
|
163 |
|
|
public void widgetSelected(SelectionEvent e) {
|
164 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
165 |
185eb33b
|
Katja Luther
|
allowOverrideShowCollectingAreaInGeneralSection = allowOverrideShowCollectingAreaButton.getSelection();
|
166 |
|
|
}
|
167 |
|
|
});
|
168 |
|
|
}else{
|
169 |
|
|
allowOverrideShowCollectingAreaButton.setSelection(overrideShowCollectionAreaInGeneralSection);
|
170 |
|
|
allowOverrideShowCollectingAreaButton.addSelectionListener(new SelectionAdapter(){
|
171 |
|
|
@Override
|
172 |
|
|
public void widgetSelected(SelectionEvent e) {
|
173 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
174 |
185eb33b
|
Katja Luther
|
overrideShowCollectionAreaInGeneralSection = allowOverrideShowCollectingAreaButton.getSelection();
|
175 |
|
|
}
|
176 |
|
|
});
|
177 |
|
|
if (!allowOverrideShowCollectingAreaInGeneralSection){
|
178 |
|
|
showCollectingAreaInGeneralSectionButton.setEnabled(false);
|
179 |
|
|
allowOverrideShowCollectingAreaButton.setEnabled(false);
|
180 |
|
|
}
|
181 |
|
|
}
|
182 |
|
|
|
183 |
|
|
final Button determinationOnlyForFieldUnitsButton = new Button(composite, SWT.CHECK);
|
184 |
|
|
determinationOnlyForFieldUnitsButton.setText(Messages.DatabasePreferncesPage_Determination_only_for_field_unnits);
|
185 |
|
|
determinationOnlyForFieldUnitsButton.setSelection(isDeterminationOnlyForFieldUnits);
|
186 |
|
|
determinationOnlyForFieldUnitsButton.addSelectionListener(new SelectionAdapter(){
|
187 |
|
|
@Override
|
188 |
|
|
public void widgetSelected(SelectionEvent e) {
|
189 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
190 |
185eb33b
|
Katja Luther
|
isDeterminationOnlyForFieldUnits = determinationOnlyForFieldUnitsButton.getSelection();
|
191 |
|
|
}
|
192 |
|
|
});
|
193 |
|
|
|
194 |
|
|
Button allowOverridesDeterminationOnlyForFieldUnitsButton = createAllowOverrideButton(composite);
|
195 |
|
|
if (isAdminPreference){
|
196 |
|
|
allowOverridesDeterminationOnlyForFieldUnitsButton.setSelection(allowOverrideDeterminationOnlyForFieldUnits);
|
197 |
|
|
allowOverridesDeterminationOnlyForFieldUnitsButton.addSelectionListener(new SelectionAdapter(){
|
198 |
|
|
@Override
|
199 |
|
|
public void widgetSelected(SelectionEvent e) {
|
200 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
201 |
185eb33b
|
Katja Luther
|
allowOverrideDeterminationOnlyForFieldUnits = allowOverridesDeterminationOnlyForFieldUnitsButton.getSelection();
|
202 |
|
|
}
|
203 |
|
|
});
|
204 |
|
|
}else{
|
205 |
|
|
allowOverridesDeterminationOnlyForFieldUnitsButton.setSelection(overrideDeterminationOnlyForFieldUnits);
|
206 |
|
|
allowOverridesDeterminationOnlyForFieldUnitsButton.addSelectionListener(new SelectionAdapter(){
|
207 |
|
|
@Override
|
208 |
|
|
public void widgetSelected(SelectionEvent e) {
|
209 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
210 |
185eb33b
|
Katja Luther
|
overrideDeterminationOnlyForFieldUnits = allowOverridesDeterminationOnlyForFieldUnitsButton.getSelection();
|
211 |
|
|
}
|
212 |
|
|
});
|
213 |
|
|
if (!allowOverrideDeterminationOnlyForFieldUnits){
|
214 |
|
|
determinationOnlyForFieldUnitsButton.setEnabled(false);
|
215 |
|
|
allowOverridesDeterminationOnlyForFieldUnitsButton.setEnabled(false);
|
216 |
|
|
}
|
217 |
|
|
}
|
218 |
|
|
|
219 |
|
|
final Button showTaxonAssociationButton = new Button(composite, SWT.CHECK);
|
220 |
|
|
|
221 |
|
|
showTaxonAssociationButton.setText(Messages.DatabasePreferncesPage_Taxon_Associations);
|
222 |
|
|
|
223 |
|
|
showTaxonAssociationButton.setSelection(isShowTaxonAssociation);
|
224 |
|
|
showTaxonAssociationButton.addSelectionListener(new SelectionAdapter(){
|
225 |
|
|
@Override
|
226 |
|
|
public void widgetSelected(SelectionEvent e) {
|
227 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
228 |
185eb33b
|
Katja Luther
|
isShowTaxonAssociation = showTaxonAssociationButton.getSelection();
|
229 |
|
|
|
230 |
|
|
}
|
231 |
|
|
});
|
232 |
|
|
Button allowOverrideIsShowTaxonAssociationButton = createAllowOverrideButton(composite);
|
233 |
|
|
if (isAdminPreference){
|
234 |
|
|
allowOverrideIsShowTaxonAssociationButton.setSelection(allowOverrideShowTaxonAssociation);
|
235 |
|
|
allowOverrideIsShowTaxonAssociationButton.addSelectionListener(new SelectionAdapter(){
|
236 |
|
|
@Override
|
237 |
|
|
public void widgetSelected(SelectionEvent e) {
|
238 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
239 |
185eb33b
|
Katja Luther
|
allowOverrideShowTaxonAssociation = allowOverrideIsShowTaxonAssociationButton.getSelection();
|
240 |
|
|
}
|
241 |
|
|
});
|
242 |
256fbc69
|
Katja Luther
|
}else{
|
243 |
185eb33b
|
Katja Luther
|
allowOverrideIsShowTaxonAssociationButton.setSelection(overrideShowTaxonAssociation);
|
244 |
|
|
allowOverrideIsShowTaxonAssociationButton.addSelectionListener(new SelectionAdapter(){
|
245 |
|
|
@Override
|
246 |
|
|
public void widgetSelected(SelectionEvent e) {
|
247 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
248 |
185eb33b
|
Katja Luther
|
overrideShowTaxonAssociation = allowOverrideIsShowTaxonAssociationButton.getSelection();
|
249 |
|
|
}
|
250 |
|
|
});
|
251 |
|
|
if (!allowOverrideShowTaxonAssociation){
|
252 |
|
|
showTaxonAssociationButton.setEnabled(false);
|
253 |
|
|
allowOverrideIsShowTaxonAssociationButton.setEnabled(false);
|
254 |
|
|
}
|
255 |
|
|
}
|
256 |
|
|
|
257 |
|
|
final Button showLifeFormButton = new Button(composite, SWT.CHECK);
|
258 |
|
|
showLifeFormButton.setText(Messages.DatabasePreferncesPage_Life_Form);
|
259 |
|
|
showLifeFormButton.setSelection(isShowLifeForm);
|
260 |
|
|
showLifeFormButton.addSelectionListener(new SelectionAdapter(){
|
261 |
|
|
@Override
|
262 |
|
|
public void widgetSelected(SelectionEvent e) {
|
263 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
264 |
185eb33b
|
Katja Luther
|
isShowLifeForm = showLifeFormButton.getSelection();
|
265 |
|
|
|
266 |
|
|
}
|
267 |
|
|
});
|
268 |
|
|
|
269 |
|
|
Button allowOverrideShowLifeFormButton = createAllowOverrideButton(composite);
|
270 |
|
|
if (isAdminPreference){
|
271 |
|
|
allowOverrideShowLifeFormButton.setSelection(allowOverrideShowLifeForm);
|
272 |
|
|
allowOverrideShowLifeFormButton.addSelectionListener(new SelectionAdapter(){
|
273 |
|
|
@Override
|
274 |
|
|
public void widgetSelected(SelectionEvent e) {
|
275 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
276 |
185eb33b
|
Katja Luther
|
allowOverrideShowLifeForm = allowOverrideShowLifeFormButton.getSelection();
|
277 |
|
|
}
|
278 |
|
|
});
|
279 |
|
|
}else{
|
280 |
|
|
allowOverrideShowLifeFormButton.setSelection(overrideShowLifeForm);
|
281 |
|
|
allowOverrideShowLifeFormButton.addSelectionListener(new SelectionAdapter(){
|
282 |
|
|
@Override
|
283 |
|
|
public void widgetSelected(SelectionEvent e) {
|
284 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
285 |
185eb33b
|
Katja Luther
|
overrideShowLifeForm = allowOverrideShowLifeFormButton.getSelection();
|
286 |
|
|
}
|
287 |
|
|
});
|
288 |
|
|
if (!allowOverrideShowLifeForm){
|
289 |
|
|
showLifeFormButton.setEnabled(false);
|
290 |
|
|
allowOverrideShowLifeFormButton.setEnabled(false);
|
291 |
|
|
}
|
292 |
|
|
}
|
293 |
256fbc69
|
Katja Luther
|
|
294 |
185eb33b
|
Katja Luther
|
if (!isEditingAllowed){
|
295 |
|
|
PreferencesUtil.recursiveSetEnabled(composite, false);
|
296 |
256fbc69
|
Katja Luther
|
}
|
297 |
185eb33b
|
Katja Luther
|
return composite;
|
298 |
6b5ad34c
|
Patric Plitzner
|
}
|
299 |
|
|
|
300 |
185eb33b
|
Katja Luther
|
|
301 |
|
|
/**
|
302 |
|
|
* {@inheritDoc}
|
303 |
|
|
*/
|
304 |
6b5ad34c
|
Patric Plitzner
|
@Override
|
305 |
185eb33b
|
Katja Luther
|
protected void getValues() {
|
306 |
|
|
CdmPreferenceCache cache = CdmPreferenceCache.instance();
|
307 |
256fbc69
|
Katja Luther
|
|
308 |
185eb33b
|
Katja Luther
|
isShowSpecimenRelatedIssues = PreferencesUtil.getBooleanValue(EditorPreferencePredicate.ShowSpecimen.getKey());
|
309 |
|
|
allowOverrideShowSpecimenRelatedIssues = cache.get(EditorPreferencePredicate.ShowSpecimen.getKey())!= null ? cache.get(EditorPreferencePredicate.ShowSpecimen.getKey()).isAllowOverride():true;
|
310 |
256fbc69
|
Katja Luther
|
|
311 |
185eb33b
|
Katja Luther
|
isShowCollectingAreaInGeneralSection = PreferencesUtil.getBooleanValue(EditorPreferencePredicate.ShowCollectingAreasInGeneralSection.getKey());
|
312 |
|
|
allowOverrideShowCollectingAreaInGeneralSection = cache.get(EditorPreferencePredicate.ShowCollectingAreasInGeneralSection.getKey())!= null ? cache.get(EditorPreferencePredicate.ShowCollectingAreasInGeneralSection.getKey()).isAllowOverride():true;
|
313 |
|
|
|
314 |
|
|
isDeterminationOnlyForFieldUnits = PreferencesUtil.getBooleanValue(EditorPreferencePredicate.DeterminationOnlyForFieldUnits.getKey());
|
315 |
|
|
allowOverrideDeterminationOnlyForFieldUnits = cache.get(EditorPreferencePredicate.DeterminationOnlyForFieldUnits.getKey())!= null ? cache.get(EditorPreferencePredicate.DeterminationOnlyForFieldUnits.getKey()).isAllowOverride():true;
|
316 |
|
|
|
317 |
|
|
isShowTaxonAssociation = PreferencesUtil.getBooleanValue(EditorPreferencePredicate.ShowTaxonAssociations.getKey());
|
318 |
|
|
allowOverrideShowTaxonAssociation = cache.get(EditorPreferencePredicate.ShowTaxonAssociations.getKey())!= null ? cache.get(EditorPreferencePredicate.ShowTaxonAssociations.getKey()).isAllowOverride():true;
|
319 |
|
|
|
320 |
|
|
isShowLifeForm = PreferencesUtil.getBooleanValue(EditorPreferencePredicate.ShowLifeForm.getKey());
|
321 |
|
|
allowOverrideShowLifeForm = cache.get(EditorPreferencePredicate.ShowLifeForm.getKey())!= null ? cache.get(EditorPreferencePredicate.ShowLifeForm.getKey()).isAllowOverride():true;
|
322 |
9181d281
|
Katja Luther
|
|
323 |
185eb33b
|
Katja Luther
|
|
324 |
|
|
}
|
325 |
9e5747be
|
Katja Luther
|
|
326 |
185eb33b
|
Katja Luther
|
@Override
|
327 |
|
|
public boolean performOk() {
|
328 |
|
|
if (allowOverrideShowSpecimenRelatedIssues){
|
329 |
|
|
PreferencesUtil.setBooleanValue(EditorPreferencePredicate.ShowSpecimen.getKey(), isShowSpecimenRelatedIssues);
|
330 |
|
|
}
|
331 |
|
|
if (allowOverrideShowCollectingAreaInGeneralSection){
|
332 |
|
|
PreferencesUtil.setBooleanValue(EditorPreferencePredicate.ShowCollectingAreasInGeneralSection.getKey(), isShowCollectingAreaInGeneralSection);
|
333 |
|
|
}
|
334 |
|
|
if (allowOverrideDeterminationOnlyForFieldUnits){
|
335 |
|
|
PreferencesUtil.setBooleanValue(EditorPreferencePredicate.DeterminationOnlyForFieldUnits.getKey(), isDeterminationOnlyForFieldUnits);
|
336 |
|
|
}
|
337 |
|
|
if (allowOverrideShowTaxonAssociation){
|
338 |
|
|
PreferencesUtil.setBooleanValue(EditorPreferencePredicate.ShowTaxonAssociations.getKey(), isShowTaxonAssociation);
|
339 |
|
|
}
|
340 |
|
|
if (allowOverrideShowLifeForm){
|
341 |
|
|
PreferencesUtil.setBooleanValue(EditorPreferencePredicate.ShowLifeForm.getKey(), isShowLifeForm);
|
342 |
|
|
}
|
343 |
|
|
return true;
|
344 |
6b5ad34c
|
Patric Plitzner
|
}
|
345 |
|
|
|
346 |
|
|
|
347 |
|
|
}
|