FileDocCategorySizeDatePackage
FilteredImageSource.javaAPI DocAndroid 1.5 API2971Wed May 06 22:41:54 BST 2009java.awt.image

FilteredImageSource

public class FilteredImageSource extends Object implements ImageProducer
The FilteredImageSource class is used for producing image data for a new filtered version of the original image using the specified filter object.
since
Android 1.0

Fields Summary
private final ImageProducer
source
The source.
private final ImageFilter
filter
The filter.
private final Hashtable
consTable
The cons table.
Constructors Summary
public FilteredImageSource(ImageProducer orig, ImageFilter imgf)
Instantiates a new FilteredImageSource object with the specified ImageProducer and the ImageFilter objects.

param
orig the specified ImageProducer.
param
imgf the specified ImageFilter.


                                                       
         
        source = orig;
        filter = imgf;
    
Methods Summary
public synchronized voidaddConsumer(java.awt.image.ImageConsumer ic)

        if (ic != null && !isConsumer(ic)) {
            ImageConsumer fic = filter.getFilterInstance(ic);
            source.addConsumer(fic);
            consTable.put(ic, fic);
        }
    
public synchronized booleanisConsumer(java.awt.image.ImageConsumer ic)

        if (ic != null) {
            return consTable.containsKey(ic);
        }
        return false;
    
public synchronized voidremoveConsumer(java.awt.image.ImageConsumer ic)

        if (ic != null && isConsumer(ic)) {
            ImageConsumer fic = consTable.get(ic);
            source.removeConsumer(fic);
            consTable.remove(ic);
        }
    
public voidrequestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)

        if (ic != null && isConsumer(ic)) {
            ImageFilter fic = (ImageFilter)consTable.get(ic);
            fic.resendTopDownLeftRight(source);
        }
    
public voidstartProduction(java.awt.image.ImageConsumer ic)

        addConsumer(ic);
        ImageConsumer fic = consTable.get(ic);
        source.startProduction(fic);