|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.text.LayeredHighlighter
javax.swing.text.DefaultHighlighter
javax.swing.plaf.basic.BasicTextUI.BasicHighlighter
org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaHighlighter
public class RSyntaxTextAreaHighlighter
The highlighter implementation used by RSyntaxTextArea
s. 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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.text.DefaultHighlighter |
---|
DefaultHighlighter.DefaultHighlightPainter |
Nested classes/interfaces inherited from class javax.swing.text.LayeredHighlighter |
---|
LayeredHighlighter.LayerPainter |
Nested classes/interfaces inherited from interface javax.swing.text.Highlighter |
---|
Highlighter.Highlight, Highlighter.HighlightPainter |
Field Summary |
---|
Fields inherited from class javax.swing.text.DefaultHighlighter |
---|
DefaultPainter |
Constructor Summary | |
---|---|
RSyntaxTextAreaHighlighter()
Constructor. |
Method Summary | |
---|---|
void |
clearParserHighlights(Parser parser)
Removes all of the highlights for a specific parser. |
void |
deinstall(JTextComponent c)
|
List |
getMarkedOccurrences()
Returns a list of "marked occurrences" in the text area. |
void |
install(JTextComponent c)
|
void |
paint(Graphics g)
Renders the highlights. |
void |
paintLayeredHighlights(Graphics g,
int p0,
int p1,
Shape viewBounds,
JTextComponent editor,
View view)
When leaf Views (such as LabelView) are rendering they should call into this method. |
Methods inherited from class javax.swing.text.DefaultHighlighter |
---|
addHighlight, changeHighlight, getDrawsLayeredHighlights, getHighlights, removeAllHighlights, removeHighlight, setDrawsLayeredHighlights |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RSyntaxTextAreaHighlighter()
Method Detail |
---|
public void clearParserHighlights(Parser parser)
parser
- The parser.public void deinstall(JTextComponent c)
deinstall
in interface Highlighter
deinstall
in class DefaultHighlighter
public List getMarkedOccurrences()
public void install(JTextComponent c)
install
in interface Highlighter
install
in class DefaultHighlighter
public void paint(Graphics g)
paint
in interface Highlighter
paint
in class DefaultHighlighter
g
- the graphics contextpublic void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
paintLayeredHighlights
in class DefaultHighlighter
g
- Graphics used to drawp0
- starting offset of viewp1
- ending offset of viewviewBounds
- Bounds of Vieweditor
- JTextComponentview
- View instance being rendered
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |