Changeset 9981
- Timestamp:
- 2005-05-30T10:48:28+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r9942 r9981 466 466 } 467 467 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) { 477 472 image = ERROR_ICON; 478 473 } 479 474 480 if (wait_until_complete) {475 if (wait_until_complete) { 481 476 int load_status; 482 477 do { 483 478 load_status = image.getImageLoadStatus(); 484 479 } 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 487 483 return image; 488 484 }
Note:
See TracChangeset
for help on using the changeset viewer.