net.groboclown.gui.timeBoundPaint.v1
Class ThreadPainter
java.lang.Object
|
+--net.groboclown.gui.timeBoundPaint.v1.ThreadPainter
- All Implemented Interfaces:
- PaintFinishedListener
- public abstract class ThreadPainter
- extends Object
- implements PaintFinishedListener
Implements a thread which paints an image for a Time Bound Painter,
or other Z-Order painting routine. The only method which needs to be
implemented is the paint
method, which performs the
actual painting.
The priority of the thread is 5.
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
img
protected Image img
imgG
protected Graphics imgG
q
private SynchQueue q
zorder
private int zorder
lt
private LoopThread lt
paintsFinished
private int paintsFinished
synchOn
private Object synchOn
pie
private PaintImageEvent pie
innerloop
private Runnable innerloop
ThreadPainter
public ThreadPainter(Image img,
SynchQueue q,
int zorder)
startPainter
public void startPainter()
- Start the painting thread
pausePainter
public void pausePainter()
resumePainter
public void resumePainter()
stopPainter
public void stopPainter()
synch
protected void synch()
- Called to wait for the painter to be finished, so we can go
on to another frame.
unsynch
protected void unsynch()
- Called to unpause the alg.
paintFinished
public void paintFinished(PaintFinishedEvent pfe)
- Called when all the painting is done. We announce to the
painting thread to start up again.
- Specified by:
paintFinished
in interface PaintFinishedListener
paint
protected abstract void paint(Graphics g,
PaintImageEvent pie)
Written under the LGPL