You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,12 +55,12 @@ $ ./gradlew build
55
55
## Features
56
56
57
57
RxJava has two sets of features:
58
+
- Factories to turn `Node` and `ObservableValue` events into an RxJava `Observable`
58
59
- A scheduler for the JavaFX dispatch thread
59
-
- Factories to turn `Node` events and `ObservableValue` changes into an RxJava `Observable`.
60
60
61
61
###Node Events
62
62
You can get event emissions by calling `JavaFxObservable.fromNodeEvents()` and pass the JavaFX `Node` and the `EventType` you are interested in. This will return an RxJava `Observable`.
Not to be confused with the RxJava `Observable`, the JavaFX `ObservableValue` can be converted into an RxJava `Observable` that emits the initial value and all value changes.
73
73
74
-
```
74
+
```java
75
75
TextField textInput =newTextField();
76
76
77
77
Observable<String> textInputs =
@@ -84,7 +84,7 @@ Note that many Nodes in JavaFX will have an initial value, which sometimes can b
84
84
85
85
When you update any JavaFX control, it must be done on the JavaFX Event Dispatch Thread. Fortunately, the `JavaFxScheduler` makes it trivial to take work off the JavaFX thread and put it back when the results are ready. Below we can use the `observeOn()` to pass text value emissions to a computation thread where the text will be flipped. Then we can pass `JavaFxScheduler.getInstance()` to another `observeOn()` afterwards to put it back on the JavaFX thread. From there it will update the `flippedTextLabel`.
86
86
87
-
```
87
+
```java
88
88
TextField textInput =newTextField();
89
89
Label fippedTextLabel =newLabel();
90
90
@@ -105,7 +105,7 @@ Although ReactFX has some asynchronous operators like `threadBridge`, ReactFX em
105
105
If you are heavily dependent on RxJava, asynchronous processing, or do not want your entire reactive codebase to be UI-focused, you will probably want to use RxJavaFX.
0 commit comments