The ImageProducer Interface

As discussed previously—see “ImageProducer”—image producers produce the bits of an image and pass them along to an image consumer. Every java.awt.Image has an associated image producer that reconstructs the image and produces the bits that constitute comprise the image whenever necessary.

The methods defined by the java.awt.image.ImageProducer interface are listed in Table 6-1.

Table 6-1. java.awt.image.ImageProducer Methods
Method Intent
void addConsumer(ImageConsumer)Registers an image consumer with the producer
boolean isConsumer(ImageConsumer) Returns true if the image consumer has been registered with the producer, false otherwise
void removeConsumer(ImageConsumer) Removes an image consumer from the list of consumers ...

Get Graphic Java™ 1.2, Volume I: AWT, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.