public class TextHandler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static byte[][] |
enc_strings |
static byte[] |
languages
2 bytes stored for each language included in this build.
|
static int |
MD_TEXT_GUIDELINE_TYPE_MASK |
static int |
set_font |
static int |
TEXTFLAG_CONTAINS_HYPHENATION_GUIDELINES |
Modifier and Type | Method and Description |
---|---|
int |
closestMatchDeviceLocaleLanguageID()
Performs some string matching logic to try and determine the closest match to the given device locale from those available in this build.
|
int |
closestMatchLocaleLanguageID(java.lang.String locale)
Performs some string matching logic to try and determine the closest match to the given locale from those available in this build.
|
DateFormat |
createLocalizedDateFormat(java.lang.String format)
Create a new
DateFormat Object appropriate for the currently loaded language. |
byte[] |
getENCString(int text_id)
Returns a specified encoded-string
|
byte[] |
getENCStringFromString(java.lang.String string)
Converts a String to an encoded-string.
|
static TextHandler |
getInstance()
Get the TextHandler instance.
|
static java.lang.String |
getLanguageIDString(int lang_id)
Returns a string representation of the specified language
|
java.lang.String |
getLoadedLocale()
Get the currently loaded language, as a String.
|
java.lang.String |
getString(int text_id)
Returns a specified String.
|
java.lang.String |
getStringFromENCString(byte[] encoded_string)
Converts an encoded-string to a String.
|
byte[] |
insertENCStringIntoENCString(byte[] enc_into,
java.lang.String replace,
byte[] enc_replace_with)
Inserts an encoded-string into another encoded-string.
|
java.lang.String |
insertENCStringIntoString(java.lang.String into,
java.lang.String replace,
byte[] enc_replace_with)
Inserts an encoded-string into a String
|
byte[] |
insertStringIntoENCString(byte[] enc_into,
java.lang.String replace,
java.lang.String replace_with)
Inserts a String into an encoded-string.
|
static java.lang.String |
insertStringIntoString(java.lang.String into,
java.lang.String replace,
java.lang.String replace_with)
Inserts a String into another String
|
void |
loadLanguage(int lang_id)
Loads a single language (only one can be kept in memory at a time)
|
static int |
numLanguagesIncluded()
Returns the number of languages included in this build.
|
static java.lang.String |
replaceHardSpaces(java.lang.String string)
Replaces hard spaces ('�' / character-0xa0) in a String with spaces
|
public static final int TEXTFLAG_CONTAINS_HYPHENATION_GUIDELINES
public static final int MD_TEXT_GUIDELINE_TYPE_MASK
public static int set_font
public static byte[] languages
public static byte[][] enc_strings
public static TextHandler getInstance()
public void loadLanguage(int lang_id)
public int closestMatchLocaleLanguageID(java.lang.String locale)
public int closestMatchDeviceLocaleLanguageID()
public static int numLanguagesIncluded()
public static java.lang.String getLanguageIDString(int lang_id)
public java.lang.String getStringFromENCString(byte[] encoded_string)
public byte[] getENCStringFromString(java.lang.String string)
public byte[] getENCString(int text_id)
public java.lang.String getString(int text_id)
public static java.lang.String replaceHardSpaces(java.lang.String string)
public static java.lang.String insertStringIntoString(java.lang.String into, java.lang.String replace, java.lang.String replace_with)
public byte[] insertENCStringIntoENCString(byte[] enc_into, java.lang.String replace, byte[] enc_replace_with)
public byte[] insertStringIntoENCString(byte[] enc_into, java.lang.String replace, java.lang.String replace_with)
public java.lang.String insertENCStringIntoString(java.lang.String into, java.lang.String replace, byte[] enc_replace_with)
public DateFormat createLocalizedDateFormat(java.lang.String format)
DateFormat
Object appropriate for the currently loaded language.format
- a String template for the DateFormat class.public java.lang.String getLoadedLocale()
null
if no language has been loaded.