51 |
51 |
private Button showSecDetail;
|
52 |
52 |
private Button secEnabled;
|
53 |
53 |
|
|
54 |
protected Button activateCheckButton;
|
|
55 |
protected Button allowLocalPreference;
|
|
56 |
protected Button showTaxon;
|
|
57 |
protected Button showLsid;
|
|
58 |
protected Button showNomenclaturalCode;
|
|
59 |
protected Button showNameCache;
|
|
60 |
protected Button showAppendedPhrase;
|
|
61 |
protected Button showRank;
|
|
62 |
protected Button showEpithets;
|
|
63 |
protected Button showAuthorCache;
|
|
64 |
protected Button showAuthorship;
|
|
65 |
protected Button showNomenclaturalRef;
|
|
66 |
protected Button showNomenclaturalStatus;
|
|
67 |
protected Button showProtologue;
|
|
68 |
protected Button showTypeDesignation;
|
|
69 |
protected Button showNameRelationship;
|
|
70 |
protected Button showHybrid;
|
|
71 |
protected Button showNameApprobiation;
|
|
72 |
|
54 |
73 |
@Override
|
55 |
74 |
protected Control createContents(Composite parent) {
|
56 |
75 |
getValues();
|
... | ... | |
65 |
84 |
nameDetailsConfig = new NameDetailsConfigurator(false);
|
66 |
85 |
}
|
67 |
86 |
|
68 |
|
final Button activateCheckButton = new Button(title, SWT.CHECK);
|
69 |
|
final Button allowLocalPreference = createAllowOverrideButton(title);
|
|
87 |
activateCheckButton = new Button(title, SWT.CHECK);
|
|
88 |
allowLocalPreference = createAllowOverrideButton(title);
|
70 |
89 |
Composite dbSettings = new Composite(parent, SWT.NONE);
|
71 |
90 |
|
72 |
91 |
activateCheckButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
|
73 |
92 |
activateCheckButton.setText(Messages.NameDetailsViewConfiguration_activateSimpleDetailsView);
|
74 |
93 |
isSimpleDetailsViewActivated = nameDetailsConfig.isSimpleDetailsViewActivated();
|
75 |
|
activateCheckButton.setSelection(isSimpleDetailsViewActivated);
|
|
94 |
|
76 |
95 |
activateCheckButton.addSelectionListener(new SelectionAdapter(){
|
77 |
96 |
@Override
|
78 |
97 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
89 |
108 |
}
|
90 |
109 |
});
|
91 |
110 |
|
92 |
|
if (isAdminPreference){
|
93 |
|
allowLocalPreference.setSelection(isAllowOverride);
|
94 |
|
}else{
|
95 |
|
allowLocalPreference.setSelection(isOverride);
|
96 |
|
}
|
|
111 |
|
97 |
112 |
allowLocalPreference.addSelectionListener(new SelectionAdapter(){
|
98 |
113 |
@Override
|
99 |
114 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
113 |
128 |
|
114 |
129 |
Label separator= new Label(dbSettings, SWT.HORIZONTAL | SWT.SEPARATOR);
|
115 |
130 |
separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
116 |
|
final Button showTaxon = new Button(dbSettings, SWT.CHECK);
|
|
131 |
showTaxon = new Button(dbSettings, SWT.CHECK);
|
117 |
132 |
showTaxon.setText(Messages.NameDetailsViewComposite_Show_Taxon);
|
118 |
133 |
isShowTaxon = nameDetailsConfig.isTaxonSectionActivated();
|
119 |
|
showTaxon.setSelection(isShowTaxon);
|
|
134 |
|
120 |
135 |
showTaxon.addSelectionListener(new SelectionAdapter(){
|
121 |
136 |
@Override
|
122 |
137 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
144 |
159 |
secEnabled.setText(Messages.NameDetailsViewComposite_SecEnabled);
|
145 |
160 |
|
146 |
161 |
isSecEnabled = nameDetailsConfig.isSecEnabled();
|
147 |
|
secEnabled.setSelection(isSecEnabled);
|
|
162 |
|
148 |
163 |
secEnabled.addSelectionListener(new SelectionAdapter(){
|
149 |
164 |
@Override
|
150 |
165 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
157 |
172 |
showSecDetail.setText(Messages.NameDetailsViewComposite_Show_SecDetail);
|
158 |
173 |
|
159 |
174 |
isSecDetailsActivated = nameDetailsConfig.isSecDetailsActivated();
|
160 |
|
showSecDetail.setSelection(isSecDetailsActivated);
|
|
175 |
|
161 |
176 |
showSecDetail.addSelectionListener(new SelectionAdapter(){
|
162 |
177 |
@Override
|
163 |
178 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
167 |
182 |
}
|
168 |
183 |
});
|
169 |
184 |
|
170 |
|
final Button showLsid = new Button(dbSettings, SWT.CHECK);
|
|
185 |
showLsid = new Button(dbSettings, SWT.CHECK);
|
171 |
186 |
showLsid.setText(Messages.NameDetailsViewComposite_Show_LSID);
|
172 |
187 |
isShowLSID = nameDetailsConfig.isLSIDActivated();
|
173 |
|
showLsid.setSelection(isShowLSID);
|
|
188 |
|
174 |
189 |
showLsid.addSelectionListener(new SelectionAdapter(){
|
175 |
190 |
@Override
|
176 |
191 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
180 |
195 |
}
|
181 |
196 |
});
|
182 |
197 |
|
183 |
|
final Button showNomenclaturalCode = new Button(dbSettings, SWT.CHECK);
|
|
198 |
showNomenclaturalCode = new Button(dbSettings, SWT.CHECK);
|
184 |
199 |
showNomenclaturalCode.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalCode);
|
185 |
200 |
isShowNomenclaturalCode = nameDetailsConfig.isNomenclaturalCodeActived();
|
186 |
|
showNomenclaturalCode.setSelection(isShowNomenclaturalCode);
|
|
201 |
|
187 |
202 |
showNomenclaturalCode.addSelectionListener(new SelectionAdapter(){
|
188 |
203 |
@Override
|
189 |
204 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
193 |
208 |
}
|
194 |
209 |
});
|
195 |
210 |
|
196 |
|
final Button showNameCache = new Button(dbSettings, SWT.CHECK);
|
|
211 |
showNameCache = new Button(dbSettings, SWT.CHECK);
|
197 |
212 |
showNameCache.setText(Messages.NameDetailsViewComposite_Show_NameCache);
|
198 |
213 |
isShowNameCache = nameDetailsConfig.isNameCacheActivated();
|
199 |
|
showNameCache.setSelection(isShowNameCache);
|
|
214 |
|
200 |
215 |
showNameCache.addSelectionListener(new SelectionAdapter(){
|
201 |
216 |
@Override
|
202 |
217 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
205 |
220 |
nameDetailsConfig.setNameCacheActivated(isShowNameCache);
|
206 |
221 |
}
|
207 |
222 |
});
|
208 |
|
final Button showAppendedPhrase = new Button(dbSettings, SWT.CHECK);
|
|
223 |
showAppendedPhrase = new Button(dbSettings, SWT.CHECK);
|
209 |
224 |
isShowAppendedPhrase= nameDetailsConfig.isAppendedPhraseActivated();
|
210 |
225 |
showAppendedPhrase.setText(Messages.NameDetailsViewComposite_Show_AppendedPhrase);
|
211 |
|
showAppendedPhrase.setSelection(isShowAppendedPhrase);
|
|
226 |
|
212 |
227 |
showAppendedPhrase.addSelectionListener(new SelectionAdapter(){
|
213 |
228 |
@Override
|
214 |
229 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
218 |
233 |
}
|
219 |
234 |
});
|
220 |
235 |
|
221 |
|
final Button showRank = new Button(dbSettings, SWT.CHECK);
|
|
236 |
showRank = new Button(dbSettings, SWT.CHECK);
|
222 |
237 |
isShowRank = nameDetailsConfig.isRankActivated();
|
223 |
238 |
showRank.setText(Messages.NameDetailsViewComposite_Show_Rank);
|
224 |
|
showRank.setSelection(isShowRank);
|
|
239 |
|
225 |
240 |
showRank.addSelectionListener(new SelectionAdapter(){
|
226 |
241 |
@Override
|
227 |
242 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
230 |
245 |
nameDetailsConfig.setRankActivated(isShowRank);
|
231 |
246 |
}
|
232 |
247 |
});
|
233 |
|
final Button showEpithets = new Button(dbSettings, SWT.CHECK);
|
|
248 |
showEpithets = new Button(dbSettings, SWT.CHECK);
|
234 |
249 |
isShowEpithets = nameDetailsConfig.isAtomisedEpithetsActivated();
|
235 |
250 |
showEpithets.setText(Messages.NameDetailsViewComposite_Show_AtomisedEpithets);
|
236 |
|
showEpithets.setSelection(isShowEpithets);
|
|
251 |
|
237 |
252 |
showEpithets.addSelectionListener(new SelectionAdapter(){
|
238 |
253 |
@Override
|
239 |
254 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
243 |
258 |
}
|
244 |
259 |
});
|
245 |
260 |
|
246 |
|
final Button showAuthorCache = new Button(dbSettings, SWT.CHECK);
|
|
261 |
showAuthorCache = new Button(dbSettings, SWT.CHECK);
|
247 |
262 |
isShowAuthorCache = nameDetailsConfig.isAuthorCacheActivated();
|
248 |
263 |
showAuthorCache.setText(Messages.NameDetailsViewComposite_Show_AuthorCache);
|
249 |
|
showAuthorCache.setSelection(isShowAuthorCache);
|
|
264 |
|
250 |
265 |
showAuthorCache.addSelectionListener(new SelectionAdapter(){
|
251 |
266 |
@Override
|
252 |
267 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
256 |
271 |
}
|
257 |
272 |
});
|
258 |
273 |
|
259 |
|
final Button showAuthorship = new Button(dbSettings, SWT.CHECK);
|
|
274 |
showAuthorship = new Button(dbSettings, SWT.CHECK);
|
260 |
275 |
isShowAuthorship = nameDetailsConfig.isAuthorshipSectionActivated();
|
261 |
276 |
showAuthorship.setText(Messages.NameDetailsViewComposite_Show_Author);
|
262 |
|
showAuthorship.setSelection(isShowAuthorship);
|
|
277 |
|
263 |
278 |
showAuthorship.addSelectionListener(new SelectionAdapter(){
|
264 |
279 |
@Override
|
265 |
280 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
269 |
284 |
}
|
270 |
285 |
});
|
271 |
286 |
|
272 |
|
final Button showNomenclaturalRef = new Button(dbSettings, SWT.CHECK);
|
|
287 |
showNomenclaturalRef = new Button(dbSettings, SWT.CHECK);
|
273 |
288 |
isShowNomenclaturalRef = nameDetailsConfig.isNomenclaturalReferenceSectionActivated();
|
274 |
289 |
showNomenclaturalRef.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalReference);
|
275 |
|
showNomenclaturalRef.setSelection(isShowNomenclaturalRef);
|
|
290 |
|
276 |
291 |
showNomenclaturalRef.addSelectionListener(new SelectionAdapter(){
|
277 |
292 |
@Override
|
278 |
293 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
282 |
297 |
}
|
283 |
298 |
});
|
284 |
299 |
|
285 |
|
final Button showNomenclaturalStatus = new Button(dbSettings, SWT.CHECK);
|
|
300 |
showNomenclaturalStatus = new Button(dbSettings, SWT.CHECK);
|
286 |
301 |
isShowNomenclaturalStatus = nameDetailsConfig.isNomenclaturalStatusSectionActivated();
|
287 |
302 |
showNomenclaturalStatus.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalStatus);
|
288 |
|
showNomenclaturalStatus.setSelection(isShowNomenclaturalStatus);
|
|
303 |
|
289 |
304 |
showNomenclaturalStatus.addSelectionListener(new SelectionAdapter(){
|
290 |
305 |
@Override
|
291 |
306 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
295 |
310 |
}
|
296 |
311 |
});
|
297 |
312 |
|
298 |
|
final Button showProtologue = new Button(dbSettings, SWT.CHECK);
|
|
313 |
showProtologue = new Button(dbSettings, SWT.CHECK);
|
299 |
314 |
isShowProtologue = nameDetailsConfig.isProtologueActivated();
|
300 |
315 |
showProtologue.setText(Messages.NameDetailsViewComposite_Show_Protologue);
|
301 |
|
showProtologue.setSelection(isShowProtologue);
|
|
316 |
|
302 |
317 |
showProtologue.addSelectionListener(new SelectionAdapter(){
|
303 |
318 |
@Override
|
304 |
319 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
308 |
323 |
}
|
309 |
324 |
});
|
310 |
325 |
|
311 |
|
final Button showTypeDesignation = new Button(dbSettings, SWT.CHECK);
|
|
326 |
showTypeDesignation = new Button(dbSettings, SWT.CHECK);
|
312 |
327 |
isShowTypeDesignation = nameDetailsConfig.isTypeDesignationSectionActivated();
|
313 |
328 |
showTypeDesignation.setText(Messages.NameDetailsViewComposite_Show_TypeDesignation);
|
314 |
|
showTypeDesignation.setSelection(isShowTypeDesignation);
|
|
329 |
|
315 |
330 |
showTypeDesignation.addSelectionListener(new SelectionAdapter(){
|
316 |
331 |
@Override
|
317 |
332 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
322 |
337 |
});
|
323 |
338 |
|
324 |
339 |
|
325 |
|
final Button showNameRelationship = new Button(dbSettings, SWT.CHECK);
|
|
340 |
showNameRelationship = new Button(dbSettings, SWT.CHECK);
|
326 |
341 |
isShowNameRelationship = nameDetailsConfig.isNameRelationsSectionActivated();
|
327 |
342 |
showNameRelationship.setText(Messages.NameDetailsViewComposite_Show_Namerelationships);
|
328 |
|
showNameRelationship.setSelection(isShowNameRelationship);
|
|
343 |
|
329 |
344 |
showNameRelationship.addSelectionListener(new SelectionAdapter(){
|
330 |
345 |
@Override
|
331 |
346 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
335 |
350 |
}
|
336 |
351 |
});
|
337 |
352 |
|
338 |
|
final Button showHybrid = new Button(dbSettings, SWT.CHECK);
|
|
353 |
showHybrid = new Button(dbSettings, SWT.CHECK);
|
339 |
354 |
isShowHybrid = nameDetailsConfig.isHybridActivated();
|
340 |
355 |
showHybrid.setText(Messages.NameDetailsViewComposite_Show_Hybrid);
|
341 |
|
showHybrid.setSelection(isShowHybrid);
|
|
356 |
|
342 |
357 |
showHybrid.addSelectionListener(new SelectionAdapter(){
|
343 |
358 |
@Override
|
344 |
359 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
347 |
362 |
nameDetailsConfig.setHybridActivated(isShowHybrid);
|
348 |
363 |
}
|
349 |
364 |
});
|
350 |
|
final Button showNameApprobiation = new Button(dbSettings, SWT.CHECK);
|
|
365 |
showNameApprobiation = new Button(dbSettings, SWT.CHECK);
|
351 |
366 |
isShowNameApprobiation = nameDetailsConfig.isNameApprobiationActivated();
|
352 |
367 |
showNameApprobiation.setText(Messages.NameDetailsViewComposite_Show_NameApprobiation);
|
353 |
|
showNameApprobiation.setSelection(isShowNameApprobiation);
|
354 |
368 |
showNameApprobiation.addSelectionListener(new SelectionAdapter(){
|
355 |
369 |
@Override
|
356 |
370 |
public void widgetSelected(SelectionEvent e) {
|
... | ... | |
364 |
378 |
showSecDetail.setEnabled(isShowTaxon);
|
365 |
379 |
secEnabled.setEnabled(isShowTaxon);
|
366 |
380 |
}
|
|
381 |
setButtonSelections();
|
367 |
382 |
|
368 |
383 |
}else{
|
369 |
384 |
final CLabel description = new CLabel(parent, SWT.NULL);
|
... | ... | |
402 |
417 |
}
|
403 |
418 |
}
|
404 |
419 |
|
|
420 |
protected void setButtonSelections(){
|
|
421 |
activateCheckButton.setSelection(isSimpleDetailsViewActivated);;
|
|
422 |
if (isAdminPreference){
|
|
423 |
allowLocalPreference.setSelection(isAllowOverride);
|
|
424 |
}else{
|
|
425 |
allowLocalPreference.setSelection(isOverride);
|
|
426 |
}
|
|
427 |
showTaxon.setSelection(isShowTaxon);
|
|
428 |
showLsid.setSelection(isShowLSID);
|
|
429 |
showNomenclaturalCode.setSelection(isShowNomenclaturalCode);
|
|
430 |
showNameCache.setSelection(isShowNameCache);
|
|
431 |
showAppendedPhrase.setSelection(isShowAppendedPhrase);
|
|
432 |
showRank.setSelection(isShowRank);
|
|
433 |
showEpithets.setSelection(isShowEpithets);
|
|
434 |
showAuthorCache.setSelection(isShowAuthorCache);
|
|
435 |
showAuthorship.setSelection(isShowAuthorship);
|
|
436 |
showNomenclaturalRef.setSelection(isShowNomenclaturalRef);
|
|
437 |
showNomenclaturalStatus.setSelection(isShowNomenclaturalStatus);
|
|
438 |
showProtologue.setSelection(isShowProtologue);
|
|
439 |
showTypeDesignation.setSelection(isShowTypeDesignation);
|
|
440 |
showNameRelationship.setSelection(isShowNameRelationship);
|
|
441 |
showHybrid.setSelection(isShowHybrid);
|
|
442 |
showNameApprobiation.setSelection(isShowNameApprobiation);
|
|
443 |
secEnabled.setSelection(isSecEnabled);
|
|
444 |
secEnabled.setEnabled(isShowTaxon);
|
|
445 |
showSecDetail.setSelection(isSecDetailsActivated);
|
|
446 |
showSecDetail.setEnabled(isShowTaxon);
|
|
447 |
|
|
448 |
}
|
|
449 |
|
|
450 |
@Override
|
|
451 |
protected void performDefaults() {
|
|
452 |
nameDetailsConfig = new NameDetailsConfigurator(false);
|
|
453 |
isShowAppendedPhrase = nameDetailsConfig.isAppendedPhraseActivated();
|
|
454 |
isShowEpithets = nameDetailsConfig.isAtomisedEpithetsActivated();
|
|
455 |
isShowAuthorship = nameDetailsConfig.isAuthorshipSectionActivated();
|
|
456 |
isShowAuthorCache = nameDetailsConfig.isAuthorCacheActivated();
|
|
457 |
isShowLSID = nameDetailsConfig.isLSIDActivated();
|
|
458 |
isShowNameApprobiation = nameDetailsConfig.isNameApprobiationActivated();
|
|
459 |
isShowNameCache = nameDetailsConfig.isNameCacheActivated();
|
|
460 |
isShowNameRelationship = nameDetailsConfig.isNameRelationsSectionActivated();
|
|
461 |
isShowNomenclaturalCode = nameDetailsConfig.isNomenclaturalCodeActived();
|
|
462 |
isShowNomenclaturalStatus = nameDetailsConfig.isNomenclaturalStatusSectionActivated();
|
|
463 |
isShowNomenclaturalRef = nameDetailsConfig.isNomenclaturalReferenceSectionActivated();
|
|
464 |
isShowProtologue = nameDetailsConfig.isProtologueActivated();
|
|
465 |
isShowRank = nameDetailsConfig.isRankActivated();
|
|
466 |
isShowTaxon = nameDetailsConfig.isTaxonSectionActivated();
|
|
467 |
isSecDetailsActivated = nameDetailsConfig.isSecDetailsActivated();
|
|
468 |
isSecEnabled = nameDetailsConfig.isSecEnabled();
|
|
469 |
isShowTypeDesignation = nameDetailsConfig.isTypeDesignationSectionActivated();
|
|
470 |
isShowHybrid = nameDetailsConfig.isHybridActivated();
|
|
471 |
this.setButtonSelections();
|
|
472 |
super.performDefaults();
|
|
473 |
}
|
|
474 |
|
405 |
475 |
}
|
ref #7849: update name details page when restore default