Revision 661914be
Added by Ben Stöver over 7 years ago
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/wizard/ExportSingleReadAlignmentWizard.java | ||
---|---|---|
10 | 10 |
package eu.etaxonomy.taxeditor.molecular.io.wizard; |
11 | 11 |
|
12 | 12 |
|
13 |
import info.bioinfweb.jphyloio.formatinfo.JPhyloIOFormatInfo; |
|
14 |
|
|
15 |
import java.io.File; |
|
16 |
|
|
17 | 13 |
import org.eclipse.jface.wizard.Wizard; |
18 | 14 |
|
19 | 15 |
|
... | ... | |
25 | 21 |
* @date 23.06.2016 |
26 | 22 |
*/ |
27 | 23 |
public class ExportSingleReadAlignmentWizard extends Wizard { |
28 |
private ExportSingleReadAlignmentWizardPage page;
|
|
24 |
private ExportSingleReadAlignmentWizardModel model = new ExportSingleReadAlignmentWizardModel();
|
|
29 | 25 |
|
30 |
private JPhyloIOFormatInfo selectedFormat = null; |
|
31 |
private File selectedFile = null; |
|
32 |
private String consensusSequenceLabel = null; |
|
26 |
private ExportSingleReadAlignmentWizardPage page; |
|
33 | 27 |
|
34 | 28 |
|
35 | 29 |
public ExportSingleReadAlignmentWizard() { |
36 |
setWindowTitle("Export single read alignment"); //TODO Use multi languange message |
|
30 |
setWindowTitle("Export single read alignment"); //TODO Use multi language message |
|
31 |
} |
|
32 |
|
|
33 |
|
|
34 |
public ExportSingleReadAlignmentWizardModel getModel() { |
|
35 |
return model; |
|
37 | 36 |
} |
38 | 37 |
|
39 | 38 |
|
... | ... | |
46 | 45 |
|
47 | 46 |
@Override |
48 | 47 |
public boolean performFinish() { |
49 |
if (!page.getConsensusSequenceLabel().isEmpty()) { |
|
50 |
selectedFormat = page.getSelectedFormat(); |
|
51 |
selectedFile = page.getSelectedFile(); |
|
52 |
consensusSequenceLabel = page.getConsensusSequenceLabel(); |
|
53 |
return true; |
|
54 |
} |
|
55 |
else { |
|
56 |
return false; //TODO Display according error message in wizard heading, as long as valid inputs are not completed. |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
|
|
61 |
public JPhyloIOFormatInfo getSelectedFormat() { |
|
62 |
return selectedFormat; |
|
63 |
} |
|
64 |
|
|
65 |
|
|
66 |
public File getSelectedFile() { |
|
67 |
return selectedFile; |
|
68 |
} |
|
69 |
|
|
70 |
|
|
71 |
public String getConsensusSequenceLabel() { |
|
72 |
return consensusSequenceLabel; |
|
48 |
return true; |
|
49 |
//TODO Add default extension to file, if necessary? |
|
73 | 50 |
} |
74 | 51 |
} |
Also available in: Unified diff
Intermediate commit in implementing wizard validation (before moving to MultiValidator).
Plug-in dependencies added to molecular.