org.jfree.report.i18n

Class DefaultResourceBundleFactory

public class DefaultResourceBundleFactory extends Object implements ResourceBundleFactory

A default implementation of the ResourceBundleFactory, that creates resource bundles using the specified locale.

If not defined otherwise, this implementation uses Locale.getDefault() as Locale.

Author: Thomas Morgner

Constructor Summary
DefaultResourceBundleFactory()
Creates a new DefaultResourceBundleFactory using the system's default locale as factory locale.
Method Summary
ResourceBundlegetResourceBundle(Locale locale, String key)
Creates a resource bundle named by the given key and using the factory's defined locale.

Constructor Detail

DefaultResourceBundleFactory

public DefaultResourceBundleFactory()
Creates a new DefaultResourceBundleFactory using the system's default locale as factory locale.

Method Detail

getResourceBundle

public ResourceBundle getResourceBundle(Locale locale, String key)
Creates a resource bundle named by the given key and using the factory's defined locale.

Parameters: key the name of the resourcebundle, never null.

Returns: the created resource bundle

Throws: NullPointerException if key is null java.util.MissingResourceException if no resource bundle for the specified base name can be found

See Also: ResourceBundle#getBundle(String,Locale)