Methods Summary |
---|
public synchronized void | addConsumer(java.awt.image.ImageConsumer c)
if ( isConsumer( c ) )
return;
consumers.addElement( c );
c.setHints(ImageConsumer.TOPDOWNLEFTRIGHT |
ImageConsumer.SINGLEPASS );
c.setDimensions( width, height );
c.setProperties( new Hashtable() );
c.setColorModel( model );
|
public synchronized boolean | isConsumer(java.awt.image.ImageConsumer c)
return ( consumers.contains( c ) );
|
public synchronized void | removeConsumer(java.awt.image.ImageConsumer c)
consumers.removeElement( c );
|
public void | requestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)
|
public void | run()
while ( frameData != null ) {
frameData.nextFrame();
sendFrame();
try {
sleep( delay );
} catch ( InterruptedException e ) {}
}
|
private void | sendFrame()
for ( Enumeration e = consumers.elements(); e.hasMoreElements(); ) {
ImageConsumer c = (ImageConsumer)e.nextElement();
c.setPixels(0, 0, width, height, model, frameData.getPixels(), 0, width);
c.imageComplete(ImageConsumer.SINGLEFRAMEDONE);
}
|
public void | startProduction(java.awt.image.ImageConsumer ic)
addConsumer(ic);
|