public abstract class BasicTextPainter extends java.lang.Object implements TextPainter
TextNode
.
Suitable for use with "standard" java.awt.font.TextAttributes only.TextAttribute
Modifier and Type | Class and Description |
---|---|
protected static class |
BasicTextPainter.BasicMark
This TextPainter's implementation of the Mark interface.
|
Modifier and Type | Field and Description |
---|---|
protected java.awt.font.FontRenderContext |
aaOffFontRenderContext |
protected java.awt.font.FontRenderContext |
fontRenderContext
The font render context to use.
|
Constructor and Description |
---|
BasicTextPainter() |
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Rectangle2D |
getGeometryBounds(TextNode node)
Get a Rectangle2D in userspace coords which encloses the textnode
glyphs just including the geometry info.
|
protected TextLayoutFactory |
getTextLayoutFactory() |
protected abstract Mark |
hitTest(double x,
double y,
TextNode node)
Returns the mark for the specified parameters.
|
Mark |
selectAt(double x,
double y,
TextNode node)
Given an X, y coordinate, AttributedCharacterIterator,
return a Mark which encapsulates a "selection start" action.
|
Mark |
selectTo(double x,
double y,
Mark beginMark)
Given an X, y coordinate, starting Mark, AttributedCharacterIterator,
return a Mark which encapsulates a "selection continued" action.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBounds2D, getHighlightShape, getMark, getOutline, getSelected, paint, selectFirst, selectLast
protected java.awt.font.FontRenderContext fontRenderContext
protected java.awt.font.FontRenderContext aaOffFontRenderContext
protected TextLayoutFactory getTextLayoutFactory()
public Mark selectAt(double x, double y, TextNode node)
selectAt
in interface TextPainter
public Mark selectTo(double x, double y, Mark beginMark)
selectTo
in interface TextPainter
public java.awt.geom.Rectangle2D getGeometryBounds(TextNode node)
getGeometryBounds
in interface TextPainter
node
- the TextNode to measureCopyright © 2022 Apache Software Foundation. All Rights Reserved.