|
Whole document tree
java.awt.font
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Method Summary | |
static TextHitInfo |
afterOffset(int offset)
Creates a TextHitInfo at the specified offset,
associated with the character after the offset. |
static TextHitInfo |
beforeOffset(int offset)
Creates a TextHitInfo at the specified offset,
associated with the character before the offset. |
boolean |
equals(Object obj)
Returns true if the specified Object is a
TextHitInfo and equals this TextHitInfo. |
boolean |
equals(TextHitInfo hitInfo)
Returns true if the specified TextHitInfo
has the same charIndex and isLeadingEdge
as this TextHitInfo. |
int |
getCharIndex()
Returns the index of the character hit. |
int |
getInsertionIndex()
Returns the insertion index. |
TextHitInfo |
getOffsetHit(int delta)
Creates a TextHitInfo whose character index is offset
by delta from the charIndex of this
TextHitInfo. |
TextHitInfo |
getOtherHit()
Creates a TextHitInfo on the other side of the
insertion point. |
int |
hashCode()
Returns the hash code. |
boolean |
isLeadingEdge()
Returns true if the leading edge of the character was
hit. |
static TextHitInfo |
leading(int charIndex)
Creates a TextHitInfo on the leading edge of the
character at the specified charIndex. |
String |
toString()
Returns a String representing the hit for debugging
use only. |
static TextHitInfo |
trailing(int charIndex)
Creates a hit on the trailing edge of the character at the specified charIndex. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
public int getCharIndex()
public boolean isLeadingEdge()
true if the leading edge of the character was
hit.true if the leading edge of the character was
hit; false otherwise.public int getInsertionIndex()
public int hashCode()
TextHitInfo, which is
also the charIndex of this TextHitInfo.public boolean equals(Object obj)
true if the specified Object is a
TextHitInfo and equals this TextHitInfo.obj - the Object to test for equalitytrue if the specified Object
equals this TextHitInfo; false otherwise.public boolean equals(TextHitInfo hitInfo)
true if the specified TextHitInfo
has the same charIndex and isLeadingEdge
as this TextHitInfo. This is not the same as having
the same insertion offset.hitInfo - a specified TextHitInfotrue if the specified TextHitInfo
has the same charIndex and isLeadingEdge
as this TextHitInfo.public String toString()
String representing the hit for debugging
use only.String representing this
TextHitInfo.public static TextHitInfo leading(int charIndex)
TextHitInfo on the leading edge of the
character at the specified charIndex.charIndex - the index of the character hitTextHitInfo on the leading edge of the
character at the specified charIndex.public static TextHitInfo trailing(int charIndex)
charIndex.charIndex - the index of the character hitTextHitInfo on the trailing edge of the
character at the specified charIndex.public static TextHitInfo beforeOffset(int offset)
TextHitInfo at the specified offset,
associated with the character before the offset.offset - an offset associated with the character before
the offsetTextHitInfo at the specified offset.public static TextHitInfo afterOffset(int offset)
TextHitInfo at the specified offset,
associated with the character after the offset.offset - an offset associated with the character after
the offsetTextHitInfo at the specified offset.public TextHitInfo getOtherHit()
TextHitInfo on the other side of the
insertion point. This TextHitInfo remains unchanged.TextHitInfo on the other side of the
insertion point.public TextHitInfo getOffsetHit(int delta)
TextHitInfo whose character index is offset
by delta from the charIndex of this
TextHitInfo. This TextHitInfo remains
unchanged.delta - the value to offset this charIndexTextHitInfo whose charIndex is
offset by delta from the charIndex of
this TextHitInfo.
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.