net.groboclown.gui.paintpipe.v1
Class EventPooler
java.lang.Object
|
+--net.groboclown.gui.paintpipe.v1.EventPooler
- public class EventPooler
- extends Object
Posts events.
In order to be more efficient, the various events are pooled.
The PainterThread.paint()
method needs to modify these, and pass them
to the queue. The pools are reused on a paintFinished
event, created in the initialize()
method, and
cleaned up in the cleanup()
method.
Note that the only non-pooled event is the FlushPaintingEvent.
There is only one of these allocated.
Warning: this needs to be better documented.
- Version:
- 1.0
- Author:
- Matt Albrecht
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
events
private Class[] events
nextIndex
private int[] nextIndex
pooledEvents
private Vector[] pooledEvents
len
private int len
EventPooler
public EventPooler(Class[] eventList)
getNextEvent
public Object getNextEvent(int eventIndex)
initialize
public void initialize()
paintFinished
public void paintFinished()
cleanup
public void cleanup()
Written under the LGPL