La classe TextLayout
![]()
Objet par l'intermédiaire duquel sont programmés des contextes d'affichage pour les polices de caractères.
Constructeurs |
| TextLayout(AttributedCharacterIterator text, FontRenderContext frc) |
| TextLayout(String string, Font font, FontRenderContext frc) |
| TextLayout(String string, Map attributes, FontRenderContext frc) |
Valeur rendue |
Nom et paramètres |
| void | draw(Graphics2D g2, float x, float y) |
| boolean | equals(Object obj) |
| boolean | equals(TextLayout rhs) |
| 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) |
| TextHitInfo | hitTestChar(float x, float y) |
| TextHitInfo | hitTestChar(float x, float y, Rectangle2D bounds) |
| boolean | isLeftToRight() |
| boolean | isVertical() |
Valeur |
Champ |
| static TextLayout.CaretPolicy | DEFAULT_CARET_POLICY |