public static class DefaultHighlighter.DefaultHighlightPainter extends LayeredHighlighter.LayerPainter
Constructor and Description |
---|
DefaultHighlightPainter(Color c)
构建一个新的亮点画家。
|
Modifier and Type | Method and Description |
---|---|
Color |
getColor()
返回突出显示的颜色。
|
void |
paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c)
画亮点
|
Shape |
paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view)
画出一部分亮点。
|
public DefaultHighlightPainter(Color c)
c
为null,JTextComponent将被查询其选择颜色。
c
-
c
的颜色
public Color getColor()
public void paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c)
g
- 图形上下文
offs0
- 起始模型偏移量> = 0
offs1
- 结束模型偏移量> = offs1
bounds
-
bounds
显示的边框
c
- 编辑
public Shape paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view)
paintLayer
在
LayeredHighlighter.LayerPainter
g
- 图形上下文
offs0
- 起始模型偏移量> = 0
offs1
- 结束模型偏移量> = offs1
bounds
- 视图的边框,这不一定是要绘制的区域。
c
- 编辑
view
- 查看油画为
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, 2014, Oracle and/or its affiliates. All rights reserved.