|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.gvt.text.TextHit
Class that encapsulates information returned from hit testing a TextSpanLayout instance.
org.apache.batik.gvt.text.TextSpanLayout.
Constructor Summary | |
TextHit(int charIndex,
boolean leadingEdge)
Constructs a TextHit with the specified values. |
Method Summary | |
int |
getCharIndex()
Returns the index of the character that has been hit. |
java.awt.font.FontRenderContext |
getFontRenderContext()
Returns the font render context at the time of the text hit. |
TextNode |
getTextNode()
Returns the text node associated with this text hit. |
boolean |
isLeadingEdge()
Returns whether on not the character has been hit on its leading edge. |
void |
setFontRenderContext(java.awt.font.FontRenderContext frc)
Sets the font render context at the time of the hit. |
void |
setTextNode(TextNode textNode)
Sets the TextNode that is associated with this hit. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TextHit(int charIndex, boolean leadingEdge)
charIndex
- The index of the character that has been hit. In the
case of bidirectional text this will be the logical character index not
the visual index. The index is relative to whole text within the selected
TextNode.leadingEdge
- Indicates which side of the character has been hit.Method Detail |
public int getCharIndex()
public boolean isLeadingEdge()
public void setTextNode(TextNode textNode)
textNode
- The textNode that has been hit.public void setFontRenderContext(java.awt.font.FontRenderContext frc)
frc
- The current font render context.public TextNode getTextNode()
public java.awt.font.FontRenderContext getFontRenderContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |