org.keridwen.core.i18n
Class DefaultDictionaryHelper

java.lang.Object
  extended by org.keridwen.core.i18n.DefaultDictionaryHelper
All Implemented Interfaces:
DictionaryHelper

public class DefaultDictionaryHelper
extends Object
implements DictionaryHelper

Default implementation of the dictionary helper interface.


Constructor Summary
DefaultDictionaryHelper(Dictionary<?>... aDictionaryEntry)
          Default constructor.
 
Method Summary
 Color getColor(String key)
          Gets the color associated with the dictionary entry
 Locale getCurrentLocale()
          Gets the locale currently used by the helper.
 Date getDate(String key)
          Gets the date associated with the dictionary entry
 Font getFont(String key)
          Gets the font associated with the dictionary entry
 Icon getIcon(String key)
          Gets the icon associated with the dictionary entry
 Image getImage(String key)
          Gets the image associated with the dictionary entry
 KeyStroke getKeyStroke(String key)
          Gets the key stroke associated with the dictionary entry
 int getMnemonic(String key)
          Gets the integer mnemonic associated with the dictionary entry
 String getString(String key)
          Gets the localized string associated with the dictionary entry.
 String getString(String key, Object... objects)
          Gets the localized string associated with the dictionary entry and replaces the arguments in the string using the printf syntax.
 void loadResourceBundle(String baseName)
          Loads the resource bundle file at the given path with the given base name.
 void setFormatter(Formatter formatterToSet)
          Sets the string formatter of the dictionary helper.
 void setLocale(Locale aLocale)
          Sets the locale of the dictionary helper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDictionaryHelper

public DefaultDictionaryHelper(Dictionary<?>... aDictionaryEntry)
Default constructor.

Method Detail

setLocale

public void setLocale(Locale aLocale)
Description copied from interface: DictionaryHelper
Sets the locale of the dictionary helper.

Specified by:
setLocale in interface DictionaryHelper
Parameters:
aLocale - the locale to set

getCurrentLocale

public Locale getCurrentLocale()
Description copied from interface: DictionaryHelper
Gets the locale currently used by the helper.

Specified by:
getCurrentLocale in interface DictionaryHelper
Returns:
the locale currently used

loadResourceBundle

public void loadResourceBundle(String baseName)
Description copied from interface: DictionaryHelper
Loads the resource bundle file at the given path with the given base name.

Specified by:
loadResourceBundle in interface DictionaryHelper
Parameters:
baseName - the base name of the resource bundle file (without the language extension)

setFormatter

public void setFormatter(Formatter formatterToSet)
Description copied from interface: DictionaryHelper
Sets the string formatter of the dictionary helper.

Specified by:
setFormatter in interface DictionaryHelper
Parameters:
formatterToSet - the string formatter of the helper

getString

public String getString(String key)
Description copied from interface: DictionaryHelper
Gets the localized string associated with the dictionary entry.

Specified by:
getString in interface DictionaryHelper
Returns:
the localized string

getString

public String getString(String key,
                        Object... objects)
Description copied from interface: DictionaryHelper
Gets the localized string associated with the dictionary entry and replaces the arguments in the string using the printf syntax.

Specified by:
getString in interface DictionaryHelper
Returns:
the localized string completed by the arguments

getImage

public Image getImage(String key)
Description copied from interface: DictionaryHelper
Gets the image associated with the dictionary entry

Specified by:
getImage in interface DictionaryHelper
Returns:
the image associated with the dictionary entry

getIcon

public Icon getIcon(String key)
Description copied from interface: DictionaryHelper
Gets the icon associated with the dictionary entry

Specified by:
getIcon in interface DictionaryHelper
Returns:
the icon associated with the dictionary entry

getColor

public Color getColor(String key)
Description copied from interface: DictionaryHelper
Gets the color associated with the dictionary entry

Specified by:
getColor in interface DictionaryHelper
Returns:
the color associated with the dictionary entry

getKeyStroke

public KeyStroke getKeyStroke(String key)
Description copied from interface: DictionaryHelper
Gets the key stroke associated with the dictionary entry

Specified by:
getKeyStroke in interface DictionaryHelper
Returns:
the key stroke associated with the dictionary entry

getMnemonic

public int getMnemonic(String key)
Description copied from interface: DictionaryHelper
Gets the integer mnemonic associated with the dictionary entry

Specified by:
getMnemonic in interface DictionaryHelper
Returns:
the integer mnemonic associated with the dictionary entry

getDate

public Date getDate(String key)
Description copied from interface: DictionaryHelper
Gets the date associated with the dictionary entry

Specified by:
getDate in interface DictionaryHelper
Returns:
the date associated with the dictionary entry

getFont

public Font getFont(String key)
Description copied from interface: DictionaryHelper
Gets the font associated with the dictionary entry

Specified by:
getFont in interface DictionaryHelper
Returns:
the font associated with the dictionary entry


Copyright © 2011-2013 Artenum. All Rights Reserved.