Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.util
Class ImageIconCache

java.lang.Object
  extended by oracle.javatools.util.ImageIconCache


public class ImageIconCache
extends java.lang.Object

An application-wide per-URL cache of ImageIcons.

This class caches instances of ImageIcon using SoftReferences. 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.

Since:
11.1.2.0.0 (Sherman)

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

ImageIconCache

public ImageIconCache()

Method Detail

get

public static final javax.swing.ImageIcon get(java.net.URL location)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.