|
2 | 2 |
|
3 | 3 | <!-- |
4 | 4 | /* |
5 | | - * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. |
| 5 | + * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. |
6 | 6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
7 | 7 | * |
8 | 8 | * This code is free software; you can redistribute it and/or modify it |
@@ -277,6 +277,7 @@ <h2>Contents</h2> |
277 | 277 | <li><a href="#typefont"><font></a></li> |
278 | 278 | <li><a href="#typepaint"><paint></a></li> |
279 | 279 | <li><a href="#typecolor"><color></a></li> |
| 280 | + <li><a href="#typetextbounds"><text-bounds></a></li> |
280 | 281 | </ul> |
281 | 282 | </li> |
282 | 283 | <li><a href="#stage">Stage</a> |
@@ -351,6 +352,7 @@ <h2>Contents</h2> |
351 | 352 | <li>javafx.scene.text |
352 | 353 | <ul> |
353 | 354 | <li><a href="#text">Text</a></li> |
| 355 | + <li><a href="#textflow">TextFlow</a></li> |
354 | 356 | </ul> |
355 | 357 | </li> |
356 | 358 | </ul> |
@@ -1071,6 +1073,7 @@ <h3><a id="typefont"><font></a></h3> |
1071 | 1073 | font family. An actual font family name available on the system can be |
1072 | 1074 | used, or one of the following generic family names can be used:</p> |
1073 | 1075 | <ul> |
| 1076 | + <li>'system'</li> |
1074 | 1077 | <li>'serif' (e.g., Times)</li> |
1075 | 1078 | <li>'sans-serif' (e.g., Helvetica)</li> |
1076 | 1079 | <li>'cursive' (e.g., Zapf-Chancery)</li> |
@@ -1576,6 +1579,32 @@ <h4>Color Functions <span class="grammar" style="font-size: smaller;"><color- |
1576 | 1579 | href="#typecolor" |
1577 | 1580 | class="typelink"><color></a> |
1578 | 1581 | ) ]+ </span></p> |
| 1582 | + <h3><a id="typetextbounds"><text-bounds></a></h3> |
| 1583 | + <p>The geometry of text can be measured either in terms of the bounds of |
| 1584 | + the particular text to be rendered - visual bounds, or as properties |
| 1585 | + of the font and the characters to be rendered - logical bounds. |
| 1586 | + Visual bounds are more useful for positioning text as graphics, and |
| 1587 | + for obtaining tight enclosing bounds around the text.</p> |
| 1588 | + <p>Logical bounds are important for laying out text relative to other |
| 1589 | + text and other components, particularly those which also contain text. |
| 1590 | + The bounds aren't specific to the text being rendered, and so will |
| 1591 | + report heights which account for the potential ascent and descent of |
| 1592 | + text using the font at its specified size. Also leading and trailing |
| 1593 | + spaces are part of the logical advance width of the text.</p> |
| 1594 | + <p> </p> |
| 1595 | + <p class="grammar">[ logical | visual | logical-vertical-center ]</p> |
| 1596 | + <ul> |
| 1597 | + <li><strong>logical</strong>: The logical bounds are based on font metrics information. |
| 1598 | + The width is based on the glyph advances and the height of the ascent, descent, and |
| 1599 | + line gap, except for the last line which does not include the line gap. |
| 1600 | + This is usually the fastest option.</li> |
| 1601 | + <li><strong>visual</strong>: Use visual bounds as the basis for calculating the bounds. |
| 1602 | + This is likely to be slower than using logical bounds.</li> |
| 1603 | + <li><strong>logical-vertical-center</strong>: Use logical vertical centered bounds |
| 1604 | + as the basis for calculating the bounds. |
| 1605 | + This bounds type is typically used to center Text nodes vertically |
| 1606 | + within the bounds of its parent.</li> |
| 1607 | + </ul> |
1579 | 1608 | <h2><a id="stage">Stage</a></h2> |
1580 | 1609 | <table class="package" width="100%"> |
1581 | 1610 | <tbody> |
@@ -1668,7 +1697,7 @@ <h4><a id="node">Node</a></h4> |
1668 | 1697 | <td class="default">false</td> |
1669 | 1698 | <td class="range"> </td> |
1670 | 1699 | <td>The default value for controls is true, although there are some exceptions. |
1671 | | - See <a href="#controls">Controls</a> for details.</td> |
| 1700 | + See <a href="#control">Control</a> for details.</td> |
1672 | 1701 | </tr> |
1673 | 1702 | <tr> |
1674 | 1703 | <th class="propertyname" scope="row">-fx-view-order</th> |
@@ -3024,6 +3053,24 @@ <h4><a id="text">Text</a></h4> |
3024 | 3053 | </tr> |
3025 | 3054 | </thead> |
3026 | 3055 | <tbody> |
| 3056 | + <tr> |
| 3057 | + <th class="propertyname" scope="row">-fx-bounds-type</th> |
| 3058 | + <td class="value"><a href="#typetextbounds" class="typelink"><text-bounds></a></td> |
| 3059 | + <td>logical</td> |
| 3060 | + <td></td> |
| 3061 | + </tr> |
| 3062 | + <tr> |
| 3063 | + <th class="propertyname" scope="row">-fx-line-spacing</th> |
| 3064 | + <td class="value"><a href="#typenumber" class="typelink"><number></a></td> |
| 3065 | + <td>0</td> |
| 3066 | + <td> </td> |
| 3067 | + </tr> |
| 3068 | + <tr> |
| 3069 | + <th class="propertyname" scope="row">-fx-fill</th> |
| 3070 | + <td class="value"><a href="#typepaint" class="typelink"><paint></a></td> |
| 3071 | + <td>BLACK</td> |
| 3072 | + <td>text color</td> |
| 3073 | + </tr> |
3027 | 3074 | <tr> |
3028 | 3075 | <th class="propertyname" scope="row">-fx-font</th> |
3029 | 3076 | <td class="value"><a href="#typefont" class="typelink"><font></a></td> |
@@ -3072,6 +3119,43 @@ <h4><a id="text">Text</a></h4> |
3072 | 3119 | </tr> |
3073 | 3120 | </tbody> |
3074 | 3121 | </table> |
| 3122 | + <h4><a id="textflow">TextFlow</a></h4> |
| 3123 | +<p class="styleclass">Style class: empty by default</p> |
| 3124 | + <table class="csspropertytable"> |
| 3125 | + <caption>Available CSS Properties</caption> |
| 3126 | + <thead> |
| 3127 | + <tr> |
| 3128 | + <th class="propertyname" scope="col">CSS Property</th> |
| 3129 | + <th class="value" scope="col">Values</th> |
| 3130 | + <th scope="col">Default</th> |
| 3131 | + <th scope="col">Comments</th> |
| 3132 | + </tr> |
| 3133 | + </thead> |
| 3134 | + <tbody> |
| 3135 | + <tr> |
| 3136 | + <th class="propertyname" scope="row">-fx-line-spacing</th> |
| 3137 | + <td class="value"><a href="#typenumber" class="typelink"><number></a></td> |
| 3138 | + <td>0</td> |
| 3139 | + <td> </td> |
| 3140 | + </tr> |
| 3141 | + <tr> |
| 3142 | + <th class="propertyname" scope="row">-fx-tab-size</th> |
| 3143 | + <td class="value"><a href="#typenumber" class="typelink"><integer></a></td> |
| 3144 | + <td>8</td> |
| 3145 | + <td> </td> |
| 3146 | + </tr> |
| 3147 | + <tr> |
| 3148 | + <th class="propertyname" scope="row">-fx-text-alignment</th> |
| 3149 | + <td class="value">[ left | center | right | justify ] </td> |
| 3150 | + <td>left</td> |
| 3151 | + <td>inherits</td> |
| 3152 | + </tr> |
| 3153 | + <tr> |
| 3154 | + <th colspan="4" class="parents" scope="row">Also has <a href="#fontprops">font |
| 3155 | + properties</a> and all properties of <a href="#pane">Pane</a></th> |
| 3156 | + </tr> |
| 3157 | + </tbody> |
| 3158 | + </table> |
3075 | 3159 | <table class="package" width="100%"> |
3076 | 3160 | <tbody> |
3077 | 3161 | <tr> |
@@ -3158,6 +3242,7 @@ <h4><a id="webview">WebView</a></h4> |
3158 | 3242 | </tbody> |
3159 | 3243 | </table> |
3160 | 3244 | <!-- Controls --> |
| 3245 | + <h2><a id="controls">Controls</a></h2> |
3161 | 3246 | <table class="package" width="100%"> |
3162 | 3247 | <tbody> |
3163 | 3248 | <tr> |
|
0 commit comments