public static class DefaultHighlighter.DefaultHighlightPainter extends LayeredHighlighter.LayerPainter
Simple highlight painter that fills a highlighted area with a solid color.
public DefaultHighlightPainter(Color c)
Constructs a new highlight painter. If c
is null, the JTextComponent will be queried for its selection color.
c
- the color for the highlightpublic Color getColor()
Returns the color of the highlight.
public void paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c)
Paints a highlight.
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)
Paints a portion of a highlight.
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
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.