Save This Page
Home » jcommon-1.0.13 » org.jfree.util » [javadoc | source]
org.jfree.util
public class: WaitingImageObserver [javadoc | source]
java.lang.Object
   org.jfree.util.WaitingImageObserver

All Implemented Interfaces:
    Cloneable, Serializable, ImageObserver

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.
Field Summary
static final  long serialVersionUID    For serialization. 
Constructor:
 public WaitingImageObserver(Image image) 
    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).
Method from org.jfree.util.WaitingImageObserver Summary:
clone,   imageUpdate,   isError,   isLoadingComplete,   waitImageLoaded
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.util.WaitingImageObserver Detail:
 public Object clone() throws CloneNotSupportedException 
Deprecated! cloning - may lock down the observer

    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. The observer waits until either all data is loaded or AWT signals that the image cannot be loaded.
 public boolean isError() 
    Returns true if there is an error condition, and false otherwise.
 public boolean isLoadingComplete() 
 public synchronized  void waitImageLoaded() 
    The workerthread. Simply draws the image to a BufferedImage's Graphics-Object and waits for the AWT to load the image.