Class CalcThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--CalcThread
All Implemented Interfaces:
java.lang.Runnable

public class CalcThread
extends java.lang.Thread

Programm: WaveThread
Copyright: 2002 Andreas Gohr, Frank Schubert, Milan Altenburg
License: GPL2 or higher

Info: Class CalcThread, calculates Raster, holds array of Rasters


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CalcThread(MonoWave mw, java.awt.Color c)
          CalcThread Constructor sets time, MonoWave and Color creates new RGB ColorModel
 
Method Summary
 void calc(int idx)
          calculates the next Raster, according to time _t
 void die()
          control thread from outside, supposed but never used
 int getQueueSize()
           
 java.awt.image.WritableRaster getRaster()
           
 void run()
          "main" of CalcThread calls synchronized calc to fill queue
 void setXY(int x, int y)
          sets new width and height starts Thread, creates suitable Raster resets queue values (length,first,last)
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, 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
 

Constructor Detail

CalcThread

public CalcThread(MonoWave mw,
                  java.awt.Color c)
CalcThread Constructor sets time, MonoWave and Color creates new RGB ColorModel

Method Detail

setXY

public void setXY(int x,
                  int y)
sets new width and height starts Thread, creates suitable Raster resets queue values (length,first,last)


getQueueSize

public int getQueueSize()
Returns:
size of queue

getRaster

public java.awt.image.WritableRaster getRaster()
Returns:
the Raster, that is next

die

public void die()
control thread from outside, supposed but never used


calc

public void calc(int idx)
calculates the next Raster, according to time _t


run

public void run()
"main" of CalcThread calls synchronized calc to fill queue

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread