<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Interface java.awt.image.ImageConsumer
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.image.html">This Package</a>  <a href="Package-java.awt.image.html">Previous</a>  <a href="java.awt.image.ImageObserver.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Interface java.awt.image.ImageConsumer
</h1>
<dl>
  <dt> public interface <b>ImageConsumer</b>
</dl>
The interface for objects expressing interest in image data through
 the ImageProducer interfaces.  When a consumer is added to an image
 producer, the producer delivers all of the data about the image
 using the method calls defined in this interface.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ImageProducer.html#_top_">ImageProducer</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#COMPLETESCANLINES"><b>COMPLETESCANLINES</b></a>
  <dd>  The pixels will be delivered in (multiples of) complete scanlines
 at a time.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#IMAGEABORTED"><b>IMAGEABORTED</b></a>
  <dd>  The image creation process was deliberately aborted.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#IMAGEERROR"><b>IMAGEERROR</b></a>
  <dd>  An error was encountered while producing the image.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#RANDOMPIXELORDER"><b>RANDOMPIXELORDER</b></a>
  <dd>  The pixels will be delivered in a random order.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SINGLEFRAME"><b>SINGLEFRAME</b></a>
  <dd>  The image contain a single static image.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SINGLEFRAMEDONE"><b>SINGLEFRAMEDONE</b></a>
  <dd>  One frame of the image is complete but there are more frames
 to be delivered.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SINGLEPASS"><b>SINGLEPASS</b></a>
  <dd>  The pixels will be delivered in a single pass.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#STATICIMAGEDONE"><b>STATICIMAGEDONE</b></a>
  <dd>  The image is complete and there are no more pixels or frames
 to be delivered.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#TOPDOWNLEFTRIGHT"><b>TOPDOWNLEFTRIGHT</b></a>
  <dd>  The pixels will be delivered in top-down, left-to-right order.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#imageComplete(int)"><b>imageComplete</b></a>(int)
  <dd>  The imageComplete method is called when the ImageProducer is
 finished delivering all of the pixels that the source image
 contains, or when a single frame of a multi-frame animation has
 been completed, or when an error in loading or producing the
 image has occured.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setColorModel(java.awt.image.ColorModel)"><b>setColorModel</b></a>(ColorModel)
  <dd>  The ColorModel object used for the majority of
 the pixels reported using the setPixels method
 calls.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setDimensions(int, int)"><b>setDimensions</b></a>(int, int)
  <dd>  The dimensions of the source image are reported using the
 setDimensions method call.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setHints(int)"><b>setHints</b></a>(int)
  <dd>  The ImageProducer can deliver the pixels in any order, but
 the ImageConsumer may be able to scale or convert the pixels
 to the destination ColorModel more efficiently or with higher
 quality if it knows some information about how the pixels will
 be delivered up front.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)"><b>setPixels</b></a>(int, int, int, int, ColorModel, byte[], int, int)
  <dd>  The pixels of the image are delivered using one or more calls
 to the setPixels method.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int)"><b>setPixels</b></a>(int, int, int, int, ColorModel, int[], int, int)
  <dd>  The pixels of the image are delivered using one or more calls
 to the setPixels method.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setProperties(java.util.Hashtable)"><b>setProperties</b></a>(Hashtable)
  <dd>  Sets the extensible list of properties associated with this image.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="RANDOMPIXELORDER"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>RANDOMPIXELORDER</b>
<pre>
 public static final int RANDOMPIXELORDER
</pre>
<dl>
  <dd> The pixels will be delivered in a random order.  This tells the
 ImageConsumer not to use any optimizations that depend on the
 order of pixel delivery, which should be the default assumption
 in the absence of any call to the setHints method.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#setHints">setHints</a>
  </dl></dd>
</dl>
<a name="TOPDOWNLEFTRIGHT"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>TOPDOWNLEFTRIGHT</b>
<pre>
 public static final int TOPDOWNLEFTRIGHT
</pre>
<dl>
  <dd> The pixels will be delivered in top-down, left-to-right order.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#setHints">setHints</a>
  </dl></dd>
</dl>
<a name="COMPLETESCANLINES"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>COMPLETESCANLINES</b>
<pre>
 public static final int COMPLETESCANLINES
</pre>
<dl>
  <dd> The pixels will be delivered in (multiples of) complete scanlines
 at a time.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#setHints">setHints</a>
  </dl></dd>
</dl>
<a name="SINGLEPASS"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>SINGLEPASS</b>
<pre>
 public static final int SINGLEPASS
</pre>
<dl>
  <dd> The pixels will be delivered in a single pass.  Each pixel will
 appear in only one call to any of the setPixels methods.  An
 example of an image format which does not meet this criterion
 is a progressive JPEG image which defines pixels in multiple
 passes, each more refined than the previous.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#setHints">setHints</a>
  </dl></dd>
</dl>
<a name="SINGLEFRAME"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>SINGLEFRAME</b>
<pre>
 public static final int SINGLEFRAME
</pre>
<dl>
  <dd> The image contain a single static image.  The pixels will be defined
 in calls to the setPixels methods and then the imageComplete method
 will be called with the STATICIMAGEDONE flag after which no more
 image data will be delivered.  An example of an image type which
 would not meet these criteria would be the output of a video feed,
 or the representation of a 3D rendering being manipulated
 by the user.  The end of each frame in those types of images will
 be indicated by calling imageComplete with the SINGLEFRAMEDONE flag.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#setHints">setHints</a>, <a href="#imageComplete">imageComplete</a>
  </dl></dd>
