org.psychomad.psycholib.resources
Class Resources

java.lang.Object
  extended by org.psychomad.psycholib.resources.Resources

public class Resources
extends java.lang.Object

This class allow to use the resources files.


Constructor Summary
Resources()
           
 
Method Summary
static int getInt(java.lang.String key)
          Returns the int which corresponds to the given key.
static java.lang.Integer getMnemonic(java.lang.String key)
          Retreive, from the resources file, the mnemonic associated with the key pass in arg.
static java.lang.String getString(java.lang.String key)
          Return the string property which corresponds to the given key.
static java.lang.String getStringNoWarning(java.lang.String key)
          Return the string property which corresponds to the given key.
static void updateLanguage(java.util.Locale language)
          Allow to change of language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resources

public Resources()
Method Detail

getString

public static java.lang.String getString(java.lang.String key)
                                  throws java.util.MissingResourceException
Return the string property which corresponds to the given key.

Parameters:
key - the string key
Returns:
the string property which corresponds to the given key
Throws:
java.util.MissingResourceException

getStringNoWarning

public static java.lang.String getStringNoWarning(java.lang.String key)
Return the string property which corresponds to the given key.

Parameters:
key - the string key
Returns:
the string property which corresponds to the given key

getInt

public static int getInt(java.lang.String key)
                  throws java.util.MissingResourceException,
                         java.lang.NumberFormatException
Returns the int which corresponds to the given key.

Parameters:
key - the string key
Returns:
the int which corresponds to the given key
Throws:
java.util.MissingResourceException
java.lang.NumberFormatException

updateLanguage

public static void updateLanguage(java.util.Locale language)
Allow to change of language.

Parameters:
language - the new language to use in the application

getMnemonic

public static java.lang.Integer getMnemonic(java.lang.String key)
Retreive, from the resources file, the mnemonic associated with the key pass in arg.

Parameters:
key - the key used for retreiving the mnemonic
Returns:
the Integer corresponding to the mnemonic of the key or null if none defined.


Copyright 2006 null. All Rights Reserved.