java.awt.image
Class BufferedImageFilter

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.image.ImageFilter sample code for java.awt.image.ImageFilter definition code for java.awt.image.ImageFilter 
      extended by java.awt.image.BufferedImageFilter
All Implemented Interfaces:
ImageConsumer sample code for java.awt.image.ImageConsumer definition code for java.awt.image.ImageConsumer , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable

public class BufferedImageFilter
extends ImageFilter sample code for java.awt.image.ImageFilter definition code for java.awt.image.ImageFilter
implements Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable

The BufferedImageFilter class subclasses an ImageFilter to provide a simple means of using a single-source/single-destination image operator (BufferedImageOp sample code for java.awt.image.BufferedImageOp definition code for java.awt.image.BufferedImageOp ) to filter a BufferedImage in the Image Producer/Consumer/Observer paradigm. Examples of these image operators are: ConvolveOp sample code for java.awt.image.ConvolveOp definition code for java.awt.image.ConvolveOp , AffineTransformOp sample code for java.awt.image.AffineTransformOp definition code for java.awt.image.AffineTransformOp and LookupOp sample code for java.awt.image.LookupOp definition code for java.awt.image.LookupOp .

See Also:
ImageFilter sample code for java.awt.image.ImageFilter definition code for java.awt.image.ImageFilter , BufferedImage sample code for java.awt.image.BufferedImage definition code for java.awt.image.BufferedImage , BufferedImageOp sample code for java.awt.image.BufferedImageOp definition code for java.awt.image.BufferedImageOp

Field Summary
 
Fields inherited from class java.awt.image.ImageFilter sample code for java.awt.image.ImageFilter definition code for java.awt.image.ImageFilter
consumer sample code for java.awt.image.ImageFilter.consumer definition code for java.awt.image.ImageFilter.consumer
 
Fields inherited from interface java.awt.image.ImageConsumer sample code for java.awt.image.ImageConsumer definition code for java.awt.image.ImageConsumer
COMPLETESCANLINES sample code for java.awt.image.ImageConsumer.COMPLETESCANLINES definition code for java.awt.image.ImageConsumer.COMPLETESCANLINES , IMAGEABORTED sample code for java.awt.image.ImageConsumer.IMAGEABORTED definition code for java.awt.image.ImageConsumer.IMAGEABORTED , IMAGEERROR sample code for java.awt.image.ImageConsumer.IMAGEERROR definition code for java.awt.image.ImageConsumer.IMAGEERROR , RANDOMPIXELORDER sample code for java.awt.image.ImageConsumer.RANDOMPIXELORDER definition code for java.awt.image.ImageConsumer.RANDOMPIXELORDER , SINGLEFRAME sample code for java.awt.image.ImageConsumer.SINGLEFRAME definition code for java.awt.image.ImageConsumer.SINGLEFRAME , SINGLEFRAMEDONE sample code for java.awt.image.ImageConsumer.SINGLEFRAMEDONE definition code for java.awt.image.ImageConsumer.SINGLEFRAMEDONE , SINGLEPASS sample code for java.awt.image.ImageConsumer.SINGLEPASS definition code for java.awt.image.ImageConsumer.SINGLEPASS , STATICIMAGEDONE sample code for java.awt.image.ImageConsumer.STATICIMAGEDONE definition code for java.awt.image.ImageConsumer.STATICIMAGEDONE , TOPDOWNLEFTRIGHT sample code for java.awt.image.ImageConsumer.TOPDOWNLEFTRIGHT definition code for java.awt.image.ImageConsumer.TOPDOWNLEFTRIGHT
 
Constructor Summary
BufferedImageFilter sample code for java.awt.image.BufferedImageFilter.BufferedImageFilter(java.awt.image.BufferedImageOp) definition code for java.awt.image.BufferedImageFilter.BufferedImageFilter(java.awt.image.BufferedImageOp) (BufferedImageOp sample code for java.awt.image.BufferedImageOp definition code for java.awt.image.BufferedImageOp  op)
          Constructs a BufferedImageFilter with the specified single-source/single-destination operator.
 
