All Packages Class Hierarchy This Package Previous Next Index
Class multilizer.FileDictionary
java.lang.Object
|
+----multilizer.Dictionary
|
+----multilizer.BundleDictionary
|
+----multilizer.FileDictionary
- public abstract class FileDictionary
- extends BundleDictionary
A abstract dictionary component that gets translation data from Multilizer's bundle files
- See Also:
- BinaryDictionary, TextDictionary
-
extension
-
-
translations
- An array that contains the native and current strings of the dictionary.
-
translationStreamListener
-
-
FileDictionary(String)
-
-
addTranslationStreamListener(TranslationStreamListener)
- Adds the specified stream listener to receive translation stream aquire events from this dictionary.
-
disconnect()
-
-
getBundleFileName()
-
-
languageChanged(boolean, boolean)
- Dictionary calls this method after the current language has been changed.
-
loadTranslation()
- Loads the translation data from the file to the array.
-
removeTranslationStreamListener(TranslationStreamListener)
- Removes the stream aquire listener so it no longer receives stream events from this dictionary.
-
sortTranslations(int, int)
- Sorts the translation array.
-
translateString(String)
- Returns the translation of the native string in the current language.
translationStreamListener
protected TranslationStreamListener translationStreamListener
extension
protected String extension
translations
protected transient Vector translations
- An array that contains the native and current strings of the dictionary.
Each item contains a Translation object.
FileDictionary
public FileDictionary(String extension)
getBundleFileName
protected String getBundleFileName()
disconnect
protected void disconnect()
translateString
protected String translateString(String str)
- Returns the translation of the native string in the current language.
- Overrides:
- translateString in class Dictionary
loadTranslation
protected abstract void loadTranslation() throws Exception
- Loads the translation data from the file to the array.
languageChanged
protected void languageChanged(boolean languageChanged,
boolean localeChanged) throws Exception
- Dictionary calls this method after the current language has been changed.
- Overrides:
- languageChanged in class Dictionary
sortTranslations
protected void sortTranslations(int left,
int right)
- Sorts the translation array.
- Parameters:
- left - the index of the first item to be sorted
- right - the index of the last item to be sorted
addTranslationStreamListener
public synchronized void addTranslationStreamListener(TranslationStreamListener l)
- Adds the specified stream listener to receive translation stream aquire events from this dictionary.
There can be only one listener at a time.
- Parameters:
- l - the text dictionary listener
removeTranslationStreamListener
public synchronized void removeTranslationStreamListener(TranslationStreamListener l)
- Removes the stream aquire listener so it no longer receives stream events from this dictionary.
All Packages Class Hierarchy This Package Previous Next Index