This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.awt.image.renderable
class RenderableImageProducer

java.lang.Object extended by java.awt.image.renderable.RenderableImageProducer
All Implemented Interfaces:
ImageProducer, Runnable

public class RenderableImageProducer
extends Object
implements ImageProducer, Runnable

An adapter class that implements ImageProducer to allow the asynchronous production of a RenderableImage. The size of the ImageConsumer is determined by the scale factor of the usr2dev transform in the RenderContext. If the RenderContext is null, the default rendering of the RenderableImage is used. This class implements an asynchronous production that produces the image in one thread at one resolution. This class may be subclassed to implement versions that will render the image using several threads. These threads could render either the same image at progressively better quality, or different sections of the image at a single resolution.


Constructor Summary

          Constructs a new RenderableImageProducer from a RenderableImage and a RenderContext.
 
Method Summary
 void

          Adds an ImageConsumer to the list of consumers interested in data for this image.
 boolean

          Determine if an ImageConsumer is on the list of consumers currently interested in data for this image.
 void

          Remove an ImageConsumer from the list of consumers interested in data for this image.
 void

          Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.
 void
run()

          The runnable method for this class.
 void

          Sets a new RenderContext to use for the next startProduction() call.
 void

          Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately starts delivery of the image data through the ImageConsumer interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderableImageProducer

public RenderableImageProducer(RenderableImage rdblImage,
                               RenderContext rc)
Constructs a new RenderableImageProducer from a RenderableImage and a RenderContext.

Parameters:
rdblImage - the RenderableImage to be rendered.
rc - the RenderContext to use for producing the pixels.
Method Detail

addConsumer

public synchronized void addConsumer(ImageConsumer ic)
Adds an ImageConsumer to the list of consumers interested in data for this image.

Parameters:
ic - an ImageConsumer to be added to the interest list.

isConsumer

public synchronized boolean isConsumer(ImageConsumer ic)
Determine if an ImageConsumer is on the list of consumers currently interested in data for this image.

Parameters:
ic - the ImageConsumer to be checked.
Returns:
true if the ImageConsumer is on the list; false otherwise.

removeConsumer

public synchronized void removeConsumer(ImageConsumer ic)
Remove an ImageConsumer from the list of consumers interested in data for this image.

Parameters:
ic - the ImageConsumer to be removed.

requestTopDownLeftRightResend

public void requestTopDownLeftRightResend(ImageConsumer ic)
Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order.

Parameters:
ic - the ImageConsumer requesting the resend.

run

public void run()
The runnable method for this class. This will produce an image using the current RenderableImage and RenderContext and send it to all the ImageConsumer currently registered with this class.


setRenderContext

public synchronized void setRenderContext(RenderContext rc)
Sets a new RenderContext to use for the next startProduction() call.

Parameters:
rc - the new RenderContext.

startProduction

public synchronized void startProduction(ImageConsumer ic)
Adds an ImageConsumer to the list of consumers interested in data for this image, and immediately starts delivery of the image data through the ImageConsumer interface.

Parameters:
ic - the ImageConsumer to be added to the list of consumers.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.