char opChar,
int constraints,
TextCursor cursor,
boolean modifyCursor) {
log("[tf.getDisplayString]");
DynamicCharacterArray out = new DynamicCharacterArray(dca.length() + 1);
int index = cursor == null ? dca.length() : cursor.index;
if ((constraints & TextField.PASSWORD) == TextField.PASSWORD) {
index = getStringForPassword(dca, constraints, index, opChar, out);
} else { // not password
out.insert(dca.toCharArray(), 0, dca.length(), 0);
switch (constraints & TextField.CONSTRAINT_MASK) {
case TextField.PHONENUMBER:
index = getStringForPhoneNumber(dca, index, opChar, out);
break;
case TextField.DECIMAL:
index = getStringForDecimal(dca, index, opChar, out);
break;
case TextField.NUMERIC:
index = getStringForNumeric(dca, index, opChar, out);
break;
case TextField.EMAILADDR:
case TextField.URL:
case TextField.ANY:
if (opChar > 0 && dca.length() < tf.getMaxSize()) {
out.insert(index++, opChar);
}
break;
default:
// for safety/completeness.
Logging.report(Logging.ERROR, LogChannels.LC_HIGHUI,
"TextFieldLFImpl: constraints=" + constraints);
if (opChar > 0 && dca.length() < tf.getMaxSize()) {
out.insert(index++, opChar);
}
break;
}
}
if (out == null) {
out = dca;
}
if (modifyCursor && cursor != null) {
cursor.index = index;
}
log("[TF.getDisplayString] getMatchList:");
pt_matches = inputSession.getMatchList();
return out.toString();
}