Text nodes.
The setting affects layoutBounds, boundsInLocal and
boundsInParent
The geometry of text can be measured either in terms of the bounds of
the particular text to be rendered - visual bounds, or as properties
of the font and the characters to be rendered - logical bounds.
Visual bounds are more useful for positioning text as graphics, and
for obtaining tight enclosing bounds around the text.
Logical bounds are important for laying out text relative to other text and other components, particularly those which also contain text. The bounds aren't specific to the text being rendered, and so will report heights which account for the potential ascent and descent of text using the font at its specified size. Also leading and trailing spaces are part of the logical advance width of the text.
| Modifier and Type | Field and Description |
|---|---|
| public static final TextBoundsType | LOGICAL
Use logical bounds as the basis for calculating the bounds. |
| public static final TextBoundsType | LOGICAL_VERTICAL_CENTER
Use logical vertical centered bounds as the basis for calculating the bounds. |
| public static final TextBoundsType | VISUAL
Use visual bounds as the basis for calculating the bounds. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static TextBoundsType | |
| public static TextBoundsType[] |
| LOGICAL | back to summary |
|---|---|
| public static final TextBoundsType LOGICAL Use logical bounds as the basis for calculating the bounds. The logical bounds are based on font metrics information. The width is based on the glyph advances and the height of the ascent, descent, and line gap, except for the last line which does not include the line gap. Note This is usually the fastest option. | |
| LOGICAL_VERTICAL_CENTER | back to summary |
|---|---|
| public static final TextBoundsType LOGICAL_VERTICAL_CENTER Use logical vertical centered bounds as the basis for calculating the bounds.
This bounds type is typically used to center
| |
| VISUAL | back to summary |
|---|---|
| public static final TextBoundsType VISUAL Use visual bounds as the basis for calculating the bounds. Note This is likely to be slower than using logical bounds. | |
| TextBoundsType | back to summary |
|---|---|
| private TextBoundsType() | |
| valueOf | back to summary |
|---|---|
| public static TextBoundsType valueOf(String name) | |
| values | back to summary |
|---|---|
| public static TextBoundsType[] values() | |