org.springframework.richclient.image
Class DefaultIconSource
java.lang.Object
org.springframework.richclient.image.DefaultIconSource
- All Implemented Interfaces:
- IconSource
- Direct Known Subclasses:
- ReloadableSizedIconSource
public class DefaultIconSource
- extends Object
- implements IconSource
The default implementation of ImageIconRegistry. This implementation caches
all icons using soft references (TODO it just lazy loads them, but it doesn't use SoftReference).
More specifically, cached icons will remain
in memory unless there is a shortage of resources in the system.
- Author:
- Keith Donald
Field Summary |
protected static org.apache.commons.logging.Log |
logger
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.apache.commons.logging.Log logger
DefaultIconSource
public DefaultIconSource()
- Default constructor. Will obtain services dependencies from the ApplicationServices
locator.
DefaultIconSource
public DefaultIconSource(ImageSource images)
- Constructs a icon registry that loads images from the provided source.
- Parameters:
images
- the image source.
getIcon
public Icon getIcon(String key)
- Description copied from interface:
IconSource
- Return an
ImageIcon
using its String
key.
- Specified by:
getIcon
in interface IconSource
- Parameters:
key
- a key for the icon.
- Returns:
- The image icon.
clear
public void clear()
doProcessImageKeyBeforeLookup
protected String doProcessImageKeyBeforeLookup(String key)
cache
protected DefaultIconSource.IconCache cache()
Copyright © 2004-2008 The Spring Framework. All Rights Reserved.