complete the sequence-structure mapping details. * JAL-582
authorjprocter <Jim Procter>
Fri, 20 Aug 2010 12:32:51 +0000 (12:32 +0000)
committerjprocter <Jim Procter>
Fri, 20 Aug 2010 12:32:51 +0000 (12:32 +0000)
src/jalview/appletgui/AppletJmol.java

index afbc83c..103d8cb 100644 (file)
@@ -335,15 +335,24 @@ public class AppletJmol extends EmbmenuFrame implements
       Frame frame = new Frame();
       frame.add(cap);
 
-      jalview.bin.JalviewLite.addFrame(frame, "PDB - Sequence Mapping",
-              550, 600);
       StringBuffer sb = new StringBuffer();
+      try {
       for (int s = 0; s < jmb.pdbentry.length; s++)
       {
         sb.append(StructureSelectionManager.getStructureSelectionManager()
                 .printMapping(jmb.pdbentry[s].getFile()));
         sb.append("\n");
       }
+      cap.setText(sb.toString());
+      }
+      catch (OutOfMemoryError ex)
+      {
+        frame.dispose();
+        System.err.println("Out of memory when trying to create dialog box with sequence-structure mapping.");
+        return;
+      }
+      jalview.bin.JalviewLite.addFrame(frame, "PDB - Sequence Mapping",
+              550, 600);
     }
     else if (evt.getSource() == charge)
     {