Project

General

Profile

« Previous | Next » 

Revision cdcb5ddf

Added by Ben Stöver about 8 years ago

Initial version of ExportSingleReadAlignmentWizardPage added.

View differences:

.gitattributes
1975 1975
src/site/site.xml -text
1976 1976

  
1977 1977
# The following files will be ignored when merging another
1978
# branch into this branch in case of merge conflict and 
1978
# branch into this branch in case of merge conflict and
1979 1979
# if the 'ours' merge driver is configured.
1980 1980
# WARNING : This merge driver should NOT be set in development
1981 1981
#           environments. It is supposed to be used only in CI
......
1987 1987
**/feature.xml merge=ours
1988 1988
eu.etaxonomy.taxeditor.cdmlib/.classpath merge=ours
1989 1989
eu.etaxonomy.taxeditor.cdmlib/build.properties merge=ours
1990
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/ExportSingleReadAlignmentWizardPage.java -text
1990 1991
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product merge=ours
1991 1992
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product.with.jre merge=ours
eu.etaxonomy.taxeditor.molecular/.gitignore
1 1
/target
2 2
.settings/
3
!src/main/java/eu/etaxonomy/taxeditor/molecular/io/.project
4
!src/main/java/eu/etaxonomy/taxeditor/molecular/io/integration-test.log
5
!src/main/java/eu/etaxonomy/taxeditor/molecular/io/target
6
!src/main/java/eu/etaxonomy/taxeditor/molecular/io/.directory
7
!src/main/java/eu/etaxonomy/taxeditor/molecular/io/hibernate.log
8
!src/main/java/eu/etaxonomy/taxeditor/molecular/io/.settings
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/ExportSingleReadAlignmentWizardPage.java
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;
11

  
12

  
13
import org.eclipse.jface.wizard.WizardPage;
14
import org.eclipse.swt.SWT;
15
import org.eclipse.swt.events.SelectionAdapter;
16
import org.eclipse.swt.events.SelectionEvent;
17
import org.eclipse.swt.layout.FormAttachment;
18
import org.eclipse.swt.layout.FormData;
19
import org.eclipse.swt.layout.FormLayout;
20
import org.eclipse.swt.widgets.Button;
21
import org.eclipse.swt.widgets.Composite;
22
import org.eclipse.swt.widgets.Text;
23

  
24

  
25

  
26
/**
27
 * Wizard page that allows to specify which parts of a single read alignment shall be exported to an alignment file.
28
 *
29
 * @author Ben Stöver
30
 * @date 18.04.2016
31
 */
32
public class ExportSingleReadAlignmentWizardPage extends WizardPage {
33
    private Text consensusSequenceNameTextField;
34
    private Button exportConsensusSequenceCB;
35
    private Button exportSingleReadsCB;
36

  
37

  
38
    /**
39
     * Create the wizard.
40
     */
41
    public ExportSingleReadAlignmentWizardPage() {
42
        super("SingleReadSequencesExport");  //TODO Which pageName should be used here? Any conventions?
43
        setTitle("Sequence export");
44
        setDescription("Defines which sequences of the single read alignment shall be exported.");
45
    }
46

  
47

  
48
    /**
49
     * Create contents of the wizard.
50
     *
51
     * @param parent the parent component
52
     */
53
    @Override
54
    public void createControl(Composite parent) {
55
        Composite container = new Composite(parent, SWT.NULL);
56

  
57
        setControl(container);
58
        container.setLayout(new FormLayout());
59

  
60
        exportSingleReadsCB = new Button(container, SWT.CHECK);
61
        exportSingleReadsCB.setSelection(true);
62
        FormData fd_exportSingleReadsCB = new FormData();
63
        fd_exportSingleReadsCB.top = new FormAttachment(0, 10);
64
        fd_exportSingleReadsCB.left = new FormAttachment(0, 10);
65
        exportSingleReadsCB.setLayoutData(fd_exportSingleReadsCB);
66
        exportSingleReadsCB.setText("Export single reads");
67

  
68
        exportConsensusSequenceCB = new Button(container, SWT.CHECK);
69
        exportConsensusSequenceCB.setSelection(true);
70
        exportConsensusSequenceCB.addSelectionListener(new SelectionAdapter() {
71
            @Override
72
            public void widgetSelected(SelectionEvent e) {
73
                consensusSequenceNameTextField.setEnabled(exportConsensusSequenceCB.getSelection());
74
            }
75
        });
76
        FormData fd_exportConsensusSequenceCB = new FormData();
77
        fd_exportConsensusSequenceCB.top = new FormAttachment(exportSingleReadsCB, 6);
78
        fd_exportConsensusSequenceCB.left = new FormAttachment(exportSingleReadsCB, 0, SWT.LEFT);
79
        exportConsensusSequenceCB.setLayoutData(fd_exportConsensusSequenceCB);
80
        exportConsensusSequenceCB.setText("Export consensus sequence");
81

  
82
        consensusSequenceNameTextField = new Text(container, SWT.BORDER);
83
        consensusSequenceNameTextField.setText("ConsensusSequence");
84
        FormData fd_consensusSequenceNameTextField = new FormData();
85
        fd_consensusSequenceNameTextField.bottom = new FormAttachment(30);
86
        fd_consensusSequenceNameTextField.right = new FormAttachment(28);
87
        fd_consensusSequenceNameTextField.top = new FormAttachment(0, 62);
88
        fd_consensusSequenceNameTextField.left = new FormAttachment(0, 32);
89
        consensusSequenceNameTextField.setLayoutData(fd_consensusSequenceNameTextField);
90
    }
91
}

Also available in: Unified diff