HighlightEntry entry = new HighlightEntry(p0, p1, painter);
HighlightEntry entry; Document doc = textComponent.getDocument(); Position pos0 = doc.createPosition(p0); Position pos1 = doc.createPosition(p1); if (getDrawsLayeredHighlights() && painter instanceof LayerPainter) entry = new LayerHighlightEntry(pos0, pos1, painter); else entry = new HighlightEntry(pos0, pos1, painter);
  public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter painter)    throws BadLocationException  {    checkPositions(p0, p1);    HighlightEntry entry = new HighlightEntry(p0, p1, painter);    highlights.add(entry);        textComponent.getUI().damageRange(textComponent, p0, p1);        return entry;  }