* Note: This method is intended to be called by the ImageProducer
* of the Image whose pixels are being filtered. Developers using
* this class to filter pixels from an image should avoid calling
* this method directly since that operation could interfere
* with the filtering operation.
* @param ic the specified ImageConsumer
* @return an ImageFilter used to perform the
* filtering for the specified ImageConsumer.
*/
public ImageFilter getFilterInstance(ImageConsumer ic) {
ImageFilter instance = (ImageFilter) clone();
instance.consumer = ic;
return instance;
}
/**
* Filters the information provided in the setDimensions method
* of the ImageConsumer interface.
*
* Note: This method is intended to be called by the ImageProducer * of the Image whose pixels are being filtered. Developers using * this class to filter pixels from an image should avoid calling * this method directly since that operation could interfere * with the filtering operation. * @see ImageConsumer#setDimensions */ public void setDimensions(int width, int height) { consumer.setDimensions(width, height); } /** * Passes the properties from the source object along after adding a * property indicating the stream of filters it has been run through. *
* Note: This method is intended to be called by the ImageProducer
* of the Image whose pixels are being filtered. Developers using
* this class to filter pixels from an image should avoid calling
* this method directly since that operation could interfere
* with the filtering operation.
*
* @param props the properties from the source object
* @exception NullPointerException if props is null
*/
public void setProperties(Hashtable props) {
Hashtable
* Note: This method is intended to be called by the ImageProducer * of the Image whose pixels are being filtered. Developers using * this class to filter pixels from an image should avoid calling * this method directly since that operation could interfere * with the filtering operation. * @see ImageConsumer#setColorModel */ public void setColorModel(ColorModel model) { consumer.setColorModel(model); } /** * Filters the information provided in the setHints method * of the ImageConsumer interface. *
* Note: This method is intended to be called by the ImageProducer * of the Image whose pixels are being filtered. Developers using * this class to filter pixels from an image should avoid calling * this method directly since that operation could interfere * with the filtering operation. * @see ImageConsumer#setHints */ public void setHints(int hints) { consumer.setHints(hints); } /** * Filters the information provided in the setPixels method of the * ImageConsumer interface which takes an array of bytes. *
* Note: This method is intended to be called by the ImageProducer * of the Image whose pixels are being filtered. Developers using * this class to filter pixels from an image should avoid calling * this method directly since that operation could interfere * with the filtering operation. * @see ImageConsumer#setPixels */ public void setPixels(int x, int y, int w, int h, ColorModel model, byte pixels[], int off, int scansize) { consumer.setPixels(x, y, w, h, model, pixels, off, scansize); } /** * Filters the information provided in the setPixels method of the * ImageConsumer interface which takes an array of integers. *
* Note: This method is intended to be called by the ImageProducer * of the Image whose pixels are being filtered. Developers using * this class to filter pixels from an image should avoid calling * this method directly since that operation could interfere * with the filtering operation. * @see ImageConsumer#setPixels */ public void setPixels(int x, int y, int w, int h, ColorModel model, int pixels[], int off, int scansize) { consumer.setPixels(x, y, w, h, model, pixels, off, scansize); } /** * Filters the information provided in the imageComplete method of * the ImageConsumer interface. *
* Note: This method is intended to be called by the ImageProducer
* of the Image whose pixels are being filtered. Developers using
* this class to filter pixels from an image should avoid calling
* this method directly since that operation could interfere
* with the filtering operation.
* @see ImageConsumer#imageComplete
*/
public void imageComplete(int status) {
consumer.imageComplete(status);
}
/**
* Responds to a request for a TopDownLeftRight (TDLR) ordered resend
* of the pixel data from an ImageConsumer.
* When an ImageConsumer being fed
* by an instance of this ImageFilter
* requests a resend of the data in TDLR order,
* the FilteredImageSource
* invokes this method of the ImageFilter.
*
*
*
* An ImageFilter subclass might override this method or not,
* depending on if and how it can send data in TDLR order.
* Three possibilities exist:
*
*
ImageProducer
* using this filter as the requesting ImageConsumer.
* This behavior
* is appropriate if the filter can determine
* that it will forward the pixels
* in TDLR order if its upstream producer object
* sends them in TDLR order.
*
* ip is null
*/
public void resendTopDownLeftRight(ImageProducer ip) {
ip.requestTopDownLeftRightResend(this);
}
/**
* Clones this object.
*/
public Object clone() {
try {
return super.clone();
} catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable
throw new InternalError(e);
}
}
}