| Modifier and Type | Field and Description |
|---|---|
| private static final Object | |
| private Integer | |
| private static int | |
| private int | |
| private PGFont | |
| private static final BaseTransform | |
| private LayoutCache | |
| private float | |
| private float | |
| private PrismTextLine[] | |
| private BaseBounds | |
| private static final int | |
| private final int | |
| private int | |
| private TextRun[] | |
| private Shape | |
| private float | |
| private TextSpan[] | |
| private FontStrike | |
| private static final Hashtable | |
| private TabAdvancePolicy | |
| private char[] | |
| private RectBounds | |
| private float | |
| 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 void | |
| private void | |
| private float | |
| private void | |
| private float | Returns: the X size of the white space trailing the runthe run to compute trailing space width for, cannot be run)nullComputes the size of the white space trailing a given run. |
| private PrismTextLine | |
| private void | |
| public BaseBounds | getBounds()
Implements com. Returns the (logical) bounds of the layout minX is always zero minY is the ascent of the first line (negative) width the width of the widest line height the sum of all lines height Note that this width is different the wrapping width! |
| public BaseBounds | getBounds(TextSpan filter, BaseBounds bounds)
Implements com.
|
| public TextLayout. | getCaretGeometry(int offset, boolean isLeading)
Implements com. Queries the caret geometry and associated information at the specified text position. |
| private int | |
| public int | |
| public PGFont | |
| public TextLayout. | getHitInfo(float x, float y)
Implements com. Calculates character index and insertion index for the given coordinates
and maps to |
| private int | |
| private int | |
| public TextLine[] | getLines()
Implements com. Returns the lines of text layout. |
| private float | |
| public void | getRange(int start, int end, int type, TextLayout.
Implements com. Queries the range geometry of the range of text within the text layout for one of the three possible types:
|
| public GlyphList[] | getRuns()
Implements com. Returns the GlyphList of text layout. |
| public Shape | getShape(int type, TextSpan filter)
Implements com. Returns the shape of the entire text layout relative to the baseline of the first line. |
| private float | |
| private char[] | |
| public TextSpan[] | |
| public BaseBounds | getVisualBounds(int type)
Implements com. Returns the visual bounds of the layout using glyph bounding box |
| protected GlyphLayout | |
| private void | |
| private boolean | |
| private boolean | |
| private void | |
| private boolean | Returns: true, if only the runs can be reusedDecides whether the text layout is worth caching and/or if we can reuse it completely or only the runs. |
| private void | |
| private void | |
| private void | |
| private void | |
| public boolean | setAlignment(int alignment)
Implements com. Sets the alignment for the TextLayout. |
| public boolean | setBoundsType(int type)
Implements com. Sets the bounds type for the TextLayout. |
| public boolean | setContent(TextSpan[] spans)
Implements com. * TextLayout API * * |
| public boolean | setContent(String text, Object font)
Implements com. Sets the content for the TextLayout. |
| public boolean | setDirection(int direction)
Implements com. Sets the direction (bidi algorithm's) for the TextLayout. |
| public boolean | setLineSpacing(float spacing)
Implements com. Sets the line spacing for the TextLayout. |
| public boolean | setTabAdvancePolicy(int tabSize, TabAdvancePolicy policy)
Implements com. Sets the tab size and the tab advance policy for the TextLayout. |
| public boolean | setWrapWidth(float newWidth)
Implements com. Sets the wrap width for the TextLayout. |
| private void |
| CACHE_SIZE_LOCK | back to summary |
|---|---|
| private static final Object CACHE_SIZE_LOCK | |
| cacheKey | back to summary |
|---|---|
| private Integer cacheKey | |
| cacheSize | back to summary |
|---|---|
| private static int cacheSize | |
| flags | back to summary |
|---|---|
| private int flags | |
| font | back to summary |
|---|---|
| private PGFont font | |
| IDENTITY | back to summary |
|---|---|
| private static final BaseTransform IDENTITY | |
| layoutCache | back to summary |
|---|---|
| private LayoutCache layoutCache | |
| layoutHeight | back to summary |
|---|---|
| private float layoutHeight | |
| layoutWidth | back to summary |
|---|---|
| private float layoutWidth | |
| lines | back to summary |
|---|---|
| private PrismTextLine[] lines | |
| logicalBounds | back to summary |
|---|---|
| private BaseBounds logicalBounds | |
| MAX_STRING_SIZE | back to summary |
|---|---|
| private static final int MAX_STRING_SIZE | |
| maxCacheSize | back to summary |
|---|---|
| private final int maxCacheSize | |
| runCount | back to summary |
|---|---|
| private int runCount | |
| runs | back to summary |
|---|---|
| private TextRun[] runs | |
| shape | back to summary |
|---|---|
| private Shape shape | |
| spacing | back to summary |
|---|---|
| private float spacing | |
| spans | back to summary |
|---|---|
| private TextSpan[] spans | |
| strike | back to summary |
|---|---|
| private FontStrike strike | |
| stringCache | back to summary |
|---|---|
| private static final Hashtable<Integer, LayoutCache> stringCache | |
| tabAdvancePolicy | back to summary |
|---|---|
| private TabAdvancePolicy tabAdvancePolicy | |
| text | back to summary |
|---|---|
| private char[] text | |
| visualBounds | back to summary |
|---|---|
| private RectBounds visualBounds | |
| wrapWidth | back to summary |
|---|---|
| private float wrapWidth | |
| X_MAX_INDEX | back to summary |
|---|---|
| private static final int X_MAX_INDEX | |
| X_MIN_INDEX | back to summary |
|---|---|
| private static final int X_MIN_INDEX | |
| Y_MAX_INDEX | back to summary |
|---|---|
| private static final int Y_MAX_INDEX | |
| Y_MIN_INDEX | back to summary |
|---|---|
| private static final int Y_MIN_INDEX | |
| PrismTextLayout | back to summary |
|---|---|
| public PrismTextLayout(int maxCacheSize) | |
| addTextRun | back to summary |
|---|---|
| public void addTextRun(TextRun run) | |
| buildRuns | back to summary |
|---|---|
| private void buildRuns(char[] chars) | |
| computeLayoutShift | back to summary |
|---|---|
| private float computeLayoutShift(TextSpan span) | |
| computeSideBearings | back to summary |
|---|---|
| private void computeSideBearings(PrismTextLine line) | |
| computeTrailingSpaceWidth | back to summary |
|---|---|
| private float computeTrailingSpaceWidth(TextRun run) Computes the size of the white space trailing a given run.
| |
| createLine | back to summary |
|---|---|
| private PrismTextLine createLine(int start, int end, int startOffset, float collapsedSpaceWidth) | |
| ensureLayout | back to summary |
|---|---|
| private void ensureLayout() | |
| getBounds | back to summary |
|---|---|
| public BaseBounds getBounds() Implements com. Doc from com. Returns the (logical) bounds of the layout minX is always zero minY is the ascent of the first line (negative) width the width of the widest line height the sum of all lines height Note that this width is different the wrapping width!
| |
| getBounds | back to summary |
|---|---|
| public BaseBounds getBounds(TextSpan filter, BaseBounds bounds) Implements com.
| |
| getCaretGeometry | back to summary |
|---|---|
| public TextLayout. Implements com. Doc from com. Queries the caret geometry and associated information at the specified text position.
| |
| getCharCount | back to summary |
|---|---|
| private int getCharCount() | |
| getDirection | back to summary |
|---|---|
| public int getDirection() | |
| getFont | back to summary |
|---|---|
| public PGFont getFont() | |
| getHitInfo | back to summary |
|---|---|
| public TextLayout. Implements com. Doc from com. Calculates character index and insertion index for the given coordinates
and maps to
| |
| getLineCount | back to summary |
|---|---|
| private int getLineCount() | |
| getLineIndex | back to summary |
|---|---|
| private int getLineIndex(float y) * Text Layout Implementation * * | |
| getLines | back to summary |
|---|---|
| public TextLine[] getLines() Implements com. Doc from com. Returns the lines of text layout.
| |
| getMirroringWidth | back to summary |
|---|---|
| private float getMirroringWidth() | |
| getRange | back to summary |
|---|---|
| public void getRange(int start, int end, int type, TextLayout. Implements com. Doc from com. Queries the range geometry of the range of text within the text layout for one of the three possible types:
| |
| getRuns | back to summary |
|---|---|
| public GlyphList[] getRuns() Implements com. Doc from com. Returns the GlyphList of text layout. The runs are returned order visually (rendering order), starting from the first line.
| |
| getShape | back to summary |
|---|---|
| public Shape getShape(int type, TextSpan filter) Implements com. Doc from com. Returns the shape of the entire text layout relative to the baseline of the first line.
| |
| getSpaceAdvance | back to summary |
|---|---|
| private float getSpaceAdvance() | |
| getText | back to summary |
|---|---|
| private char[] getText() | |
| getTextSpans | back to summary |
|---|---|
| public TextSpan[] getTextSpans() | |
| getVisualBounds | back to summary |
|---|---|
| public BaseBounds getVisualBounds(int type) Implements com. Doc from com. Returns the visual bounds of the layout using glyph bounding box
| |
| glyphLayout | back to summary |
|---|---|
| protected GlyphLayout glyphLayout() | |
| initCache | back to summary |
|---|---|
| private void initCache() | |
| isMirrored | back to summary |
|---|---|
| private boolean isMirrored() | |
| isSimpleLayout | back to summary |
|---|---|
| private boolean isSimpleLayout() | |
| layout | back to summary |
|---|---|
| private void layout() | |
| onlyReuseRuns | back to summary |
|---|---|
| private boolean onlyReuseRuns() Decides whether the text layout is worth caching and/or if we can reuse it completely or only the runs.
A text layout is worth caching and to be reused completely
when the text layout uses the (simple) default settings.
| |
| relayout | back to summary |
|---|---|
| private void relayout() | |
| reorderLine | back to summary |
|---|---|
| private void reorderLine(PrismTextLine line) | |
| reset | back to summary |
|---|---|
| private void reset() | |
| reuseRuns | back to summary |
|---|---|
| private void reuseRuns() | |
| setAlignment | back to summary |
|---|---|
| public boolean setAlignment(int alignment) Implements com. Doc from com. Sets the alignment for the TextLayout.
| |
| setBoundsType | back to summary |
|---|---|
| public boolean setBoundsType(int type) Implements com. Doc from com. Sets the bounds type for the TextLayout.
| |
| setContent | back to summary |
|---|---|
| public boolean setContent(TextSpan[] spans) Implements com. * TextLayout API * *
| |
| setContent | back to summary |
|---|---|
| public boolean setContent(String text, Object font) Implements com. Doc from com. Sets the content for the TextLayout. Shorthand for single span text (no rich text).
| |
| setDirection | back to summary |
|---|---|
| public boolean setDirection(int direction) Implements com. Doc from com. Sets the direction (bidi algorithm's) for the TextLayout.
| |
| setLineSpacing | back to summary |
|---|---|
| public boolean setLineSpacing(float spacing) Implements com. Doc from com. Sets the line spacing for the TextLayout.
| |
| setTabAdvancePolicy | back to summary |
|---|---|
| public boolean setTabAdvancePolicy(int tabSize, TabAdvancePolicy policy) Implements com. Doc from com. Sets the tab size and the tab advance policy for the TextLayout.
A non-
| |
| setWrapWidth | back to summary |
|---|---|
| public boolean setWrapWidth(float newWidth) Implements com. Doc from com. Sets the wrap width for the TextLayout.
| |
| shape | back to summary |
|---|---|
| private void shape(TextRun run, char[] chars, GlyphLayout layout) | |