System.setProperty("com.apple.mrj.application.apple.menu.about.name",
ChannelProperties.getProperty("app_name"));
System.setProperty("apple.laf.useScreenMenuBar", "true");
+ /*
+ * broken native LAFs on (ARM?) macbooks
set = setQuaquaLookAndFeel();
if ((!set) || !UIManager.getLookAndFeel().getClass().toString()
.toLowerCase(Locale.ROOT).contains("quaqua"))
{
set = setVaquaLookAndFeel();
}
+ */
+ set = setFlatLookAndFeel();
return set;
}
private String jmolScript(String script)
{
+ return jmolScript(script, false);
+ }
+
+ private String jmolScript(String script, boolean useScriptWait)
+ {
Console.debug(">>Jmol>> " + script);
- String s = jmolViewer.evalStringQuiet(script); // scriptWait(script); BH
+ String s;
+ if (useScriptWait)
+ {
+ s = jmolViewer.scriptWait(script);
+ }
+ else
+ {
+ s = jmolViewer.evalStringQuiet(script); // scriptWait(script); BH
+ }
Console.debug("<<Jmol<< " + s);
return s;
{
if (atoms != null)
{
+ boolean useScriptWait = atoms.size() > 1;
if (resetLastRes.length() > 0)
{
- jmolScript(resetLastRes.toString());
+ jmolScript(resetLastRes.toString(), useScriptWait);
resetLastRes.setLength(0);
}
for (AtomSpec atom : atoms)
{
highlightAtom(atom.getAtomIndex(), atom.getPdbResNum(),
- atom.getChain(), atom.getPdbFile());
+ atom.getChain(), atom.getPdbFile(), useScriptWait);
}
}
}
// jmol/ssm only
public void highlightAtom(int atomIndex, int pdbResNum, String chain,
- String pdbfile)
+ String pdbfile, boolean useScriptWait)
{
String modelId = getModelIdForFile(pdbfile);
if (modelId.isEmpty())
return;
}
- jmolHistory(false);
+ jmolHistory(false, useScriptWait);
StringBuilder selection = new StringBuilder(32);
StringBuilder cmd = new StringBuilder(64);
resetLastRes.append(selection).append(";wireframe 0;").append(selection)
.append(" and not hetero; spacefill 0;");
- jmolScript(cmd.toString());
- jmolHistory(true);
+ jmolScript(cmd.toString(), useScriptWait);
+ jmolHistory(true, useScriptWait);
}
private boolean debug = true;
private void jmolHistory(boolean enable)
{
- jmolScript("History " + ((debug || enable) ? "on" : "off"));
+ jmolHistory(enable, false);
+ }
+
+ private void jmolHistory(boolean enable, boolean useScriptWait)
+ {
+ jmolScript("History " + ((debug || enable) ? "on" : "off"),
+ useScriptWait);
}
public void loadInline(String string)