بنقرة واحدة
javafx-concurrency-services
Use javafx.concurrent Task and Service correctly for background work and responsive UIs.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use javafx.concurrent Task and Service correctly for background work and responsive UIs.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | javafx-concurrency-services |
| description | Use javafx.concurrent Task and Service correctly for background work and responsive UIs. |
| triggers | ["javafx task","javafx service","javafx.concurrent","platform runlater"] |
| compatibility | {"java":"17+","javafx":"21+"} |
| category | ui-core |
| tags | ["task","service","threading","background","responsiveness"] |
| metadata | {"scope":"repository","maturity":"starter"} |
| allowed-tools | ["view","rg","apply_patch"] |
Use this skill when expensive work must stay off the JavaFX Application Thread while the UI remains observable and responsive.
import javafx.concurrent.Task;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressBar;
import javafx.scene.layout.VBox;
public class LoaderView extends VBox {
public LoaderView() {
var status = new Label("Idle");
var progress = new ProgressBar(0);
var button = new Button("Load");
button.setOnAction(event -> {
Task<String> task = new Task<>() {
@Override
protected String call() throws Exception {
updateMessage("Loading data...");
updateProgress(0.5, 1.0);
Thread.sleep(250);
updateProgress(1.0, 1.0);
return "Done";
}
};
status.textProperty().bind(task.messageProperty());
progress.progressProperty().bind(task.progressProperty());
task.setOnSucceeded(done -> {
status.textProperty().unbind();
status.setText(task.getValue());
});
var thread = new Thread(task, "loader-task");
thread.setDaemon(true);
thread.start();
});
getChildren().addAll(status, progress, button);
}
}
Task for one-shot work and Service for restartable workflows.javafx-architecture-frameworks for overall application service design and
javafx-reactive-binding-state for stream-based state pipelines.call().setOnFailed(...) or worker state bindings instead of swallowing
exceptions.Build JavaFX 3D modeling tools and print/export workflows with isolated geometry generation and preview rendering.
Choose and integrate mature third-party JavaFX control libraries for forms, productivity widgets, theming, and developer workflow support.
Build JavaFX terminal emulators or shell-style console panes with background process I/O, ANSI handling, and safe FX-thread updates.
Build node-based JavaFX workflow editors, graph canvases, and visual programming surfaces with clean model separation.
Animate JavaFX UIs with Timeline, Transition, Canvas, and AnimationTimer-based render loops.
Manage the JavaFX Application lifecycle, primary stage setup, startup sequencing, and shutdown behavior.