1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2016 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
|
package eu.etaxonomy.taxeditor.molecular.io.wizard;
|
11
|
|
12
|
|
13
|
import java.io.File;
|
14
|
|
15
|
import org.eclipse.jface.wizard.Wizard;
|
16
|
|
17
|
|
18
|
|
19
|
/**
|
20
|
* A wizard to export a single read alignment from <i>CDM</i> using <i>JPhyloIO</i>.
|
21
|
*
|
22
|
* @author Ben Stöver
|
23
|
* @date 23.06.2016
|
24
|
*/
|
25
|
public class ExportSingleReadAlignmentWizard extends Wizard {
|
26
|
private ExportSingleReadAlignmentWizardPage page;
|
27
|
|
28
|
private String selectedFormat = null;
|
29
|
private File selectedFile = null;
|
30
|
private String consensusSequenceLabel = null;
|
31
|
|
32
|
|
33
|
public ExportSingleReadAlignmentWizard() {
|
34
|
setWindowTitle("Export single read alignment"); //TODO Use multi languange message
|
35
|
}
|
36
|
|
37
|
|
38
|
@Override
|
39
|
public void addPages() {
|
40
|
page = new ExportSingleReadAlignmentWizardPage();
|
41
|
addPage(page);
|
42
|
}
|
43
|
|
44
|
|
45
|
@Override
|
46
|
public boolean performFinish() {
|
47
|
if (!page.getConsensusSequenceLabel().isEmpty()) {
|
48
|
selectedFormat = page.getSelectedFormat();
|
49
|
selectedFile = page.getSelectedFile();
|
50
|
consensusSequenceLabel = page.getConsensusSequenceLabel();
|
51
|
return true;
|
52
|
}
|
53
|
else {
|
54
|
return false; //TODO Display according error message in wizard heading, as long as valid inputs are not completed.
|
55
|
}
|
56
|
}
|
57
|
|
58
|
|
59
|
public String getSelectedFormat() {
|
60
|
return selectedFormat;
|
61
|
}
|
62
|
|
63
|
|
64
|
public File getSelectedFile() {
|
65
|
return selectedFile;
|
66
|
}
|
67
|
|
68
|
|
69
|
public String getConsensusSequenceLabel() {
|
70
|
return consensusSequenceLabel;
|
71
|
}
|
72
|
}
|