/**
* If true, only allow enough characters that will fit in the width. If
* false, allow the field to scroll to the right.
*/
/**
* If true, only allow enough characters that will fit in the width. If
* false, allow the field to scroll to the right.
*/
fieldColor = getTheme().getColor("tfield.active");
} else {
fieldColor = getTheme().getColor("tfield.inactive");
fieldColor = getTheme().getColor("tfield.active");
} else {
fieldColor = getTheme().getColor("tfield.inactive");
end = text.length();
}
getScreen().hLineXY(0, 0, getWidth(), GraphicsChars.HATCH, fieldColor);
end = text.length();
}
getScreen().hLineXY(0, 0, getWidth(), GraphicsChars.HATCH, fieldColor);
- getScreen().putStrXY(0, 0, text.substring(windowStart, end),
+ getScreen().putStringXY(0, 0, text.substring(windowStart, end),
if ((position > getWidth()) && fixed) {
setCursorX(getWidth());
} else if ((position - windowStart == getWidth()) && !fixed) {
if ((position > getWidth()) && fixed) {
setCursorX(getWidth());
} else if ((position - windowStart == getWidth()) && !fixed) {
- if (!keypress.getKey().getIsKey()
- && !keypress.getKey().getAlt()
- && !keypress.getKey().getCtrl()
+ if (!keypress.getKey().isFnKey()
+ && !keypress.getKey().isAlt()
+ && !keypress.getKey().isCtrl()
) {
// Plain old keystroke, process it
if ((position == text.length())
&& (text.length() < getWidth())) {
// Append case
) {
// Plain old keystroke, process it
if ((position == text.length())
&& (text.length() < getWidth())) {
// Append case
if (insertMode == false) {
// Replace character
text = text.substring(0, position)
if (insertMode == false) {
// Replace character
text = text.substring(0, position)
} else if ((fixed == true) && (insertMode == false)) {
// Overwrite the last character, maybe move position
text = text.substring(0, position)
} else if ((fixed == true) && (insertMode == false)) {
// Overwrite the last character, maybe move position
text = text.substring(0, position)
} else if ((fixed == false) && (insertMode == false)) {
// Overwrite the last character, definitely move position
text = text.substring(0, position)
} else if ((fixed == false) && (insertMode == false)) {
// Overwrite the last character, definitely move position
text = text.substring(0, position)
text = text.substring(0, position) + ch + text.substring(position);
position++;
if ((position - windowStart) == getWidth()) {
text = text.substring(0, position) + ch + text.substring(position);
position++;
if ((position - windowStart) == getWidth()) {