JAL-3026 GD#107,128,130,139 build-site.xml
[jalview.git] / src / jalview / ext / jmol / JalviewJmolBinding.java
index 5afbc8e..ca82744 100644 (file)
@@ -473,7 +473,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
     jmolHistory(false);
     if (lastCommand == null || !lastCommand.equals(command))
     {
-      viewer.evalStringQuiet(command + "\n");
+      jmolScript(command + "\n");
     }
     jmolHistory(true);
     lastCommand = command;
@@ -739,7 +739,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
     {
       if (resetLastRes.length() > 0)
       {
-        viewer.evalStringQuiet(resetLastRes.toString());
+        jmolScript(resetLastRes.toString());
         resetLastRes.setLength(0);
       }
       for (AtomSpec atom : atoms)
@@ -797,7 +797,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
 
     cmd.append("spacefill 200;select none");
 
-    viewer.evalStringQuiet(cmd.toString());
+    jmolScript(cmd.toString());
     jmolHistory(true);
 
   }
@@ -806,7 +806,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
 
   private void jmolHistory(boolean enable)
   {
-    viewer.evalStringQuiet("History " + ((debug || enable) ? "on" : "off"));
+    jmolScript("History " + ((debug || enable) ? "on" : "off"));
   }
 
   public void loadInline(String string)
@@ -966,7 +966,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
 
     if (!atomsPicked.contains(picked))
     {
-      viewer.evalStringQuiet("select " + picked + ";label %n %r:%c");
+      jmolScript("select " + picked + ";label %n %r:%c");
       atomsPicked.addElement(picked);
     }
     else
@@ -1230,7 +1230,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
     // }
     if (!isLoadingFromArchive())
     {
-      viewer.evalStringQuiet(
+      jmolScript(
               "model *; select backbone;restrict;cartoon;wireframe off;spacefill off");
     }
     // register ourselves as a listener and notify the gui that it needs to
@@ -1400,7 +1400,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
 
     viewer.setJmolStatusListener(this); // extends JmolCallbackListener
 
-    console = createJmolConsole(consolePanel, buttonsToShow);
+    console = null;//createJmolConsole(consolePanel, buttonsToShow);
     if (consolePanel != null)
     {
       consolePanel.addComponentListener(this);
@@ -1418,11 +1418,16 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
   public void setBackgroundColour(java.awt.Color col)
   {
     jmolHistory(false);
-    viewer.evalStringQuiet("background [" + col.getRed() + ","
+    jmolScript("background [" + col.getRed() + ","
             + col.getGreen() + "," + col.getBlue() + "];");
     jmolHistory(true);
   }
 
+  private String jmolScript(String script)
+  {
+    return viewer.scriptWait(script);
+  }
+
   @Override
   public int[] resizeInnerPanel(String data)
   {