java.awt.font
public final class TextLayout extends Object implements Cloneable
| Nested Class Summary | |
|---|---|
| static class | TextLayout.CaretPolicy
Inner class describing a caret policy |
| Field Summary | |
|---|---|
| static TextLayout.CaretPolicy | DEFAULT_CARET_POLICY
The default caret policy. |
| Constructor Summary | |
|---|---|
| TextLayout(String str, Font font, FontRenderContext frc)
Constructs a TextLayout. | |
| TextLayout(String string, Map<? extends Attribute,?> attributes, FontRenderContext frc) | |
| TextLayout(AttributedCharacterIterator text, FontRenderContext frc) | |
| Method Summary | |
|---|---|
| protected Object | clone() |
| void | draw(Graphics2D g2, float x, float y) |
| boolean | equals(Object obj) |
| boolean | equals(TextLayout tl) |
| float | getAdvance() |
| float | getAscent() |
| byte | getBaseline() |
| float[] | getBaselineOffsets() |
| Shape | getBlackBoxBounds(int firstEndpoint, int secondEndpoint) |
| Rectangle2D | getBounds() |
| float[] | getCaretInfo(TextHitInfo hit) |
| float[] | getCaretInfo(TextHitInfo hit, Rectangle2D bounds) |
| Shape | getCaretShape(TextHitInfo hit) |
| Shape | getCaretShape(TextHitInfo hit, Rectangle2D bounds) |
| Shape[] | getCaretShapes(int offset) |
| Shape[] | getCaretShapes(int offset, Rectangle2D bounds) |
| Shape[] | getCaretShapes(int offset, Rectangle2D bounds, TextLayout.CaretPolicy policy) |
| int | getCharacterCount() |
| byte | getCharacterLevel(int index) |
| float | getDescent() |
| TextLayout | getJustifiedLayout(float justificationWidth) |
| float | getLeading() |
| Shape | getLogicalHighlightShape(int firstEndpoint, int secondEndpoint) |
| Shape | getLogicalHighlightShape(int firstEndpoint, int secondEndpoint, Rectangle2D bounds) |
| int[] | getLogicalRangesForVisualSelection(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint) |
| TextHitInfo | getNextLeftHit(int offset) |
| TextHitInfo | getNextLeftHit(int offset, TextLayout.CaretPolicy policy) |
| TextHitInfo | getNextLeftHit(TextHitInfo hit) |
| TextHitInfo | getNextRightHit(int offset) |
| TextHitInfo | getNextRightHit(int offset, TextLayout.CaretPolicy policy) |
| TextHitInfo | getNextRightHit(TextHitInfo hit) |
| Shape | getOutline(AffineTransform tx) |
| float | getVisibleAdvance() |
| Shape | getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint) |
| Shape | getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint, Rectangle2D bounds) |
| TextHitInfo | getVisualOtherHit(TextHitInfo hit) |
| protected void | handleJustify(float justificationWidth)
This is a protected method of a final class, meaning
it exists only to taunt you. |
| int | hashCode() |
| TextHitInfo | hitTestChar(float x, float y) |
| TextHitInfo | hitTestChar(float x, float y, Rectangle2D bounds)
Finds the character hit at the specified point. |
| boolean | isLeftToRight() |
| boolean | isVertical() |
| String | toString() |
final class, meaning
it exists only to taunt you.bounds rectangle. That
means that in the case where a point is outside these bounds, this method
returns the leading edge of the first character or the trailing edge of
the last character.
Parameters: x the X location to test y the Y location to test bounds the bounds to test against
Returns: the character hit at the specified point