public interface ImageConsumer
ImageProducer
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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 occurred.
|
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.
|
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 Valuesvoid 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
- the X coordinate of the upper-left corner of the
area of pixels to be sety
- the Y coordinate 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
- the X coordinate of the upper-left corner of the
area of pixels to be sety
- the Y coordinate 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)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.