</dl>
<a name="IMAGEERROR"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>IMAGEERROR</b>
<pre>
 public static final int IMAGEERROR
</pre>
<dl>
  <dd> An error was encountered while producing the image.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#imageComplete">imageComplete</a>
  </dl></dd>
</dl>
<a name="SINGLEFRAMEDONE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>SINGLEFRAMEDONE</b>
<pre>
 public static final int SINGLEFRAMEDONE
</pre>
<dl>
  <dd> One frame of the image is complete but there are more frames
 to be delivered.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#imageComplete">imageComplete</a>
  </dl></dd>
</dl>
<a name="STATICIMAGEDONE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>STATICIMAGEDONE</b>
<pre>
 public static final int STATICIMAGEDONE
</pre>
<dl>
  <dd> The image is complete and there are no more pixels or frames
 to be delivered.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#imageComplete">imageComplete</a>
  </dl></dd>
</dl>
<a name="IMAGEABORTED"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>IMAGEABORTED</b>
<pre>
 public static final int IMAGEABORTED
</pre>
<dl>
  <dd> The image creation process was deliberately aborted.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#imageComplete">imageComplete</a>
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="setDimensions(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setDimensions"><b>setDimensions</b></a>
<pre>
 public abstract void setDimensions(int width,
                                    int height)
</pre>
<dl>
  <dd> The dimensions of the source image are reported using the
 setDimensions method call.
<p>
</dl>
<a name="setProperties(java.util.Hashtable)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setProperties"><b>setProperties</b></a>
<pre>
 public abstract void setProperties(<a href="java.util.Hashtable.html#_top_">Hashtable</a> props)
</pre>
<dl>
  <dd> Sets the extensible list of properties associated with this image.
<p>
</dl>
<a name="setColorModel(java.awt.image.ColorModel)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setColorModel"><b>setColorModel</b></a>
<pre>
 public abstract void setColorModel(<a href="java.awt.image.ColorModel.html#_top_">ColorModel</a> model)
</pre>
<dl>
  <dd> The ColorModel object used for the majority of
 the pixels reported using the setPixels method
 calls.  Note that each set of pixels delivered using setPixels
 contains its own ColorModel object, so no assumption should
 be made that this model will be the only one used in delivering
 pixel values.  A notable case where multiple ColorModel objects
 may be seen is a filtered image when for each set of pixels
 that it filters, the filter
 determines  whether the
 pixels can be sent on untouched, using the original ColorModel,
 or whether the pixels should be modified (filtered) and passed
 on using a ColorModel more convenient for the filtering process.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a>
  </dl></dd>
</dl>
<a name="setHints(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setHints"><b>setHints</b></a>
<pre>
 public abstract void setHints(int hintflags)
</pre>
<dl>
  <dd> The ImageProducer can deliver the pixels in any order, but
 the ImageConsumer may be able to scale or convert the pixels
 to the destination ColorModel more efficiently or with higher
 quality if it knows some information about how the pixels will
 be delivered up front.  The setHints method should be called
 before any calls to any of the setPixels methods with a bit mask
 of hints about the manner in which the pixels will be delivered.
 If the ImageProducer does not follow the guidelines for the
 indicated hint, the results are undefined.
<p>
</dl>
<a name="setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setPixels"><b>setPixels</b></a>
<pre>
 public abstract void setPixels(int x,
                                int y,
                                int w,
                                int h,
                                <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a> model,
                                byte pixels[],
                                int off,
                                int scansize)
</pre>
<dl>
  <dd> The pixels of the image are delivered using one or more calls
 to the setPixels method.  Each call specifies the location and
 size of the rectangle of source pixels that are contained in
 the array of pixels.  The specified ColorModel object should
 be used to convert the pixels into their corresponding color
 and alpha components.  Pixel (m,n) is stored in the pixels array
 at index (n * scansize + m + off).  The pixels delivered using
 this method are all stored as bytes.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a>
  </dl></dd>
</dl>
<a name="setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setPixels"><b>setPixels</b></a>
<pre>
 public abstract void setPixels(int x,
                                int y,
                                int w,
                                int h,
                                <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a> model,
                                int pixels[],
                                int off,
                                int scansize)
</pre>
<dl>
  <dd> The pixels of the image are delivered using one or more calls
 to the setPixels method.  Each call specifies the location and
 size of the rectangle of source pixels that are contained in
 the array of pixels.  The specified ColorModel object should
 be used to convert the pixels into their corresponding color
 and alpha components.  Pixel (m,n) is stored in the pixels array
 at index (n * scansize + m + off).  The pixels delivered using
 this method are all stored as ints.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a>
  </dl></dd>
</dl>
<a name="imageComplete(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="imageComplete"><b>imageComplete</b></a>
<pre>
 public abstract void imageComplete(int status)
</pre>
<dl>
  <dd> The imageComplete method is called when the ImageProducer is
 finished delivering all of the pixels that the source image
 contains, or when a single frame of a multi-frame animation has
 been completed, or when an error in loading or producing the
 image has occured.  The ImageConsumer should remove itself from the
 list of consumers registered with the ImageProducer at this time,
 unless it is interested in successive frames.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ImageProducer.html#removeConsumer">removeConsumer</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.image.html">This Package</a>  <a href="Package-java.awt.image.html">Previous</a>  <a href="java.awt.image.ImageObserver.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
