diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-01-23 12:10:14 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-01-23 12:10:14 +0100 |
| commit | caabd3cba2ad9d454e119c4b241de9632b61cd43 (patch) | |
| tree | 5a73ba7894b2c62bf27ec759b290d539a63dc438 /src/main/java/com/c2kernel/gui/ImageLoader.java | |
| parent | bd88a6202439a9b4e10ca0cc79aca71f118ab0da (diff) | |
Changes to support the new ResourceLoader. Refs #149
Diffstat (limited to 'src/main/java/com/c2kernel/gui/ImageLoader.java')
| -rw-r--r-- | src/main/java/com/c2kernel/gui/ImageLoader.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/com/c2kernel/gui/ImageLoader.java b/src/main/java/com/c2kernel/gui/ImageLoader.java index 816aab7..4037f61 100644 --- a/src/main/java/com/c2kernel/gui/ImageLoader.java +++ b/src/main/java/com/c2kernel/gui/ImageLoader.java @@ -8,8 +8,9 @@ import java.util.Hashtable; import javax.swing.ImageIcon;
import com.c2kernel.common.ObjectNotFoundException;
+import com.c2kernel.process.Gateway;
+import com.c2kernel.process.resource.Resource;
import com.c2kernel.utils.Logger;
-import com.c2kernel.utils.Resource;
public class ImageLoader {
@@ -25,7 +26,7 @@ public class ImageLoader { */
static public ImageIcon findImage(String resName) {
try {
- for (String ns : Resource.getModuleBaseURLs().keySet()) {
+ for (String ns : Gateway.getResource().getModuleBaseURLs().keySet()) {
try {
return getImage(ns, resName);
} catch (ObjectNotFoundException ex) { }
@@ -51,11 +52,11 @@ public class ImageLoader { URL imgLocation = null;
if (ns == null)
try {
- imgLocation = Resource.getKernelResourceURL("images/"+resName);
+ imgLocation = Gateway.getResource().getKernelResourceURL("images/"+resName);
} catch (MalformedURLException ex) { }
else
try {
- imgLocation = Resource.getModuleResourceURL(ns, "images/"+resName);
+ imgLocation = Gateway.getResource().getModuleResourceURL(ns, "images/"+resName);
} catch (MalformedURLException ex) { }
if (imgLocation!= null) {
|
