public class ScriptManager extends Object implements JmolScriptManager
| Modifier and Type | Field and Description |
|---|---|
private JmolThread |
commandWatcherThread |
private ScriptEval |
eval |
private JmolScriptEvaluator |
evalTemp |
private boolean |
isScriptQueued |
private static int |
prevCovalentVersion |
private Thread[] |
queueThreads |
private int |
scriptIndex |
javajs.util.Lst<javajs.util.Lst<Object>> |
scriptQueue |
private boolean[] |
scriptQueueRunning |
private boolean |
useCommandWatcherThread |
private Viewer |
vwr |
| Constructor and Description |
|---|
ScriptManager() |
| Modifier and Type | Method and Description |
|---|---|
BS |
addHydrogensInline(BS bsAtoms,
javajs.util.Lst<Atom> vConnections,
javajs.util.P3[] pts) |
private Object |
addScr(String returnType,
String strScript,
String statusList,
boolean isQuiet) |
String |
addScript(String strScript,
boolean isQuiet) |
boolean |
checkHalt(String str,
boolean isInsert) |
private boolean |
checkResume(String str) |
private String |
checkScriptExecution(String strScript,
boolean isInsert) |
private boolean |
checkStepping(String str) |
void |
clear(boolean isAll) |
void |
clearCommandWatcherThread() |
void |
clearQueue() |
String |
evalFile(String strFilename) |
String |
evalStringQuietSync(String strScript,
boolean isQuiet,
boolean allowSyncScript) |
Object |
evalStringWaitStatusQueued(String returnType,
String strScript,
String statusList,
boolean isQuiet,
boolean isQueued) |
private void |
flushQueue(String command) |
BS |
getAtomBitSetEval(JmolScriptEvaluator eval,
Object atomExpression) |
private String |
getDragDropFileTypeName(String fileName) |
javajs.util.Lst<Object> |
getScriptItem(boolean watching,
boolean isByCommandWatcher) |
javajs.util.Lst<javajs.util.Lst<Object>> |
getScriptQueue() |
private String |
getZipDirectoryAsString(String fileName) |
(package private) void |
interruptQueueThreads() |
boolean |
isQueueProcessing() |
boolean |
isScriptQueued() |
private ScriptEval |
newScriptEvaluator() |
void |
openFileAsync(String fileName,
int flags)
From file dropping.
|
void |
queueThreadFinished(int pt) |
void |
runScriptNow() |
Object |
scriptCheckRet(String strScript,
boolean returnContext) |
static void |
setStateScriptVersion(Viewer vwr,
String version) |
JmolScriptEvaluator |
setViewer(Viewer vwr) |
void |
startCommandWatcher(boolean isStart) |
private void |
startScriptQueue(boolean startedByCommandWatcher) |
void |
waitForQueue() |
private Viewer vwr
private ScriptEval eval
private JmolScriptEvaluator evalTemp
private Thread[] queueThreads
private boolean[] scriptQueueRunning
private JmolThread commandWatcherThread
public javajs.util.Lst<javajs.util.Lst<Object>> scriptQueue
private boolean useCommandWatcherThread
private int scriptIndex
private boolean isScriptQueued
private static int prevCovalentVersion
public javajs.util.Lst<javajs.util.Lst<Object>> getScriptQueue()
getScriptQueue in interface JmolScriptManagerpublic boolean isScriptQueued()
isScriptQueued in interface JmolScriptManagerpublic JmolScriptEvaluator setViewer(Viewer vwr)
setViewer in interface JmolScriptManagerprivate ScriptEval newScriptEvaluator()
public void clear(boolean isAll)
clear in interface JmolScriptManagerpublic String addScript(String strScript, boolean isQuiet)
addScript in interface JmolScriptManagerprivate Object addScr(String returnType, String strScript, String statusList, boolean isQuiet)
public void clearQueue()
clearQueue in interface JmolScriptManagerpublic void waitForQueue()
waitForQueue in interface JmolScriptManagerpublic boolean isQueueProcessing()
isQueueProcessing in interface JmolScriptManagerprivate void flushQueue(String command)
private void startScriptQueue(boolean startedByCommandWatcher)
public javajs.util.Lst<Object> getScriptItem(boolean watching, boolean isByCommandWatcher)
getScriptItem in interface JmolScriptManagerpublic void startCommandWatcher(boolean isStart)
startCommandWatcher in interface JmolScriptManagervoid interruptQueueThreads()
public void clearCommandWatcherThread()
public void queueThreadFinished(int pt)
queueThreadFinished in interface JmolScriptManagerpublic void runScriptNow()
public String evalFile(String strFilename)
evalFile in interface JmolScriptManagerpublic Object evalStringWaitStatusQueued(String returnType, String strScript, String statusList, boolean isQuiet, boolean isQueued)
evalStringWaitStatusQueued in interface JmolScriptManagerprivate boolean checkResume(String str)
private boolean checkStepping(String str)
public String evalStringQuietSync(String strScript, boolean isQuiet, boolean allowSyncScript)
evalStringQuietSync in interface JmolScriptManagerpublic boolean checkHalt(String str, boolean isInsert)
checkHalt in interface JmolScriptManagerpublic BS getAtomBitSetEval(JmolScriptEvaluator eval, Object atomExpression)
getAtomBitSetEval in interface JmolScriptManagerpublic Object scriptCheckRet(String strScript, boolean returnContext)
scriptCheckRet in interface JmolScriptManagerpublic void openFileAsync(String fileName, int flags)
openFileAsync in interface JmolScriptManagerfileName - flags - 1=pdbCartoons, 2=no scripting, 4=appendpublic BS addHydrogensInline(BS bsAtoms, javajs.util.Lst<Atom> vConnections, javajs.util.P3[] pts) throws Exception
addHydrogensInline in interface JmolScriptManagerException