import jalview.datamodel.DBRefEntry;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
+import jalview.fts.service.pdb.PDBFTSPanel;
+import jalview.fts.service.uniprot.UniprotFTSPanel;
import jalview.io.gff.SequenceOntologyI;
import jalview.util.DBRefUtils;
import jalview.util.MessageManager;
int debounceTrap = 0;
+ public JTextArea getTextArea()
+ {
+ return textArea;
+ }
+
/**
* Blocking method that initialises and returns the shared instance of the
* SequenceFetcher client
{
debounceTrap++;
String currentSelection = database.getSelectedItem();
- if (!currentSelection.equalsIgnoreCase("pdb"))
- {
- otherSourceAction();
- }
+
if (currentSelection.equalsIgnoreCase("pdb")
&& (database.action == KeyEvent.VK_ENTER || ((debounceTrap % 2) == 0)))
{
pdbSourceAction();
}
+ // else if (currentSelection.equalsIgnoreCase("uniprot")
+ // && (database.action == KeyEvent.VK_ENTER || ((debounceTrap % 2) ==
+ // 0)))
+ // {
+ // uniprotSourceAction();
+ // }
+ else
+ {
+ otherSourceAction();
+ }
database.action = -1;
}
});
private void pdbSourceAction()
{
databaseButt.setText(database.getSelectedItem());
- new PDBSearchPanel(this);
+ new PDBFTSPanel(this);
frame.dispose();
}
+ private void uniprotSourceAction()
+ {
+ databaseButt.setText(database.getSelectedItem());
+ new UniprotFTSPanel(this);
+ frame.dispose();
+ }
private void otherSourceAction()
{
try
proxy.getDbName() }), Thread.currentThread()
.hashCode());
isAliSource = proxy.isAlignmentSource();
- if (proxy.getAccessionSeparator() == null)
+ if (proxy.getMaximumQueryCount() == 1)
{
while (en.hasNext())
{
}
if (Cache.getDefault("HIDE_INTRONS", true))
{
- af.avc.markColumnsContainingFeatures(true, false, false,
- SequenceOntologyI.EXON);
- af.getViewport().hideSelectedColumns();
+ hideIntronsIfPresent(af);
}
Desktop.addInternalFrame(af, title, AlignFrame.DEFAULT_WIDTH,
return al;
}
+ /**
+ * Hide columns not containing 'exon' features, provided there are exon
+ * features on the alignment
+ *
+ * @param af
+ */
+ public void hideIntronsIfPresent(AlignFrame af)
+ {
+ boolean hasExons = af.avc.markColumnsContainingFeatures(false, false,
+ false,
+ SequenceOntologyI.EXON);
+ if (hasExons)
+ {
+ af.avc.markColumnsContainingFeatures(true, false, true,
+ SequenceOntologyI.EXON);
+ af.getViewport().hideSelectedColumns();
+ }
+ }
+
void showErrorMessage(final String error)
{
resetDialog();