Merge branch 'develop' into groovy/JAL-2074_upgradeto2.4.4
[jalview.git] / src / jalview / gui / SequenceFetcher.java
index eb33ce7..ab78ad3 100755 (executable)
@@ -26,6 +26,8 @@ import jalview.datamodel.AlignmentI;
 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;
@@ -114,6 +116,11 @@ public class SequenceFetcher extends JPanel implements Runnable
 
   int debounceTrap = 0;
 
+  public JTextArea getTextArea()
+  {
+    return textArea;
+  }
+
   /**
    * Blocking method that initialises and returns the shared instance of the
    * SequenceFetcher client
@@ -367,15 +374,21 @@ public class SequenceFetcher extends JPanel implements Runnable
       {
         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;
       }
     });
@@ -399,10 +412,16 @@ public class SequenceFetcher extends JPanel implements Runnable
   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