Class JmolThread
java.lang.Object
java.lang.Thread
org.jmol.thread.JmolThread
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
AnimationThread, CommandWatcherThread, HoverWatcherThread, MinimizationThread, MoveToThread, Navigator, ScriptQueueThread, SpinThread, TimeoutThread, VibrationThread
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intprotected longprotected JmolScriptEvaluatorprotected static final intprotected booleanprotected booleanprotected static final intprotected booleanprotected booleanprotected longprotected static final intprotected ScriptContextprotected intprotected longprotected booleanprotected longprotected booleanprotected ViewerFields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanvoidprotected voidvoidreset()voidvoidrun()protected abstract voidrun1(int mode) protected booleanrunSleep(int millis, int runPtr) voidsetEval(JmolScriptEvaluator eval) JavaScript only -- -- scriptDelay, moveTo, spin -- save context for restoration later -- move program counter forward one commandintsetManager(Object manager, Viewer vwr, Object params) voidvoidstart()toString()Methods inherited from class Thread
activeCount, checkAccess, clone, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, startVirtualThread, stop, threadId, yield
-
Field Details
-
name
-
INIT
protected static final int INIT- See Also:
-
MAIN
protected static final int MAIN- See Also:
-
FINISH
protected static final int FINISH- See Also:
-
CHECK1
protected static final int CHECK1- See Also:
-
CHECK2
protected static final int CHECK2- See Also:
-
CHECK3
protected static final int CHECK3- See Also:
-
vwr
-
eval
-
sc
-
haveReference
protected boolean haveReference -
hoverEnabled
protected boolean hoverEnabled -
startTime
protected long startTime -
targetTime
protected long targetTime -
lastRepaintTime
protected long lastRepaintTime -
currentTime
protected long currentTime -
sleepTime
protected int sleepTime -
isJS
protected boolean isJS -
stopped
protected boolean stopped -
isReset
protected boolean isReset -
useTimeout
protected boolean useTimeout
-
-
Constructor Details
-
JmolThread
public JmolThread()
-
-
Method Details
-
setManager
-
setViewer
-
run1
- Throws:
InterruptedException
-
setEval
JavaScript only -- -- scriptDelay, moveTo, spin -- save context for restoration later -- move program counter forward one command- Parameters:
eval-
-
resumeEval
public void resumeEval() -
start
-
run
-
oops
-
runSleep
- Parameters:
millis-runPtr-- Returns:
- true if we can continue on with this thread (Java, not JavaScript)
- Throws:
InterruptedException
-
interrupt
-
checkInterrupted
-
reset
public void reset() -
toString
-