/** * When leaf Views (such as LabelView) are rendering they should * call into this method. If a highlight is in the given region it will * be drawn immediately. * * @param g Graphics used to draw * @param p0 starting offset of view * @param p1 ending offset of view * @param viewBounds Bounds of View * @param editor JTextComponent * @param view View instance being rendered */ public void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) { for (int i=markedOccurrences.size()-1; i>=0; i--) { Object tag = markedOccurrences.get(i); if (tag instanceof LayeredHighlightInfo) { LayeredHighlightInfo lhi = (LayeredHighlightInfo)tag; int start = lhi.getStartOffset(); int end = lhi.getEndOffset(); if ((p0 < start && p1 > start) || (p0 >= start && p0 < end)) { lhi.paintLayeredHighlights(g, p0, p1, viewBounds, editor, view); } } } super.paintLayeredHighlights(g, p0, p1, viewBounds, editor, view); }
/** * When leaf Views (such as LabelView) are rendering they should * call into this method. If a highlight is in the given region it will * be drawn immediately. * * @param g Graphics used to draw * @param lineStart starting offset of view * @param lineEnd ending offset of view * @param viewBounds Bounds of View * @param editor JTextComponent * @param view View instance being rendered */ @Override public void paintLayeredHighlights(Graphics g, int lineStart, int lineEnd, Shape viewBounds, JTextComponent editor, View view) { paintListLayered(g, lineStart,lineEnd, viewBounds, editor, view, markAllHighlights); super.paintLayeredHighlights(g, lineStart, lineEnd, viewBounds, editor, view); }
/** * When leaf Views (such as LabelView) are rendering they should * call into this method. If a highlight is in the given region it will * be drawn immediately. * * @param g Graphics used to draw * @param p0 starting offset of view * @param p1 ending offset of view * @param viewBounds Bounds of View * @param editor JTextComponent * @param view View instance being rendered */ public void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) { paintListLayered(g, p0,p1, viewBounds, editor, view, markedOccurrences); super.paintLayeredHighlights(g, p0, p1, viewBounds, editor, view); paintListLayered(g, p0,p1, viewBounds, editor, view, parserHighlights); }
/** * When leaf Views (such as LabelView) are rendering they should * call into this method. If a highlight is in the given region it will * be drawn immediately. * * @param g Graphics used to draw * @param lineStart starting offset of view * @param lineEnd ending offset of view * @param viewBounds Bounds of View * @param editor JTextComponent * @param view View instance being rendered */ @Override public void paintLayeredHighlights(Graphics g, int lineStart, int lineEnd, Shape viewBounds, JTextComponent editor, View view) { paintListLayered(g, lineStart,lineEnd, viewBounds, editor, view, markAllHighlights); super.paintLayeredHighlights(g, lineStart, lineEnd, viewBounds, editor, view); }