Method Summary
 BufferedImageOp sample code for java.awt.image.BufferedImageOp definition code for java.awt.image.BufferedImageOp getBufferedImageOp sample code for java.awt.image.BufferedImageFilter.getBufferedImageOp() definition code for java.awt.image.BufferedImageFilter.getBufferedImageOp() ()
          Returns the BufferedImageOp.
 void imageComplete sample code for java.awt.image.BufferedImageFilter.imageComplete(int) definition code for java.awt.image.BufferedImageFilter.imageComplete(int) (int status)
          Filters the information provided in the imageComplete method of the ImageConsumer interface.
 void setColorModel sample code for java.awt.image.BufferedImageFilter.setColorModel(java.awt.image.ColorModel) definition code for java.awt.image.BufferedImageFilter.setColorModel(java.awt.image.ColorModel) (ColorModel sample code for java.awt.image.ColorModel definition code for java.awt.image.ColorModel  model)
          Filters the information provided in the setColorModel sample code for java.awt.image.ImageConsumer.setColorModel(java.awt.image.ColorModel) definition code for java.awt.image.ImageConsumer.setColorModel(java.awt.image.ColorModel) method of the ImageConsumer interface.
 void setDimensions sample code for java.awt.image.BufferedImageFilter.setDimensions(int, int) definition code for java.awt.image.BufferedImageFilter.setDimensions(int, int) (int width, int height)
          Filters the information provided in the setDimensions sample code for java.awt.image.ImageConsumer.setDimensions(int, int) definition code for java.awt.image.ImageConsumer.setDimensions(int, int) method of the ImageConsumer sample code for java.awt.image.ImageConsumer definition code for java.awt.image.ImageConsumer interface.
 void setPixels sample code for java.awt.image.BufferedImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int) definition code for java.awt.image.BufferedImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int) (int x, int y, int w, int h, ColorModel sample code for java.awt.image.ColorModel definition code for java.awt.image.ColorModel  model, byte[] pixels, int off, int scansize)
          Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of bytes.
 void setPixels sample code for java.awt.image.BufferedImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int) definition code for java.awt.image.BufferedImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int) (int x, int y, int w, int h, ColorModel sample code for java.awt.image.ColorModel definition code for java.awt.image.ColorModel  model, int[] pixels, int off, int scansize)
          Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of integers.
 
Methods inherited from class java.awt.image.ImageFilter sample code for java.awt.image.ImageFilter definition code for java.awt.image.ImageFilter
clone sample code for java.awt.image.ImageFilter.clone() definition code for java.awt.image.ImageFilter.clone() , getFilterInstance sample code for java.awt.image.ImageFilter.getFilterInstance(java.awt.image.ImageConsumer) definition code for java.awt.image.ImageFilter.getFilterInstance(java.awt.image.ImageConsumer) , resendTopDownLeftRight sample code for java.awt.image.ImageFilter.resendTopDownLeftRight(java.awt.image.ImageProducer) definition code for java.awt.image.ImageFilter.resendTopDownLeftRight(java.awt.image.ImageProducer) , setHints sample code for java.awt.image.ImageFilter.setHints(int) definition code for java.awt.image.ImageFilter.setHints(int) , setProperties sample code for java.awt.image.ImageFilter.setProperties(java.util.Hashtable) definition code for java.awt.image.ImageFilter.setProperties(java.util.Hashtable)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

BufferedImageFilter sample code for java.awt.image.BufferedImageFilter(java.awt.image.BufferedImageOp) definition code for java.awt.image.BufferedImageFilter(java.awt.image.BufferedImageOp)

public BufferedImageFilter(BufferedImageOp sample code for java.awt.image.BufferedImageOp definition code for java.awt.image.BufferedImageOp  op)
Constructs a BufferedImageFilter with the specified single-source/single-destination operator.

Parameters:
op - the specified BufferedImageOp to use to filter a BufferedImage
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if op is null
Method Detail

getBufferedImageOp sample code for java.awt.image.BufferedImageFilter.getBufferedImageOp() definition code for java.awt.image.BufferedImageFilter.getBufferedImageOp()

public BufferedImageOp sample code for java.awt.image.BufferedImageOp definition code for java.awt.image.BufferedImageOp  getBufferedImageOp()
Returns the BufferedImageOp.

Returns:
the operator of this BufferedImageFilter.

setDimensions sample code for java.awt.image.BufferedImageFilter.setDimensions(int, int) definition code for java.awt.image.BufferedImageFilter.setDimensions(int, int)

public void setDimensions(int width,
                          int height)
Filters the information provided in the setDimensions sample code for java.awt.image.ImageConsumer.setDimensions(int, int) definition code for java.awt.image.ImageConsumer.setDimensions(int, int) method of the ImageConsumer sample code for java.awt.image.ImageConsumer definition code for java.awt.image.ImageConsumer interface.

Note: This method is intended to be called by the ImageProducer sample code for java.awt.image.ImageProducer definition code for java.awt.image.ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Specified by:
setDimensions sample code for java.awt.image.ImageConsumer.setDimensions(int, int) definition code for java.awt.image.ImageConsumer.setDimensions(int, int) in interface ImageConsumer sample code for java.awt.image.ImageConsumer definition code for java.awt.image.ImageConsumer
Overrides:
setDimensions sample code for java.awt.image.ImageFilter.setDimensions(int, int) definition code for java.awt.image.ImageFilter.setDimensions(int, int) in class ImageFilter sample code for java.awt.image.ImageFilter definition code for java.awt.image.ImageFilter
Parameters:
width - the width to which to set the width of this BufferedImageFilter
height - the height to which to set the height of this BufferedImageFilter
See Also:
ImageConsumer.setDimensions(int, int) sample code for java.awt.image.ImageConsumer.setDimensions(int, int) definition code for java.awt.image.ImageConsumer.setDimensions(int, int)

setColorModel sample code for java.awt.image.BufferedImageFilter.setColorModel(java.awt.image.ColorModel) definition code for java.awt.image.BufferedImageFilter.setColorModel(java.awt.image.ColorModel)

