public static class DefaultHighlighter.DefaultHighlightPainter extends LayeredHighlighter.LayerPainter
Constructor and Description |
---|
DefaultHighlightPainter(Color c)
Constructs a new highlight painter.
|
Modifier and Type | Method and Description |
---|---|
Color |
getColor()
Returns the color of the highlight.
|
void |
paint(Graphics g,
int offs0,
int offs1,
Shape bounds,
JTextComponent c)
Paints a highlight.
|
Shape |
paintLayer(Graphics g,
int offs0,
int offs1,
Shape bounds,
JTextComponent c,
View view)
Paints a portion of a highlight.
|
public DefaultHighlightPainter(Color c)
c
is null,
the JTextComponent will be queried for its selection color.c
- the color for the highlightpublic Color getColor()
public void paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c)
g
- the graphics contextoffs0
- the starting model offset >= 0offs1
- the ending model offset >= offs1bounds
- the bounding box for the highlightc
- the editorpublic Shape paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view)
paintLayer
in class LayeredHighlighter.LayerPainter
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 Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2019, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.