Skip to content

Commit abe726b

Browse files
committed
more tweaks to readme
1 parent 2609e9c commit abe726b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ $ ./gradlew build
5555
## Features
5656

5757
RxJava has two sets of features:
58+
- Factories to turn `Node` and `ObservableValue` events into an RxJava `Observable`
5859
- A scheduler for the JavaFX dispatch thread
59-
- Factories to turn `Node` events and `ObservableValue` changes into an RxJava `Observable`.
6060

6161
###Node Events
6262
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`.
63-
```
63+
```java
6464
Button incrementBttn = new Button("Increment");
6565

6666
Observable<ActionEvent> bttnEvents =
@@ -71,7 +71,7 @@ Observable<ActionEvent> bttnEvents =
7171
### ObservableValue Changes
7272
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.
7373

74-
```
74+
```java
7575
TextField textInput = new TextField();
7676

7777
Observable<String> textInputs =
@@ -84,7 +84,7 @@ Note that many Nodes in JavaFX will have an initial value, which sometimes can b
8484

8585
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`.
8686

87-
```
87+
```java
8888
TextField textInput = new TextField();
8989
Label fippedTextLabel = new Label();
9090

@@ -105,7 +105,7 @@ Although ReactFX has some asynchronous operators like `threadBridge`, ReactFX em
105105
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.
106106

107107
## Comprehensive Example
108-
```
108+
```java
109109
package rx.schedulers;
110110

111111
import javafx.application.Application;

0 commit comments

Comments
 (0)