Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Extends JavaFX with derived bindings, composed event streams, reducer-style state, and synchronized reactive pipelines.
Use this skill ↓91% 95%+5 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 20 of 22 without it.
3 of 3 safety checks passed
Not used yet
Use this skill when core JavaFX properties are not enough and the application needs derived observable graphs, composed event streams, reducer-style state, or synchronized reactive pipelines.
import javafx.beans.binding.Bindings;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.collections.transformation.FilteredList;
import javafx.scene.control.ListView;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
public class ReactiveFilterView extends VBox {
private final StringProperty filter = new SimpleStringProperty("");
public ReactiveFilterView() {
var input = new TextField();
var items = FXCollections.observableArrayList("alpha", "beta", "gamma", "delta");
var filtered = new FilteredList<>(items, item -> true);
filter.bind(input.textProperty());
filter.addListener((obs, oldValue, newValue) ->
filtered.setPredicate(item -> item.contains(newValue))
);
var status = new TextField();
status.textProperty().bind(Bindings.size(filtered).asString("Matches: %d"));
status.setEditable(false);
getChildren().addAll(input, status, new ListView<>(filtered));
}
}
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.