All Packages Class Hierarchy This Package Previous Next Index
Class multilizer.TestDictionary
java.lang.Object
|
+----multilizer.Dictionary
|
+----multilizer.TestDictionary
- public class TestDictionary
- extends Dictionary
A dictionary component that contains two test languages. The first one is
generated from the native language using the test algorithm. The second one
is the same as the native language. The TestDictionary is usefull in the desing
phase to test how the user interface works with different languages.
Set the
TestType
property to specifies the test type. This determines the algorithm that is
used to generate the test translation.
By default the test languages emulate the default language of the system.
You can change this to any language by settings the
TestLanguage
property.
The dictionary contains several properties that control how the test translations
are generated. The main options are specified by the
Expand,
Enclose,
UpperCase,
AlternateCase, and
Diacritic properties.
An example:
TestDictionary dictionary = new TestDictionary();
dictionary.setTestType(TestDictionary.TT_TRANSLATE_C);
dictionary.setExpand(true);
dictionary.setEnclose(true);
dictionary.open();
- See Also:
- BinaryDictionary, TextDictionary, ResourceDictionary, ServerDictionary, DatabaseDictionary
-
TT_COVER
- Cover test type.
-
TT_MINIMUM
- An example:
'Sample' -> 'S'
-
TT_TRANSLATE
- An example:
'Sample' -> 'Sample______X' or '{Sample}' or 'SAMPLE' or 'SaMpLe' or 'Sämplé' or any combination of these.
-
TestDictionary()
-
-
getAlternateCase()
- This option is used only when the active language uses an European (i.e.
-
getDiacritic()
- This option is used only when the active language uses the Latin script.
An example:
'Sample' -> 'Sämplé'
-
getEnclose()
- An example:
'Sample' -> '{Sample}'
-
getExpand()
- Gets the expand option.
-
getExpandChar()
- Gets the test language.
-
getFrom11To20()
- Gets the test language.
-
getFrom1To5()
- Gets the test language.
-
getFrom21To30()
- Gets the test language.
-
getFrom31To50()
- Gets the test language.
-
getFrom6To10()
- Gets the test language.
-
getLanguageCount()
- Gets the amount of the languages in the dictionary.
-
getLanguageData(int)
- Gets the specified language.
-
getLastChar()
- Gets the test language.
-
getOver50()
- Gets the test language.
-
getReductionChar()
- Gets the reduction string that is used in the minimum test.
-
getReplaceChar()
- Gets the test language.
-
getTestLanguage()
- Gets the test language.
-
getTestLocale()
- Gets the locale of the test languages.
-
getTestType()
- Gets the test type.
-
getUpperCase()
- This option is used only when the active language uses an European (i.e.
-
setAlternateCase(boolean)
-
-
setDiacritic(boolean)
-
-
setEnclose(boolean)
- An example:
'Sample' -> '{Sample}'
-
setExpand(boolean)
- Sets the expand option.
-
setExpandChar(char)
- Sets the test language.
-
setFrom11To20(int)
- Sets the test language.
-
setFrom1To5(int)
- Sets the test language.
-
setFrom21To30(int)
- Sets the test language.
-
setFrom31To50(int)
- Sets the test language.
-
setFrom6To10(int)
- Sets the test language.
-
setLastChar(char)
- Sets the test language.
-
setOver50(int)
- Sets the test language.
-
setReductionChar(String)
- Sets the reduction string that is used in the minimum test.
-
setReplaceChar(char)
- Sets the test language.
-
setTestLanguage(String)
- Sets the test language.
-
setTestType(int)
- Sets the test type.
-
setUpperCase(boolean)
-
-
translateArabic(String)
- Generates an Arabic test string.
-
translateCyrillic(String)
- Generates a Cyrillic test string.
-
translateGreek(String)
- Generates a Greek test string.
-
translateHebrew(String)
- Generates a Hebrew test string.
-
translateJapanese(String)
- Generates a Japanese test string.
-
translateKorean(String)
- Generates a Korean test string.
-
translateLatin(String)
- Generates a Latin test string.
-
translateSimplifiedChinese(String)
- Generates a Simplified Chinese test string.
-
translateString(String, String, String)
- Returns the translation of the context sensitive native string in the current language.
-
translateTraditionalChinese(String)
- Generates a Traditional Chinese test string.
TT_COVER
public static final int TT_COVER
- Cover test type. Every character of the native string is replaced with the
character specified by the
ReplaceChar
property.
An example:
'Sample' -> '......'
- See Also:
- setReplaceChar
TT_MINIMUM
public static final int TT_MINIMUM
- An example:
'Sample' -> 'S'
TT_TRANSLATE
public static final int TT_TRANSLATE
- An example:
'Sample' -> 'Sample______X' or '{Sample}' or 'SAMPLE' or 'SaMpLe' or 'Sämplé' or any combination of these.
TestDictionary
public TestDictionary()
translateJapanese
protected String translateJapanese(String str)
- Generates a Japanese test string.
translateKorean
protected String translateKorean(String str)
- Generates a Korean test string.
translateSimplifiedChinese
protected String translateSimplifiedChinese(String str)
- Generates a Simplified Chinese test string.
translateTraditionalChinese
protected String translateTraditionalChinese(String str)
- Generates a Traditional Chinese test string.
translateArabic
protected String translateArabic(String str)
- Generates an Arabic test string.
translateHebrew
protected String translateHebrew(String str)
- Generates a Hebrew test string.
translateCyrillic
protected String translateCyrillic(String str)
- Generates a Cyrillic test string.
translateGreek
protected String translateGreek(String str)
- Generates a Greek test string.
translateLatin
protected String translateLatin(String str)
- Generates a Latin test string.
getTestLocale
protected Locale getTestLocale()
- Gets the locale of the test languages.
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
getLanguageCount
public int getLanguageCount()
- Gets the amount of the languages in the dictionary.
- Overrides:
- getLanguageCount in class Dictionary
getLanguageData
public Language getLanguageData(int index)
- Gets the specified language.
- Overrides:
- getLanguageData in class Dictionary
getTestType
public int getTestType()
- Gets the test type.
- See Also:
- TT_COVER, TT_MINIMUM, TT_TRANSLATE, getTestLanguage
setTestType
public void setTestType(int value)
- Sets the test type.
- See Also:
- TT_COVER, TT_MINIMUM, TT_TRANSLATE, setTestLanguage
getTestLanguage
public String getTestLanguage()
- Gets the test language.
- See Also:
- getTestType
setTestLanguage
public void setTestLanguage(String value)
- Sets the test language.
- See Also:
- setTestType
getReductionChar
public String getReductionChar()
- Gets the reduction string that is used in the minimum test.
- See Also:
- getTestType, TT_MINIMUM
setReductionChar
public void setReductionChar(String value)
- Sets the reduction string that is used in the minimum test.
- See Also:
- setTestType, TT_MINIMUM
getReplaceChar
public char getReplaceChar()
- Gets the test language.
setReplaceChar
public void setReplaceChar(char value)
- Sets the test language.
getExpandChar
public char getExpandChar()
- Gets the test language.
setExpandChar
public void setExpandChar(char value)
- Sets the test language.
getLastChar
public char getLastChar()
- Gets the test language.
setLastChar
public void setLastChar(char value)
- Sets the test language.
getFrom1To5
public int getFrom1To5()
- Gets the test language.
setFrom1To5
public void setFrom1To5(int value)
- Sets the test language.
getFrom6To10
public int getFrom6To10()
- Gets the test language.
setFrom6To10
public void setFrom6To10(int value)
- Sets the test language.
getFrom11To20
public int getFrom11To20()
- Gets the test language.
setFrom11To20
public void setFrom11To20(int value)
- Sets the test language.
getFrom21To30
public int getFrom21To30()
- Gets the test language.
setFrom21To30
public void setFrom21To30(int value)
- Sets the test language.
getFrom31To50
public int getFrom31To50()
- Gets the test language.
setFrom31To50
public void setFrom31To50(int value)
- Sets the test language.
getOver50
public int getOver50()
- Gets the test language.
setOver50
public void setOver50(int value)
- Sets the test language.
getExpand
public boolean getExpand()
- Gets the expand option. If this is
true
the test string is generated
by expanding the native string.
An example:
'Sample' -> 'Sample______X'
- See Also:
- setExpand, getFrom1To5, getFrom6To10, getFrom11To20, getFrom21To30, getFrom31To50, getOver50
setExpand
public void setExpand(boolean value)
- Sets the expand option. If this is
true
the test string is generated
by expanding the native string.
An example:
'Sample' -> 'Sample______X'
- See Also:
- getExpand, setFrom1To5, setFrom6To10, setFrom11To20, setFrom21To30, setFrom31To50, setOver50
getEnclose
public boolean getEnclose()
- An example:
'Sample' -> '{Sample}'
setEnclose
public void setEnclose(boolean value)
- An example:
'Sample' -> '{Sample}'
getAlternateCase
public boolean getAlternateCase()
- This option is used only when the active language uses an European (i.e. Latin, Cyrillic, or Greek) script.
An example:
'Sample' -> 'SaMpLe'
setAlternateCase
public void setAlternateCase(boolean value)
getUpperCase
public boolean getUpperCase()
- This option is used only when the active language uses an European (i.e. Latin, Cyrillic, or Greek) script.
An example:
'Sample' -> 'SAMPLE'
setUpperCase
public void setUpperCase(boolean value)
getDiacritic
public boolean getDiacritic()
- This option is used only when the active language uses the Latin script.
An example:
'Sample' -> 'Sämplé'
setDiacritic
public void setDiacritic(boolean value)
All Packages Class Hierarchy This Package Previous Next Index