java.lang.Object
org.tigris.gef.util.ResourceLoader
- public class ResourceLoader
- extends java.lang.Object
This class manages the resource locations needed within the
application. Already loaded resources are cached. The resources
can be searched in different locations.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_resourceCache
private static java.util.HashMap _resourceCache
_resourceLocations
private static java.util.List _resourceLocations
_resourceExtensions
private static java.util.List _resourceExtensions
ResourceLoader
public ResourceLoader()
lookupIconResource
public static javax.swing.ImageIcon lookupIconResource(java.lang.String resource)
- This method tries to find an ImageIcon for the given name
in all known locations. The file extension of the used image
file can be any of the known extensions.
lookupIconResource
public static javax.swing.ImageIcon lookupIconResource(java.lang.String resource,
java.lang.String desc)
lookupIconResource
public static javax.swing.ImageIcon lookupIconResource(java.lang.String resource,
java.lang.ClassLoader loader)
lookupIconResource
public static javax.swing.ImageIcon lookupIconResource(java.lang.String resource,
java.lang.String desc,
java.lang.ClassLoader loader)
addResourceLocation
public static void addResourceLocation(java.lang.String location)
- This method adds a new location to the list of known locations.
addResourceExtension
public static void addResourceExtension(java.lang.String extension)
- This method adds a new extension to the list of known extensions.
removeResourceLocation
public static void removeResourceLocation(java.lang.String location)
- This method removes a location from the list of known locations.
removeResourceExtension
public static void removeResourceExtension(java.lang.String extension)
- This method removes a extension from the list of known extensions.
containsExtension
public static boolean containsExtension(java.lang.String extension)
containsLocation
public static boolean containsLocation(java.lang.String location)
isInCache
public static boolean isInCache(java.lang.String resource)