uic.model
Interface IconFactory.Repository

All Known Implementing Classes:
IconFactory.IconRepository, IconFactory.ZipFileRepository
Enclosing interface:
IconFactory

public static interface IconFactory.Repository

This interface is used to query any repository for icons it might have to be used by the IconFactory. The IconFactory provides a limited set of Resources, where a resource is a directory with icons in it in a certain format specific to that resource.

If the default resources will not find your images it is possible to write a new resource and register it with the IconFactory for usage.


Method Summary
 InputStream getImage(String name, int size)
          Returns the input stream of the requested image, or null when none found.
 

Method Detail

getImage

public InputStream getImage(String name,
                            int size)
                     throws IOException
Returns the input stream of the requested image, or null when none found. All registered repositories will be asked to provide an image untill one returns a parsable image.

Parameters:
name - the name of the image, this is the name as specified in the getIcon method which again is the same name as registered in an action.
size - the requested size. If the wanted size is not found the returned size will be used to scale to the wanted size.
Returns:
an InputStream for the image, or null if nothing found.
Throws:
IOException


Copyright © 2002,2003 Thomas Zander Available under the Free Apache licence