Assets 2

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)));

@thomasnield thomasnield released this Nov 24, 2017 · 6 commits to 2.x since this release

Assets 2

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.

@thomasnield thomasnield released this Sep 9, 2017 · 11 commits to 2.x since this release

Assets 2

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);

@thomasnield thomasnield released this Jun 28, 2017 · 16 commits to 2.x since this release

Assets 2

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.

@thomasnield thomasnield released this May 28, 2017 · 24 commits to 2.x since this release

Assets 2
  • Deprecated CompositeObservable, use a Subject instead to decouple Observables and Observers #54
  • Group ID has been changed to io.reactivex.rxjava2 so build systems can use RxJavaFX 1.x and 2.x in the same project #53
  • Updated RxJava dependency to 2.1.0

@thomasnield thomasnield released this Feb 25, 2017 · 34 commits to 2.x since this release

Assets 2

Refactored to use io.reactivex.rxjavafx domain instead of rx.

@thomasnield thomasnield released this Feb 25, 2017 · 35 commits to 2.x since this release

Assets 2

RxJavaFX Now Supports RxJava 2.0

Re-released to trigger rebuild

RxJava 2.0 is a ground-up rewrite of RxJava that makes many critical changes to the ReactiveX implementation for Java. You can read more about what is different in RxJava 2.0 here. Documentation on RxJava 2.0 is an ongoing effort, and the Learning RxJava with JavaFX eBook will be updated accordingly. I will also be publishing Learning RxJava, the first book covering RxJava 2.0, later this year with Packt Publishing.

The primary difference between RxJava 1.0 and 2.0 is the separation of the Observable into the Observable and Flowable types. The Observable in RxJava 1.0 supports backpressure, but in hindsight RxJava leadership realized it would have been better to create a separate backpressured type. In RxJava 2.0, this became the Flowable and backpressure was removed from the Observable. The Subscriber was separated into the Observer and Subscriber types, where the Observer is used to subscribe to Observables and the Subscriber to Flowables.

This means there are a few changes for RxJavaFX 2.0, which is the starting version utilizing RxJava 2.0:

  • Since UI events cannot be backpressured, most of the source factories have been left alone and still yield Observables (and not Flowables).
  • RxJava 2.0 Observables forbid emitting null values, so JavaFxObservable.valuesOf() will ignore null values. If you want null values to be emitted, you will need to use JavaFxObservable.nullableValuesOf() to emit nullable values as Java 8 Optionals.
  • JavaFX Bindings now need to receive emissions from both Observables or Flowables. The JavaFxSubscriber utility class has been separated into JavaFxObserver and JavaFxSubscriber, which create Bindings off Observables and Flowables respectively.
  • JavaFxTransformers also has been split into FxObservableTransformers and FxFlowableTransformers, so JavaFX-specific operators are supported for both Observables and Flowables.
  • All deprecations from RxJavaFX 1.0 have been removed. The old factory naming conventions as well as JavaFxScheduler.getInstance() are gone.

Please feel free to contact me or file an issue if you have any questions or concerns. Also, a special thanks to @protogenes for helping expedite this rollout.

@thomasnield thomasnield released this Feb 25, 2017 · 36 commits to 2.x since this release

Assets 3

RxJavaFX Now Supports RxJava 2.0

RxJava 2.0 is a ground-up rewrite of RxJava that makes many critical changes to the ReactiveX implementation for Java. You can read more about what is different in RxJava 2.0 here. Documentation on RxJava 2.0 is an ongoing effort, and the Learning RxJava with JavaFX eBook will be updated accordingly. I will also be publishing Learning RxJava, the first book covering RxJava 2.0, later this year with Packt Publishing.

The primary difference between RxJava 1.0 and 2.0 is the separation of the Observable into the Observable and Flowable types. The Observable in RxJava 1.0 supports backpressure, but in hindsight RxJava leadership realized it would have been better to create a separate backpressured type. In RxJava 2.0, this became the Flowable and backpressure was removed from the Observable. The Subscriber was separated into the Observer and Subscriber types, where the Observer is used to subscribe to Observables and the Subscriber to Flowables.

This means there are a few changes for RxJavaFX 2.0, which is the starting version utilizing RxJava 2.0:

  • Since UI events cannot be backpressured, most of the source factories have been left alone and still yield Observables (and not Flowables).
  • RxJava 2.0 Observables forbid emitting null values, so JavaFxObservable.valuesOf() will ignore null values. If you want null values to be emitted, you will need to use JavaFxObservable.nullableValuesOf() to emit nullable values as Java 8 Optionals.
  • JavaFX Bindings now need to receive emissions from both Observables or Flowables. The JavaFxSubscriber utility class has been separated into JavaFxObserver and JavaFxSubscriber, which create Bindings off Observables and Flowables respectively.
  • JavaFxTransformers also has been split into FxObservableTransformers and FxFlowableTransformers, so JavaFX-specific operators are supported for both Observables and Flowables.
  • All deprecations from RxJavaFX 1.0 have been removed. The old factory naming conventions as well as JavaFxScheduler.getInstance() are gone.

Please feel free to contact me or file an issue if you have any questions or concerns. Also, a special thanks to @protogenes for helping expedite this rollout.

Pre-release

@thomasnield thomasnield released this Feb 24, 2017 · 43 commits to 2.x since this release

Assets 3

This is the pre-release of RxJavaFX 2.0, which is backed by RxJava 2.0.

For the most part, the API is largely the same as RxJavaFX 1.0. Most differences are due to the core changes in RxJava 2.0.

Please help test for functionality and share feedback on the API design. When all concerns are addressed, we will release RxJavaFX 2.0.

Key Differences:

  • JavaFxObservable.valuesOf() ignores null values
  • JavaFxObservable.nullableValuesOf() added to emit null values wrapped in a Java 8 Optional<T>
  • JavaFXObservable.nonNullValuesOf() has been removed
  • JavaFxSubscriber.toBinding() is overloaded to support both Observables and Flowables
  • JavaFxTransformers has been separated into FxFlowableTransformers and FxObservableTransformers
  • JavaFxSubscriber.toLazyBinding() has been removed due to implementation challenges.
  • JavaFxScheduler.getInstance() factory has been removed in favor of JavaFxScheduler.platform()

@thomasnield thomasnield released this Feb 25, 2017

Assets 2

Many thanks to @protogenes for being the driver of this release.

NEW FEATURES

  • Implemented @protogenes' new JavaFxScheduler implementation that features less overhead and improved performance.
  • Added JavaFxObservable.invalidationsOf() factory