|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.util.ImageIconCache
public class ImageIconCache
An application-wide per-URL cache of ImageIcons.
This class caches instances of ImageIcon using SoftReference
s. You should therefore avoid permanently caching the returned icons in your own code, because this could pin icons on the heap unnecessarily.
It is suggested to use this cache wherever an ImageIcon is being constructed in code that may be repetitively or iteratively called. In such cases you may simply replace the code pattern 'new ImageIcon' with 'ImageIconCache.get' to prevent any potential memory leaks or performance overhead from excessive icon creation.
Constructor Summary | |
---|---|
ImageIconCache() |
Method Summary | |
---|---|
static javax.swing.ImageIcon |
get(java.net.URL location) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageIconCache()
Method Detail |
---|
public static final javax.swing.ImageIcon get(java.net.URL location)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |