1 |
3fb05254
|
n.hoffmann
|
// $Id$
|
2 |
|
|
/**
|
3 |
|
|
* Copyright (C) 2007 EDIT
|
4 |
|
|
* European Distributed Institute of Taxonomy
|
5 |
|
|
* http://www.e-taxonomy.eu
|
6 |
|
|
*
|
7 |
|
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8 |
|
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9 |
|
|
*/
|
10 |
|
|
|
11 |
|
|
package eu.etaxonomy.taxeditor.featuretree;
|
12 |
|
|
|
13 |
|
|
import java.util.Set;
|
14 |
|
|
|
15 |
|
|
import org.eclipse.jface.wizard.Wizard;
|
16 |
|
|
|
17 |
|
|
import eu.etaxonomy.cdm.model.description.Feature;
|
18 |
|
|
import eu.etaxonomy.cdm.model.description.FeatureTree;
|
19 |
|
|
|
20 |
|
|
/**
|
21 |
3be6ef3e
|
n.hoffmann
|
* <p>AvailableFeaturesWizard class.</p>
|
22 |
|
|
*
|
23 |
3fb05254
|
n.hoffmann
|
* @author n.hoffmann
|
24 |
|
|
* @created Aug 5, 2010
|
25 |
|
|
* @version 1.0
|
26 |
|
|
*/
|
27 |
|
|
public class AvailableFeaturesWizard extends Wizard {
|
28 |
|
|
|
29 |
|
|
private FeatureTree featureTree;
|
30 |
|
|
|
31 |
|
|
private AvailableFeaturesWizardPage page;
|
32 |
|
|
|
33 |
|
|
private Set<Feature> additionalFeatures;
|
34 |
|
|
|
35 |
3be6ef3e
|
n.hoffmann
|
/**
|
36 |
|
|
* <p>Constructor for AvailableFeaturesWizard.</p>
|
37 |
|
|
*
|
38 |
|
|
* @param featureTree a {@link eu.etaxonomy.cdm.model.description.FeatureTree} object.
|
39 |
|
|
*/
|
40 |
3fb05254
|
n.hoffmann
|
public AvailableFeaturesWizard(FeatureTree featureTree){
|
41 |
|
|
this.featureTree = featureTree;
|
42 |
|
|
}
|
43 |
|
|
|
44 |
3be6ef3e
|
n.hoffmann
|
/** {@inheritDoc} */
|
45 |
3fb05254
|
n.hoffmann
|
@Override
|
46 |
|
|
public void addPages() {
|
47 |
|
|
page = new AvailableFeaturesWizardPage(featureTree);
|
48 |
|
|
addPage(page);
|
49 |
|
|
}
|
50 |
|
|
|
51 |
3be6ef3e
|
n.hoffmann
|
/** {@inheritDoc} */
|
52 |
3fb05254
|
n.hoffmann
|
@Override
|
53 |
|
|
public boolean performFinish() {
|
54 |
|
|
additionalFeatures = page.getSelectedFeatures();
|
55 |
|
|
return additionalFeatures.size() > 0;
|
56 |
|
|
}
|
57 |
|
|
|
58 |
3be6ef3e
|
n.hoffmann
|
/**
|
59 |
|
|
* <p>Getter for the field <code>additionalFeatures</code>.</p>
|
60 |
|
|
*
|
61 |
|
|
* @return a {@link java.util.Set} object.
|
62 |
|
|
*/
|
63 |
3fb05254
|
n.hoffmann
|
public Set<Feature> getAdditionalFeatures() {
|
64 |
|
|
return additionalFeatures;
|
65 |
|
|
}
|
66 |
|
|
}
|