Example usage for java.awt TextArea getText

List of usage examples for java.awt TextArea getText

Introduction

In this page you can find the example usage for java.awt TextArea getText.

Prototype

public synchronized String getText() 

Source Link

Document

Returns the text that is presented by this text component.

Usage

From source file:mesquite.chromaseq.InterpretASNGenBank.InterpretASNGenBank.java

public boolean getExportOptions(boolean dataSelected, boolean taxaSelected) {
    MesquiteInteger buttonPressed = new MesquiteInteger(1);
    ExporterDialog exportDialog = new ExporterDialog(this, containerOfModule(),
            "Export ASN for GenBank Options", buttonPressed);
    exportDialog.appendToHelpString(//from ww w.j  a  va 2  s.  co  m
            "Choose the options for exporting the matrix as a ASN file prepared for submission NCBI's Sequin.");
    exportDialog.appendToHelpString(
            "<br><br><b>SeqID Suffix</b>: this will be added to each taxon name to form the unique SeqID.");
    exportDialog.appendToHelpString(
            "<br><b>Description of gene fragment</b>: this will be added to each sequence's DEFINITION.");
    exportDialog.appendToHelpString(
            "<br><b>Text before VoucherCode in DEFINITION</b>: this will inserted between the organism name and the VoucherCode in the DEFINITION.");

    SingleLineTextField uniqueSuffixField = exportDialog.addTextField("SeqID Suffix", "", 20);
    TextArea fsText = null;
    exportDialog.addLabel("Description of gene fragment:", Label.LEFT);
    fsText = exportDialog.addTextAreaSmallFont(addendum, 4);
    SingleLineTextField codeLabelField = exportDialog.addTextField("Text before VoucherCode in DEFINITION",
            "DNAVoucher", 20);

    Checkbox includeGapsCheckBox = exportDialog.addCheckBox("include gaps", includeGaps);
    exportDialog.addHorizontalLine(1);
    int releaseB = 1;
    if (releaseImmediately)
        releaseB = 0;
    RadioButtons releaseButtons = exportDialog
            .addRadioButtons(new String[] { "release immediately", "release date:" }, releaseB);
    IntegerField releaseYearField = exportDialog.addIntegerField("Release Year", releaseYear, 6);
    IntegerField releaseMonthField = exportDialog.addIntegerField("Release Month", releaseMonth, 4);
    IntegerField releaseDayField = exportDialog.addIntegerField("Release Day", releaseDay, 4);

    exportDialog.completeAndShowDialog(dataSelected, taxaSelected);

    addendum = fsText.getText();
    codeLabel = codeLabelField.getText();
    uniqueSuffix = uniqueSuffixField.getText();

    boolean ok = (exportDialog.query(dataSelected, taxaSelected) == 0);

    if (ok) {
        includeGaps = includeGapsCheckBox.getState();
        if (releaseButtons.getValue() == 0) {
            releaseImmediately = true;
        } else {
            releaseYear = releaseYearField.getValue();
            releaseMonth = releaseMonthField.getValue();
            releaseDay = releaseDayField.getValue();
            releaseImmediately = false;
        }
    }

    exportDialog.dispose();
    if (ok)
        ok = contact.queryValues();
    if (ok)
        ok = authors.queryValues();
    if (ok)
        ok = affiliation.queryValues();
    if (ok)
        storePreferences();
    return ok;

}