Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mulgish/mutinyfx

Mutiny bindings for JavaFX
https://github.com/mulgish/mutinyfx

java javafx openjfx smallrye-mutiny

Last synced: about 2 months ago
JSON representation

Mutiny bindings for JavaFX

Awesome Lists containing this project

README

        

# MutinyFX

![Maven Central](https://img.shields.io/maven-central/v/com.mulgish/mutinyfx?style=for-the-badge)

[Mutiny](https://smallrye.io/smallrye-mutiny/) bindings for JavaFX

### Binaries:

```xml

com.mulgish
mutinyfx
1.0.0

```

### Usage:

```java
FxMulti.createFrom().observableValue(observableValue);
FxMulti.createFrom().observableList(observableList);
FxMulti.createFrom().observableSet(observableSet);
FxMulti.createFrom().observableMap(observableMap);
```

### Examples:

Observing list additions

```java
FxMulti.createFrom().observableList(observableList)
.filter(ListChangeListener.Change::wasAdded)
.subscribe().with((change) -> {
System.out.println("Item(s) added: "+change.getAddedSubList());
});
```

Observing user input every 200ms

```java
FxMulti.createFrom().observableValue(textField)
.group().intoMultis().every(Duration.ofMillis(200))
.onItem().transformToMulti(items->items.select().last()).merge()
.subscribe().with((change) -> {
System.out.println("User entered: "+change.getNewValue());
});
```

### Links:

[Home page](https://mulgish.github.io/MutinyFX/)

[Maven index](https://search.maven.org/artifact/com.mulgish/mutinyfx)