ImageFilterpublic class ImageFilter extends Object implements ImageConsumer, CloneableThe ImageFilter class provides a filter for delivering image data from an
ImageProducer to an ImageConsumer. |
Fields Summary |
---|
protected ImageConsumer | consumerThe consumer. |
Constructors Summary |
---|
public ImageFilter()Instantiates a new ImageFilter.
super();
|
Methods Summary |
---|
public java.lang.Object | clone()Returns a copy of this ImageFilter.
try {
return super.clone();
} catch (CloneNotSupportedException e) {
return null;
}
| public java.awt.image.ImageFilter | getFilterInstance(java.awt.image.ImageConsumer ic)Gets an instance of an ImageFilter object which performs the filtering
for the specified ImageConsumer.
ImageFilter filter = (ImageFilter)clone();
filter.consumer = ic;
return filter;
| public void | imageComplete(int status)
consumer.imageComplete(status);
| public void | resendTopDownLeftRight(java.awt.image.ImageProducer ip)Responds to a request for a Top-Down-Left-Right ordered resend of the
pixel data from an ImageConsumer.
ip.requestTopDownLeftRightResend(this);
| public void | setColorModel(java.awt.image.ColorModel model)
consumer.setColorModel(model);
| public void | setDimensions(int width, int height)
consumer.setDimensions(width, height);
| public void | setHints(int hints)
consumer.setHints(hints);
| public void | setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, int[] pixels, int off, int scansize)
consumer.setPixels(x, y, w, h, model, pixels, off, scansize);
| public void | setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, byte[] pixels, int off, int scansize)
consumer.setPixels(x, y, w, h, model, pixels, off, scansize);
| public void | setProperties(java.util.Hashtable props)
Hashtable<Object, Object> fprops;
if (props == null) {
fprops = new Hashtable<Object, Object>();
} else {
fprops = (Hashtable<Object, Object>)props.clone();
}
String propName = "Filters"; //$NON-NLS-1$
String prop = "Null filter"; //$NON-NLS-1$
Object o = fprops.get(propName);
if (o != null) {
if (o instanceof String) {
prop = (String)o + "; " + prop; //$NON-NLS-1$
} else {
prop = o.toString() + "; " + prop; //$NON-NLS-1$
}
}
fprops.put(propName, prop);
consumer.setProperties(fprops);
|
|