protected void paintHighlight(TextAreaModel model, Graphics gfx, int lineIndex, int y)
protected void paintHighlight(TextAreaModel model, Graphics gfx, int y)
	protected void paintHighlight(TextAreaModel model, Graphics gfx,		int lineIndex, int y)	{		FontMetrics fm = getFontMetrics();		int height = fm.getHeight();		y += fm.getLeading() + fm.getMaxDescent();		int selectionStart = model.getSelectionStart();		int selectionEnd = model.getSelectionEnd();		if(selectionStart == selectionEnd)		{			if(lineHighlight)			{				gfx.setColor(lineHighlightColor);				gfx.fillRect(0,y,offImg.getWidth(this),height);			}		}		else		{			gfx.setColor(selectionColor);			int selectionStartLine = model.getSelectionStartLine();			int selectionEndLine = model.getSelectionEndLine();			int lineStart = model.getLineStartOffset(lineIndex);			int x1, x2;			if(selectionStartLine == selectionEndLine)			{				x1 = model.offsetToX(lineIndex,selectionStart					- lineStart);				x2 = model.offsetToX(lineIndex,selectionEnd					- lineStart);			}			else if(lineIndex == selectionStartLine)			{				x1 = model.offsetToX(lineIndex,selectionStart					- lineStart);				x2 = offImg.getWidth(this);			}			else if(lineIndex == selectionEndLine)			{				x1 = 0;				x2 = model.offsetToX(lineIndex,selectionEnd					- lineStart);			}			else			{				x1 = 0;				x2 = offImg.getWidth(this);			}			gfx.fillRect(x1,y,x2 - x1,height);		}		if(textArea.getCaretVisible()			&& lineIndex == model.getCaretLine())		{			int offset = model.getCaretPosition() 				- model.getLineStartOffset(lineIndex);			int caretX = model.offsetToX(lineIndex,offset);			int caretWidth = (blockCaret ?				fm.charWidth('w') : 1);			gfx.setColor(caretColor);			gfx.fillRect(caretX,y,caretWidth,height);		}	}