public class RSyntaxTextAreaHighlighter extends RTextAreaHighlighter
RSyntaxTextAreas. It knows to
always paint "marked occurrences" highlights below selection highlights,
and squiggle underline highlights above all other highlights.Most of this code is copied from javax.swing.text.DefaultHighlighter; unfortunately, we cannot re-use much of it since it is package private.
RTextAreaHighlighter.HighlightInfo, RTextAreaHighlighter.HighlightInfoImpl, RTextAreaHighlighter.LayeredHighlightInfo, RTextAreaHighlighter.LayeredHighlightInfoImpltextArea| 构造器和说明 |
|---|
RSyntaxTextAreaHighlighter()
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearParserHighlights(Parser parser)
Removes all of the highlights for a specific parser.
|
void |
deinstall(javax.swing.text.JTextComponent c) |
java.util.List<DocumentRange> |
getMarkedOccurrences()
Returns a list of "marked occurrences" in the text area.
|
void |
paintLayeredHighlights(java.awt.Graphics g,
int lineStart,
int lineEnd,
java.awt.Shape viewBounds,
javax.swing.text.JTextComponent editor,
javax.swing.text.View view)
When leaf Views (such as LabelView) are rendering they should
call into this method.
|
getMarkAllHighlightCount, getMarkAllHighlightRanges, install, paintList, paintListLayered, repaintListHighlightpublic void clearParserHighlights(Parser parser)
parser - The parser.public void deinstall(javax.swing.text.JTextComponent c)
deinstall 在接口中 javax.swing.text.Highlighterdeinstall 在类中 RTextAreaHighlighterpublic java.util.List<DocumentRange> getMarkedOccurrences()
DocumentRange.public void paintLayeredHighlights(java.awt.Graphics g,
int lineStart,
int lineEnd,
java.awt.Shape viewBounds,
javax.swing.text.JTextComponent editor,
javax.swing.text.View view)
RTextAreaHighlighterpaintLayeredHighlights 在类中 RTextAreaHighlighterg - Graphics used to drawlineStart - starting offset of viewlineEnd - ending offset of viewviewBounds - Bounds of Vieweditor - JTextComponentview - View instance being rendered