set title of viewer frame after file has been loaded (if possible) so Desktop window...
authorjprocter <Jim Procter>
Tue, 26 Aug 2008 10:48:24 +0000 (10:48 +0000)
committerjprocter <Jim Procter>
Tue, 26 Aug 2008 10:48:24 +0000 (10:48 +0000)
src/jalview/gui/AppJmol.java

index f340457..50e5644 100644 (file)
@@ -74,12 +74,11 @@ public class AppJmol
     this.sequence = seq;
     this.ap = ap;
     this.setBounds(bounds);
-
     colourBySequence = false;
     seqColour.setSelected(false);
 
-    jalview.gui.Desktop.addInternalFrame(this, "Loading File",
-                                         bounds.width,bounds.height);
+    //jalview.gui.Desktop.addInternalFrame(this, "Loading File",
+    //                                     bounds.width,bounds.height);
 
     initJmol(loadStatus);
 
@@ -157,8 +156,9 @@ public synchronized void addSequence(SequenceI [] seq)
     this.ap = ap;
     this.pdbentry = pdbentry;
     this.sequence = seq;
-
-    jalview.gui.Desktop.addInternalFrame(this, "Loading File", 400, 400);
+    this.setSize(400,400);
+    //jalview.gui.Desktop.addInternalFrame(this, "Jmol View"+(pdbentry.getId()!=null ? "for "+pdbentry.getId() 
+    //          : ""), 400, 400);
 
     if (pdbentry.getFile() != null)
     {
@@ -204,6 +204,8 @@ public synchronized void addSequence(SequenceI [] seq)
     }
 
     this.setTitle(title.toString());
+    jalview.gui.Desktop.addInternalFrame(this, title.toString(), 
+                                         getBounds().width,getBounds().height);
 
     viewer = org.jmol.api.JmolViewer.allocateViewer(renderPanel,
         new SmarterJmolAdapter());