Skip to content

Mutiny bindings for JavaFX

License

Notifications You must be signed in to change notification settings

Mulgish/MutinyFX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MutinyFX

Maven Central

Mutiny bindings for JavaFX

Binaries:

<dependency>
    <groupId>com.mulgish</groupId>
    <artifactId>mutinyfx</artifactId>
    <version>1.0.0</version>
</dependency>

Usage:

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

Examples:

Observing list additions

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

Observing user input every 200ms

 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

Maven index

Releases

No releases published

Packages

No packages published