1 |
185eb33b
|
Katja Luther
|
/**
|
2 |
|
|
* Copyright (C) 2018 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.swt.SWT;
|
12 |
|
|
import org.eclipse.swt.events.SelectionAdapter;
|
13 |
|
|
import org.eclipse.swt.events.SelectionEvent;
|
14 |
9fe7e119
|
Katja Luther
|
import org.eclipse.swt.events.SelectionListener;
|
15 |
914fe91d
|
Katja Luther
|
import org.eclipse.swt.layout.GridData;
|
16 |
185eb33b
|
Katja Luther
|
import org.eclipse.swt.widgets.Button;
|
17 |
9fe7e119
|
Katja Luther
|
import org.eclipse.swt.widgets.Combo;
|
18 |
185eb33b
|
Katja Luther
|
import org.eclipse.swt.widgets.Composite;
|
19 |
|
|
import org.eclipse.swt.widgets.Control;
|
20 |
914fe91d
|
Katja Luther
|
import org.eclipse.swt.widgets.Label;
|
21 |
185eb33b
|
Katja Luther
|
|
22 |
|
|
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
|
23 |
9fe7e119
|
Katja Luther
|
import eu.etaxonomy.cdm.model.metadata.CdmPreference.PrefKey;
|
24 |
9b8d1a1c
|
Katja Luther
|
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
|
25 |
9fe7e119
|
Katja Luther
|
import eu.etaxonomy.cdm.model.metadata.PreferenceSubject;
|
26 |
185eb33b
|
Katja Luther
|
import eu.etaxonomy.taxeditor.l10n.Messages;
|
27 |
|
|
import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
|
28 |
|
|
|
29 |
|
|
/**
|
30 |
|
|
* @author k.luther
|
31 |
|
|
* @since 29.05.2018
|
32 |
|
|
*
|
33 |
|
|
*/
|
34 |
9fe7e119
|
Katja Luther
|
public class GeneralPreferencePage extends CdmPreferencePage implements SelectionListener{
|
35 |
185eb33b
|
Katja Luther
|
|
36 |
|
|
|
37 |
a4f3f99c
|
Katja Luther
|
protected Boolean isShowIOMenu;
|
38 |
185eb33b
|
Katja Luther
|
// protected boolean isShowMediaView;
|
39 |
a4f3f99c
|
Katja Luther
|
protected Boolean isShowCheckListPerspective;
|
40 |
|
|
protected Boolean isShowTaxonNodeWizard;
|
41 |
185eb33b
|
Katja Luther
|
protected boolean isAllowOverrideShowIOMenu;
|
42 |
|
|
protected boolean isAllowOverrideShowMediaView;
|
43 |
|
|
protected boolean isAllowOverrideShowCheckListPerspective;
|
44 |
|
|
protected boolean isAllowOverrideShowTaxonNodeWizard;
|
45 |
|
|
protected boolean isOverrideShowIOMenu;
|
46 |
|
|
protected boolean isOverrideShowMediaView;
|
47 |
|
|
protected boolean isOverrideShowCheckListPerspective;
|
48 |
|
|
protected boolean isOverrideShowTaxonNodeWizard;
|
49 |
|
|
|
50 |
9fe7e119
|
Katja Luther
|
protected Combo showIOMenuButton;
|
51 |
85bd68d3
|
Katja Luther
|
protected Button allowOverrideShowIOMenuButton;
|
52 |
9fe7e119
|
Katja Luther
|
protected Combo showChecklistPerspectiveButton;
|
53 |
85bd68d3
|
Katja Luther
|
protected Button allowOverrideShowChecklistButton;
|
54 |
9fe7e119
|
Katja Luther
|
protected Combo showTaxonNodeWizardButton;
|
55 |
85bd68d3
|
Katja Luther
|
protected Button allowOverrideShowTaxonNodeWizardButton;
|
56 |
9fe7e119
|
Katja Luther
|
final String SHOW = Messages.GeneralPreference_yes;
|
57 |
|
|
final String DO_NOT_SHOW = Messages.GeneralPreference_no;
|
58 |
185eb33b
|
Katja Luther
|
/**
|
59 |
|
|
* {@inheritDoc}
|
60 |
|
|
*/
|
61 |
|
|
@Override
|
62 |
|
|
protected Control createContents(Composite parent) {
|
63 |
|
|
getValues();
|
64 |
|
|
final Composite composite = createComposite(parent);
|
65 |
|
|
|
66 |
914fe91d
|
Katja Luther
|
GridData gridData = createTextGridData();
|
67 |
fbd932cc
|
Katja Luther
|
|
68 |
914fe91d
|
Katja Luther
|
Label separator= new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
|
69 |
|
|
separator.setLayoutData(gridData);
|
70 |
|
|
separator.setVisible(false);
|
71 |
9fe7e119
|
Katja Luther
|
|
72 |
|
|
showIOMenuButton = createBooleanCombo(composite, SHOW, DO_NOT_SHOW, PreferencePredicate.ShowImportExportMenu, "Show Export/Import Menu",
|
73 |
|
|
isAdminPreference);
|
74 |
|
|
|
75 |
|
|
showIOMenuButton.addSelectionListener(this);
|
76 |
a4f3f99c
|
Katja Luther
|
|
77 |
f02e08f4
|
Katja Luther
|
|
78 |
185eb33b
|
Katja Luther
|
if (isAdminPreference){
|
79 |
9fe7e119
|
Katja Luther
|
allowOverrideShowIOMenuButton = createAllowOverrideButton(composite);
|
80 |
|
|
|
81 |
f02e08f4
|
Katja Luther
|
|
82 |
185eb33b
|
Katja Luther
|
allowOverrideShowIOMenuButton.addSelectionListener(new SelectionAdapter(){
|
83 |
|
|
@Override
|
84 |
|
|
public void widgetSelected(SelectionEvent e) {
|
85 |
|
|
isAllowOverrideShowIOMenu = allowOverrideShowIOMenuButton.getSelection();
|
86 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
87 |
185eb33b
|
Katja Luther
|
}
|
88 |
|
|
});
|
89 |
9fe7e119
|
Katja Luther
|
}
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
showChecklistPerspectiveButton = createBooleanCombo(composite, SHOW, DO_NOT_SHOW, PreferencePredicate.ShowChecklistPerspective, "Set Checklist Perspective as Default Perspective",
|
93 |
|
|
isAdminPreference);
|
94 |
|
|
|
95 |
|
|
showChecklistPerspectiveButton.addSelectionListener(this);
|
96 |
f02e08f4
|
Katja Luther
|
|
97 |
185eb33b
|
Katja Luther
|
|
98 |
|
|
if (isAdminPreference){
|
99 |
9fe7e119
|
Katja Luther
|
allowOverrideShowChecklistButton = createAllowOverrideButton(composite);
|
100 |
185eb33b
|
Katja Luther
|
allowOverrideShowChecklistButton.addSelectionListener(new SelectionAdapter(){
|
101 |
|
|
@Override
|
102 |
|
|
public void widgetSelected(SelectionEvent e) {
|
103 |
|
|
isAllowOverrideShowCheckListPerspective = allowOverrideShowChecklistButton.getSelection();
|
104 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
105 |
185eb33b
|
Katja Luther
|
}
|
106 |
|
|
});
|
107 |
|
|
}
|
108 |
|
|
|
109 |
9fe7e119
|
Katja Luther
|
showTaxonNodeWizardButton = createBooleanCombo(composite, SHOW, DO_NOT_SHOW, PreferencePredicate.ShowTaxonNodeWizard, "Show Taxonnode Wizard",
|
110 |
|
|
isAdminPreference);
|
111 |
185eb33b
|
Katja Luther
|
showTaxonNodeWizardButton.setText(Messages.DatabasePreferncesPage_Show_TaxonNodeWizard);
|
112 |
9fe7e119
|
Katja Luther
|
showTaxonNodeWizardButton.addSelectionListener(this);
|
113 |
|
|
|
114 |
|
|
|
115 |
185eb33b
|
Katja Luther
|
if (isAdminPreference){
|
116 |
9fe7e119
|
Katja Luther
|
allowOverrideShowTaxonNodeWizardButton = createAllowOverrideButton(composite);
|
117 |
185eb33b
|
Katja Luther
|
allowOverrideShowTaxonNodeWizardButton.addSelectionListener(new SelectionAdapter(){
|
118 |
|
|
@Override
|
119 |
|
|
public void widgetSelected(SelectionEvent e) {
|
120 |
|
|
isAllowOverrideShowTaxonNodeWizard = allowOverrideShowTaxonNodeWizardButton.getSelection();
|
121 |
fbd932cc
|
Katja Luther
|
setApply(true);
|
122 |
185eb33b
|
Katja Luther
|
}
|
123 |
|
|
});
|
124 |
9fe7e119
|
Katja Luther
|
}
|
125 |
|
|
if(!isAdminPreference){
|
126 |
|
|
if (!isAllowOverrideShowIOMenu){
|
127 |
|
|
showIOMenuButton.setEnabled(false);
|
128 |
|
|
|
129 |
|
|
}
|
130 |
|
|
if (!isAllowOverrideShowCheckListPerspective){
|
131 |
|
|
showChecklistPerspectiveButton.setEnabled(false);
|
132 |
|
|
|
133 |
|
|
}
|
134 |
185eb33b
|
Katja Luther
|
if (!isAllowOverrideShowTaxonNodeWizard){
|
135 |
|
|
showTaxonNodeWizardButton.setEnabled(false);
|
136 |
9fe7e119
|
Katja Luther
|
|
137 |
185eb33b
|
Katja Luther
|
}
|
138 |
|
|
}
|
139 |
|
|
|
140 |
f02e08f4
|
Katja Luther
|
setSelections();
|
141 |
185eb33b
|
Katja Luther
|
return composite;
|
142 |
|
|
}
|
143 |
|
|
|
144 |
fbd932cc
|
Katja Luther
|
|
145 |
185eb33b
|
Katja Luther
|
|
146 |
|
|
@Override
|
147 |
|
|
public boolean performOk() {
|
148 |
9c128421
|
Katja Luther
|
if (!isApply()){
|
149 |
|
|
return true;
|
150 |
|
|
}
|
151 |
185eb33b
|
Katja Luther
|
if (isAllowOverrideShowCheckListPerspective){
|
152 |
f02e08f4
|
Katja Luther
|
if (isShowCheckListPerspective != null){
|
153 |
|
|
PreferencesUtil.setBooleanValue(PreferencePredicate.ShowChecklistPerspective.getKey(), isShowCheckListPerspective);
|
154 |
|
|
}
|
155 |
8fecfdbd
|
Katja Luther
|
PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowChecklistPerspective.getKey()), isOverrideShowCheckListPerspective);
|
156 |
f02e08f4
|
Katja Luther
|
|
157 |
9c128421
|
Katja Luther
|
|
158 |
185eb33b
|
Katja Luther
|
}
|
159 |
|
|
if (isAllowOverrideShowIOMenu){
|
160 |
f02e08f4
|
Katja Luther
|
if (isShowIOMenu != null){
|
161 |
|
|
PreferencesUtil.setBooleanValue(PreferencePredicate.ShowImportExportMenu.getKey(), isShowIOMenu);
|
162 |
|
|
}
|
163 |
9b8d1a1c
|
Katja Luther
|
PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowImportExportMenu.getKey()), isOverrideShowIOMenu);
|
164 |
185eb33b
|
Katja Luther
|
}
|
165 |
9fe7e119
|
Katja Luther
|
|
166 |
185eb33b
|
Katja Luther
|
if (isAllowOverrideShowTaxonNodeWizard){
|
167 |
f02e08f4
|
Katja Luther
|
if (isShowTaxonNodeWizard != null){
|
168 |
|
|
PreferencesUtil.setBooleanValue(PreferencePredicate.ShowTaxonNodeWizard.getKey(), isShowTaxonNodeWizard);
|
169 |
|
|
}
|
170 |
9b8d1a1c
|
Katja Luther
|
PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowTaxonNodeWizard.getKey()), isOverrideShowTaxonNodeWizard);
|
171 |
f02e08f4
|
Katja Luther
|
|
172 |
185eb33b
|
Katja Luther
|
}
|
173 |
|
|
|
174 |
|
|
return true;
|
175 |
|
|
}
|
176 |
|
|
@Override
|
177 |
|
|
protected void getValues(){
|
178 |
|
|
isAdminPreference = false;
|
179 |
9181d281
|
Katja Luther
|
|
180 |
185eb33b
|
Katja Luther
|
CdmPreferenceCache cache = CdmPreferenceCache.instance();
|
181 |
a4f3f99c
|
Katja Luther
|
isOverrideShowIOMenu = PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowImportExportMenu.getKey()), true) != null?
|
182 |
|
|
PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowImportExportMenu.getKey()), true): false;
|
183 |
8fecfdbd
|
Katja Luther
|
if (isOverrideShowIOMenu){
|
184 |
|
|
isShowIOMenu = PreferencesUtil.getBooleanValue(PreferencePredicate.ShowImportExportMenu.getKey(), true);
|
185 |
|
|
}
|
186 |
|
|
|
187 |
|
|
|
188 |
9fe7e119
|
Katja Luther
|
PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowImportExportMenu);
|
189 |
|
|
CdmPreference pref = cache.findBestMatching(key);
|
190 |
185eb33b
|
Katja Luther
|
if (pref != null){
|
191 |
|
|
isAllowOverrideShowIOMenu = pref.isAllowOverride();
|
192 |
|
|
}else{
|
193 |
|
|
isAllowOverrideShowIOMenu = true;
|
194 |
|
|
}
|
195 |
9fe7e119
|
Katja Luther
|
|
196 |
a4f3f99c
|
Katja Luther
|
isOverrideShowCheckListPerspective = PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowChecklistPerspective.getKey()), true) != null? PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowChecklistPerspective.getKey()), true): false;
|
197 |
8fecfdbd
|
Katja Luther
|
if (isOverrideShowCheckListPerspective){
|
198 |
|
|
isShowCheckListPerspective = PreferencesUtil.getBooleanValue(PreferencePredicate.ShowChecklistPerspective.getKey(), true);
|
199 |
|
|
}
|
200 |
|
|
|
201 |
|
|
|
202 |
9fe7e119
|
Katja Luther
|
key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowChecklistPerspective);
|
203 |
|
|
pref = cache.findBestMatching(key);
|
204 |
185eb33b
|
Katja Luther
|
if (pref != null){
|
205 |
|
|
isAllowOverrideShowCheckListPerspective = pref.isAllowOverride();
|
206 |
|
|
}else{
|
207 |
|
|
isAllowOverrideShowCheckListPerspective = true;
|
208 |
|
|
}
|
209 |
9fe7e119
|
Katja Luther
|
|
210 |
a4f3f99c
|
Katja Luther
|
isOverrideShowTaxonNodeWizard = PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowTaxonNodeWizard.getKey()), true) != null? PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowTaxonNodeWizard.getKey()), true): false;
|
211 |
8fecfdbd
|
Katja Luther
|
if (isOverrideShowTaxonNodeWizard){
|
212 |
|
|
isShowTaxonNodeWizard = PreferencesUtil.getBooleanValue(PreferencePredicate.ShowTaxonNodeWizard.getKey(), true);
|
213 |
|
|
}
|
214 |
|
|
|
215 |
9fe7e119
|
Katja Luther
|
key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowTaxonNodeWizard);
|
216 |
|
|
pref = cache.findBestMatching(key);
|
217 |
185eb33b
|
Katja Luther
|
if (pref != null){
|
218 |
|
|
isAllowOverrideShowTaxonNodeWizard = pref.isAllowOverride();
|
219 |
|
|
}else{
|
220 |
|
|
isAllowOverrideShowTaxonNodeWizard = true;
|
221 |
|
|
}
|
222 |
|
|
}
|
223 |
|
|
|
224 |
9fe7e119
|
Katja Luther
|
|
225 |
|
|
|
226 |
|
|
/**
|
227 |
|
|
* {@inheritDoc}
|
228 |
|
|
*/
|
229 |
|
|
@Override
|
230 |
|
|
public void widgetSelected(SelectionEvent e) {
|
231 |
f02e08f4
|
Katja Luther
|
|
232 |
9fe7e119
|
Katja Luther
|
if (e.getSource().equals(this.showIOMenuButton)) {
|
233 |
|
|
String text = showIOMenuButton.getText();
|
234 |
c2a446b0
|
Katja Luther
|
if (text.startsWith(Messages.Preference_Use_Default)){
|
235 |
9c128421
|
Katja Luther
|
isOverrideShowIOMenu = false;
|
236 |
c2a446b0
|
Katja Luther
|
isShowIOMenu = null;
|
237 |
79bd864f
|
Katja Luther
|
|
238 |
9c128421
|
Katja Luther
|
}else if (text.equals(SHOW)){
|
239 |
9fe7e119
|
Katja Luther
|
isShowIOMenu = true;
|
240 |
f02e08f4
|
Katja Luther
|
isOverrideShowIOMenu = true;
|
241 |
e1dfd329
|
Katja Luther
|
|
242 |
9fe7e119
|
Katja Luther
|
}else{
|
243 |
|
|
isShowIOMenu = false;
|
244 |
f02e08f4
|
Katja Luther
|
isOverrideShowIOMenu = true;
|
245 |
9fe7e119
|
Katja Luther
|
}
|
246 |
|
|
}
|
247 |
|
|
if (e.getSource().equals(this.showChecklistPerspectiveButton)) {
|
248 |
|
|
String text = showChecklistPerspectiveButton.getText();
|
249 |
c2a446b0
|
Katja Luther
|
if (text.startsWith(Messages.Preference_Use_Default)){
|
250 |
9c128421
|
Katja Luther
|
isOverrideShowCheckListPerspective = false;
|
251 |
c2a446b0
|
Katja Luther
|
isShowCheckListPerspective = null;
|
252 |
79bd864f
|
Katja Luther
|
|
253 |
9c128421
|
Katja Luther
|
}else if (text.equals(SHOW)){
|
254 |
9fe7e119
|
Katja Luther
|
isShowCheckListPerspective = true;
|
255 |
f02e08f4
|
Katja Luther
|
isOverrideShowCheckListPerspective = true;
|
256 |
9fe7e119
|
Katja Luther
|
}else{
|
257 |
|
|
isShowCheckListPerspective = false;
|
258 |
f02e08f4
|
Katja Luther
|
isOverrideShowCheckListPerspective = true;
|
259 |
9fe7e119
|
Katja Luther
|
}
|
260 |
|
|
}
|
261 |
|
|
if (e.getSource().equals(this.showTaxonNodeWizardButton)) {
|
262 |
|
|
String text = showTaxonNodeWizardButton.getText();
|
263 |
c2a446b0
|
Katja Luther
|
if (text.startsWith(Messages.Preference_Use_Default)){
|
264 |
9c128421
|
Katja Luther
|
isOverrideShowTaxonNodeWizard = false;
|
265 |
c2a446b0
|
Katja Luther
|
isShowTaxonNodeWizard = null;
|
266 |
79bd864f
|
Katja Luther
|
|
267 |
9c128421
|
Katja Luther
|
}else if (text.equals(SHOW)){
|
268 |
9fe7e119
|
Katja Luther
|
isShowTaxonNodeWizard = true;
|
269 |
f02e08f4
|
Katja Luther
|
isOverrideShowTaxonNodeWizard = true;
|
270 |
9fe7e119
|
Katja Luther
|
}else{
|
271 |
|
|
isShowTaxonNodeWizard = false;
|
272 |
f02e08f4
|
Katja Luther
|
isOverrideShowTaxonNodeWizard = true;
|
273 |
9fe7e119
|
Katja Luther
|
}
|
274 |
|
|
}
|
275 |
e1dfd329
|
Katja Luther
|
this.setSelections();
|
276 |
cc1302bd
|
Katja Luther
|
this.setApply(true);
|
277 |
9fe7e119
|
Katja Luther
|
|
278 |
|
|
|
279 |
|
|
}
|
280 |
|
|
|
281 |
|
|
|
282 |
|
|
|
283 |
|
|
/**
|
284 |
|
|
* {@inheritDoc}
|
285 |
|
|
*/
|
286 |
|
|
@Override
|
287 |
|
|
public void widgetDefaultSelected(SelectionEvent e) {
|
288 |
|
|
// TODO Auto-generated method stub
|
289 |
|
|
|
290 |
|
|
}
|
291 |
|
|
|
292 |
f02e08f4
|
Katja Luther
|
@Override
|
293 |
|
|
protected void performDefaults() {
|
294 |
|
|
isOverrideShowTaxonNodeWizard = false;
|
295 |
|
|
isShowTaxonNodeWizard = null;
|
296 |
|
|
|
297 |
|
|
isOverrideShowCheckListPerspective = false;
|
298 |
|
|
isShowCheckListPerspective = null;
|
299 |
|
|
|
300 |
|
|
isOverrideShowIOMenu = false;
|
301 |
|
|
isShowIOMenu = null;
|
302 |
|
|
setSelections();
|
303 |
|
|
setApply(true);
|
304 |
|
|
}
|
305 |
|
|
|
306 |
|
|
protected void setSelections(){
|
307 |
|
|
if (isShowIOMenu == null || (!isOverrideShowIOMenu && !isAdminPreference)){
|
308 |
|
|
showIOMenuButton.select(0);
|
309 |
79bd864f
|
Katja Luther
|
// if (isAdminPreference){
|
310 |
|
|
// allowOverrideShowIOMenuButton.setEnabled(false);
|
311 |
|
|
// }
|
312 |
f02e08f4
|
Katja Luther
|
}else{
|
313 |
79bd864f
|
Katja Luther
|
// if (isAdminPreference){
|
314 |
|
|
// allowOverrideShowIOMenuButton.setEnabled(true);
|
315 |
|
|
// }
|
316 |
e1dfd329
|
Katja Luther
|
if (isShowIOMenu){
|
317 |
|
|
showIOMenuButton.select(1);
|
318 |
|
|
}else{
|
319 |
|
|
showIOMenuButton.select(2);
|
320 |
|
|
}
|
321 |
f02e08f4
|
Katja Luther
|
}
|
322 |
|
|
|
323 |
8fecfdbd
|
Katja Luther
|
if (isShowCheckListPerspective == null || (!isOverrideShowCheckListPerspective && !isAdminPreference)){
|
324 |
f02e08f4
|
Katja Luther
|
showChecklistPerspectiveButton.select(0);
|
325 |
79bd864f
|
Katja Luther
|
// if (isAdminPreference){
|
326 |
|
|
// allowOverrideShowChecklistButton.setEnabled(false);
|
327 |
|
|
// }
|
328 |
f02e08f4
|
Katja Luther
|
}else{
|
329 |
79bd864f
|
Katja Luther
|
// if (isAdminPreference){
|
330 |
|
|
// allowOverrideShowChecklistButton.setEnabled(true);
|
331 |
|
|
// }
|
332 |
e1dfd329
|
Katja Luther
|
if (isShowCheckListPerspective){
|
333 |
|
|
showChecklistPerspectiveButton.select(1);
|
334 |
|
|
}else{
|
335 |
|
|
showChecklistPerspectiveButton.select(2);
|
336 |
|
|
}
|
337 |
f02e08f4
|
Katja Luther
|
}
|
338 |
|
|
|
339 |
8fecfdbd
|
Katja Luther
|
if (isShowTaxonNodeWizard == null || (!isOverrideShowTaxonNodeWizard && !isAdminPreference)){
|
340 |
f02e08f4
|
Katja Luther
|
showTaxonNodeWizardButton.select(0);
|
341 |
79bd864f
|
Katja Luther
|
// if (isAdminPreference){
|
342 |
|
|
// allowOverrideShowTaxonNodeWizardButton.setEnabled(false);
|
343 |
|
|
// }
|
344 |
f02e08f4
|
Katja Luther
|
}else{
|
345 |
79bd864f
|
Katja Luther
|
// if (isAdminPreference){
|
346 |
|
|
// allowOverrideShowTaxonNodeWizardButton.setEnabled(true);
|
347 |
|
|
// }
|
348 |
e1dfd329
|
Katja Luther
|
if (isShowTaxonNodeWizard){
|
349 |
|
|
showTaxonNodeWizardButton.select(1);
|
350 |
|
|
}else{
|
351 |
|
|
showTaxonNodeWizardButton.select(2);
|
352 |
|
|
}
|
353 |
f02e08f4
|
Katja Luther
|
}
|
354 |
|
|
|
355 |
|
|
if (isAdminPreference){
|
356 |
|
|
allowOverrideShowIOMenuButton.setSelection(isAllowOverrideShowIOMenu);
|
357 |
|
|
allowOverrideShowChecklistButton.setSelection(isAllowOverrideShowCheckListPerspective);
|
358 |
|
|
allowOverrideShowTaxonNodeWizardButton.setSelection(isAllowOverrideShowTaxonNodeWizard);
|
359 |
|
|
}
|
360 |
|
|
}
|
361 |
|
|
|
362 |
185eb33b
|
Katja Luther
|
}
|