|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.text.LayeredHighlighter.LayerPainter
javax.swing.text.DefaultHighlighter.DefaultHighlightPainter
org.fife.ui.rsyntaxtextarea.SquiggleUnderlineHighlightPainter
public class SquiggleUnderlineHighlightPainter
Highlight painter that paints a squiggly underline underneath text, similar to what popular IDE's such as Visual Studio and Eclipse do to indicate errors, warnings, etc.
This class must be used as a LayerPainter.
| Constructor Summary | |
|---|---|
SquiggleUnderlineHighlightPainter(java.awt.Color color)
Constructor. |
|
| Method Summary | |
|---|---|
java.awt.Color |
getColor()
Returns the color to paint with. |
java.awt.Shape |
paintLayer(java.awt.Graphics g,
int offs0,
int offs1,
java.awt.Shape bounds,
javax.swing.text.JTextComponent c,
javax.swing.text.View view)
Paints a portion of a highlight. |
protected void |
paintSquiggle(java.awt.Graphics g,
java.awt.Rectangle r)
Paints a squiggle underneath text in the specified rectangle. |
void |
setColor(java.awt.Color color)
Sets the color to paint the bounding boxes with. |
| Methods inherited from class javax.swing.text.DefaultHighlighter.DefaultHighlightPainter |
|---|
paint |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SquiggleUnderlineHighlightPainter(java.awt.Color color)
color - The color of the squiggle. This cannot be
null.| Method Detail |
|---|
public java.awt.Shape paintLayer(java.awt.Graphics g,
int offs0,
int offs1,
java.awt.Shape bounds,
javax.swing.text.JTextComponent c,
javax.swing.text.View view)
paintLayer in class javax.swing.text.DefaultHighlighter.DefaultHighlightPainterg - the graphics contextoffs0 - the starting model offset >= 0offs1 - the ending model offset >= offs1bounds - the bounding box of the view, which is not
necessarily the region to paint.c - the editorview - View painting for
protected void paintSquiggle(java.awt.Graphics g,
java.awt.Rectangle r)
g - The graphics context with which to paint.r - The rectangle containing the text.public java.awt.Color getColor()
getColor in class javax.swing.text.DefaultHighlighter.DefaultHighlightPaintersetColor(Color)public void setColor(java.awt.Color color)
color - The new color. This cannot be null.getColor()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||