if (!isLastRow) { setString( myText ); } else { this.caretRowFirstPart = start; this.caretRowLastPart = end; this.caretRowLastPartWidth = this.font.stringWidth(end); if (this.isPassword) { setString( myText ); } else { this.text = myText; }
setString( myText );
	private synchronized boolean deleteCurrentChar() {		if (this.caretChar != this.editingCaretChar) {			this.caretChar = this.editingCaretChar;			//#ifdef polish.css.font-bitmap				if (this.bitMapFont != null) {					this.caretViewer = this.editingCaretViewer;				}			//#endif			this.caretWidth = this.font.charWidth(this.editingCaretChar);			return true;		}		//#ifdef polish.css.font-bitmap			if (this.bitMapFont != null) {				String myText;				if (this.isPassword) {					myText = this.passwordText; 				} else {					myText = this.text;				}				if (myText != null && myText.length() > 0) {					this.caretColumn--;					setString( myText.substring( 0, myText.length() - 1 ));					//#if polish.css.textfield-show-length  && (polish.TextField.showInputInfo != false)						if (this.showLength) {							updateInfo();						}				    //#endif					if (getScreen() instanceof Form) {						notifyStateChanged();					}					return true;				} else {					return false;				}			}		//#endif		boolean isLastRow = (this.caretRow == this.realTextLines.length - 1);		if (this.caretColumn > 0) {			this.caretColumn--;			this.caretPosition--;			String start = this.originalRowText.substring(0, this.caretColumn );			String end = this.originalRowText.substring( this.caretColumn + 1);			this.caretX = this.font.stringWidth(start);			//System.out.println(this + ".deleteCurrentChar()/font: caretX=" + this.caretX);			this.originalRowText = start + end;			this.realTextLines[ this.caretRow ] = this.originalRowText;			String myText;			if (this.isPassword) {				myText = this.passwordText; 			} else {				myText = this.text;			}			myText = myText.substring( 0, this.caretPosition )				+ myText.substring( this.caretPosition + 1);			if (!isLastRow) {				setString( myText );			} else {				this.caretRowFirstPart = start;				this.caretRowLastPart = end;				this.caretRowLastPartWidth = this.font.stringWidth(end);				if (this.isPassword) {					setString( myText );				} else {					this.text = myText;				}				/*				System.out.println("backspace in last row");				checkCaretPosition();				*/			}			//#if polish.css.textfield-show-length  && (polish.TextField.showInputInfo != false)				if (this.showLength) {					updateInfo();				}			//#endif			if (getScreen() instanceof Form) {				notifyStateChanged();			}			return true;		} else if (this.caretRow > 0) {			this.caretPosition--;			String myText;			if (this.isPassword) {				myText = this.passwordText; 			} else {				myText = this.text;			}			myText = myText.substring( 0, this.caretPosition )				+ myText.substring( this.caretPosition + 1);			this.caretRow--;			String line = this.realTextLines[ this.caretRow ];			line = line.substring( 0, line.length() -1 );			this.caretColumn = line.length();			this.caretX = this.font.stringWidth(line);			//System.out.println(this + ".deleteCurrentChar()/font2: caretX=" + this.caretX);			this.caretY -= this.rowHeight;			setString( myText );			//#if polish.css.textfield-show-length  && (polish.TextField.showInputInfo != false)				if (this.showLength) {					updateInfo();				}			//#endif			if (getScreen() instanceof Form) {				notifyStateChanged();			}			return true;		} else {			return false;		}	}