| java.lang.Object java.awt.font.TextLine
TextLine | final class TextLine (Code) | | |
Inner Class :final static class TextLineMetrics | |
Constructor Summary | |
public | TextLine(FontRenderContext frc, TextLineComponent[] components, float[] baselineOffsets, char[] chars, int charsStart, int charsLimit, int[] charLogicalOrder, byte[] charLevels, boolean isDirectionLTR) |
Method Summary | |
static boolean | advanceToFirstFont(AttributedCharacterIterator aci) When this returns, the ACI's current position will be at the start of the
first run which does NOT contain a GraphicAttribute. | public boolean | caretAtOffsetIsValid(int offset) | public int | characterCount() | static Rectangle | computePixelBounds(BufferedImage im) | public static TextLineComponent[] | createComponentsOnRun(int runStart, int runLimit, char[] chars, int[] charsLtoV, byte[] levels, TextLabelFactory factory, Font font, CoreMetrics cm, FontRenderContext frc, Decoration decorator, TextLineComponent[] components, int numComponents) Returns an array in logical order of the TextLineComponents on
the text in the given range, with the given attributes. | public static TextLine | createLineFromText(char[] chars, StyledParagraph styledParagraph, TextLabelFactory factory, boolean isDirectionLTR, float[] baselineOffsets) Create a TextLine from the Font and character data over the
range. | public void | draw(Graphics2D g2, float x, float y) | public static TextLine | fastCreateTextLine(FontRenderContext frc, char[] chars, Font font, CoreMetrics lm, Map attributes) Create a TextLine from the text. | public static float | getAdvanceBetween(TextLineComponent[] components, int start, int limit) | public float | getCharAdvance(int logicalIndex) | public float | getCharAngle(int logicalIndex) | public float | getCharAscent(int logicalIndex) | public Rectangle2D | getCharBounds(int logicalIndex) | public float | getCharDescent(int logicalIndex) | public byte | getCharLevel(int logicalIndex) | public float | getCharLinePosition(int logicalIndex) | public float | getCharLinePosition(int logicalIndex, boolean leading) | public float | getCharShift(int logicalIndex) | public int | getCharType(int logicalIndex) | public float | getCharXPosition(int logicalIndex) | public float | getCharYPosition(int logicalIndex) | public static TextLineComponent[] | getComponents(StyledParagraph styledParagraph, char[] chars, int textStart, int textLimit, int[] charsLtoV, byte[] levels, TextLabelFactory factory) Returns an array (in logical order) of the TextLineComponents representing
the text. | public CoreMetrics | getCoreMetricsAt(int logicalIndex) | static Font | getFontAtCurrentPos(AttributedCharacterIterator aci) | public Rectangle2D | getItalicBounds() | public TextLine | getJustifiedLine(float justificationWidth, float justifyRatio, int justStart, int justLimit) | LayoutPathImpl | getLayoutPath() | public TextLineMetrics | getMetrics() | static float[] | getNormalizedOffsets(float[] baselineOffsets, byte baseline) | public Shape | getOutline(AffineTransform tx) | public Rectangle | getPixelBounds(FontRenderContext frc, float x, float y) | public Rectangle2D | getVisualBounds() Return the union of the visual bounds of all the components.
This incorporates the path. | public int | hashCode() | public boolean | isCharLTR(int logicalIndex) | public boolean | isCharSpace(int logicalIndex) | public boolean | isCharWhitespace(int logicalIndex) | public boolean | isDirectionLTR() | public int | logicalToVisual(int logicalIndex) | public static TextLine | standardCreateTextLine(FontRenderContext frc, AttributedCharacterIterator text, char[] chars, float[] baselineOffsets) Create a TextLine from the text. | public String | toString() | public int | visualToLogical(int visualIndex) |
TextLine | public TextLine(FontRenderContext frc, TextLineComponent[] components, float[] baselineOffsets, char[] chars, int charsStart, int charsLimit, int[] charLogicalOrder, byte[] charLevels, boolean isDirectionLTR)(Code) | | |
advanceToFirstFont | static boolean advanceToFirstFont(AttributedCharacterIterator aci)(Code) | | When this returns, the ACI's current position will be at the start of the
first run which does NOT contain a GraphicAttribute. If no such run exists
the ACI's position will be at the end, and this method will return false.
|
caretAtOffsetIsValid | public boolean caretAtOffsetIsValid(int offset)(Code) | | |
characterCount | public int characterCount()(Code) | | |
createComponentsOnRun | public static TextLineComponent[] createComponentsOnRun(int runStart, int runLimit, char[] chars, int[] charsLtoV, byte[] levels, TextLabelFactory factory, Font font, CoreMetrics cm, FontRenderContext frc, Decoration decorator, TextLineComponent[] components, int numComponents)(Code) | | Returns an array in logical order of the TextLineComponents on
the text in the given range, with the given attributes.
|
createLineFromText | public static TextLine createLineFromText(char[] chars, StyledParagraph styledParagraph, TextLabelFactory factory, boolean isDirectionLTR, float[] baselineOffsets)(Code) | | Create a TextLine from the Font and character data over the
range. The range is relative to both the StyledParagraph and the
character array.
|
fastCreateTextLine | public static TextLine fastCreateTextLine(FontRenderContext frc, char[] chars, Font font, CoreMetrics lm, Map attributes)(Code) | | Create a TextLine from the text. The Font must be able to
display all of the text.
attributes==null is equivalent to using an empty Map for
attributes
|
getAdvanceBetween | public static float getAdvanceBetween(TextLineComponent[] components, int start, int limit)(Code) | | |
getCharAdvance | public float getCharAdvance(int logicalIndex)(Code) | | |
getCharAngle | public float getCharAngle(int logicalIndex)(Code) | | |
getCharAscent | public float getCharAscent(int logicalIndex)(Code) | | |
getCharDescent | public float getCharDescent(int logicalIndex)(Code) | | |
getCharLevel | public byte getCharLevel(int logicalIndex)(Code) | | |
getCharLinePosition | public float getCharLinePosition(int logicalIndex)(Code) | | |
getCharLinePosition | public float getCharLinePosition(int logicalIndex, boolean leading)(Code) | | |
getCharShift | public float getCharShift(int logicalIndex)(Code) | | |
getCharType | public int getCharType(int logicalIndex)(Code) | | |
getCharXPosition | public float getCharXPosition(int logicalIndex)(Code) | | |
getCharYPosition | public float getCharYPosition(int logicalIndex)(Code) | | |
getComponents | public static TextLineComponent[] getComponents(StyledParagraph styledParagraph, char[] chars, int textStart, int textLimit, int[] charsLtoV, byte[] levels, TextLabelFactory factory)(Code) | | Returns an array (in logical order) of the TextLineComponents representing
the text. The components are both logically and visually contiguous.
|
getCoreMetricsAt | public CoreMetrics getCoreMetricsAt(int logicalIndex)(Code) | | |
getJustifiedLine | public TextLine getJustifiedLine(float justificationWidth, float justifyRatio, int justStart, int justLimit)(Code) | | |
getLayoutPath | LayoutPathImpl getLayoutPath()(Code) | | |
getMetrics | public TextLineMetrics getMetrics()(Code) | | |
getNormalizedOffsets | static float[] getNormalizedOffsets(float[] baselineOffsets, byte baseline)(Code) | | |
getVisualBounds | public Rectangle2D getVisualBounds()(Code) | | Return the union of the visual bounds of all the components.
This incorporates the path. It does not include logical
bounds (used by carets).
|
hashCode | public int hashCode()(Code) | | |
isCharLTR | public boolean isCharLTR(int logicalIndex)(Code) | | |
isCharSpace | public boolean isCharSpace(int logicalIndex)(Code) | | |
isCharWhitespace | public boolean isCharWhitespace(int logicalIndex)(Code) | | |
isDirectionLTR | public boolean isDirectionLTR()(Code) | | |
logicalToVisual | public int logicalToVisual(int logicalIndex)(Code) | | |
visualToLogical | public int visualToLogical(int visualIndex)(Code) | | |
|
|