JAL-2071 further refactoring, optimisation, and house keeping for the generic Free...
[jalview.git] / src / jalview / gui / SequenceFetcher.java
index da88b12..ab78ad3 100755 (executable)
@@ -27,6 +27,7 @@ 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;
@@ -373,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;
       }
     });
@@ -409,6 +416,12 @@ public class SequenceFetcher extends JPanel implements Runnable
     frame.dispose();
   }
 
+  private void uniprotSourceAction()
+  {
+    databaseButt.setText(database.getSelectedItem());
+    new UniprotFTSPanel(this);
+    frame.dispose();
+  }
   private void otherSourceAction()
   {
     try