|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ImageConsumer
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 |
---|
static final int RANDOMPIXELORDER
setHints(int)
,
Constant Field Valuesstatic final int TOPDOWNLEFTRIGHT
setHints(int)
,
Constant Field Valuesstatic final int COMPLETESCANLINES
setHints(int)
,
Constant Field Valuesstatic final int SINGLEPASS
setHints(int)
,
Constant Field Valuesstatic final int SINGLEFRAME
setHints(int)
,
imageComplete(int)
,
Constant Field Valuesstatic final int IMAGEERROR
imageComplete(int)
,
Constant Field Valuesstatic final int SINGLEFRAMEDONE
imageComplete(int)
,
Constant Field Valuesstatic final int STATICIMAGEDONE
imageComplete(int)
,
Constant Field Valuesstatic final int IMAGEABORTED
imageComplete(int)
,
Constant Field ValuesMethod Detail |
---|
void setDimensions(int width, int height)
width
- the width of the source imageheight
- the height of the source imagevoid setProperties(Hashtable<?,?> props)
props
- the list of properties to be associated with this
imagevoid setColorModel(ColorModel model)
model
- the specified ColorModel
ColorModel
void setHints(int hintflags)
hintflags
- a set of hints that the ImageConsumer uses to
process the pixelsvoid setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
x, y
- the coordinates of the upper-left corner of the
area of pixels to be setw
- 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
void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
x, y
- the coordinates of the upper-left corner of the
area of pixels to be setw
- 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
void imageComplete(int status)
status
- the status of image loadingImageProducer.removeConsumer(java.awt.image.ImageConsumer)
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.