|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.gvt.renderer.BasicTextPainter
Basic implementation of TextPainter which renders the attributed character iterator of a TextNode. Suitable for use with "standard" java.awt.font.TextAttributes only.
TextAttribute
Inner Class Summary | |
protected static class |
BasicTextPainter.BasicMark
This TextPainter's implementation of the Mark interface. |
Field Summary | |
protected java.awt.font.FontRenderContext |
fontRenderContext
The font render context to use. |
Constructor Summary | |
BasicTextPainter()
|
Method Summary | |
java.awt.geom.Rectangle2D |
getBounds(TextNode node)
Gets a Rectangle2D in userspace coords which encloses the textnode glyphs composed from an AttributedCharacterIterator. |
protected abstract java.awt.geom.Rectangle2D |
getBounds(TextNode node,
boolean includeDecoration,
boolean includeStrokeWidth)
Gets a Rectangle2D in userspace coords which encloses the textnode glyphs composed from an AttributedCharacterIterator. |
java.awt.geom.Rectangle2D |
getDecoratedBounds(TextNode node)
Gets a Rectangle2D in userspace coords which encloses the textnode glyphs composed from an AttributedCharacterIterator, inclusive of glyph decoration (underline, overline, strikethrough). |
java.awt.Shape |
getDecoratedShape(TextNode node)
Gets a Shape in userspace coords which defines the decorated textnode glyph outlines. |
protected abstract java.awt.Shape |
getOutline(TextNode node,
boolean includeDecoration)
Gets a Shape in userspace coords which defines the textnode glyph outlines. |
java.awt.geom.Rectangle2D |
getPaintedBounds(TextNode node)
Gets a Rectangle2D in userspace coords which encloses the textnode glyphs (as-painted, inclusive of decoration and stroke, but exclusive of filters, etc.) composed from an AttributedCharacterIterator. |
java.awt.Shape |
getShape(TextNode node)
Gets a Shape in userspace coords which defines the textnode glyph outlines. |
protected abstract java.awt.Shape |
getStrokeOutline(TextNode node,
boolean includeDecoration)
Gets a Shape in userspace coords which defines the stroked textnode glyph outlines. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.batik.gvt.TextPainter |
getHighlightShape, getMark, getSelected, paint, selectFirst, selectLast |
Field Detail |
protected java.awt.font.FontRenderContext fontRenderContext
Constructor Detail |
public BasicTextPainter()
Method Detail |
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 getBounds(TextNode node)
getBounds
in interface TextPainter
node
- the TextNode to measurepublic java.awt.geom.Rectangle2D getDecoratedBounds(TextNode node)
getDecoratedBounds
in interface TextPainter
node
- the TextNode to measurepublic java.awt.geom.Rectangle2D getPaintedBounds(TextNode node)
getPaintedBounds
in interface TextPainter
node
- the TextNode to measurepublic java.awt.Shape getShape(TextNode node)
getShape
in interface TextPainter
node
- the TextNode to measurepublic java.awt.Shape getDecoratedShape(TextNode node)
getDecoratedShape
in interface TextPainter
node
- the TextNode to measureprotected abstract java.awt.geom.Rectangle2D getBounds(TextNode node, boolean includeDecoration, boolean includeStrokeWidth)
node
- the TextNode to measureincludeDecoration
- whether to include text decoration in bounds
computation.includeStrokeWidth
- whether to include the effect of stroke width
in bounds computation.protected abstract java.awt.Shape getOutline(TextNode node, boolean includeDecoration)
node
- the TextNode to measureincludeDecoration
- whether to include text decoration outlinesprotected abstract java.awt.Shape getStrokeOutline(TextNode node, boolean includeDecoration)
node
- the TextNode to measureincludeDecoration
- whether to include text decoration outlinesprotected abstract Mark hitTest(double x, double y, TextNode node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |