extract string constant
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / feature / FeatureStateWizard.java
1 /**
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.Feature;
14 import eu.etaxonomy.cdm.model.description.FeatureState;
15 import eu.etaxonomy.cdm.model.term.TermNode;
16 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
17
18 /**
19 * @author pplitzner
20 * @since Aug 16, 2019
21 *
22 */
23 public class FeatureStateWizard extends Wizard {
24
25 private static final String CREATE_FEATURE_STATE = "Create Feature State";
26 private FeatureStateWizardPage page;
27 private CdmFormFactory formFactory;
28 private String comboLabel;
29 private TermNode<? extends Feature> termNode;
30
31 public FeatureStateWizard(String comboLabel, TermNode<? extends Feature> termNode, CdmFormFactory formFactory) {
32 super();
33 this.formFactory = formFactory;
34 this.termNode = termNode;
35 this.comboLabel = comboLabel;
36 setWindowTitle(CREATE_FEATURE_STATE);
37 }
38
39 @Override
40 public void addPages() {
41 page = new FeatureStateWizardPage(CREATE_FEATURE_STATE, comboLabel, termNode, formFactory);
42 addPage(page);
43 }
44
45 @Override
46 public boolean performFinish() {
47 return page.isPageComplete();
48 }
49
50 FeatureState getFeatureState(){
51 return page.getFeatureState();
52 }
53
54 }