|
JavaTM 2 Platform Std. Ed. v1.4.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
ImageProducer
Field Summary | |
static int |
COMPLETESCANLINES
The pixels will be delivered in (multiples of) complete scanlines at a time. |
static int |
IMAGEABORTED
The image creation process was deliberately aborted. |
static int |
IMAGEERROR
An error was encountered while producing the image. |
static int |
RANDOMPIXELORDER
The pixels will be delivered in a random order. |
static int |
SINGLEFRAME
The image contain a single static image. |
static int |
SINGLEFRAMEDONE
One frame of the image is complete but there are more frames to be delivered. |
static int |
SINGLEPASS
The pixels will be delivered in a single pass. |
static int |
STATICIMAGEDONE
The image is complete and there are no more pixels or frames to be delivered. |
static int |
TOPDOWNLEFTRIGHT
The pixels will be delivered in top-down, left-to-right order. |
Method Summary | |
void |
imageComplete(int status)
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. |
void |
setColorModel(ColorModel model)
Sets the ColorModel object used for the majority of the pixels reported using the setPixels method calls. |
void |
setDimensions(int width,
int height)
The dimensions of the source image are reported using the setDimensions method call. |
void |
setHints(int hintflags)
Sets the hints that the ImageConsumer uses to process the pixels delivered by the ImageProducer. |
void |
setPixels(int x,
int y,
int w,
int h,
ColorModel model,
byte[] pixels,
int off,
int scansize)
Delivers the pixels of the image with one or more calls to this method. |
void |
setPixels(int x,
int y,
int w,
int h,
ColorModel model,
int[] pixels,
int off,
int scansize)
The pixels of the image are delivered using one or more calls to the setPixels method. |
void |
setProperties(Hashtable props)
Sets the extensible list of properties associated with this image. |
Field Detail |
public static final int RANDOMPIXELORDER
setHints(int)
,
Constant Field Valuespublic static final int TOPDOWNLEFTRIGHT
setHints(int)
,
Constant Field Valuespublic static final int COMPLETESCANLINES
setHints(int)
,
Constant Field Valuespublic static final int SINGLEPASS
setHints(int)
,
Constant Field Valuespublic static final int SINGLEFRAME
setHints(int)
,
imageComplete(int)
,
Constant Field Valuespublic static final int IMAGEERROR
imageComplete(int)
,
Constant Field Valuespublic static final int SINGLEFRAMEDONE
imageComplete(int)
,
Constant Field Valuespublic static final int STATICIMAGEDONE
imageComplete(int)
,
Constant Field Valuespublic static final int IMAGEABORTED
imageComplete(int)
,
Constant Field ValuesMethod Detail |
public void setDimensions(int width, int height)
width
- the width of the source imageheight
- the height of the source imagepublic void setProperties(Hashtable props)
props
- the list of properties to be associated with this
imagepublic void setColorModel(ColorModel model)
model
- the specified ColorModel
ColorModel
public void setHints(int hintflags)
hintflags
- a set of hints that the ImageConsumer uses to
process the pixelspublic void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
w
- the width of the area of pixelsh
- the height of the area of pixelsmodel
- the specified ColorModel
pixels
- the array of pixelsoff
- the offset into the pixels
arrayscansize
- the distance from one row of pixels to the next in
the pixels
arrayColorModel
public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
w
- the width of the area of pixelsh
- the height of the area of pixelsmodel
- the specified ColorModel
pixels
- the array of pixelsoff
- the offset into the pixels
arrayscansize
- the distance from one row of pixels to the next in
the pixels
arrayColorModel
public void imageComplete(int status)
status
- the status of image loadingImageProducer.removeConsumer(java.awt.image.ImageConsumer)
|
JavaTM 2 Platform Std. Ed. v1.4.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.