Package org.fife.ui.rsyntaxtextarea
Class SquiggleUnderlineHighlightPainter
- java.lang.Object
-
- javax.swing.text.LayeredHighlighter.LayerPainter
-
- org.fife.ui.rtextarea.ChangeableHighlightPainter
-
- org.fife.ui.rsyntaxtextarea.SquiggleUnderlineHighlightPainter
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.text.Highlighter.HighlightPainter
public class SquiggleUnderlineHighlightPainter extends ChangeableHighlightPainter
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static int
AMT
-
Constructor Summary
Constructors Constructor Description SquiggleUnderlineHighlightPainter(java.awt.Color color)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.-
Methods inherited from class org.fife.ui.rtextarea.ChangeableHighlightPainter
getAlpha, getPaint, getRoundedEdges, paint, setAlpha, setPaint, setRoundedEdges
-
-
-
-
Field Detail
-
AMT
private static final int AMT
- See Also:
- Constant Field Values
-
-
Method Detail
-
paintLayer
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)
Paints a portion of a highlight.- Overrides:
paintLayer
in 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
protected void paintSquiggle(java.awt.Graphics g, java.awt.Rectangle r)
Paints a squiggle underneath text in the specified rectangle.- Parameters:
g
- The graphics context with which to paint.r
- The rectangle containing the text.
-
-