jmolHistory(false);
if (lastCommand == null || !lastCommand.equals(cmd))
{
- jmolScript(cmd + "\n");
+ jmolScript(cmd + "\n", command.isWaitNeeded());
}
jmolHistory(true);
lastCommand = cmd;
// End StructureListener
// //////////////////////////
-
+
////////////////////////////
// HETATM get
//
-
+
@Override
- public List<String> getHetatmNames()
+ public Map<String, String> getHetatmNames()
{
- HashMap<String,String> hetlist=new HashMap();
- for (int mc=0;mc<jmolViewer.ms.mc; mc++)
+ HashMap<String, String> hetlist = new HashMap();
+ for (int mc = 0; mc < jmolViewer.ms.mc; mc++)
{
- Map<String,String> hets = jmolViewer.ms.getHeteroList(mc);
- if (hets!=null)
+ Map<String, String> hets = jmolViewer.ms.getHeteroList(mc);
+ if (hets != null)
{
hetlist.putAll(hets);
}
}
- return Arrays.asList(hetlist.keySet().toArray(new String[0]));
+ return hetlist;
}
//
////////////////////////////
-
+
@Override
public float[][] functionXY(String functionName, int x, int y)
{
jmolScript(resetLastRes.toString());
resetLastRes.setLength(0);
}
- StringBuilder highlightCommands=null;
+ StringBuilder highlightCommands = null;
for (AtomSpec atom : atoms)
{
- StringBuilder thisAtom = highlightAtom(atom.getAtomIndex(), atom.getPdbResNum(),
- atom.getChain(), atom.getPdbFile());
- if (thisAtom!=null) {
- if (highlightCommands==null)
+ StringBuilder thisAtom = highlightAtom(atom.getAtomIndex(),
+ atom.getPdbResNum(), atom.getChain(), atom.getPdbFile());
+ if (thisAtom != null)
+ {
+ if (highlightCommands == null)
+ {
+ highlightCommands = thisAtom;
+ }
+ else
{
- highlightCommands=thisAtom;
- } else {
highlightCommands.append(thisAtom);
}
}
}
- if (highlightCommands!=null)
+ if (highlightCommands != null)
{
jmolHistory(false);
jmolScript(highlightCommands.toString());
}
// jmol/ssm only
- private StringBuilder highlightAtom(int atomIndex, int pdbResNum, String chain,
- String pdbfile)
+ private StringBuilder highlightAtom(int atomIndex, int pdbResNum,
+ String chain, String pdbfile)
{
String modelId = getModelIdForFile(pdbfile);
if (modelId.isEmpty())
lastMessage = strInfo;
if (data != null)
{
- jalview.bin.Console.errPrintln("Ignoring additional hover info: " + data
- + " (other info: '" + strInfo + "' pos " + atomIndex + ")");
+ jalview.bin.Console.errPrintln(
+ "Ignoring additional hover info: " + data + " (other info: '"
+ + strInfo + "' pos " + atomIndex + ")");
}
mouseOverStructure(atomIndex, strInfo);
}
*/
if (strData != null)
{
- jalview.bin.Console.errPrintln("Ignoring additional pick data string " + strData);
+ jalview.bin.Console.errPrintln(
+ "Ignoring additional pick data string " + strData);
}
int chainSeparator = strInfo.indexOf(":");
int p = 0;
}
} catch (Exception e)
{
- jalview.bin.Console.errPrintln("Squashed Jmol callback handler error:");
+ jalview.bin.Console
+ .errPrintln("Squashed Jmol callback handler error:");
e.printStackTrace();
}
}
public void setCallbackFunction(String callbackType,
String callbackFunction)
{
- jalview.bin.Console.errPrintln("Ignoring set-callback request to associate "
- + callbackType + " with function " + callbackFunction);
+ jalview.bin.Console
+ .errPrintln("Ignoring set-callback request to associate "
+ + callbackType + " with function " + callbackFunction);
}
String buttonsToShow)
{
- jalview.bin.Console.errPrintln("Allocating Jmol Viewer: " + commandOptions);
+ jalview.bin.Console
+ .errPrintln("Allocating Jmol Viewer: " + commandOptions);
if (commandOptions == null)
{
console = createJmolConsole(consolePanel, buttonsToShow);
} catch (Throwable e)
{
- jalview.bin.Console.errPrintln("Could not create Jmol application console. "
- + e.getMessage());
+ jalview.bin.Console
+ .errPrintln("Could not create Jmol application console. "
+ + e.getMessage());
e.printStackTrace();
}
if (consolePanel != null)