Changeset 9981


Ignore:
Timestamp:
2005-05-30T10:48:28+12:00 (19 years ago)
Author:
mdewsnip
Message:

The getImage function no longer tries to load images language-specifically, as this was never used (and probably never should be).

File:
1 edited

Legend:

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

    r9942 r9981  
    466466    }
    467467
    468     static public ImageIcon getImage(String filename, boolean wait_until_complete) {
    469     ImageIcon image = null;
    470     try {
    471         image = new ImageIcon(base.getResource("/images/" + Dictionary.get("Version") + "/" + filename));
    472     }
    473     catch(NullPointerException exception) {
    474         image = new ImageIcon(base.getResource("/images/" + filename));
    475     }
    476     if(image == null) {
     468    static public ImageIcon getImage(String filename, boolean wait_until_complete)
     469    {
     470    ImageIcon image = new ImageIcon(base.getResource("/images/" + filename));
     471    if (image == null) {
    477472        image = ERROR_ICON;
    478473    }
    479474
    480     if(wait_until_complete) {
     475    if (wait_until_complete) {
    481476        int load_status;
    482477        do {
    483478        load_status = image.getImageLoadStatus();
    484479        }
    485         while(load_status != MediaTracker.ABORTED && load_status != MediaTracker.ERRORED && load_status != MediaTracker.COMPLETE);
    486     }
     480        while (load_status != MediaTracker.ABORTED && load_status != MediaTracker.ERRORED && load_status != MediaTracker.COMPLETE);
     481    }
     482
    487483    return image;
    488484    }
Note: See TracChangeset for help on using the changeset viewer.