com.approximatrix.charting
Class BufferedChart.RenderThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.approximatrix.charting.BufferedChart.RenderThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
BufferedChart

private class BufferedChart.RenderThread
extends java.lang.Thread

Private class for handling drawing the chart on a separate thread. The class is simply passed an image on which to draw and a parent to notify at completiong. The thread will simply exit when interrupted


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.awt.image.BufferedImage bi
          The target image to draw to
private  BufferedChart parent
          The parent to notify when work is complete
private  boolean renderingStoppped
          Flag to block drawing notify in this particular thread
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
BufferedChart.RenderThread(java.awt.image.BufferedImage image, BufferedChart notify)
          Standard constructor accpeting the target image and the parent object to notify upon completion of the rendering work.
 
Method Summary
 void run()
          The actual drawing procedures for the rendering
 void stopRender()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

renderingStoppped

private volatile boolean renderingStoppped
Flag to block drawing notify in this particular thread


bi

private java.awt.image.BufferedImage bi
The target image to draw to


parent

private BufferedChart parent
The parent to notify when work is complete

Constructor Detail

BufferedChart.RenderThread

public BufferedChart.RenderThread(java.awt.image.BufferedImage image,
                                  BufferedChart notify)
Standard constructor accpeting the target image and the parent object to notify upon completion of the rendering work.

Parameters:
image - the image on which to draw
notify - a BufferedChart object to notify when complete
Method Detail

run

public void run()
The actual drawing procedures for the rendering

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

stopRender

public void stopRender()