JAL-1355 removed all top level html tags from message bundles
[jalview.git] / src / jalview / gui / ChimeraViewFrame.java
index a3ff00b..236d094 100644 (file)
@@ -154,7 +154,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
       _alignwith = new Vector<AlignmentPanel>();
     }
 
-    seqColourBy = new ViewSelectionMenu("Colour by ..", this, _colourwith,
+    seqColourBy = new ViewSelectionMenu(MessageManager.getString("label.colour_by"), this, _colourwith,
             new ItemListener()
             {
 
@@ -174,7 +174,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
             });
     viewMenu.add(seqColourBy);
     final ItemListener handler;
-    JMenu alpanels = new ViewSelectionMenu("Superpose with ..", this,
+    JMenu alpanels = new ViewSelectionMenu(MessageManager.getString("label.superpose_with"), this,
             _alignwith, handler = new ItemListener()
             {
 
@@ -586,7 +586,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
     {
       command = "";
     }
-    jmb.evalStateCommand(command);
+    jmb.evalStateCommand(command, false);
     jmb.setFinishedInit(true);
   }
 
@@ -689,9 +689,8 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
       jalview.ws.dbsources.Pdb pdbclient = new jalview.ws.dbsources.Pdb();
       for (int pi = 0; pi < jmb.pdbentry.length; pi++)
       {
-        String file = new File(jmb.pdbentry[pi].getFile())
-                .getAbsoluteFile().getPath();
-        if (file == null)
+        String file = null;
+        if (jmb.pdbentry[pi].getFile()==null) 
         {
           // retrieve the pdb and store it locally
           AlignmentI pdbseq = null;
@@ -699,7 +698,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
           long hdl = pdbid.hashCode() - System.currentTimeMillis();
           if (progressBar != null)
           {
-            progressBar.setProgressBar("Fetching PDB " + pdbid, hdl);
+            progressBar.setProgressBar(MessageManager.formatMessage("status.fetching_pdb", new String[]{pdbid}), hdl);
           }
           try
           {
@@ -715,7 +714,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
           }
           if (progressBar != null)
           {
-            progressBar.setProgressBar("Finished.", hdl);
+            progressBar.setProgressBar(MessageManager.getString("label.state_completed"), hdl);
           }
           if (pdbseq != null)
           {
@@ -734,6 +733,8 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
         }
         else
         {
+          file = new File(jmb.pdbentry[pi].getFile())
+          .getAbsoluteFile().getPath();
           if (curfiles != null && curfiles.length > 0)
           {
             addingStructures = true; // already files loaded.
@@ -844,13 +845,13 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
       // do superposition if asked to
       if (alignAddedStructures)
       {
-        javax.swing.SwingUtilities.invokeLater(new Runnable()
+        new Thread(new Runnable()
         {
           public void run()
           {
             alignStructs_withAllAlignPanels();
           }
-        });
+        }).start();
         alignAddedStructures = false;
       }
       addingStructures = false;
@@ -865,7 +866,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
             jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
 
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle("Save PDB File");
+    chooser.setDialogTitle(MessageManager.getString("label.save_pdb_file"));
     chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(this);
@@ -927,7 +928,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
    */
   public void eps_actionPerformed(ActionEvent e)
   {
-    throw new Error("EPS Generation not yet implemented.");
+    throw new Error(MessageManager.getString("error.eps_generation_not_implemented"));
   }
 
   /**
@@ -938,7 +939,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
    */
   public void png_actionPerformed(ActionEvent e)
   {
-    throw new Error("PNG Generation not yet implemented.");
+           throw new Error(MessageManager.getString("error.png_generation_not_implemented"));
   }
 
   public void jmolColour_actionPerformed(ActionEvent actionEvent)
@@ -1043,7 +1044,7 @@ public class ChimeraViewFrame extends GStructureViewer implements Runnable,
   public void backGround_actionPerformed(ActionEvent actionEvent)
   {
     java.awt.Color col = JColorChooser.showDialog(this,
-            "Select Background Colour", null);
+               MessageManager.getString("label.select_backgroud_colour"), null);
     if (col != null)
     {
       jmb.setBackgroundColour(col);