nu.zoom.ui.gaderian
Class ResourcesImpl

java.lang.Object
  extended by nu.zoom.ui.gaderian.ResourcesImpl
All Implemented Interfaces:
Resources

public class ResourcesImpl
extends Object
implements Resources

An implementation of resources that scan the class path for all instances of the file "META-INF/org/ops4j/gaderian/module.properties" and collates all properties from all the files found.

Author:
"Johan Maasing" <johan@zoom.nu>

Nested Class Summary
 
Nested classes/interfaces inherited from interface nu.zoom.ui.Resources
Resources.ResourceNotFoundException
 
Constructor Summary
ResourcesImpl()
           
 
Method Summary
 String format(String key, Object... args)
          Get a localized string template and insert values.
 ImageIcon getIcon(String key)
          Get a localized image.
 String getMessage(String key)
          Get a localized string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcesImpl

public ResourcesImpl()
Method Detail

getMessage

public String getMessage(String key)
                  throws Resources.ResourceNotFoundException
Description copied from interface: Resources
Get a localized string.

Specified by:
getMessage in interface Resources
Parameters:
key - The name of the resource string to get.
Returns:
The resource string.
Throws:
Resources.ResourceNotFoundException

format

public String format(String key,
                     Object... args)
              throws Resources.ResourceNotFoundException
Description copied from interface: Resources
Get a localized string template and insert values.

Specified by:
format in interface Resources
Parameters:
key - The name of the resource string to get.
args - The parametrs that are to be inserted into the string template.
Returns:
The string template with values inserted.
Throws:
Resources.ResourceNotFoundException

getIcon

public ImageIcon getIcon(String key)
                  throws Resources.ResourceNotFoundException
Description copied from interface: Resources
Get a localized image.

Specified by:
getIcon in interface Resources
Parameters:
key - The resouce name that points to the image name.
Returns:
The image.
Throws:
Resources.ResourceNotFoundException


Copyright © 2012. All Rights Reserved.