| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.util.ResourcePool
public class ResourcePool
A utility class for pools of resources, in particular for loading and caching resource objects.
| Nested Class Summary | |
|---|---|
static interface | 
ResourcePool.ResourceLoader
A ResourcePool.ResourceLoader object should be able to load a particular type of resource files from Resources, optionally using parameters passed on via the param array  | 
| Field Summary | |
|---|---|
private  ResourcePool.ResourceLoader | 
loader
 | 
private  Map<String,Object> | 
resourceCache
 | 
private  List<Resources> | 
resourcesList
 | 
| Constructor Summary | |
|---|---|
ResourcePool()
Create a new ResourcePool  | 
|
ResourcePool(ResourcePool.ResourceLoader loader)
Create a new ResourcePool with defined ResourceLoader  | 
|
| Method Summary | |
|---|---|
 void | 
addResourceDirectory(String resourceDir)
Adds the specified directory to the (front of the) list of resource directories to be searched When some resource is actually present in more than one directory in the list, the version from the directory that was added latest will take preference.  | 
private  Resources | 
findResources(String resourceDir)
 | 
 Object | 
getResource(String resourceName)
Tries to get a resource with the specified name , without specifying properties  | 
 Object | 
getResource(String resourceName,
            Object[] properties)
 | 
 void | 
setResourceLoader(ResourcePool.ResourceLoader loader)
Defines the ResourcePool.ResourceLoader object that will be used for loading resource files.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private List<Resources> resourcesList
private Map<String,Object> resourceCache
private ResourcePool.ResourceLoader loader
| Constructor Detail | 
|---|
public ResourcePool()
public ResourcePool(ResourcePool.ResourceLoader loader)
| Method Detail | 
|---|
public void setResourceLoader(ResourcePool.ResourceLoader loader)
public void addResourceDirectory(String resourceDir)
private Resources findResources(String resourceDir)
public Object getResource(String resourceName,
                          Object[] properties)
                   throws IOException
IOException
public Object getResource(String resourceName)
                   throws IOException
IOException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||