Uses of Class
java.awt.font.TextHitInfo
| Package | Description |
|---|---|
| java.awt.event |
Provides interfaces and classes for dealing with different types of events
fired by AWT components.
|
| java.awt.font |
Provides classes and interface relating to fonts.
|
| java.awt.im |
Provides classes and interfaces for the input method framework.
|
| java.awt.im.spi |
Provides interfaces that enable the development of input methods that can be
used with any Java runtime environment.
|
-
Uses of TextHitInfo in java.awt.event
Methods in java.awt.event that return TextHitInfo Modifier and Type Method Description TextHitInfoInputMethodEvent. getCaret()Gets the caret.TextHitInfoInputMethodEvent. getVisiblePosition()Gets the position that's most important to be visible.Constructors in java.awt.event with parameters of type TextHitInfo Constructor Description InputMethodEvent(Component source, int id, long when, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)Constructs anInputMethodEventwith the specified source component, type, time, text, caret, and visiblePosition.InputMethodEvent(Component source, int id, TextHitInfo caret, TextHitInfo visiblePosition)Constructs anInputMethodEventwith the specified source component, type, caret, and visiblePosition.InputMethodEvent(Component source, int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)Constructs anInputMethodEventwith the specified source component, type, text, caret, and visiblePosition. -
Uses of TextHitInfo in java.awt.font
Methods in java.awt.font that return TextHitInfo Modifier and Type Method Description static TextHitInfoTextHitInfo. afterOffset(int offset)Creates aTextHitInfoat the specified offset, associated with the character after the offset.static TextHitInfoTextHitInfo. beforeOffset(int offset)Creates aTextHitInfoat the specified offset, associated with the character before the offset.TextHitInfoTextLayout. getNextLeftHit(int offset)Returns the hit for the next caret to the left (top); if no such hit, returnsnull.TextHitInfoTextLayout. getNextLeftHit(int offset, TextLayout.CaretPolicy policy)Returns the hit for the next caret to the left (top); if no such hit, returnsnull.TextHitInfoTextLayout. getNextLeftHit(TextHitInfo hit)Returns the hit for the next caret to the left (top); if no such hit, returnsnull.TextHitInfoTextLayout. getNextRightHit(int offset)Returns the hit for the next caret to the right (bottom); if no such hit, returnsnull.TextHitInfoTextLayout. getNextRightHit(int offset, TextLayout.CaretPolicy policy)Returns the hit for the next caret to the right (bottom); if no such hit, returnsnull.TextHitInfoTextLayout. getNextRightHit(TextHitInfo hit)Returns the hit for the next caret to the right (bottom); if there is no such hit, returnsnull.TextHitInfoTextHitInfo. getOffsetHit(int delta)Creates aTextHitInfowhose character index is offset bydeltafrom thecharIndexof thisTextHitInfo.TextHitInfoTextHitInfo. getOtherHit()Creates aTextHitInfoon the other side of the insertion point.TextHitInfoTextLayout.CaretPolicy. getStrongCaret(TextHitInfo hit1, TextHitInfo hit2, TextLayout layout)Chooses one of the specifiedTextHitInfoinstances as a strong caret in the specifiedTextLayout.TextHitInfoTextLayout. getVisualOtherHit(TextHitInfo hit)Returns the hit on the opposite side of the specified hit's caret.TextHitInfoTextLayout. hitTestChar(float x, float y)Returns aTextHitInfocorresponding to the specified point.TextHitInfoTextLayout. hitTestChar(float x, float y, Rectangle2D bounds)Returns aTextHitInfocorresponding to the specified point.static TextHitInfoTextHitInfo. leading(int charIndex)Creates aTextHitInfoon the leading edge of the character at the specifiedcharIndex.static TextHitInfoTextHitInfo. trailing(int charIndex)Creates a hit on the trailing edge of the character at the specifiedcharIndex.Methods in java.awt.font with parameters of type TextHitInfo Modifier and Type Method Description booleanTextHitInfo. equals(TextHitInfo hitInfo)Returnstrueif the specifiedTextHitInfohas the samecharIndexandisLeadingEdgeas thisTextHitInfo.float[]TextLayout. getCaretInfo(TextHitInfo hit)Returns information about the caret corresponding tohit.float[]TextLayout. getCaretInfo(TextHitInfo hit, Rectangle2D bounds)Returns information about the caret corresponding tohit.ShapeTextLayout. getCaretShape(TextHitInfo hit)Returns aShaperepresenting the caret at the specified hit inside the natural bounds of thisTextLayout.ShapeTextLayout. getCaretShape(TextHitInfo hit, Rectangle2D bounds)Returns aShaperepresenting the caret at the specified hit inside the specified bounds.int[]TextLayout. getLogicalRangesForVisualSelection(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint)Returns the logical ranges of text corresponding to a visual selection.TextHitInfoTextLayout. getNextLeftHit(TextHitInfo hit)Returns the hit for the next caret to the left (top); if no such hit, returnsnull.TextHitInfoTextLayout. getNextRightHit(TextHitInfo hit)Returns the hit for the next caret to the right (bottom); if there is no such hit, returnsnull.TextHitInfoTextLayout.CaretPolicy. getStrongCaret(TextHitInfo hit1, TextHitInfo hit2, TextLayout layout)Chooses one of the specifiedTextHitInfoinstances as a strong caret in the specifiedTextLayout.ShapeTextLayout. getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint)Returns aShapeenclosing the visual selection in the specified range, extended to the bounds.ShapeTextLayout. getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint, Rectangle2D bounds)Returns a path enclosing the visual selection in the specified range, extended tobounds.TextHitInfoTextLayout. getVisualOtherHit(TextHitInfo hit)Returns the hit on the opposite side of the specified hit's caret.voidTextLayout. hitToPoint(TextHitInfo hit, Point2D point)Convert a hit to a point in standard coordinates. -
Uses of TextHitInfo in java.awt.im
Methods in java.awt.im that return TextHitInfo Modifier and Type Method Description TextHitInfoInputMethodRequests. getLocationOffset(int x, int y)Gets the offset within the composed text for the specified absolute x and y coordinates on the screen.Methods in java.awt.im with parameters of type TextHitInfo Modifier and Type Method Description RectangleInputMethodRequests. getTextLocation(TextHitInfo offset)Gets the location of a specified offset in the current composed text, or of the selection in committed text. -
Uses of TextHitInfo in java.awt.im.spi
Methods in java.awt.im.spi with parameters of type TextHitInfo Modifier and Type Method Description voidInputMethodContext. dispatchInputMethodEvent(int id, AttributedCharacterIterator text, int committedCharacterCount, TextHitInfo caret, TextHitInfo visiblePosition)Creates an input method event from the arguments given and dispatches it to the client component.