Changeset 5916


Ignore:
Timestamp:
2003-11-20T11:21:01+13:00 (20 years ago)
Author:
jmt12
Message:

The getImage method can now be called with a boolean to indicate if the process should block until the image is completed - one way or the other

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r5890 r5916  
    555555     */
    556556    static public ImageIcon getImage(String filename) {
     557    return getImage(filename, false);
     558    }
     559
     560    static public ImageIcon getImage(String filename, boolean wait_until_complete) {
    557561    ImageIcon image = null;
    558562    try {
     
    564568    if(image == null) {
    565569        image = ERROR_ICON;
     570    }
     571
     572    if(wait_until_complete) {
     573        int load_status;
     574        do {
     575        load_status = image.getImageLoadStatus();
     576        }
     577        while(load_status != MediaTracker.ABORTED && load_status != MediaTracker.ERRORED && load_status != MediaTracker.COMPLETE);
    566578    }
    567579    return image;
Note: See TracChangeset for help on using the changeset viewer.