Java tutorial
//package com.java2s; import javafx.beans.binding.BooleanBinding; import javafx.concurrent.Worker; public class Main { public static <V> BooleanBinding isFinishedProperty(Worker<V> worker) { return worker.stateProperty().isEqualTo(Worker.State.CANCELLED).or(worker.stateProperty() .isEqualTo(Worker.State.FAILED).or(worker.stateProperty().isEqualTo(Worker.State.SUCCEEDED))); } }