ciips.animation
Class AlgThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--ciips.animation.AlgThread
All Implemented Interfaces:
java.lang.Runnable

public abstract class AlgThread
extends java.lang.Thread

Animations should extend this class and implement the run and loadData methods.


Field Summary
 AlgAnimFrame frame
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AlgThread()
           
 
Method Summary
 void generateData()
          Generate the example data set.
 int getDataPanelCount()
           
 java.lang.String[] getDataSets()
           
abstract  boolean loadData(int choice)
          Load or generate a specified data set.
 void restoreDrawingPanel()
           
abstract  void run()
          Run the animation.
 void setDelay(int delay)
           
 void setParms(AlgAnimFrame frame, java.lang.String[] ds, int frames)
           
 void shuffleDown()
          Shuffle the previous panels down
 void waitSkip()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

frame

public AlgAnimFrame frame
Constructor Detail

AlgThread

public AlgThread()
Method Detail

setParms

public void setParms(AlgAnimFrame frame,
                     java.lang.String[] ds,
                     int frames)

getDataSets

public java.lang.String[] getDataSets()

setDelay

public void setDelay(int delay)

getDataPanelCount

public int getDataPanelCount()

shuffleDown

public void shuffleDown()
Shuffle the previous panels down

loadData

public abstract boolean loadData(int choice)
Load or generate a specified data set. The animation writer should implement this in the specialization class. choice will be a data set index in the range 0..max_data_sets-1

generateData

public void generateData()
Generate the example data set. Reads the chosen data set from the frame's menu, and calls loadData( choice ) to load or generate the appropriate data set.

run

public abstract void run()
Run the animation. This is the key method that the animator provides: it starts up the animation and runs it to completion.
Overrides:
run in class java.lang.Thread

restoreDrawingPanel

public void restoreDrawingPanel()

waitSkip

public void waitSkip()