From caabd3cba2ad9d454e119c4b241de9632b61cd43 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 23 Jan 2014 12:10:14 +0100 Subject: Changes to support the new ResourceLoader. Refs #149 --- src/main/java/com/c2kernel/gui/ImageLoader.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/c2kernel/gui/ImageLoader.java') 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) { -- cgit v1.2.3