Class JmolThread

java.lang.Object
java.lang.Thread
org.jmol.thread.JmolThread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
AnimationThread, CommandWatcherThread, FileLoadThread, HoverWatcherThread, MinimizationThread, MoveToThread, Navigator, ScriptDelayThread, ScriptQueueThread, SpinThread, TimeoutThread, VibrationThread

public abstract class JmolThread extends Thread
  • Field Details

    • name

      public String name
    • threadIndex

      private static int threadIndex
    • 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

      protected Viewer vwr
    • eval

      protected JmolScriptEvaluator eval
    • sc

      protected ScriptContext 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
    • junk

      double junk
  • Constructor Details

    • JmolThread

      public JmolThread()
  • Method Details

    • setManager

      public int setManager(Object manager, Viewer vwr, Object params)
      Parameters:
      manager -
      vwr -
      params -
      Returns:
      TODO
    • setViewer

      public void setViewer(Viewer vwr, String name)
    • run1

      protected abstract void run1(int mode) throws InterruptedException
      Throws:
      InterruptedException
    • setEval

      public void setEval(JmolScriptEvaluator eval)
      JavaScript only -- -- scriptDelay, moveTo, spin -- save context for restoration later -- move program counter forward one command
      Parameters:
      eval -
    • resumeEval

      public void resumeEval()
    • start

      public void start()
      Overrides:
      start in class Thread
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • oops

      protected void oops(Exception e)
    • runSleep

      protected boolean runSleep(int millis, int runPtr) throws InterruptedException
      Parameters:
      millis -
      runPtr -
      Returns:
      true if we can continue on with this thread (Java, not JavaScript)
      Throws:
      InterruptedException
    • interrupt

      public void interrupt()
      Overrides:
      interrupt in class Thread
    • checkInterrupted

      protected boolean checkInterrupted(JmolThread ref)
    • reset

      public void reset()
    • toString

      public String toString()
      Overrides:
      toString in class Thread