jmolHistory(false);
if (lastCommand == null || !lastCommand.equals(cmd))
{
- jmolScript(cmd + "\n");
+ jmolScript(cmd + "\n",command.isWaitNeeded());
}
jmolHistory(true);
lastCommand = cmd;
/*
* https://chemapps.stolaf.edu/jmol/docs/#writemodel
*/
- return new StructureCommand("write STATE \"" + filepath + "\"");
+ StructureCommand sc = new StructureCommand("write STATE \"" + filepath + "\"");
+ sc.setWaitNeeded(true);
+ return sc;
}
@Override
private List<String> parameters;
+ private boolean waitNeeded=false;
public StructureCommand(String cmd, String... params)
{
command = cmd;
}
}
}
-
+
+ public void setWaitNeeded(boolean wait)
+ {
+ waitNeeded=wait;
+ }
+
+ @Override
+ public boolean isWaitNeeded()
+ {
+ return waitNeeded;
+ }
+
@Override
public void addParameter(String param)
{
void addParameter(String param);
boolean hasParameters();
+
+ default boolean isWaitNeeded() { return false; };
}