1
|
/**
|
2
|
* Copyright (C) 2017 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.ui.dialog.configurator;
|
10
|
|
11
|
import org.eclipse.jface.wizard.Wizard;
|
12
|
|
13
|
import eu.etaxonomy.cdm.api.service.config.SecundumForSubtreeConfigurator;
|
14
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
15
|
import eu.etaxonomy.taxeditor.l10n.Messages;
|
16
|
|
17
|
/**
|
18
|
* @author k.luther
|
19
|
* @date 10.02.2017
|
20
|
*
|
21
|
*/
|
22
|
public class SetSecundumForSubtreeConfigurationWizard extends Wizard {
|
23
|
|
24
|
Reference newSecRef;
|
25
|
private final SecundumForSubtreeConfigurator configurator;
|
26
|
|
27
|
|
28
|
private SetSecundumConfiguratorWizardPage page;
|
29
|
|
30
|
|
31
|
|
32
|
/**
|
33
|
* @param parentShell
|
34
|
* @param dialogTitle
|
35
|
* @param dialogTitleImage
|
36
|
* @param dialogMessage
|
37
|
* @param dialogImageType
|
38
|
* @param dialogButtonLabels
|
39
|
* @param defaultIndex
|
40
|
* @param config
|
41
|
*/
|
42
|
public SetSecundumForSubtreeConfigurationWizard(SecundumForSubtreeConfigurator config) {
|
43
|
super();
|
44
|
// super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
|
45
|
this.configurator = config;
|
46
|
setNeedsProgressMonitor(true);
|
47
|
this.setWindowTitle(Messages.SetSecundumConfiguration_Title);
|
48
|
|
49
|
|
50
|
|
51
|
}
|
52
|
|
53
|
|
54
|
|
55
|
|
56
|
|
57
|
|
58
|
|
59
|
|
60
|
|
61
|
/**
|
62
|
* {@inheritDoc}
|
63
|
*/
|
64
|
@Override
|
65
|
public boolean performFinish() {
|
66
|
if (!(configurator.isIncludeAcceptedTaxa() || configurator.isIncludeSynonyms())){
|
67
|
return false;
|
68
|
}else{
|
69
|
return true;
|
70
|
}
|
71
|
}
|
72
|
|
73
|
/* (non-Javadoc)
|
74
|
* @see org.eclipse.jface.wizard.Wizard#addPages()
|
75
|
*/
|
76
|
/** {@inheritDoc} */
|
77
|
@Override
|
78
|
public void addPages() {
|
79
|
page = new SetSecundumConfiguratorWizardPage(configurator);
|
80
|
addPage(page);
|
81
|
}
|
82
|
|
83
|
|
84
|
}
|