Class SquiggleUnderlineHighlightPainter
java.lang.Object
javax.swing.text.LayeredHighlighter.LayerPainter
org.fife.ui.rtextarea.ChangeableHighlightPainter
org.fife.ui.rsyntaxtextarea.SquiggleUnderlineHighlightPainter
- All Implemented Interfaces:
Serializable, Highlighter.HighlightPainter
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.
- Version:
- 1.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionpaintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) Paints a portion of a highlight.protected voidpaintSquiggle(Graphics g, Rectangle r) Paints a squiggle underneath text in the specified rectangle.Methods inherited from class ChangeableHighlightPainter
getAlpha, getPaint, getRoundedEdges, paint, setAlpha, setPaint, setRoundedEdges
-
Field Details
-
AMT
private static final int AMT- See Also:
-
-
Constructor Details
-
SquiggleUnderlineHighlightPainter
Constructor.- Parameters:
color- The color of the squiggle. This cannot benull.
-
-
Method Details
-
paintLayer
public Shape paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) Paints a portion of a highlight.- Overrides:
paintLayerin classChangeableHighlightPainter- Parameters:
g- 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- Returns:
- region drawing occurred in
-
paintSquiggle
-