java.lang.Object
javax.swing.text.LayeredHighlighter
- 所有已实现的接口:
-
Highlighter
- 直接已知的子类:
-
DefaultHighlighter
实现了
Highlighter
接口,用于标记叶视图的背景为彩色区域。
- 参见:
-
Nested Class Summary
Nested classes/interfaces declared in interface javax.swing.text.Highlighter
Highlighter.Highlight, Highlighter.HighlightPainter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
paintLayeredHighlights
(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) 当叶视图(如LabelView)进行渲染时,应调用此方法。Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods declared in interface javax.swing.text.Highlighter
addHighlight, changeHighlight, deinstall, getHighlights, install, paint, removeAllHighlights, removeHighlight
-
Constructor Details
-
LayeredHighlighter
protected LayeredHighlighter()子类调用的构造函数。
-
-
Method Details
-
paintLayeredHighlights
public abstract void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view) 当叶视图(如LabelView)进行渲染时,应调用此方法。如果给定区域内存在高亮,则将立即绘制。- 参数:
-
g
- 用于绘制的Graphics对象 -
p0
- 视图的起始偏移量 -
p1
- 视图的结束偏移量 -
viewBounds
- 视图的边界 -
editor
- JTextComponent -
view
- 正在渲染的View实例
-