API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.font. TextHitInfo View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      TextHitInfo
Implements
Subclasses
Description
publicfinal class TextHitInfo
  The TextHitInfo class represents a character position in a text model, and a bias, or "side," of the character.
See also:    TextLayout
Constructors
private TextHitInfo (int charIndex, boolean isLeadingEdge)
  Constructs a new TextHitInfo.
Methods
Hide/Show inherited methods
publicstatic TextHitInfo afterOffset (int offset)
  Creates a TextHitInfo at the specified offset, associated with the character after the offset.
publicstatic TextHitInfo beforeOffset (int offset)
  Creates a TextHitInfo at the specified offset, associated with the character before the offset.
public boolean equals (Object obj)
  Returns true if the specified Object is a TextHitInfo and equals this TextHitInfo.
public boolean equals (TextHitInfo hitInfo)
  Returns true if the specified TextHitInfo has the same charIndex and isLeadingEdge as this TextHitInfo.
public int getCharIndex ()
  Returns the index of the character hit.
public int getInsertionIndex ()
  Returns the insertion index.
public TextHitInfo getOffsetHit (int delta)
  Creates a TextHitInfo whose character index is offset by delta from the charIndex of this TextHitInfo.
public TextHitInfo getOtherHit ()
  Creates a TextHitInfo on the other side of the insertion point.
public int hashCode ()
  Returns the hash code.
public boolean isLeadingEdge ()
  Returns true if the leading edge of the character was hit.
publicstatic TextHitInfo leading (int charIndex)
  Creates a TextHitInfo on the leading edge of the character at the specified charIndex.
public String toString ()
  Returns a String representing the hit for debugging use only.
publicstatic TextHitInfo trailing (int charIndex)
  Creates a hit on the trailing edge of the character at the specified charIndex.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar