org.keridwen.core.i18n
Interface Dictionary<HelperType extends DictionaryHelper>


public interface Dictionary<HelperType extends DictionaryHelper>

A dictionary contains the localized value corresponding to a given key. This class provides methods to directly access the correct types of data.


Method Summary
 Color getColor()
          Gets the color associated with the dictionary entry
 Date getDate()
          Gets the date associated with the dictionary entry
 Locale getDefaultLocale()
          Gets the default locale of the dictionary.
 String getDefaultString()
          Gets the localized string associated with the dictionary entry for the default locale.
 Class<?> getEntryClass()
          Gets the class associated with the entry type.
 EntryType getEntryType()
          Gets the dictionary entry type.
 Font getFont()
          Gets the font associated with the dictionary entry
 HelperType getHelper()
          Gets the helper of the dictionary.
 Icon getIcon()
          Gets the icon associated with the dictionary entry
 Image getImage()
          Gets the image associated with the dictionary entry
 String getKey()
          Gets the key of the dictionary entry.
 KeyStroke getKeyStroke()
          Gets the key stroke associated with the dictionary entry
 int getMnemonic()
          Gets the integer mnemonic associated with the dictionary entry
 String getResourceBundleBaseName()
          Gets the resource bundle base name for other languages.
 String getString()
          Gets the localized string associated with the dictionary entry.
 String getString(Object... objects)
          Gets the localized string associated with the dictionary entry and replaces the arguments in the string using the printf syntax.
 boolean isEntryOfType(EntryType typeToCheck)
          Checks if the dictionary entry if of the same type than the provided entry type.
 

Method Detail

getKey

String getKey()
Gets the key of the dictionary entry.

Returns:
the dictionary entry key

getDefaultString

String getDefaultString()
Gets the localized string associated with the dictionary entry for the default locale.

Returns:
the localized string

getString

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

Returns:
the localized string

getString

String getString(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()
Gets the image associated with the dictionary entry

Returns:
the image associated with the dictionary entry

getIcon

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

Returns:
the icon associated with the dictionary entry

getColor

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

Returns:
the color associated with the dictionary entry

getKeyStroke

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

Returns:
the key stroke associated with the dictionary entry

getMnemonic

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

Returns:
the integer mnemonic associated with the dictionary entry

getDate

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

Returns:
the date associated with the dictionary entry

getFont

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

Returns:
the font associated with the dictionary entry

isEntryOfType

boolean isEntryOfType(EntryType typeToCheck)
Checks if the dictionary entry if of the same type than the provided entry type.

Parameters:
typeToCheck - the entry type to compare with
Returns:
true if they are the same

getEntryType

EntryType getEntryType()
Gets the dictionary entry type.

Returns:
the type of the dictionary entry

getEntryClass

Class<?> getEntryClass()
Gets the class associated with the entry type.

Returns:
the class associated with the entry type

getHelper

HelperType getHelper()
Gets the helper of the dictionary.

Returns:
the helper of the dictionary

getDefaultLocale

Locale getDefaultLocale()
Gets the default locale of the dictionary.

Returns:
the default locale

getResourceBundleBaseName

String getResourceBundleBaseName()
Gets the resource bundle base name for other languages.

Returns:
the path and the base name (without the language extensions)


Copyright © 2011-2013 Artenum. All Rights Reserved.