org.keridwen.core.i18n
Interface DictionaryHelper

All Known Implementing Classes:
DefaultDictionaryHelper

public interface DictionaryHelper

This interface provides methods to directly access the correct types of data from a dictionary entry key.


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 formatter)
          Sets the string formatter of the dictionary helper.
 void setLocale(Locale locale)
          Sets the locale of the dictionary helper.
 

Method Detail

setLocale

void setLocale(Locale locale)
Sets the locale of the dictionary helper.

Parameters:
locale - the locale to set

getCurrentLocale

Locale getCurrentLocale()
Gets the locale currently used by the helper.

Returns:
the locale currently used

loadResourceBundle

void loadResourceBundle(String baseName)
Loads the resource bundle file at the given path with the given base name.

Parameters:
baseName - the base name of the resource bundle file (without the language extension)

setFormatter

void setFormatter(Formatter formatter)
Sets the string formatter of the dictionary helper.

Parameters:
formatter - the string formatter of the helper

getString

String getString(String key)
Gets the localized string associated with the dictionary entry.

Returns:
the localized string

getString

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.

Returns:
the localized string completed by the arguments

getImage

Image getImage(String key)
Gets the image associated with the dictionary entry

Returns:
the image associated with the dictionary entry

getIcon

Icon getIcon(String key)
Gets the icon associated with the dictionary entry

Returns:
the icon associated with the dictionary entry

getColor

Color getColor(String key)
Gets the color associated with the dictionary entry

Returns:
the color associated with the dictionary entry

getKeyStroke

KeyStroke getKeyStroke(String key)
Gets the key stroke associated with the dictionary entry

Returns:
the key stroke associated with the dictionary entry

getMnemonic

int getMnemonic(String key)
Gets the integer mnemonic associated with the dictionary entry

Returns:
the integer mnemonic associated with the dictionary entry

getDate

Date getDate(String key)
Gets the date associated with the dictionary entry

Returns:
the date associated with the dictionary entry

getFont

Font getFont(String key)
Gets the font associated with the dictionary entry

Returns:
the font associated with the dictionary entry


Copyright © 2011-2013 Artenum. All Rights Reserved.