Skip to content

Commit 7bf2372

Browse files
committed
8293587: Fix mistakes in FX API docs
Reviewed-by: jhendrikx, kcr, angorya
1 parent abe8058 commit 7bf2372

File tree

6 files changed

+51
-48
lines changed

6 files changed

+51
-48
lines changed

modules/javafx.controls/src/main/java/javafx/scene/control/ListView.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -462,26 +462,26 @@ public final ObjectProperty<ObservableList<T>> itemsProperty() {
462462
return items;
463463
}
464464

465-
466-
// --- Placeholder Node
467-
private ObjectProperty<Node> placeholder;
468465
/**
469-
* This Node is shown to the user when the listview has no content to show.
470-
* This may be the case because the table model has no data in the first
471-
* place or that a filter has been applied to the list model, resulting
472-
* in there being nothing to show the user..
473-
* @return the placeholder property for this ListView
466+
* The {@code Node} to show to the user when the {@code ListView} has no content to show.
467+
* This happens when the list model has no data or when a filter has been applied to the list model, resulting in
468+
* there being nothing to show the user.
469+
*
474470
* @since JavaFX 8.0
475471
*/
472+
private ObjectProperty<Node> placeholder;
473+
476474
public final ObjectProperty<Node> placeholderProperty() {
477475
if (placeholder == null) {
478476
placeholder = new SimpleObjectProperty<>(this, "placeholder");
479477
}
480478
return placeholder;
481479
}
480+
482481
public final void setPlaceholder(Node value) {
483482
placeholderProperty().set(value);
484483
}
484+
485485
public final Node getPlaceholder() {
486486
return placeholder == null ? null : placeholder.get();
487487
}

modules/javafx.graphics/src/main/java/com/sun/glass/ui/InvokeLaterDispatcher.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@
3030
* A dispatcher for Application.invokeLater() that submits deferred runnables
3131
* to the native system one by one.
3232
*
33-
* A native system may by default execute all submitted runnables before
33+
* A native system may, by default, execute all submitted runnables before
3434
* actually leaving a nested event loop. However, there is an assumption that a
3535
* runnable that calls the Application.leaveNestedEventLoop() method must be
3636
* the last runnable executed in the current inner event loop. The next
37-
* runnable that might have already been submitted by client code, must be
38-
* invoked in the context of the outer event loop. To satisfy this requirement
37+
* runnable that might have already been submitted by client code must be
38+
* invoked in the context of the outer event loop. To satisfy this requirement,
3939
* the runnables must be submitted to the native system one by one. This allows
40-
* for fine grain control over executing the deferred tasks when it comes to
41-
* entering/leaving nested event loops despite of native system limitations.
40+
* for a fine grained control over the execution of the deferred tasks when it comes to
41+
* entering/leaving nested event loops despite native system limitations.
4242
*/
4343
public final class InvokeLaterDispatcher extends Thread {
4444
// The runnables queue
@@ -82,7 +82,7 @@ public Future(Runnable r) {
8282
}
8383

8484
/**
85-
* Tells whether the runnbale has finished execution.
85+
* Tells whether the runnable has finished execution.
8686
*
8787
* This method must be called under the LOCK lock.
8888
*/

modules/javafx.graphics/src/main/java/com/sun/glass/ui/win/WinApplication.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
import java.util.ResourceBundle;
4040

4141
final class WinApplication extends Application implements InvokeLaterDispatcher.InvokeLaterSubmitter {
42-
static float overrideUIScale;
42+
43+
static float overrideUIScale;
4344
private static final String BASE_NAME = "com/sun/glass/ui/win/themes";
4445

4546
private static boolean getBoolean(String propname, boolean defval, String description) {
@@ -111,6 +112,7 @@ public Void run() {
111112
}
112113

113114
private final InvokeLaterDispatcher invokeLaterDispatcher;
115+
114116
WinApplication() {
115117
// Embedded in SWT, with shared event thread
116118
@SuppressWarnings("removal")
@@ -126,7 +128,7 @@ public Void run() {
126128

127129
private static boolean verbose;
128130

129-
// returng toolkit window HWND
131+
// returning toolkit window HWND
130132
private native long _init(int awarenessRequested);
131133
private native void _setClassLoader(ClassLoader classLoader);
132134
private native void _runLoop(Runnable launchable);

modules/javafx.graphics/src/main/java/javafx/scene/Scene.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3274,7 +3274,7 @@ private boolean processRecognized(DragEvent de) {
32743274

32753275
private void processDropEnd(DragEvent de) {
32763276
if (source == null) {
3277-
System.out.println("Scene.DnDGesture.processDropEnd() - UNEXPECTD - source is NULL");
3277+
System.out.println("Scene.DnDGesture.processDropEnd() - UNEXPECTED - source is NULL");
32783278
return;
32793279
}
32803280

modules/javafx.graphics/src/main/java/javafx/scene/layout/Region.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,9 +1454,9 @@ public final BooleanProperty scaleShapeProperty() {
14541454
}
14551455

14561456
/**
1457-
* Defines whether the shape is centered within the Region's width or height.
1458-
* {@code true} means the shape centered within the Region's width and height,
1459-
* {@code false} means the shape is positioned at its source position.
1457+
* Defines whether the shape is centered within the {@code Region}'s width and height.
1458+
* When {@code true}, the shape is centered within the {@code Region}'s width and height,
1459+
* otherwise the shape is positioned at its source position.
14601460
*
14611461
* @defaultValue true
14621462
* @since JavaFX 8.0

modules/javafx.graphics/src/main/java/javafx/scene/text/TextFlow.java

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -59,38 +59,39 @@
5959
import javafx.css.StyleableProperty;
6060

6161
/**
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,
6565
* 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
6868
* due to bidi reordering.
6969
*
7070
* <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
7272
* text layout. It will be inserted in the content using its preferred width,
7373
* height, and baseline offset.
7474
*
7575
* <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
7878
* 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
8484
* line breaking and bidi reordering).
8585
*
8686
* <p>
8787
* 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
8989
* 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}.
9192
*
9293
* <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.
9495
*
9596
* <p>
9697
* Example of a TextFlow:
@@ -105,18 +106,18 @@
105106
* }</pre>
106107
*
107108
* <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;
109110
* unmanaged children are ignored for all layout calculations.</p>
110111
*
111112
* <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
113114
* {@link javafx.scene.layout.Region Region} superclass for details.</p>
114115
*
115116
* <h2>Resizable Range</h2>
116117
*
117118
* <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
120121
* as outlined in the tables below.
121122
* </p>
122123
*
@@ -130,24 +131,24 @@
130131
* <td>left/right insets plus the width of the text content</td>
131132
* <td>top/bottom insets plus the height of the text content</td></tr>
132133
* <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>
134135
* </table>
135136
* <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
137138
* it may be resized beyond its preferred size to fill whatever space is assigned to it.
138139
* <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
141142
* application may set them to other values as needed:
142143
* <pre><code>
143144
* <b>textflow.setMaxWidth(500);</b>
144145
* </code></pre>
145146
* Applications may restore the computed values by setting these properties back
146-
* to Region.USE_COMPUTED_SIZE.
147+
* to {@code Region.USE_COMPUTED_SIZE}.
147148
* <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>
151152
*
152153
* @since JavaFX 8.0
153154
*/

0 commit comments

Comments
 (0)