|
59 | 59 | import javafx.css.StyleableProperty; |
60 | 60 |
|
61 | 61 | /** |
62 | | - * TextFlow is special layout designed to lay out rich text. |
63 | | - * It can be used to layout several {@link Text} nodes in a single text flow. |
64 | | - * The TextFlow uses the text and the font of each {@link Text} node inside of it |
| 62 | + * A specialized layout for rich text. |
| 63 | + * It can be used to lay out several {@link Text} nodes in a single text flow. |
| 64 | + * {@code TextFlow} uses the text and the font of each {@code Text} node inside of it, |
65 | 65 | * plus its own width and text alignment to determine the location for each child. |
66 | | - * A single {@link Text} node can span over several lines due to wrapping, and |
67 | | - * the visual location of {@link Text} node can differ from the logical location |
| 66 | + * A single {@code Text} node can span over several lines due to wrapping, and |
| 67 | + * the visual location of the {@code Text} node can differ from the logical location |
68 | 68 | * due to bidi reordering. |
69 | 69 | * |
70 | 70 | * <p> |
71 | | - * Any Node, other than Text, will be treated as an embedded object in the |
| 71 | + * Any {@code Node} other than {@code Text} will be treated as an embedded object in the |
72 | 72 | * text layout. It will be inserted in the content using its preferred width, |
73 | 73 | * height, and baseline offset. |
74 | 74 | * |
75 | 75 | * <p> |
76 | | - * When a {@link Text} node is inside of a TextFlow, some of its properties are ignored. |
77 | | - * For example, the x and y properties of the {@link Text} node are ignored since |
| 76 | + * When a {@code Text} node is inside a {@code TextFlow}, some of its properties are ignored. |
| 77 | + * For example, the {@code x} and {@code y} properties of the {@code Text} node are ignored since |
78 | 78 | * the location of the node is determined by the parent. Likewise, the wrapping |
79 | | - * width in the {@link Text} node is ignored since the width used for wrapping |
80 | | - * is the TextFlow's width. The value of the <code>pickOnBounds</code> property |
81 | | - * of a {@link Text} is set to <code>false</code> when it is laid out by the |
82 | | - * TextFlow. This happens because the content of a single {@link Text} node can |
83 | | - * divided and placed in the different locations on the TextFlow (usually due to |
| 79 | + * width in the {@code Text} node is ignored since the width used for wrapping |
| 80 | + * is the {@code TextFlow}'s width. The value of the {@code pickOnBounds} property |
| 81 | + * of a {@code Text} node is set to {@code false} when it is laid out by the |
| 82 | + * {@code TextFlow}. This happens because the content of a single {@code Text} node can be |
| 83 | + * split and placed in different locations in the {@code TextFlow} (usually due to |
84 | 84 | * line breaking and bidi reordering). |
85 | 85 | * |
86 | 86 | * <p> |
87 | 87 | * The wrapping width of the layout is determined by the region's current width. |
88 | | - * It can be specified by the application by setting the textflow's preferred |
| 88 | + * It can be specified by the application by setting the {@code TextFlow}'s preferred |
89 | 89 | * width. If no wrapping is desired, the application can either set the preferred |
90 | | - * with to Double.MAX_VALUE or Region.USE_COMPUTED_SIZE. |
| 90 | + * with to {@code Double.MAX_VALUE} or |
| 91 | + * {@link javafx.scene.layout.Region#USE_COMPUTED_SIZE Region.USE_COMPUTED_SIZE}. |
91 | 92 | * |
92 | 93 | * <p> |
93 | | - * Paragraphs are separated by {@code '\n'} present in any Text child. |
| 94 | + * Paragraphs are separated by {@code '\n'} present in any {@code Text} child. |
94 | 95 | * |
95 | 96 | * <p> |
96 | 97 | * Example of a TextFlow: |
|
105 | 106 | * }</pre> |
106 | 107 | * |
107 | 108 | * <p> |
108 | | - * TextFlow lays out each managed child regardless of the child's visible property value; |
| 109 | + * {@code TextFlow} lays out each managed child regardless of the child's visible property value; |
109 | 110 | * unmanaged children are ignored for all layout calculations.</p> |
110 | 111 | * |
111 | 112 | * <p> |
112 | | - * TextFlow may be styled with backgrounds and borders using CSS. See |
| 113 | + * {@code TextFlow} may be styled with backgrounds and borders using CSS. See its |
113 | 114 | * {@link javafx.scene.layout.Region Region} superclass for details.</p> |
114 | 115 | * |
115 | 116 | * <h2>Resizable Range</h2> |
116 | 117 | * |
117 | 118 | * <p> |
118 | | - * A textflow's parent will resize the textflow within the textflow's range |
119 | | - * during layout. By default the textflow computes this range based on its content |
| 119 | + * A {@code TextFlow}'s parent will resize the {@code TextFlow} within the {@code TextFlow}'s range |
| 120 | + * during layout. By default, the {@code TextFlow} computes this range based on its content |
120 | 121 | * as outlined in the tables below. |
121 | 122 | * </p> |
122 | 123 | * |
|
130 | 131 | * <td>left/right insets plus the width of the text content</td> |
131 | 132 | * <td>top/bottom insets plus the height of the text content</td></tr> |
132 | 133 | * <tr><th scope="row">maximum</th> |
133 | | - * <td>Double.MAX_VALUE</td><td>Double.MAX_VALUE</td></tr> |
| 134 | + * <td>{@code Double.MAX_VALUE}</td><td>{@code Double.MAX_VALUE}</td></tr> |
134 | 135 | * </table> |
135 | 136 | * <p> |
136 | | - * A textflow's unbounded maximum width and height are an indication to the parent that |
| 137 | + * A {@code TextFlow}'s unbounded maximum width and height are an indication to the parent that |
137 | 138 | * it may be resized beyond its preferred size to fill whatever space is assigned to it. |
138 | 139 | * <p> |
139 | | - * TextFlow provides properties for setting the size range directly. These |
140 | | - * properties default to the sentinel value Region.USE_COMPUTED_SIZE, however the |
| 140 | + * {@code TextFlow} provides properties for setting the size range directly. These |
| 141 | + * properties default to the sentinel value {@code Region.USE_COMPUTED_SIZE}, however the |
141 | 142 | * application may set them to other values as needed: |
142 | 143 | * <pre><code> |
143 | 144 | * <b>textflow.setMaxWidth(500);</b> |
144 | 145 | * </code></pre> |
145 | 146 | * Applications may restore the computed values by setting these properties back |
146 | | - * to Region.USE_COMPUTED_SIZE. |
| 147 | + * to {@code Region.USE_COMPUTED_SIZE}. |
147 | 148 | * <p> |
148 | | - * TextFlow does not clip its content by default, so it is possible that childrens' |
149 | | - * bounds may extend outside its own bounds if a child's pref size is larger than |
150 | | - * the space textflow has to allocate for it.</p> |
| 149 | + * {@code TextFlow} does not clip its content by default, so it is possible that children's |
| 150 | + * bounds may extend outside of its own bounds if a child's preferred size is larger than |
| 151 | + * the space the {@code TextFlow} has to allocate for it.</p> |
151 | 152 | * |
152 | 153 | * @since JavaFX 8.0 |
153 | 154 | */ |
|
0 commit comments