public final class TranslationTable
extends java.lang.Object
implements java.util.Iterator
The iterator interface is implemented to allow access to the translations
using the standard iterator methods (hasNext
, next
, and
remove
).
MODIFIED (MM/DD/YY)
rgurubha 12/14/04 -- #(4029445) Added Java API wrapTranslatedText() for wrapping of
boilerplate text label.
Modifier and Type | Field and Description |
---|---|
protected int[] |
m_charSetArray
Array of character sets in the translation table
|
protected java.util.Vector |
m_langArray
Array of languages in the translation table held in a Vector.
|
Modifier | Constructor and Description |
---|---|
protected |
TranslationTable(JdapiModule mod)
Constructor called by JdapiModule only
|
Modifier and Type | Method and Description |
---|---|
int |
addTranslation(java.lang.String language,
int characterSet)
Adds a translation to the table.
|
void |
deleteTranslation(java.lang.String language)
Deletes a given language translation from the table.
|
int |
getCharacterSet(java.lang.String language)
Returns a language's corresponding character set.
|
java.lang.String |
getCurrentLanguageString()
Returns the Module's current language string.
|
java.lang.String |
getLanguageString(int characterSet)
Returns a character set's corresponding language.
|
JdapiModule |
getModule()
Returns the JdapiModule to which this TranslationTable corresponds.
|
java.lang.String |
getString(java.lang.String language,
int stringID)
Returns a String given its stringID for a specified language.
|
int |
getStringCount()
Returns the number of used strings in the module's string table.
|
java.lang.Class |
getStringObjectClass(int stringID)
Returns the property number for the string and the given stringID
|
int |
getStringObjectType(int stringID)
Returns the object type for the string at the given stringID
|
int |
getStringPropertyNumber(int stringID)
Returns the property number for the string at the given stringID
|
void |
goStart()
Reset the iterator to the start of the language table
|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
boolean |
isStringInUse(int stringID)
Queries whether a given String is in use or not.
|
java.lang.Object |
next()
Gets the next object.
|
void |
remove()
Removes the current translation in the iterator using deleteTranslation.
|
void |
setString(java.lang.String language,
int stringID,
java.lang.String str)
Sets a String given its stringID and language
|
void |
wrapTranslatedText(Graphics pd2fgra,
java.lang.String language)
#(4029445) Jdapi for wrapping of boilerplate text needed.
|
protected java.util.Vector m_langArray
protected int[] m_charSetArray
protected TranslationTable(JdapiModule mod)
public JdapiModule getModule()
public int getCharacterSet(java.lang.String language)
language
- the Oracle-defined name of the language.JdapiIllegalStateException
- if the langauge is not in the table.public java.lang.String getLanguageString(int characterSet)
characterSet
- the Oracle-defined name of the character set.public java.lang.String getCurrentLanguageString()
public int addTranslation(java.lang.String language, int characterSet)
language
- the Oracle-defined name of the language.characterSet
- the Oracle-defined name of the character set.public void deleteTranslation(java.lang.String language)
language
- the Oracle-defined name of the language.JdapiIllegalStateException
- if the langauge is not in the table.public int getStringCount()
Note that the string array is 1-indexed rather than zero-indexed, so strings for a given language can be processed as follows:
for (int i = 1; i <= fmb.getStringCount(); i++) { String str = fmb.getString(lang, n); ... }
public boolean isStringInUse(int stringID)
stringID
- the integer that indexes the string
property in the table for the current language.public java.lang.String getString(java.lang.String language, int stringID)
language
- the Oracle-defined name of the language.stringID
- the integer that indexes the string
property in the table for the current language.JdapiIllegalStateException
- if the langauge isn't in the table.public void setString(java.lang.String language, int stringID, java.lang.String str)
language
- the Oracle-defined name of the language.stringID
- the integer that indexes the string
property in the table for the current language.str
- the string property.JdapiIllegalStateException
- if the langauge is not in the table.public int getStringPropertyNumber(int stringID)
stringID
- the integer that indexes the string
property in the table for the current language.public int getStringObjectType(int stringID)
stringID
- the integer that indexes the string
property in the table for the current language.public java.lang.Class getStringObjectClass(int stringID)
stringID
- the integer that indexes the string
property in the table for the current language.public boolean hasNext()
hasNext
in interface java.util.Iterator
public java.lang.Object next()
next
in interface java.util.Iterator
public void goStart()
public void remove()
remove
in interface java.util.Iterator
public void wrapTranslatedText(Graphics pd2fgra, java.lang.String language)
pd2fgra
- Graphics object containing the text to be wrapped.language
- Oracle-defined name of the language.