I'm using 2.2.3-b05. If I create a SimpleBooleanProperty I can assign a ChangeListener<Boolean> to it. If I create a SimpleIntegerProperty I cannot assign a ChangeListener<Integer> as it complaings that there is no suitable method, as ChangeListener<? super Number> does not apply. Instead we need to check and cast Numbers to Integers in the changed() method of the listener.
If I create a SimpleObjectProperty<Integer> then I can add ChangeListener<Integer> to it without issue.
If I create a SimpleObjectProperty<Integer> then I can add ChangeListener<Integer> to it without issue.
- duplicates
-
JDK-8123348 Assigning IntegerProperty to ObservableValue<Integer>
-
- Closed
-
- relates to
-
JDK-8102506 "Primitive"Property to ObjectProperty<Primitive>
-
- Resolved
-
-
JDK-8101061 Default conversion from ObservableObjectValue<Integer> to ObservableIntegerValue etc.
-
- Resolved
-