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
An abstract dictionary component that gets translation data from file(s).
- See Also:
- BinaryDictionary, TextDictionary
-
FILE_USAGE_AUTO
-
-
FILE_USAGE_BUNDLE
-
-
FILE_USAGE_SINGLE
-
-
translationStreamListener
-
-
FileDictionary(String)
-
-
addTranslationStreamListener(TranslationStreamListener)
- Adds the specified stream listener to receive translation stream aquire events from this dictionary.
-
contextSortTranslations(int, int)
- Sorts the translation array using contexts.
-
disconnect()
-
-
getActiveBundleName()
-
-
getActiveBundleName(String)
-
-
getActiveFileName()
-
-
getActiveFileName(String)
-
-
getFileUsage()
-
-
getTranslationCount()
- Returns the translation count.
-
getUseBundle()
- Returns true of the dictionary use a bundle of files instead of a single file.
-
languageChanged(boolean, boolean)
- Dictionary calls this method after the current language has been changed.
-
loadLocalTranslation(Container, Vector)
-
-
loadTranslation(Vector, String)
- 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.
-
setFileUsage(int)
-
-
sort(Vector)
- Sorts the translation array.
-
sortTranslations(int, int)
- Sorts the translation array.
-
translateString(String)
- Returns the translation of the native string in the current language.
-
translateString(String, String, String)
- Returns the translation of the context sensitive native string in the current language.
FILE_USAGE_AUTO
public static final int FILE_USAGE_AUTO
FILE_USAGE_SINGLE
public static final int FILE_USAGE_SINGLE
FILE_USAGE_BUNDLE
public static final int FILE_USAGE_BUNDLE
translationStreamListener
protected TranslationStreamListener translationStreamListener
FileDictionary
public FileDictionary(String extension)
getTranslationCount
public int getTranslationCount()
- Returns the translation count.
- Overrides:
- getTranslationCount in class Dictionary
getFileUsage
public int getFileUsage()
setFileUsage
public void setFileUsage(int value)
getUseBundle
protected boolean getUseBundle()
- Returns true of the dictionary use a bundle of files instead of a single file.
getActiveBundleName
protected String getActiveBundleName(String fileName)
getActiveBundleName
protected String getActiveBundleName()
getActiveFileName
protected String getActiveFileName(String fileName)
getActiveFileName
protected String getActiveFileName()
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
translateString
protected String translateString(String str,
String form,
String component)
- Returns the translation of the context sensitive native string in the current language.
- Overrides:
- translateString in class Dictionary
loadLocalTranslation
public void loadLocalTranslation(Container host,
Vector translations)
loadTranslation
protected abstract void loadTranslation(Vector translations,
String fileName)
- Loads the translation data from the file to the array.
languageChanged
protected void languageChanged(boolean languageChanged,
boolean localeChanged)
- Dictionary calls this method after the current language has been changed.
- Overrides:
- languageChanged in class Dictionary
sort
protected void sort(Vector translations)
- Sorts the translation array.
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
contextSortTranslations
protected void contextSortTranslations(int left,
int right)
- Sorts the translation array using contexts.
- 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