| java.lang.Object org.jfree.util.WaitingImageObserver
WaitingImageObserver | public class WaitingImageObserver implements ImageObserver,Serializable,Cloneable(Code) | | This image observer blocks until the image is completely loaded. AWT
defers the loading of images until they are painted on a graphic.
While printing reports it is not very nice, not to know whether a image
was completely loaded, so this observer forces the loading of the image
until a final state (either ALLBITS, ABORT or ERROR) is reached.
author: Thomas Morgner |
Method Summary | |
public Object | clone() Clones this WaitingImageObserver. | public synchronized boolean | imageUpdate(Image img, int infoflags, int x, int y, int width, int height) Callback function used by AWT to inform that more data is available. | public boolean | isError() Returns true if there is an error condition, and false otherwise. | public boolean | isLoadingComplete() | public synchronized void | waitImageLoaded() The workerthread. |
serialVersionUID | final static long serialVersionUID(Code) | | For serialization.
|
WaitingImageObserver | public WaitingImageObserver(Image image)(Code) | | Creates a new ImageObserver for the given Image.
The observer has to be started by an external thread.
Parameters: image - the image to observe (null not permitted). |
imageUpdate | public synchronized boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height)(Code) | | Callback function used by AWT to inform that more data is available. The
observer waits until either all data is loaded or AWT signals that the
image cannot be loaded.
Parameters: img - the image being observed. Parameters: infoflags - the bitwise inclusive OR of the followingflags: WIDTH , HEIGHT ,PROPERTIES , SOMEBITS ,FRAMEBITS , ALLBITS ,ERROR , ABORT . Parameters: x - the x coordinate. Parameters: y - the y coordinate. Parameters: width - the width. Parameters: height - the height. false if the infoflags indicate that theimage is completely loaded; true otherwise. |
isError | public boolean isError()(Code) | | Returns true if there is an error condition, and false otherwise.
A boolean. |
isLoadingComplete | public boolean isLoadingComplete()(Code) | | |
waitImageLoaded | public synchronized void waitImageLoaded()(Code) | | The workerthread. Simply draws the image to a BufferedImage's
Graphics-Object and waits for the AWT to load the image.
|
|
|