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

Variable Index

 o TT_COVER
Cover test type.
 o TT_MINIMUM
An example:
 'Sample' -> 'S'
 
 o TT_TRANSLATE
An example:
 'Sample' -> 'Sample______X' or '{Sample}' or 'SAMPLE' or 'SaMpLe' or 'Sämplé' or any combination of these.

Constructor Index

 o TestDictionary()

Method Index

 o getAlternateCase()
This option is used only when the active language uses an European (i.e.
 o getDiacritic()
This option is used only when the active language uses the Latin script.

An example:

 'Sample' -> 'Sämplé'
 
 o getEnclose()
An example:
 'Sample' -> '{Sample}'
 
 o getExpand()
Gets the expand option.
 o getExpandChar()
Gets the test language.
 o getFrom11To20()
Gets the test language.
 o getFrom1To5()
Gets the test language.
 o getFrom21To30()
Gets the test language.
 o getFrom31To50()
Gets the test language.
 o getFrom6To10()
Gets the test language.
 o getLanguageCount()
Gets the amount of the languages in the dictionary.
 o getLanguageData(int)
Gets the specified language.
 o getLastChar()
Gets the test language.
 o getOver50()
Gets the test language.
 o getReductionChar()
Gets the reduction string that is used in the minimum test.
 o getReplaceChar()
Gets the test language.
 o getTestLanguage()
Gets the test language.
 o getTestLocale()
Gets the locale of the test languages.
 o getTestType()
Gets the test type.
 o getUpperCase()
This option is used only when the active language uses an European (i.e.
 o setAlternateCase(boolean)
 o setDiacritic(boolean)
 o setEnclose(boolean)
An example:
 'Sample' -> '{Sample}'
 
 o setExpand(boolean)
Sets the expand option.
 o setExpandChar(char)
Sets the test language.
 o setFrom11To20(int)
Sets the test language.
 o setFrom1To5(int)
Sets the test language.
 o setFrom21To30(int)
Sets the test language.
 o setFrom31To50(int)
Sets the test language.
 o setFrom6To10(int)
Sets the test language.
 o setLastChar(char)
Sets the test language.
 o setOver50(int)
Sets the test language.
 o setReductionChar(String)
Sets the reduction string that is used in the minimum test.
 o setReplaceChar(char)
Sets the test language.
 o setTestLanguage(String)
Sets the test language.
 o setTestType(int)
Sets the test type.
 o setUpperCase(boolean)
 o translateArabic(String)
Generates an Arabic test string.
 o translateCyrillic(String)
Generates a Cyrillic test string.
 o translateGreek(String)
Generates a Greek test string.
 o translateHebrew(String)
Generates a Hebrew test string.
 o translateJapanese(String)
Generates a Japanese test string.
 o translateKorean(String)
Generates a Korean test string.
 o translateLatin(String)
Generates a Latin test string.
 o translateSimplifiedChinese(String)
Generates a Simplified Chinese test string.
 o translateString(String, String, String)
Returns the translation of the context sensitive native string in the current language.
 o translateTraditionalChinese(String)
Generates a Traditional Chinese test string.

Variables

 o 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
 o TT_MINIMUM
 public static final int TT_MINIMUM
An example:
 'Sample' -> 'S'
 

 o 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.
 

Constructors

 o TestDictionary
 public TestDictionary()

Methods

 o translateJapanese
 protected String translateJapanese(String str)
Generates a Japanese test string.

 o translateKorean
 protected String translateKorean(String str)
Generates a Korean test string.

 o translateSimplifiedChinese
 protected String translateSimplifiedChinese(String str)
Generates a Simplified Chinese test string.

 o translateTraditionalChinese
 protected String translateTraditionalChinese(String str)
Generates a Traditional Chinese test string.

 o translateArabic
 protected String translateArabic(String str)
Generates an Arabic test string.

 o translateHebrew
 protected String translateHebrew(String str)
Generates a Hebrew test string.

 o translateCyrillic
 protected String translateCyrillic(String str)
Generates a Cyrillic test string.

 o translateGreek
 protected String translateGreek(String str)
Generates a Greek test string.

 o translateLatin
 protected String translateLatin(String str)
Generates a Latin test string.

 o getTestLocale
 protected Locale getTestLocale()
Gets the locale of the test languages.

 o 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
 o getLanguageCount
 public int getLanguageCount()
Gets the amount of the languages in the dictionary.

Overrides:
getLanguageCount in class Dictionary
 o getLanguageData
 public Language getLanguageData(int index)
Gets the specified language.

Overrides:
getLanguageData in class Dictionary
 o getTestType
 public int getTestType()
Gets the test type.

See Also:
TT_COVER, TT_MINIMUM, TT_TRANSLATE, getTestLanguage
 o setTestType
 public void setTestType(int value)
Sets the test type.

See Also:
TT_COVER, TT_MINIMUM, TT_TRANSLATE, setTestLanguage
 o getTestLanguage
 public String getTestLanguage()
Gets the test language.

See Also:
getTestType
 o setTestLanguage
 public void setTestLanguage(String value)
Sets the test language.

See Also:
setTestType
 o getReductionChar
 public String getReductionChar()
Gets the reduction string that is used in the minimum test.

See Also:
getTestType, TT_MINIMUM
 o setReductionChar
 public void setReductionChar(String value)
Sets the reduction string that is used in the minimum test.

See Also:
setTestType, TT_MINIMUM
 o getReplaceChar
 public char getReplaceChar()
Gets the test language.

 o setReplaceChar
 public void setReplaceChar(char value)
Sets the test language.

 o getExpandChar
 public char getExpandChar()
Gets the test language.

 o setExpandChar
 public void setExpandChar(char value)
Sets the test language.

 o getLastChar
 public char getLastChar()
Gets the test language.

 o setLastChar
 public void setLastChar(char value)
Sets the test language.

 o getFrom1To5
 public int getFrom1To5()
Gets the test language.

 o setFrom1To5
 public void setFrom1To5(int value)
Sets the test language.

 o getFrom6To10
 public int getFrom6To10()
Gets the test language.

 o setFrom6To10
 public void setFrom6To10(int value)
Sets the test language.

 o getFrom11To20
 public int getFrom11To20()
Gets the test language.

 o setFrom11To20
 public void setFrom11To20(int value)
Sets the test language.

 o getFrom21To30
 public int getFrom21To30()
Gets the test language.

 o setFrom21To30
 public void setFrom21To30(int value)
Sets the test language.

 o getFrom31To50
 public int getFrom31To50()
Gets the test language.

 o setFrom31To50
 public void setFrom31To50(int value)
Sets the test language.

 o getOver50
 public int getOver50()
Gets the test language.

 o setOver50
 public void setOver50(int value)
Sets the test language.

 o 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
 o 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
 o getEnclose
 public boolean getEnclose()
An example:
 'Sample' -> '{Sample}'
 

 o setEnclose
 public void setEnclose(boolean value)
An example:
 'Sample' -> '{Sample}'
 

 o 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'
 

 o setAlternateCase
 public void setAlternateCase(boolean value)
 o 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'
 

 o setUpperCase
 public void setUpperCase(boolean value)
 o getDiacritic
 public boolean getDiacritic()
This option is used only when the active language uses the Latin script.

An example:

 'Sample' -> 'Sämplé'
 

 o setDiacritic
 public void setDiacritic(boolean value)

All Packages  Class Hierarchy  This Package  Previous  Next  Index