Example usage for javafx.concurrent Worker cancel

List of usage examples for javafx.concurrent Worker cancel

Introduction

In this page you can find the example usage for javafx.concurrent Worker cancel.

Prototype

public boolean cancel();

Source Link

Document

Terminates execution of this Worker.

Usage

From source file:caillou.company.clonemanager.gui.service.task.impl.WorkerMonitor.java

public void stop(String category) {
    if (workerToMonitor.containsKey(category)) {
        for (Worker<?> worker : workerToMonitor.get(category)) {
            worker.cancel();
        }//from  w w w . j  av  a  2  s  .  co  m
    }
}