Methods Summary |
---|
public synchronized void | addConsumer(java.awt.image.ImageConsumer ic)Adds the specified ImageConsumer
to the list of consumers interested in data for the filtered image.
An instance of the original ImageFilter
is created
(using the filter's getFilterInstance method)
to manipulate the image data
for the specified ImageConsumer .
The newly created filter instance
is then passed to the addConsumer method
of the original ImageProducer .
This method is public as a side effect
of this class implementing
the ImageProducer interface.
It should not be called from user code,
and its behavior if called from user code is unspecified.
if (proxies == null) {
proxies = new Hashtable();
}
if (!proxies.containsKey(ic)) {
ImageFilter imgf = filter.getFilterInstance(ic);
proxies.put(ic, imgf);
src.addConsumer(imgf);
}
|
public synchronized boolean | isConsumer(java.awt.image.ImageConsumer ic)Determines whether an ImageConsumer is on the list of consumers
currently interested in data for this image.
This method is public as a side effect
of this class implementing
the ImageProducer interface.
It should not be called from user code,
and its behavior if called from user code is unspecified.
return (proxies != null && proxies.containsKey(ic));
|
public synchronized void | removeConsumer(java.awt.image.ImageConsumer ic)Removes an ImageConsumer from the list of consumers interested in
data for this image.
This method is public as a side effect
of this class implementing
the ImageProducer interface.
It should not be called from user code,
and its behavior if called from user code is unspecified.
if (proxies != null) {
ImageFilter imgf = (ImageFilter) proxies.get(ic);
if (imgf != null) {
src.removeConsumer(imgf);
proxies.remove(ic);
if (proxies.isEmpty()) {
proxies = null;
}
}
}
|
public void | requestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)Requests that a given ImageConsumer have the image data delivered
one more time in top-down, left-right order. The request is
handed to the ImageFilter for further processing, since the
ability to preserve the pixel ordering depends on the filter.
This method is public as a side effect
of this class implementing
the ImageProducer interface.
It should not be called from user code,
and its behavior if called from user code is unspecified.
if (proxies != null) {
ImageFilter imgf = (ImageFilter) proxies.get(ic);
if (imgf != null) {
imgf.resendTopDownLeftRight(src);
}
}
|
public void | startProduction(java.awt.image.ImageConsumer ic)Starts production of the filtered image.
If the specified ImageConsumer
isn't already a consumer of the filtered image,
an instance of the original ImageFilter
is created
(using the filter's getFilterInstance method)
to manipulate the image data
for the ImageConsumer .
The filter instance for the ImageConsumer
is then passed to the startProduction method
of the original ImageProducer .
This method is public as a side effect
of this class implementing
the ImageProducer interface.
It should not be called from user code,
and its behavior if called from user code is unspecified.
if (proxies == null) {
proxies = new Hashtable();
}
ImageFilter imgf = (ImageFilter) proxies.get(ic);
if (imgf == null) {
imgf = filter.getFilterInstance(ic);
proxies.put(ic, imgf);
}
src.startProduction(imgf);
|