drawUnselectedText(g, x, y, line.getStartOffset(), line.getEndOffset() - 1);
int startOffset = line.getStartOffset(); int endOffset = line.getEndOffset();  if (selectionStart <= startOffset)  if (selectionEnd <= startOffset) {  drawUnselectedText(g, x, y, startOffset, endOffset); } else if (selectionEnd <= endOffset) {   x = drawSelectedText(g, x, y, startOffset, selectionEnd); drawUnselectedText(g, x, y, selectionEnd, endOffset); } else  drawSelectedText(g, x, y, startOffset, endOffset); else if (selectionStart < endOffset)  if (selectionEnd < endOffset) {   x = drawUnselectedText(g, x, y, startOffset, selectionStart); x = drawSelectedText(g, x, y, selectionStart, selectionEnd); drawUnselectedText(g, x, y, selectionEnd, endOffset); } else {   x = drawUnselectedText(g, x, y, startOffset, selectionStart); drawSelectedText(g, x, y, selectionStart, selectionEnd); } else  drawUnselectedText(g, x, y, startOffset, endOffset);
  protected void drawLine(int lineIndex, Graphics g, int x, int y)  {    try      {	metrics = g.getFontMetrics();	// FIXME: Selected text are not drawn yet.	Element line = getElement().getElement(lineIndex);        drawUnselectedText(g, x, y, line.getStartOffset(),                           line.getEndOffset() - 1);	//drawSelectedText(g, , , , );      }    catch (BadLocationException e)      {	AssertionError ae = new AssertionError("Unexpected bad location");	ae.initCause(e);	throw ae;      }  }