if (pos < -1) { pos = -1; }
	public void drawString(String text, int textColor, int x, int y,			int orientation, Graphics g) 	{		int length = text.length();		if ( text != this.lastText ) {			this.lastText = text;			this.animationRunning = true;			if (this.mode == MODE_RIGHT_TO_LEFT || this.mode == MODE_RIGHT_TO_LEFT_ONCE) {				this.currentPos = length;			} else {				this.currentPos = -1;			}		}		if (!this.animationRunning) {			g.drawString(text, x, y, orientation);		} else {			int pos = this.currentPos;			Font font = g.getFont();			x = getLeftX(x, orientation, font.stringWidth( text ) );			y = getTopY(y, orientation, font.getHeight(), font.getBaselinePosition() );			int neighbor = pos - 1;			if (neighbor >= 0) {				if (neighbor != 0) {					g.drawSubstring( text, 0, neighbor, x, y,  Graphics.TOP | Graphics.LEFT );					x += font.substringWidth(text, 0, neighbor);				}				g.setColor( this.neighborColor );				char c = text.charAt( neighbor );				g.drawChar( c, x,  y, Graphics.TOP | Graphics.LEFT );				x += font.charWidth( c );			}			if ( pos >= 0 && pos < length ) {				g.setColor( this.mainColor );				char c = text.charAt(pos);				g.drawChar( c, x,  y, Graphics.TOP | Graphics.LEFT );				x += font.charWidth( c );			}			neighbor = pos + 1;			if (neighbor < length ) {				g.setColor( this.neighborColor );				char c = text.charAt(neighbor);				g.drawChar( c, x,  y, Graphics.TOP | Graphics.LEFT );				neighbor++;				if ( neighbor < length ) {					x += font.charWidth( c );					g.setColor( textColor );					g.drawSubstring(text, neighbor, length - neighbor, x, y, Graphics.TOP | Graphics.LEFT ); 				}			}					}	}