public void setColorModel(ColorModel sample code for java.awt.image.ColorModel definition code for java.awt.image.ColorModel  model)
Filters the information provided in the setColorModel sample code for java.awt.image.ImageConsumer.setColorModel(java.awt.image.ColorModel) definition code for java.awt.image.ImageConsumer.setColorModel(java.awt.image.ColorModel) method of the ImageConsumer interface.

If model is null, this method clears the current ColorModel of this BufferedImageFilter.

Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Specified by:
setColorModel sample code for java.awt.image.ImageConsumer.setColorModel(java.awt.image.ColorModel) definition code for java.awt.image.ImageConsumer.setColorModel(java.awt.image.ColorModel) in interface ImageConsumer sample code for java.awt.image.ImageConsumer definition code for java.awt.image.ImageConsumer
Overrides:
setColorModel sample code for java.awt.image.ImageFilter.setColorModel(java.awt.image.ColorModel) definition code for java.awt.image.ImageFilter.setColorModel(java.awt.image.ColorModel) in class ImageFilter sample code for java.awt.image.ImageFilter definition code for java.awt.image.ImageFilter
Parameters:
model - the ColorModel sample code for java.awt.image.ColorModel definition code for java.awt.image.ColorModel to which to set the ColorModel of this BufferedImageFilter
See Also:
ImageConsumer.setColorModel(java.awt.image.ColorModel) sample code for java.awt.image.ImageConsumer.setColorModel(java.awt.image.ColorModel) definition code for java.awt.image.ImageConsumer.setColorModel(java.awt.image.ColorModel)

setPixels sample code for java.awt.image.BufferedImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int) definition code for java.awt.image.BufferedImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel sample code for java.awt.image.ColorModel definition code for java.awt.image.ColorModel  model,
                      byte[] pixels,
                      int off,
                      int scansize)
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 retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Specified by:
setPixels sample code for java.awt.image.ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int) definition code for java.awt.image.ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int) in interface ImageConsumer sample code for java.awt.image.ImageConsumer definition code for java.awt.image.ImageConsumer
Overrides:
setPixels sample code for java.awt.image.ImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int) definition code for java.awt.image.ImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int) in class ImageFilter sample code for java.awt.image.ImageFilter definition code for java.awt.image.ImageFilter
w - the width of the area of pixels
h - the height of the area of pixels
model - the specified ColorModel
pixels - the array of pixels
off - the offset into the pixels array
scansize - the distance from one row of pixels to the next in the pixels array
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if width or height are less than zero.
See Also:
ImageConsumer.setPixels(int, int, int, int, ColorModel, byte[], int, int) sample code for java.awt.image.ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int) definition code for java.awt.image.ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)

setPixels sample code for java.awt.image.BufferedImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int) definition code for java.awt.image.BufferedImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int)

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel sample code for java.awt.image.ColorModel definition code for java.awt.image.ColorModel  model,
                      int[] pixels,
                      int off,
                      int 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 retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Specified by:
setPixels sample code for java.awt.image.ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int) definition code for java.awt.image.ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int) in interface ImageConsumer sample code for java.awt.image.ImageConsumer definition code for java.awt.image.ImageConsumer
Overrides:
setPixels sample code for java.awt.image.ImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int) definition code for java.awt.image.ImageFilter.setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int) in class ImageFilter sample code for java.awt.image.ImageFilter definition code for java.awt.image.ImageFilter
w - the width of the area of pixels
h - the height of the area of pixels
model - the specified ColorModel
pixels - the array of pixels
off - the offset into the pixels array
scansize - the distance from one row of pixels to the next in the pixels array
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if width or height are less than zero.
See Also:
ImageConsumer.setPixels(int, int, int, int, ColorModel, int[], int, int) sample code for java.awt.image.ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int) definition code for java.awt.image.ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int)

imageComplete sample code for java.awt.image.BufferedImageFilter.imageComplete(int) definition code for java.awt.image.BufferedImageFilter.imageComplete(int)

public void imageComplete(int status)
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 retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Specified by:
imageComplete sample code for java.awt.image.ImageConsumer.imageComplete(int) definition code for java.awt.image.ImageConsumer.imageComplete(int) in interface ImageConsumer sample code for java.awt.image.ImageConsumer definition code for java.awt.image.ImageConsumer
Overrides:
imageComplete sample code for java.awt.image.ImageFilter.imageComplete(int) definition code for java.awt.image.ImageFilter.imageComplete(int) in class ImageFilter sample code for java.awt.image.ImageFilter definition code for java.awt.image.ImageFilter
Parameters:
status - the status of image loading
Throws:
ImagingOpException sample code for java.awt.image.ImagingOpException definition code for java.awt.image.ImagingOpException - if there was a problem calling the filter method of the BufferedImageOp associated with this instance.
See Also:
ImageConsumer.imageComplete(int) sample code for java.awt.image.ImageConsumer.imageComplete(int) definition code for java.awt.image.ImageConsumer.imageComplete(int)