com.townleyenterprises.common
Interface ResourceProvider

All Known Implementing Classes:
ResourceLoader, ResourceManager

public interface ResourceProvider

This interface defines methods for retrieving resources from various locations. This interface is intended to be expanded with a variety of other resource types.

Version:
$Id: ResourceProvider.java,v 1.1 2004/07/29 18:32:04 atownley Exp $
Author:
Andrew S. Townley

Method Summary
 javax.swing.ImageIcon getIcon(java.lang.String key)
          This method is used to retrieve the specified image icon for the default locale.
 javax.swing.ImageIcon getIcon(java.lang.String key, java.util.Locale locale)
          This method is used to retrieve the specified image icon for the specified locale.
 java.util.Collection getKeys()
          This method returns the collection of keys for the resource provider.
 java.lang.String getString(java.lang.String key)
          This method is used to find a given resource string based on the default locale.
 java.lang.String getString(java.lang.String key, java.util.Locale locale)
          This method is used to find a given resource string based on the specified locale.
 

Method Detail

getKeys

public java.util.Collection getKeys()
This method returns the collection of keys for the resource provider.


getString

public java.lang.String getString(java.lang.String key)
This method is used to find a given resource string based on the default locale.

Parameters:
key - the resource string key
Returns:
the string for the key

getIcon

public javax.swing.ImageIcon getIcon(java.lang.String key)
This method is used to retrieve the specified image icon for the default locale.

Parameters:
key - the key (usually the name) of the icon
Returns:
the appropriate ImageIcon

getString

public java.lang.String getString(java.lang.String key,
                                  java.util.Locale locale)
This method is used to find a given resource string based on the specified locale.

Parameters:
key - the resource string key
locale - the locale
Returns:
the string for the key

getIcon

public javax.swing.ImageIcon getIcon(java.lang.String key,
                                     java.util.Locale locale)
This method is used to retrieve the specified image icon for the specified locale.

Parameters:
key - the key (usually the name) of the icon
locale - the locale
Returns:
the appropriate ImageIcon


Copyright © 2002-2004, Andrew S. Townley and Townley Enterprises. All Rights Reserved.
This project is hosted on http://te-code.sourceforge.net.