1 |
cf3d9f76
|
Patrick Plitzner
|
/**
|
2 |
|
|
* Copyright (C) 2019 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.section.feature;
|
10 |
|
|
|
11 |
|
|
import org.eclipse.jface.wizard.Wizard;
|
12 |
|
|
|
13 |
|
|
import eu.etaxonomy.cdm.model.description.FeatureState;
|
14 |
2e1c204d
|
Katja Luther
|
import eu.etaxonomy.cdm.persistence.dto.TermNodeDto;
|
15 |
cf3d9f76
|
Patrick Plitzner
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
16 |
|
|
|
17 |
|
|
/**
|
18 |
|
|
* @author pplitzner
|
19 |
|
|
* @since Aug 16, 2019
|
20 |
|
|
*
|
21 |
|
|
*/
|
22 |
|
|
public class FeatureStateWizard extends Wizard {
|
23 |
|
|
|
24 |
3250b022
|
Patrick Plitzner
|
private static final String CREATE_FEATURE_STATE = "Create Feature State";
|
25 |
cf3d9f76
|
Patrick Plitzner
|
private FeatureStateWizardPage page;
|
26 |
|
|
private CdmFormFactory formFactory;
|
27 |
edc4e5ae
|
Katja Luther
|
private TermNodeDto termNode;
|
28 |
cf3d9f76
|
Patrick Plitzner
|
|
29 |
edc4e5ae
|
Katja Luther
|
public FeatureStateWizard(TermNodeDto termNode, CdmFormFactory formFactory) {
|
30 |
cf3d9f76
|
Patrick Plitzner
|
super();
|
31 |
|
|
this.formFactory = formFactory;
|
32 |
e9af789c
|
Patrick Plitzner
|
this.termNode = termNode;
|
33 |
3250b022
|
Patrick Plitzner
|
setWindowTitle(CREATE_FEATURE_STATE);
|
34 |
cf3d9f76
|
Patrick Plitzner
|
}
|
35 |
|
|
|
36 |
|
|
@Override
|
37 |
|
|
public void addPages() {
|
38 |
48a40f35
|
Patrick Plitzner
|
page = new FeatureStateWizardPage(CREATE_FEATURE_STATE, termNode, formFactory);
|
39 |
cf3d9f76
|
Patrick Plitzner
|
addPage(page);
|
40 |
|
|
}
|
41 |
|
|
|
42 |
|
|
@Override
|
43 |
|
|
public boolean performFinish() {
|
44 |
|
|
return page.isPageComplete();
|
45 |
|
|
}
|
46 |
|
|
|
47 |
|
|
FeatureState getFeatureState(){
|
48 |
|
|
return page.getFeatureState();
|
49 |
|
|
}
|
50 |
|
|
|
51 |
|
|
}
|