|
Préférences
Moteurs de recherche
|
||||||||||||||||||||||||||||||
| JavaTM 2 Platform Std. Ed. v1.5.0
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.Object.equals(java.lang.Object),
Hashtablepublic boolean equals(Object obj)
true if the specified Object is a
TextHitInfo and equals this TextHitInfo.
obj - the Object to test for equality
true if the specified Object
equals this TextHitInfo; false otherwise.Object.hashCode(),
Hashtablepublic 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 TextHitInfo
true 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 hit
TextHitInfo on the leading edge of the
character at the specified charIndex.public static TextHitInfo trailing(int charIndex)
charIndex.
charIndex - the index of the character hit
TextHitInfo 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 offset
TextHitInfo 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 offset
TextHitInfo 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 charIndex
TextHitInfo whose charIndex is
offset by delta from the charIndex of
this TextHitInfo.