Class ViewPlots.TimerThread

java.lang.Object
  extended byViewPlots.TimerThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ViewPlots

class ViewPlots.TimerThread
extends java.lang.Object
implements java.lang.Runnable

TimerThread supporting class for ViewPlots.Timer This class handles the implmentation of the background thread for the image animation.

Author:
Daniel J. Adams

Field Summary
 long itsInterval
          Storage for the tick interval in microseconds
private  java.awt.event.ActionListener itsListener
          Pointer to the consumer of timer ticks
 boolean itsRunningFlag
          Flag to track execution status of thread
 
Constructor Summary
(package private) ViewPlots.TimerThread()
           
 
Method Summary
 void run()
          run method override from Runnable class, thread execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

itsRunningFlag

public boolean itsRunningFlag
Flag to track execution status of thread


itsInterval

public long itsInterval
Storage for the tick interval in microseconds


itsListener

private java.awt.event.ActionListener itsListener
Pointer to the consumer of timer ticks

Constructor Detail

ViewPlots.TimerThread

ViewPlots.TimerThread()
Method Detail

run

public void run()
run method override from Runnable class, thread execution. This method is the action portion of the thread. When running, it sends a 'tick' event to the listener after sleeping for the specified interval. It also checks for safe-thread stop by checking the execution flag.

Specified by:
run in interface java.lang.Runnable