2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.propertysheet
.type
.wizard
;
12 import org
.eclipse
.core
.databinding
.observable
.list
.WritableList
;
13 import org
.eclipse
.jface
.wizard
.Wizard
;
14 import org
.eclipse
.jface
.wizard
.WizardPage
;
16 import eu
.etaxonomy
.cdm
.model
.name
.TaxonNameBase
;
17 import eu
.etaxonomy
.cdm
.model
.name
.TypeDesignationBase
;
18 import eu
.etaxonomy
.taxeditor
.model
.NameHelper
;
26 public class TypeDesignationWizard
extends Wizard
{
29 private TypeDesignationBase
<?
> typeDesignation
;
30 private TaxonNameBase
<?
, ?
> name
;
31 private WritableList typeDesignationsList
;
33 private WizardPage chooseTypePage
;
36 * @param typeDesignation
37 * @param typeDesignationsList
39 public TypeDesignationWizard(TypeDesignationBase
<?
> typeDesignation
, TaxonNameBase
<?
, ?
> name
, WritableList typeDesignationsList
) {
42 this.typeDesignation
= typeDesignation
;
43 this.typeDesignationsList
= typeDesignationsList
;
47 * @see org.eclipse.jface.wizard.Wizard#addPages()
49 public void addPages() {
50 if (NameHelper
.isNameSupraSpecific(name
)) {
51 chooseTypePage
= new ChooseNameTypeWizardPage(typeDesignation
, name
, typeDesignationsList
);
53 chooseTypePage
= new ChooseSpecimenTypeWizardPage(typeDesignation
, name
, typeDesignationsList
);
56 addPage(chooseTypePage
);
60 * @see org.eclipse.jface.wizard.Wizard#performFinish()
63 public boolean performFinish() {
65 chooseTypePage
.setPageComplete(true);