Skip to content

Commit 487854c

Browse files
committed
8246343: Fix mistakes in FX API docs
Reviewed-by: kcr, aghaisas
1 parent fc38ce6 commit 487854c

File tree

6 files changed

+36
-35
lines changed

6 files changed

+36
-35
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ public final BooleanProperty editableProperty() {
575575
**************************************************************************/
576576

577577
/**
578+
* Starts an edit to the value of the cell.
578579
* Call this function to transition from a non-editing state into an editing
579580
* state, if the cell is editable. If this cell is already in an editing
580581
* state, it will stay in it.
@@ -586,6 +587,7 @@ public void startEdit() {
586587
}
587588

588589
/**
590+
* Cancels an edit to the value of the cell.
589591
* Call this function to transition from an editing state into a non-editing
590592
* state, without saving any user input.
591593
*/
@@ -596,11 +598,12 @@ public void cancelEdit() {
596598
}
597599

598600
/**
601+
* Commits an edit to the value of the cell.
599602
* Call this function when appropriate (based on the user interaction requirements
600603
* of your cell editing user interface) to do two things:
601604
*
602605
* <ol>
603-
* <li>Fire the appropriate events back to the backing UI control (e.g.
606+
* <li>Fire the appropriate events back to the backing UI control (e.g.,
604607
* {@link ListView}). This will begin the process of pushing this edit
605608
* back to the relevant data source / property (although it does not
606609
* guarantee that this will be successful - that is dependent upon the
@@ -611,12 +614,12 @@ public void cancelEdit() {
611614
*
612615
* <p>In general there is no need to override this method in custom cell
613616
* implementations - it should be sufficient to simply call this method
614-
* when appropriate (e.g. when the user pressed the Enter key, you may do something
617+
* when appropriate (e.g., when the user pressed the Enter key, you may do something
615618
* like {@code cell.commitEdit(converter.fromString(textField.getText()));}</p>
616619
*
617-
* @param newValue The value as input by the end user, which should be
620+
* @param newValue the value as input by the end user, which should be
618621
* persisted in the relevant way given the data source underpinning the
619-
* user interface and the install edit commit handler of the UI control.
622+
* user interface and the install edit commit handler of the UI control
620623
*/
621624
public void commitEdit(T newValue) {
622625
if (isEditing()) {

modules/javafx.fxml/src/main/docs/javafx/fxml/doc-files/introduction_to_fxml.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ <h4><a id="collections_and_property_handlers">Special handlers for collections a
720720
<p> Collections and object properties cannot be listen to using <span class="code">setOn<span class="variable">Event</span>()</span> methods.
721721
For these reason, special handler methods need to be used.
722722
<span class="code">ObservableList</span>, <span class="code">ObservableMap</span> or <span class="code">ObservableSet</span>
723-
uses a special <span class="code">onChange</span> attribute that points to a handler method with a <span class="code">ListChangeListner.Change</span>, <span class="code">MapChangeListener.Change</span> or <span class="code">SetChangeListener.Change</span> parameter respectively.
723+
uses a special <span class="code">onChange</span> attribute that points to a handler method with a <span class="code">ListChangeListener.Change</span>, <span class="code">MapChangeListener.Change</span> or <span class="code">SetChangeListener.Change</span> parameter, respectively.
724724
</p>
725725
<pre class="code">
726726
&lt;VBox fx:controller="com.foo.MyController"

modules/javafx.graphics/src/main/java/javafx/animation/Transition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* the implementation of a method {@link #interpolate(double)} which is the
4141
* called in each frame, while the {@code Transition} is running.
4242
* <p>
43-
* In addition an extending class needs to set the duration of a single cycle
43+
* In addition, an extending class needs to set the duration of a single cycle
4444
* with {@link Animation#setCycleDuration(javafx.util.Duration)}. This duration
4545
* is usually set by the user via a duration property (as in
4646
* {@link FadeTransition#durationProperty() duration}) for example. But it can also be calculated

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

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848
import javafx.geometry.HPos;
4949
import javafx.util.Callback;
5050

51-
52-
5351
/**
5452
* HBox lays out its children in a single horizontal row.
5553
* If the hbox has a border and/or padding set, then the contents will be laid
@@ -168,13 +166,14 @@ public class HBox extends Pane {
168166

169167
/**
170168
* Sets the horizontal grow priority for the child when contained by an hbox.
171-
* If set, the hbox will use the priority to allocate additional space if the
172-
* hbox is resized larger than it's preferred width.
169+
* If set, the hbox will use the priority value to allocate additional space if the
170+
* hbox is resized larger than its preferred width.
173171
* If multiple hbox children have the same horizontal grow priority, then the
174172
* extra space will be split evenly between them.
175173
* If no horizontal grow priority is set on a child, the hbox will never
176-
* allocate it additional horizontal space if available.
177-
* Setting the value to null will remove the constraint.
174+
* allocate any additional horizontal space for that child.
175+
* <p>
176+
* Setting the value to {@code null} will remove the constraint.
178177
* @param child the child of an hbox
179178
* @param value the horizontal grow priority for the child
180179
*/
@@ -227,14 +226,14 @@ public static void clearConstraints(Node child) {
227226
********************************************************************/
228227

229228
/**
230-
* Creates an HBox layout with spacing = 0.
229+
* Creates an {@code HBox} layout with {@code spacing = 0}.
231230
*/
232231
public HBox() {
233232
super();
234233
}
235234

236235
/**
237-
* Creates an HBox layout with the specified spacing between children.
236+
* Creates an {@code HBox} layout with the specified spacing between children.
238237
* @param spacing the amount of horizontal space between each child
239238
*/
240239
public HBox(double spacing) {
@@ -243,8 +242,8 @@ public HBox(double spacing) {
243242
}
244243

245244
/**
246-
* Creates an HBox layout with spacing = 0.
247-
* @param children The initial set of children for this pane.
245+
* Creates an {@code HBox} layout with {@code spacing = 0}.
246+
* @param children the initial set of children for this pane
248247
* @since JavaFX 8.0
249248
*/
250249
public HBox(Node... children) {
@@ -253,9 +252,9 @@ public HBox(Node... children) {
253252
}
254253

255254
/**
256-
* Creates an HBox layout with the specified spacing between children.
255+
* Creates an {@code HBox} layout with the specified spacing between children.
257256
* @param spacing the amount of horizontal space between each child
258-
* @param children The initial set of children for this pane.
257+
* @param children the initial set of children for this pane
259258
* @since JavaFX 8.0
260259
*/
261260
public HBox(double spacing, Node... children) {

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -154,16 +154,17 @@ public class VBox extends Pane {
154154
private static final String VGROW_CONSTRAINT = "vbox-vgrow";
155155

156156
/**
157-
* Sets the vertical grow priority for the child when contained by an vbox.
158-
* If set, the vbox will use the priority to allocate additional space if the
159-
* vbox is resized larger than it's preferred height.
157+
* Sets the vertical grow priority for the child when contained by a vbox.
158+
* If set, the vbox will use the priority value to allocate additional space if the
159+
* vbox is resized larger than its preferred height.
160160
* If multiple vbox children have the same vertical grow priority, then the
161161
* extra space will be split evenly between them.
162162
* If no vertical grow priority is set on a child, the vbox will never
163-
* allocate it additional vertical space if available.
164-
* Setting the value to null will remove the constraint.
163+
* allocate any additional vertical space for that child.
164+
* <p>
165+
* Setting the value to {@code null} will remove the constraint.
165166
* @param child the child of a vbox
166-
* @param value the horizontal grow priority for the child
167+
* @param value the vertical grow priority for the child
167168
*/
168169
public static void setVgrow(Node child, Priority value) {
169170
setConstraint(child, VGROW_CONSTRAINT, value);
@@ -214,14 +215,14 @@ public static void clearConstraints(Node child) {
214215
********************************************************************/
215216

216217
/**
217-
* Creates a VBox layout with spacing = 0 and alignment at TOP_LEFT.
218+
* Creates a {@code VBox} layout with {@code spacing = 0} and alignment at {@code TOP_LEFT}.
218219
*/
219220
public VBox() {
220221
super();
221222
}
222223

223224
/**
224-
* Creates a VBox layout with the specified spacing between children.
225+
* Creates a {@code VBox} layout with the specified spacing between children.
225226
* @param spacing the amount of vertical space between each child
226227
*/
227228
public VBox(double spacing) {
@@ -230,8 +231,8 @@ public VBox(double spacing) {
230231
}
231232

232233
/**
233-
* Creates an VBox layout with spacing = 0.
234-
* @param children The initial set of children for this pane.
234+
* Creates a {@code VBox} layout with {@code spacing = 0}.
235+
* @param children the initial set of children for this pane
235236
* @since JavaFX 8.0
236237
*/
237238
public VBox(Node... children) {
@@ -240,9 +241,9 @@ public VBox(Node... children) {
240241
}
241242

242243
/**
243-
* Creates an VBox layout with the specified spacing between children.
244-
* @param spacing the amount of horizontal space between each child
245-
* @param children The initial set of children for this pane.
244+
* Creates a {@code VBox} layout with the specified spacing between children.
245+
* @param spacing the amount of vertical space between each child
246+
* @param children the initial set of children for this pane
246247
* @since JavaFX 8.0
247248
*/
248249
public VBox(double spacing, Node... children) {

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -795,13 +795,11 @@ public final ReadOnlyDoubleProperty baselineOffsetProperty() {
795795

796796
/**
797797
* Specifies a requested font smoothing type: gray or LCD.
798-
*
799-
* The width of the bounding box is defined by the widest row.
800-
*
798+
* <p>
801799
* Note: LCD mode doesn't apply in numerous cases, such as various
802800
* compositing modes, where effects are applied and very large glyphs.
803801
*
804-
* @defaultValue FontSmoothingType.GRAY
802+
* @defaultValue {@code FontSmoothingType.GRAY}
805803
* @since JavaFX 2.1
806804
*/
807805
private ObjectProperty<FontSmoothingType> fontSmoothingType;

0 commit comments

Comments
 (0)