org.springframework.richclient.image
Class ReloadableSizedIconSource

java.lang.Object
  extended by org.springframework.richclient.image.DefaultIconSource
      extended by org.springframework.richclient.image.ReloadableSizedIconSource
All Implemented Interfaces:
IconSource, SizedIconSource

public class ReloadableSizedIconSource
extends DefaultIconSource
implements SizedIconSource

Default implementation of a reloadable sized icon registry. Icons by default are loaded by appending registry's current iconSize name to the iconKey as follows:

 
  
    <iconKey>.<iconSize>
   
  
 

For example:

 
  
    action.edit.copy.small=/images/edit/copy16.gif
   
  
 

Author:
Keith Donald

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.richclient.image.DefaultIconSource
DefaultIconSource.IconCache
 
Field Summary
 
Fields inherited from class org.springframework.richclient.image.DefaultIconSource
logger
 
Constructor Summary
ReloadableSizedIconSource(IconSize iconSize, ImageSource iconResources)
          Create a sized icon registry with icons of a specified size and icon resources to be loaded from the specified image source.
 
Method Summary
protected  String doProcessImageKeyBeforeLookup(String key)
           
 void reload(IconSize size)
          Reload all icons in this registry with the provided IconSize.
 
Methods inherited from class org.springframework.richclient.image.DefaultIconSource
cache, clear, getIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.richclient.image.IconSource
getIcon
 

Constructor Detail

ReloadableSizedIconSource

public ReloadableSizedIconSource(IconSize iconSize,
                                 ImageSource iconResources)
Create a sized icon registry with icons of a specified size and icon resources to be loaded from the specified image source.

Parameters:
iconSize - the size of icons in this registry
iconResources - The image icon source
Method Detail

reload

public void reload(IconSize size)
Description copied from interface: SizedIconSource
Reload all icons in this registry with the provided IconSize.

Specified by:
reload in interface SizedIconSource
Parameters:
size - The icon size.

doProcessImageKeyBeforeLookup

protected String doProcessImageKeyBeforeLookup(String key)
Overrides:
doProcessImageKeyBeforeLookup in class DefaultIconSource


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.