Questions tagged [rx-javafx]

RxJava bindings for JavaFX

14 questions
8
votes
1 answer

Java enum with no instances

In RXJava [1] there is an enum [2] defined as public enum JavaFxObservable { ; // no instances public static void staticMethod() { // ... } } What's the purpose this technique using a enum with no instances? Why not use a…
lukstei
  • 844
  • 2
  • 8
  • 20
6
votes
0 answers

Populating a JavaFX TableView from an RxJava Observable>

I have an Observable> that I want to display with a TableView. It seems as though there should be a library function in JavaFx to convert an RxJava Observable> into a JavaFx ObservableList, but if there is, I can't find it…
David Moles
  • 48,006
  • 27
  • 136
  • 235
4
votes
1 answer

Making parallel API calls using java rx.Observable

I have a Set and for each entry in the Set I have to make an API call passing that as a param. And I have to process each of those responses & populate another Map with some own logic Sample sequential execution: List responses =…
3
votes
3 answers

RxJava - Why the executors only use one thread

I have created a fixed thread-pool to process an event emit per 300 milliseconds and assume the process need 1000 millisecond. Suppose the multi-thread will work but only one thread reused. If i set the sleepTime smaller than 300ms, the processing…
Rockman12352
  • 101
  • 10
3
votes
1 answer

RxJava + RxAndroid WidgetObservable new API

A few weeks ago this code worked fine with RxAndroid v0.25.0 Observable usernameObservable = WidgetObservable.text(editText); usernameObservable .filter(e -> e.text.length() >= 3) .subscribe(e ->…
cesarferreira
  • 1,578
  • 4
  • 24
  • 34
2
votes
0 answers

Trying to get the point of RxJavaFX

So right now I'm reading about RxJavaFX and stumbled upon the following example: var comboBox = new ComboBox (); comboBox.getItems().setAll("Alpha", "Beta", "Gamma", "Delta", "Epsilon"); JavaFxObservable.valuesOf(comboBox.valueProperty()) …
M. Malkon
  • 145
  • 1
  • 6
2
votes
3 answers

Convert RxJava Observable to RxScala Observable

I am writing a small JavaFx application in Scala and I like to use RxScala and RxJavaFx for this. With the following code I get a RxJava Observable: JavaFxObservable.fromObservableValue(textfield.textProperty()) Obviously, as I write in Scala, I…
RvanHeest
  • 869
  • 6
  • 12
1
vote
1 answer

Prevent multiple calls to the method using rxjava

There are two events - event1 and event2 which can call getA(), these two events could occur simultaneously and trigger getA. I don't want to call getA multiple times until it gets done. I am using isDisposed() to check if its still active and…
0
votes
1 answer

How to merge with Observable inside loop?

I would like to merge several Obserables into one. I use Observable.mergeWith() method. My requirement is to merge inside the loop. The problem is no emissions are sent on subscription. The issue seems to be way I initialize main Observale using…
0
votes
0 answers

In RxJavaFx, how to get the Observable for Scene accelerator events?

Looking at this: https://github.com/ReactiveX/RxJavaFX/issues/66 I can get the button click Observable via: JavaFxObservable.actionEventsOf(loadUsersButton).subscribe(loadButtonSubject); Is there a way to get an Observable for key presses that are…
levant pied
  • 3,886
  • 5
  • 37
  • 56
0
votes
1 answer

How to get JavaFX to display API feed

My question is pretty straight forward (I'm just a recreational coder playing around with stuff). I have established a connection to an API and via the magic of RxJava I can subscribe to the json data emitted the API . I have also created a very…
0
votes
1 answer

RxJava Emit initial value from downstream observable from flatmap

I have a use case where I have to convert a button press to database fetch. I have an Observable from the button press. I am doing a flatMap of the observable to another observable which fetches items from the DB. Observable
prem
  • 81
  • 1
  • 6
0
votes
2 answers

How to reactively handle mouse click event only if drag event does not occure between mouse pressed and released events?

I want to fire some action when there was NO drag event between mouse pressed and released events. In other words - when user kept his mouse cursor still while clicking. The question is specificly about rective way achive it. Really would appreciate…
0
votes
1 answer

RxJava/RxKotlin split stream depending on subtype

I have a stream of ResponseMessage which can be of different subtypes. I would like to split the stream into streams where I can handle each type in its own stream. My first try resulted in this which I can not see working out. file.readLines() …
user3139545
  • 6,882
  • 13
  • 44
  • 87