|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjsky.util.ResourceMap
public final class ResourceMap
A ResourceMap provdes a map of resources such that frequently used resources, such as images and icons can be reused.
Currently, this is a simple HashMap, but could
be evolved to use weak references.
Currently only Icon special routines are implemented.
| Constructor Summary | |
|---|---|
ResourceMap()
Create a new ResourceMap. |
|
ResourceMap(int capacity)
Create a new ResourceMap with a start up capacity. |
|
| Method Summary | |
|---|---|
javax.swing.Icon |
getIcon(java.lang.String iconName)
Checks and returns a cached Icon. |
void |
storeIcon(java.lang.String iconName,
javax.swing.Icon icon)
Stores an Icon with the given resourceName. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceMap()
public ResourceMap(int capacity)
| Method Detail |
|---|
public javax.swing.Icon getIcon(java.lang.String iconName)
Icon.
Icon or null if not present.
public void storeIcon(java.lang.String iconName,
javax.swing.Icon icon)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||