java.awt.font
Class TextLayout
public final
class
TextLayout
extends Object
implements Cloneable
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() |
The default caret policy.
Constructs a TextLayout.
public boolean equals(
Object obj)
public float getAdvance()
public float getAscent()
public byte getBaseline()
public float[] getBaselineOffsets()
public
Shape getBlackBoxBounds(int firstEndpoint, int secondEndpoint)
public
Shape[] getCaretShapes(int offset)
public int getCharacterCount()
public byte getCharacterLevel(int index)
public float getDescent()
public
TextLayout getJustifiedLayout(float justificationWidth)
public float getLeading()
public
Shape getLogicalHighlightShape(int firstEndpoint, int secondEndpoint)
public
Shape getLogicalHighlightShape(int firstEndpoint, int secondEndpoint,
Rectangle2D bounds)
public float getVisibleAdvance()
protected void handleJustify(float justificationWidth)
This is a protected method of a final
class, meaning
it exists only to taunt you.
public int hashCode()
Finds the character hit at the specified point. This 'clips' this
text layout against the specified
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
public boolean isLeftToRight()
public boolean isVertical()