APIdia Launch Partner
Top Description Inners Constructors Methods
javax.swing.text

public abstract Class LayeredHighlighter

extends Object
implements Highlighter
Class Inheritance
All Implemented Interfaces
javax.swing.text.Highlighter
Known Direct Subclasses
javax.swing.text.DefaultHighlighter
Imports
java.awt.Graphics, .Shape

Implementation of Highlighter interface to mark up the background of leaf views with colored areas.
Authors
Scott Violet, Timothy Prinzing
See Also
Highlighter

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
LayeredHighlighter.LayerPainter

Layered highlight renderer.

Constructor Summary

AccessConstructor and Description
protected
LayeredHighlighter()

Constructor for subclasses to call.

Method Summary

Modifier and TypeMethod and Description
public abstract void
paintLayeredHighlights(Graphics
Graphics used to draw
g
,
int
starting offset of view
p0
,
int
ending offset of view
p1
,
Shape
Bounds of View
viewBounds
,
JTextComponent
JTextComponent
editor
,
View
View instance being rendered
view
)

When leaf Views (such as LabelView) are rendering they should call into this method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LayeredHighlighterback to summary
protected LayeredHighlighter()

Constructor for subclasses to call.

Method Detail

paintLayeredHighlightsback to summary
public abstract void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)

When leaf Views (such as LabelView) are rendering they should call into this method. If a highlight is in the given region it will be drawn immediately.

Parameters
g:Graphics

Graphics used to draw

p0:int

starting offset of view

p1:int

ending offset of view

viewBounds:Shape

Bounds of View

editor:JTextComponent

JTextComponent

view:View

View instance being rendered

javax.swing.text back to summary

public abstract Class LayeredHighlighter.LayerPainter

extends Object
implements HighlightPainter
Class Inheritance
All Implemented Interfaces
javax.swing.text.Highlighter.HighlightPainter
Known Direct Subclasses
javax.swing.text.DefaultHighlighter.DefaultHighlightPainter

Layered highlight renderer.

Constructor Summary

AccessConstructor and Description
protected
LayerPainter()

Constructor for subclasses to call.

Method Summary

Modifier and TypeMethod and Description
public abstract Shape

Returns:

a shape
paintLayer
(Graphics
Graphics used to draw
g
,
int
starting offset of view
p0
,
int
ending offset of view
p1
,
Shape
Bounds of View
viewBounds
,
JTextComponent
JTextComponent
editor
,
View
View instance being rendered
view
)

Paints a portion of a highlight.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LayerPainterback to summary
protected LayerPainter()

Constructor for subclasses to call.

Method Detail

paintLayerback to summary
public abstract Shape paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)

Paints a portion of a highlight.

Parameters
g:Graphics

Graphics used to draw

p0:int

starting offset of view

p1:int

ending offset of view

viewBounds:Shape

Bounds of View

editor:JTextComponent

JTextComponent

view:View

View instance being rendered

Returns:Shape

a shape