Hidden tabs and vamsas refs for beta release
authoramwaterhouse <Andrew Waterhouse>
Thu, 17 Nov 2005 18:18:55 +0000 (18:18 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 17 Nov 2005 18:18:55 +0000 (18:18 +0000)
src/jalview/gui/AlignFrame.java
src/jalview/gui/Desktop.java
src/jalview/gui/SequenceFetcher.java
src/jalview/gui/SequenceRenderer.java

index 65b9a08..74f081b 100755 (executable)
@@ -98,7 +98,7 @@ public class AlignFrame
    // remove(tabbedPane);\r
     getContentPane().add(alignPanel, BorderLayout.CENTER);\r
 \r
-    setGUINucleotide(al.isNucleotide());\r
+\r
 \r
   //  tabbedPane.add(al.isNucleotide() ? "DNA":"Protein", alignPanel);\r
 \r
@@ -127,8 +127,12 @@ public class AlignFrame
      }\r
    });\r
 \r
-       if(Desktop.desktop!=null)\r
+\r
+  if (Desktop.desktop != null)\r
+  {\r
     addServiceListeners();\r
+    setGUINucleotide(al.isNucleotide());\r
+  }\r
   }\r
 \r
   /* Set up intrinsic listeners for dynamically generated GUI bits. */\r
@@ -2492,7 +2496,7 @@ public class AlignFrame
     // TODO: group services by location as well as function.\r
   }\r
 \r
-  public void vamsasStore_actionPerformed(ActionEvent e)\r
+ /* public void vamsasStore_actionPerformed(ActionEvent e)\r
   {\r
     JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache.\r
         getProperty("LAST_DIRECTORY"));\r
@@ -2509,7 +2513,7 @@ public class AlignFrame
       //vs.store(chooser.getSelectedFile().getAbsolutePath()   );\r
       vs.storeJalview( chooser.getSelectedFile().getAbsolutePath(), this);\r
     }\r
-  }\r
+  }*/\r
 \r
   public void featureSettings_actionPerformed(ActionEvent e)\r
   {\r
index cc720fe..8323320 100755 (executable)
@@ -550,7 +550,7 @@ public class Desktop extends jalview.jbgui.GDesktop
         }
     }
 
-    public void vamsasLoad_actionPerformed(ActionEvent e)
+  /*  public void vamsasLoad_actionPerformed(ActionEvent e)
     {
       JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache.
           getProperty("LAST_DIRECTORY"));
@@ -569,7 +569,7 @@ public class Desktop extends jalview.jbgui.GDesktop
             );
       }
 
-    }
+    }*/
 
 
     public void inputSequence_actionPerformed(ActionEvent e)
index 4fa215f..adadf14 100755 (executable)
@@ -127,6 +127,7 @@ public class SequenceFetcher
 \r
   public void run()\r
   {\r
+    String error = null;\r
     StringBuffer result = new StringBuffer();\r
       if (database.getSelectedItem().equals("Uniprot")\r
           || database.getSelectedItem().equals("EMBL")\r
@@ -160,13 +161,11 @@ public class SequenceFetcher
           }\r
         }catch(Exception ex)// Problem parsing PDB file\r
         {\r
-          JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
-         "Error retrieving "+textfield.getText()+" from "+database.getSelectedItem(),\r
-         "Error Retrieving Data", JOptionPane.WARNING_MESSAGE);\r
+          error = "Error retrieving "+textfield.getText()+" from "+database.getSelectedItem();\r
         }\r
       }\r
 \r
-    if (result.length() > 0)\r
+    if (result.length() > 0 && error!=null)\r
     {\r
       String format = IdentifyFile.Identify(result.toString(), "Paste");\r
       SequenceI[] sequences = null;\r
@@ -228,9 +227,9 @@ public class SequenceFetcher
 \r
         }\r
         else\r
-          JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
-         "Error retrieving "+textfield.getText()+" from "+database.getSelectedItem(),\r
-         "Error Retrieving Data", JOptionPane.WARNING_MESSAGE);\r
+          error = "Error retrieving "+textfield.getText()+" from "+database.getSelectedItem();\r
+\r
+\r
 \r
       }\r
     }\r
@@ -240,6 +239,11 @@ public class SequenceFetcher
     ok.setEnabled(true);\r
     cancel.setEnabled(true);\r
     frame.setTitle("Sequence Fetcher");\r
+\r
+    if(error!=null)\r
+          JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+         error, "Error Retrieving Data", JOptionPane.WARNING_MESSAGE);\r
+\r
   }\r
 }\r
 \r
index f70a9fa..e95ca02 100755 (executable)
@@ -86,7 +86,8 @@ public class SequenceRenderer
 \r
       graphics = bi.getGraphics();\r
 \r
-      bi.setRGB(0,0, initialCol.getRGB());\r
+      if(initialCol!=null)\r
+        bi.setRGB(0,0, initialCol.getRGB());\r
 \r
       allGroups = av.alignment.findAllGroups(seq);\r
 \r