FilteredImageSource
is safe for use by multiple threads.
Here is an example which filters an image by swapping the red and
blue components:
Image src = getImage("doc:///demo/images/duke/T1.gif"); ImageFilter colorfilter = new RedBlueSwapFilter(); Image img = createImage(new FilteredImageSource(src.getSource(), colorfilter));
ImageProducer
Modifier and Type | Field and Description |
---|---|
pack-priv ImageFilter | |
private Hashtable | |
pack-priv ImageProducer |
Access | Constructor and Description |
---|---|
public | FilteredImageSource(ImageProducer
the specified orig, ImageFilter ImageProducer the specified imgf)ImageFilter Constructs an ImageProducer object from an existing ImageProducer and a filter object. |
Modifier and Type | Method and Description |
---|---|
public synchronized void | addConsumer(ImageConsumer
the consumer for the filtered image ic)Implements java. Adds the specified |
public synchronized boolean | Returns: true if the ImageConsumer is on the list; false otherwisethe specified ic)ImageConsumer Implements java. Determines whether an ImageConsumer is on the list of consumers currently interested in data for this image. |
public synchronized void | removeConsumer(ImageConsumer
the specified ic)ImageConsumer Implements java. Removes an ImageConsumer from the list of consumers interested in data for this image. |
public synchronized void | requestTopDownLeftRightResend(ImageConsumer
the specified ic)ImageConsumer Implements java. Requests that a given ImageConsumer have the image data delivered one more time in top-down, left-right order. |
public synchronized void | startProduction(ImageConsumer
the consumer for the filtered image ic)Implements java. Starts production of the filtered image. |
filter | back to summary |
---|---|
pack-priv ImageFilter filter |
proxies | back to summary |
---|---|
private Hashtable<ImageConsumer, ImageFilter> proxies |
src | back to summary |
---|---|
pack-priv ImageProducer src |
FilteredImageSource | back to summary |
---|---|
public FilteredImageSource(ImageProducer orig, ImageFilter imgf) Constructs an ImageProducer object from an existing ImageProducer and a filter object.
|
addConsumer | back to summary |
---|---|
public synchronized void addConsumer(ImageConsumer ic) Implements java. Adds the specified
This method is public as a side effect
of this class implementing
the
|
isConsumer | back to summary |
---|---|
public synchronized boolean isConsumer(ImageConsumer ic) Implements java. 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
|
removeConsumer | back to summary |
---|---|
public synchronized void removeConsumer(ImageConsumer ic) Implements java. 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
|
requestTopDownLeftRightResend | back to summary |
---|---|
public synchronized void requestTopDownLeftRightResend(ImageConsumer ic) Implements java. 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
|
startProduction | back to summary |
---|---|
public synchronized void startProduction(ImageConsumer ic) Implements java. Starts production of the filtered image.
If the specified
This method is public as a side effect
of this class implementing
the
|