| Modifier and Type | Field and Description |
|---|---|
| private Rectangle2D | |
| private final float | |
| private static final int | |
| private static final int | |
| private final AffineTransform | |
| private float[] | |
| private final CoreMetrics | |
| private static final boolean | |
| private final Decoration | |
| private final Font | |
| private StandardGlyphVector | |
| private Rectangle2D | |
| private Rectangle2D | |
| private static final int | |
| private static final int | |
| private static final int | |
| private final TextSource | |
| private Rectangle2D | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public TextLineComponent | applyJustificationDeltas(float[] deltas, int deltaStart, boolean[] flags)
Implements sun. Apply deltas to the data in this component, starting at offset deltaStart, and return the new component. |
| public boolean | caretAtOffsetIsValid(int offset)
Implements sun. Return whether a caret can exist on the leading edge of the character at offset. |
| protected Rectangle2D | createAlignBounds()
Like createLogicalBounds except ignore leading and logically trailing white space. |
| protected float[] | |
| protected StandardGlyphVector | |
| public Rectangle2D | |
| protected Rectangle2D | createLogicalBounds()
The logical bounds extends from the origin of the glyphvector to the position at which a following glyphvector's origin should be placed. |
| public void | draw(Graphics2D g, float x, float y)
Implements sun. Render the label at x, y in the graphics. |
| public void | |
| public float | |
| public float | getAdvanceBetween(int start, int limit)
Implements sun. Return the accumulated advances of all characters between logicalStart and logicalLimit. |
| public Rectangle2D | getAlignBounds(float x, float y)
Return a rectangle that corresponds to the alignment bounds of the text when this label is rendered at x, y. |
| public Rectangle2D | |
| public AffineTransform | |
| public float | getCharAdvance(int index)
Implements sun. Return the advance of the character at the given logical index. |
| private float[] | |
| public Rectangle2D | getCharVisualBounds(int logicalIndex)
Implements sun. A convenience overload of getCharVisualBounds that defaults the label origin to 0, 0. |
| public Rectangle2D | getCharVisualBounds(int index, float x, float y)
Return the visual bounds of the character at the given logical index. |
| public float | getCharX(int index)
Implements sun. Return the x location of the character at the given logical index. |
| public float | getCharY(int index)
Implements sun. Return the y location of the character at the given logical index. |
| public CoreMetrics | getCoreMetrics()
Implements sun. Return the line metrics for all text in this label. |
| private StandardGlyphVector | |
| public Rectangle2D | getItalicBounds(float x, float y)
Return a rectangle that corresponds to the logical bounds of the text, adjusted to angle the leading and trailing edges by the italic angle. |
| public Rectangle2D | getItalicBounds()
Implements sun. A convenience method that returns the italic bounds when rendered at 0, 0. |
| public void | getJustificationInfos(GlyphJustificationInfo[] infos, int infoStart, int charStart, int charLimit)
Implements sun. Return GlyphJustificationInfo objects for the characters between charStart and charLimit, starting at offset infoStart. |
| public int | getLineBreakIndex(int start, float width)
Implements sun. Return the logical index of the character, starting with the character at logicalStart, whose accumulated advance exceeds width. |
| public Rectangle2D | getLogicalBounds(float x, float y)
Return a rectangle that corresponds to the logical bounds of the text when this label is rendered at x, y. |
| public Rectangle2D | getLogicalBounds()
Implements sun. A convenience method that returns the logical bounds when rendered at 0, 0. |
| public int | getNumCharacters()
Implements sun. Return the number of characters represented by this label. |
| public int | getNumJustificationInfos()
Implements sun. Return the number of justification records this uses. |
| public Shape | getOutline(float x, float y)
Implements sun. Return an outline of the characters in the label when rendered at x, y. |
| public Shape | |
| public Rectangle | getPixelBounds(FontRenderContext frc, float x, float y)
Implements sun.
|
| public TextLineComponent | getSubset(int start, int limit, int dir)
Implements sun. Return a TextLineComponent for the characters in the range start, limit. |
| public Rectangle2D | getVisualBounds(float x, float y)
Return a rectangle that surrounds the text outline when this label is rendered at x, y. |
| public Rectangle2D | getVisualBounds()
Implements sun. A convenience method that returns the visual bounds when rendered at 0, 0. |
| public void | |
| public Rectangle2D | |
| public Shape | |
| public Rectangle2D | |
| public boolean | |
| protected int | |
| public int | logicalToVisual(int logicalIndex)
Return the visual index of the character at the given logical index. |
| public String | |
| protected int | |
| private void | |
| public int | visualToLogical(int visualIndex)
Return the logical index of the character at the given visual index. |
| ab | back to summary |
|---|---|
| private Rectangle2D ab | |
| advTracking | back to summary |
|---|---|
| private final float advTracking | |
| advx | back to summary |
|---|---|
| private static final int advx | |
| advy | back to summary |
|---|---|
| private static final int advy | |
| baseTX | back to summary |
|---|---|
| private final AffineTransform baseTX | |
| charinfo | back to summary |
|---|---|
| private float[] charinfo | |
| cm | back to summary |
|---|---|
| private final CoreMetrics cm | |
| DEBUG | back to summary |
|---|---|
| private static final boolean DEBUG | |
| decorator | back to summary |
|---|---|
| private final Decoration decorator | |
| font | back to summary |
|---|---|
| private final Font font | |
| gv | back to summary |
|---|---|
| private StandardGlyphVector gv | |
| ib | back to summary |
|---|---|
| private Rectangle2D ib | |
| lb | back to summary |
|---|---|
| private Rectangle2D lb | |
| numvals | back to summary |
|---|---|
| private static final int numvals | |
| posx | back to summary |
|---|---|
| private static final int posx | |
| posy | back to summary |
|---|---|
| private static final int posy | |
| source | back to summary |
|---|---|
| private final TextSource source | |
| vb | back to summary |
|---|---|
| private Rectangle2D vb | |
| vish | back to summary |
|---|---|
| private static final int vish | |
| visw | back to summary |
|---|---|
| private static final int visw | |
| visx | back to summary |
|---|---|
| private static final int visx | |
| visy | back to summary |
|---|---|
| private static final int visy | |
| ExtendedTextSourceLabel | back to summary |
|---|---|
| public ExtendedTextSourceLabel(TextSource source, Decoration decorator) Create from a TextSource. | |
| applyJustificationDeltas | back to summary |
|---|---|
| public TextLineComponent applyJustificationDeltas(float[] deltas, int deltaStart, boolean[] flags) Implements sun. Apply deltas to the data in this component, starting at offset deltaStart, and return the new component. There are two floats for each justification info, for a total of 2 * getNumJustificationInfos. The first delta is the left adjustment, the second is the right adjustment. If flags[0] is true on entry, rejustification is allowed. If the new component requires rejustification (ligatures were formed or split), flags[0] will be set on exit. | |
| caretAtOffsetIsValid | back to summary |
|---|---|
| public boolean caretAtOffsetIsValid(int offset) Implements sun. Return whether a caret can exist on the leading edge of the character at offset. If the character is part of a ligature (for example) a caret may not be appropriate at offset. | |
| createAlignBounds | back to summary |
|---|---|
| protected Rectangle2D createAlignBounds() Like createLogicalBounds except ignore leading and logically trailing white space. this assumes logically trailing whitespace is also visually trailing. Whitespace is anything that has a zero visual width, regardless of its advance. We make the same simplifying assumptions as in createLogicalBounds, namely that we can rely on the charinfo to shield us from any glyph positioning oddities in the font that place the glyph for a character at other than the pos + advance of the character to its left. So we no longer need to skip chars with zero advance, as their bounds (right and left) are already correct. | |
| createCharinfo | back to summary |
|---|---|
| protected float[] createCharinfo() | |
| createGV | back to summary |
|---|---|
| protected StandardGlyphVector createGV() | |
| createItalicBounds | back to summary |
|---|---|
| public Rectangle2D createItalicBounds() | |
| createLogicalBounds | back to summary |
|---|---|
| protected Rectangle2D createLogicalBounds() The logical bounds extends from the origin of the glyphvector to the position at which a following glyphvector's origin should be placed. We always assume glyph vectors are rendered from left to right, so the origin is always to the left. On a left-to-right run, combining marks and 'ligatured away' characters are to the right of their base characters. The charinfo array will record the character positions for these 'missing' characters as being at the origin+advance of the base glyph, with zero advance. (This is not necessarily the same as the glyph position, for example, an umlaut glyph may have a position to the left of this point, it depends on whether the font was designed so that such glyphs overhang to the left of their origin, or whether it presumes some kind of kerning to position the glyphs). Anyway, the left of the bounds is the origin of the first logical (leftmost) character, and the right is the origin + advance of the last logical (rightmost) character. On a right-to-left run, these special characters are to the left of their base characters. Again, since 'glyph position' has been abstracted away, we can use the origin of the leftmost character, and the origin + advance of the rightmost character. On a mixed run (hindi) we can't rely on the first logical character being the leftmost character. However we can again rely on the leftmost character origin and the rightmost character + advance. | |
| draw | back to summary |
|---|---|
| public void draw(Graphics2D g, float x, float y) Implements sun. Render the label at x, y in the graphics. | |
| draw | back to summary |
|---|---|
| public void draw(Graphics2D g) A convenience method that renders the label at 0, 0. | |
| getAdvance | back to summary |
|---|---|
| public float getAdvance() Implements sun. | |
| getAdvanceBetween | back to summary |
|---|---|
| public float getAdvanceBetween(int start, int limit) Implements sun. Return the accumulated advances of all characters between logicalStart and logicalLimit. | |
| getAlignBounds | back to summary |
|---|---|
| public Rectangle2D getAlignBounds(float x, float y) Return a rectangle that corresponds to the alignment bounds of the text when this label is rendered at x, y. This rectangle is used when positioning text next to a margin. It differs from the logical bounds in that it does not include leading or trailing whitespace. | |
| getAlignBounds | back to summary |
|---|---|
| public Rectangle2D getAlignBounds() A convenience method that returns the align bounds when rendered at 0, 0. | |
| getBaselineTransform | back to summary |
|---|---|
| public AffineTransform getBaselineTransform() Implements sun. | |
| getCharAdvance | back to summary |
|---|---|
| public float getCharAdvance(int index) Implements sun. Return the advance of the character at the given logical index. | |
| getCharinfo | back to summary |
|---|---|
| private float[] getCharinfo() | |
| getCharVisualBounds | back to summary |
|---|---|
| public Rectangle2D getCharVisualBounds(int logicalIndex) Implements sun. A convenience overload of getCharVisualBounds that defaults the label origin to 0, 0. | |
| getCharVisualBounds | back to summary |
|---|---|
| public Rectangle2D getCharVisualBounds(int index, float x, float y) Return the visual bounds of the character at the given logical index. This bounds encloses all the pixels of the character when the label is rendered at x, y. | |
| getCharX | back to summary |
|---|---|
| public float getCharX(int index) Implements sun. Return the x location of the character at the given logical index. | |
| getCharY | back to summary |
|---|---|
| public float getCharY(int index) Implements sun. Return the y location of the character at the given logical index. | |
| getCoreMetrics | back to summary |
|---|---|
| public CoreMetrics getCoreMetrics() Implements sun. Return the line metrics for all text in this label. | |
| getGV | back to summary |
|---|---|
| private StandardGlyphVector getGV() | |
| getItalicBounds | back to summary |
|---|---|
| public Rectangle2D getItalicBounds(float x, float y) Return a rectangle that corresponds to the logical bounds of the text, adjusted to angle the leading and trailing edges by the italic angle. | |
| getItalicBounds | back to summary |
|---|---|
| public Rectangle2D getItalicBounds() Implements sun. A convenience method that returns the italic bounds when rendered at 0, 0. | |
| getJustificationInfos | back to summary |
|---|---|
| public void getJustificationInfos(GlyphJustificationInfo[] infos, int infoStart, int charStart, int charLimit) Implements sun. Return GlyphJustificationInfo objects for the characters between charStart and charLimit, starting at offset infoStart. Infos will be in visual order. All positions between infoStart and getNumJustificationInfos will be set. If a position corresponds to a character outside the provided range, it is set to null. | |
| getLineBreakIndex | back to summary |
|---|---|
| public int getLineBreakIndex(int start, float width) Implements sun. Return the logical index of the character, starting with the character at logicalStart, whose accumulated advance exceeds width. If the advances of all characters do not exceed width, return getNumCharacters. If width is less than zero, return logicalStart - 1. | |
| getLogicalBounds | back to summary |
|---|---|
| public Rectangle2D getLogicalBounds(float x, float y) Return a rectangle that corresponds to the logical bounds of the text when this label is rendered at x, y. This rectangle is used when positioning text next to other text. | |
| getLogicalBounds | back to summary |
|---|---|
| public Rectangle2D getLogicalBounds() Implements sun. A convenience method that returns the logical bounds when rendered at 0, 0. | |
| getNumCharacters | back to summary |
|---|---|
| public int getNumCharacters() Implements sun. Return the number of characters represented by this label. | |
| getNumJustificationInfos | back to summary |
|---|---|
| public int getNumJustificationInfos() Implements sun. Return the number of justification records this uses. | |
| getOutline | back to summary |
|---|---|
| public Shape getOutline(float x, float y) Implements sun. Return an outline of the characters in the label when rendered at x, y. | |
| getOutline | back to summary |
|---|---|
| public Shape getOutline() A convenience method that returns the outline when rendered at 0, 0. | |
| getPixelBounds | back to summary |
|---|---|
| public Rectangle getPixelBounds(FontRenderContext frc, float x, float y) Implements sun. | |
| getSubset | back to summary |
|---|---|
| public TextLineComponent getSubset(int start, int limit, int dir) Implements sun. Doc from sun. Return a TextLineComponent for the characters in the range start, limit. The range is relative to this TextLineComponent (ie, the first character is at 0). | |
| getVisualBounds | back to summary |
|---|---|
| public Rectangle2D getVisualBounds(float x, float y) Return a rectangle that surrounds the text outline when this label is rendered at x, y. | |
| getVisualBounds | back to summary |
|---|---|
| public Rectangle2D getVisualBounds() Implements sun. A convenience method that returns the visual bounds when rendered at 0, 0. | |
| handleDraw | back to summary |
|---|---|
| public void handleDraw(Graphics2D g, float x, float y) Implements sun. | |
| handleGetCharVisualBounds | back to summary |
|---|---|
| public Rectangle2D handleGetCharVisualBounds(int index) Implements sun. | |
| handleGetOutline | back to summary |
|---|---|
| public Shape handleGetOutline(float x, float y) Implements sun. | |
| handleGetVisualBounds | back to summary |
|---|---|
| public Rectangle2D handleGetVisualBounds() Implements sun. | |
| isSimple | back to summary |
|---|---|
| public boolean isSimple() Implements sun. | |
| l2v | back to summary |
|---|---|
| protected int l2v(int index) Map logical character index to visual character index. This ignores hindi reordering.
| |
| logicalToVisual | back to summary |
|---|---|
| public int logicalToVisual(int logicalIndex) Return the visual index of the character at the given logical index. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| v2l | back to summary |
|---|---|
| protected int v2l(int index) Map visual character index to logical character index. This ignores hindi reordering.
| |
| validate | back to summary |
|---|---|
| private void validate(int index) | |
| visualToLogical | back to summary |
|---|---|
| public int visualToLogical(int visualIndex) Return the logical index of the character at the given visual index. | |