public class WaitingImageObserver
extends java.lang.Object
implements java.awt.image.ImageObserver, java.io.Serializable, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
private boolean |
error
A flag that signals an error.
|
private java.awt.Image |
image
The image.
|
private boolean |
lock
The lock.
|
(package private) static long |
serialVersionUID
For serialization.
|
| Constructor and Description |
|---|
WaitingImageObserver(java.awt.Image image)
Creates a new
ImageObserver for the given Image. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Deprecated.
cloning may lock down the observer
|
boolean |
imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
Callback function used by AWT to inform that more data is available.
|
boolean |
isError()
Returns true if there is an error condition, and false otherwise.
|
boolean |
isLoadingComplete()
Returns
true if loading is complete, and false
otherwise. |
void |
waitImageLoaded()
The workerthread.
|
static final long serialVersionUID
private boolean lock
private java.awt.Image image
private boolean error
public WaitingImageObserver(java.awt.Image image)
ImageObserver for the given Image.
The observer has to be started by an external thread.image - the image to observe (null not permitted).public boolean imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
imageUpdate in interface java.awt.image.ImageObserverimg - the image being observed.infoflags - the bitwise inclusive OR of the following
flags: WIDTH, HEIGHT,
PROPERTIES, SOMEBITS,
FRAMEBITS, ALLBITS,
ERROR, ABORT.x - the x coordinate.y - the y coordinate.width - the width.height - the height.false if the infoflags indicate that the
image is completely loaded; true otherwise.public void waitImageLoaded()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - this should never happen.public boolean isLoadingComplete()
true if loading is complete, and false
otherwise.public boolean isError()