RxJava bindings for JavaFX
Special thanks to @pvnhome, @JonathanVusich, and @Speljohan for spurring this on.
Special thanks to @pvnhome, @JonathanVusich, and @Speljohan for spurring this on.
This is a release candidate for RxJavaFX 2.11.0, which supports JavaFX 11.
Please try out this release and let me know if there are any issue
This is a release candidate for RxJavaFX 2.11.0, which supports JavaFX 11.
Please try out this release and let me know if there are any issue
This is a release candidate for RxJavaFX 2.11.0, which supports JavaFX 11.
Please try out this release and let me know if there are any issues.
This is a release candidate for RxJavaFX 2.11.0, which supports JavaFX 11.
Please try out this release and let me know if there are any issues.
This release contains bug fixes for the doOnNextCount()
, doOnErrorCount()
, and doOnCompleteCount()
transformers as well as their FX counterparts doOnNextCountFx()
, doOnErrorCountFx()
, and doOnCompleteCountFx()
.
Unit tests have been added for these operators as well.
List<Integer> onNextCounts = new ArrayList<>();
Observable.just("Alpha", "Beta", "Gamma")
.compose(FxObservableTransformers.doOnNextCount(onNextCounts::add))
.subscribe();
Assert.assertTrue(onNextCounts.containsAll(Arrays.asList(1, 2, 3)));
A series of nullable Binding factories has been built by @protogenes. These help workaround RxJava not allowing null emissions, which are often necessary for null states in JavaFX ObservableValues.
JavaFxObservable.toNullBinding()
JavaFxObservable.toNullableBinding()
JavaFxObservable.toLazyNullBinding()
JavaFxObservable.toLazyNullableBinding()
JavaFxSubscriber.toNullBinding()
JavaFxSubscriber.toNullableBinding()
JavaFxSubscriber.toLazyNullBinding()
JavaFxSubscriber.toLazyNullableBinding()
The toNullBinding()
factories use a null sentinel value to represent null emissions, while toNullableBinding()
factories leverage Optional<T>
emissions and unwraps them in the Binding
.
Thanks for your help @protogenes! An https://github.com/thomasnield/RxKotlinFX release will follow shortly.
This is the first breaking change in awhile, although it only affects the Dialog
factory. JavaFxObservable.fromDialog()
will return a Maybe<T>
rather than an Observable<T>
now. This makes sense since a Dialog
may only have one response from the user, if there is any provided value at all.
Dialog<String> dlg = ...;
Maybe<String> response = JavaFxObservable.fromDialog(dlg);
Small addition to this release: a null-sentinal overload is now available for JavaFxObservable.valuesOf()
.
ObservableValue<String> myProperty = ...
Observable<String> values = JavaFxObservable.valuesOf(myProperty, "N/A")
Thank you @protogenes for contributing this.