Skip to content

Commit a369938

Browse files
committed
8254964: Fix default values in Spinner class
Reviewed-by: kcr
1 parent 9c73dcc commit a369938

File tree

1 file changed

+5
-2
lines changed
  • modules/javafx.controls/src/main/java/javafx/scene/control

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,13 +568,15 @@ public final ObjectProperty<SpinnerValueFactory<T>> valueFactoryProperty() {
568568
* {@link SpinnerValueFactory#setValue(Object)} method. If the value
569569
* is valid, it will remain as the value. If it is invalid, the value factory
570570
* will need to react accordingly and back out this change.
571+
*
572+
* @defaultValue {@code false}
571573
*/
572574
private BooleanProperty editable;
573575
public final void setEditable(boolean value) {
574576
editableProperty().set(value);
575577
}
576578
public final boolean isEditable() {
577-
return editable == null ? true : editable.get();
579+
return editable == null ? false : editable.get();
578580
}
579581
public final BooleanProperty editableProperty() {
580582
if (editable == null) {
@@ -611,6 +613,7 @@ public final TextField getEditor() {
611613
* {@code null} if no prompt text is displayed.
612614
* @return the prompt text property
613615
* @since 9
616+
* @defaultValue Empty string
614617
*/
615618
public final StringProperty promptTextProperty() { return getEditor().promptTextProperty(); }
616619
public final String getPromptText() { return getEditor().getPromptText(); }
@@ -625,7 +628,7 @@ public final TextField getEditor() {
625628
* before the next value steps. Successive step duration is set using
626629
* {@link #repeatDelayProperty() repeat delay}.
627630
*
628-
* @return inital delay property
631+
* @return initial delay property
629632
* @since 11
630633
* @defaultValue 300ms
631634
*/

0 commit comments

Comments
 (0)