-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from MesquiteProject/development
Chromaseq 1.5
- Loading branch information
Showing
68 changed files
with
2,601 additions
and
500 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
Source/mesquite/chromaseq/ExportFastaDNAForGenBank/ExportFastaDNAForGenBank.java
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...e/mesquite/chromaseq/ExportFastaDNAForGenBankTbl2Asn/ExportFastaDNAForGenBankTbl2Asn.java
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
Source/mesquite/chromaseq/ExportFastaDNAForSequin/ExportFastaDNAForSequin.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
Source/mesquite/chromaseq/PrefixTaxNameWCode/PrefixTaxNameWCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
Source/mesquite/chromaseq/SequenceProfileForGenBank/SequenceProfileDialog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
package mesquite.chromaseq.SequenceProfileForGenBank; | ||
|
||
import java.awt.Button; | ||
import java.awt.Choice; | ||
import java.awt.GridBagConstraints; | ||
import java.awt.Panel; | ||
import java.awt.event.ActionEvent; | ||
import java.awt.event.ActionListener; | ||
import java.awt.event.ItemEvent; | ||
import java.awt.event.ItemListener; | ||
|
||
import mesquite.chromaseq.lib.ChromatogramFileNameParser; | ||
import mesquite.chromaseq.lib.SequenceProfile; | ||
import mesquite.lib.*; | ||
|
||
|
||
public class SequenceProfileDialog extends ExtensibleDialog { | ||
|
||
private SequenceProfileForGenBank sequenceProfileManager; | ||
private SequenceProfile sequenceProfile; | ||
private Choice sequenceProfileChoice; | ||
private String sequenceProfileName=""; | ||
|
||
public SequenceProfileDialog(MesquiteWindow parent, String title, MesquiteInteger buttonPressed, | ||
SequenceProfileForGenBank sequenceProfileManager, String defaultRuleName) { | ||
super(parent, title, buttonPressed); | ||
this.sequenceProfileManager = sequenceProfileManager; | ||
this.sequenceProfileName = defaultRuleName; | ||
addNameParsingComponents(); | ||
} | ||
|
||
|
||
protected void addNameParsingComponents() { | ||
addLabel(getTitle()); | ||
|
||
sequenceProfileChoice = addPopUpMenu("Sequence Profiles", sequenceProfileManager.sequenceProfileVector.getElementArray(), 0); | ||
sequenceProfileManager.setChoice(sequenceProfileChoice); | ||
sequenceProfileChoice.addItemListener(new ItemListener() { | ||
public void itemStateChanged(ItemEvent e) { | ||
if (e.getItemSelectable() == sequenceProfileChoice){ | ||
getNameRuleFromChoice(); | ||
} | ||
} | ||
}); | ||
if (sequenceProfileChoice!=null) { | ||
boolean noChoiceItems = (sequenceProfileChoice.getItemCount()<=0); | ||
int sL = sequenceProfileManager.sequenceProfileVector.indexOfByName(sequenceProfileName); | ||
if (sL <0) { | ||
sL = 0; | ||
} | ||
if (!noChoiceItems) { | ||
sequenceProfileChoice.select(sL); | ||
sequenceProfile = (SequenceProfile)(sequenceProfileManager.sequenceProfileVector.elementAt(sL)); | ||
} | ||
} | ||
suppressNewPanel(); | ||
GridBagConstraints gridConstraints; | ||
gridConstraints = getGridBagConstraints(); | ||
gridConstraints.fill = GridBagConstraints.NONE; | ||
setGridBagConstraints(gridConstraints); | ||
Panel panel = addNewDialogPanel(gridConstraints); | ||
String editNameParserButtonString = "Edit Specifications..."; | ||
Button editNameParsersButton = addAButton(editNameParserButtonString, panel); | ||
editNameParsersButton.addActionListener(new ActionListener() { | ||
public void actionPerformed(ActionEvent e) { | ||
if (sequenceProfileManager!=null) { | ||
sequenceProfile = sequenceProfileManager.chooseSequenceSpecifiation(sequenceProfile); | ||
} | ||
} | ||
}); | ||
} | ||
|
||
public void getNameRuleFromChoice() { | ||
sequenceProfile=null; | ||
if (sequenceProfileChoice!=null) { | ||
sequenceProfileName = sequenceProfileChoice.getSelectedItem(); | ||
boolean noChoiceItems = (sequenceProfileChoice.getItemCount()<=0); | ||
int sL = sequenceProfileChoice.getSelectedIndex(); | ||
if (sL <0) { | ||
sL = 0; | ||
} | ||
if (!noChoiceItems) { | ||
sequenceProfile = (SequenceProfile)(sequenceProfileManager.sequenceProfileVector.elementAt(sL)); | ||
} | ||
} | ||
if (sequenceProfile==null) | ||
sequenceProfile = new SequenceProfile(); //make default one } | ||
} | ||
|
||
public SequenceProfile getNameParsingRule() { | ||
return sequenceProfile; | ||
} | ||
} |
Oops, something went wrong.