diff --git a/javafx-ui-controls/src/javafx/scene/control/ComboBox.java b/javafx-ui-controls/src/javafx/scene/control/ComboBox.java --- a/javafx-ui-controls/src/javafx/scene/control/ComboBox.java +++ b/javafx-ui-controls/src/javafx/scene/control/ComboBox.java @@ -244,22 +244,22 @@ * means that the actual implementation may be SelectionModel, or a subclass * (such as {@link SingleSelectionModel} or {@link MultipleSelectionModel}). */ - private ObjectProperty> selectionModel = new SimpleObjectProperty>(this, "selectionModel") { - private SelectionModel oldSM = null; + private ObjectProperty> selectionModel = new SimpleObjectProperty>(this, "selectionModel") { + private SingleSelectionModel oldSM = null; @Override protected void invalidated() { if (oldSM != null) { oldSM.selectedItemProperty().removeListener(selectedItemListener); } - SelectionModel sm = get(); + SingleSelectionModel sm = get(); oldSM = sm; if (sm != null) { sm.selectedItemProperty().addListener(selectedItemListener); } } }; - public final void setSelectionModel(SelectionModel value) { selectionModel.set(value); } - public final SelectionModel getSelectionModel() { return selectionModel.get(); } - public final ObjectProperty> selectionModelProperty() { return selectionModel; } + public final void setSelectionModel(SingleSelectionModel value) { selectionModel.set(value); } + public final SingleSelectionModel getSelectionModel() { return selectionModel.get(); } + public final ObjectProperty> selectionModelProperty() { return selectionModel; } // --- Visible Row Count