if (lh != null) {  if (currEnd == end) lh.paintLayeredHighlights(g, currStart, currEnd - 1, s, tc, this); else lh.paintLayeredHighlights(g, currStart, currEnd, s, tc, this);  }
    public void paint(Graphics g, Shape s)    {      Rectangle rect = s.getBounds();      int end = getEndOffset();      int currStart = getStartOffset();      int currEnd;            int count = 0;      while (currStart < end)        {          currEnd = calculateBreakPosition(currStart, end);          drawLine(currStart, currEnd, g, rect.x, rect.y + metrics.getAscent());                    rect.y += lineHeight;                    if (currEnd == currStart)            currStart ++;          else            currStart = currEnd;                              count++;                  }            if (count != numLines)        {          numLines = count;          preferenceChanged(this, false, true);        }          }