Example usage for javafx.scene.control ProgressIndicator setStyle

List of usage examples for javafx.scene.control ProgressIndicator setStyle

Introduction

In this page you can find the example usage for javafx.scene.control ProgressIndicator setStyle.

Prototype

public final void setStyle(String value) 

Source Link

Document

A string representation of the CSS style associated with this specific Node .

Usage

From source file:edu.wustl.lookingglass.issue.ExceptionPane.java

public final void submit() {
    assert javafx.application.Platform.isFxApplicationThread();

    javafx.scene.control.ProgressIndicator indicator = new javafx.scene.control.ProgressIndicator(
            javafx.scene.control.ProgressIndicator.INDETERMINATE_PROGRESS);
    indicator.setPrefSize(100, 100);/*from   w  w w.j a  v a 2  s.c  o m*/
    indicator.setMinSize(javafx.scene.control.Control.USE_PREF_SIZE,
            javafx.scene.control.Control.USE_PREF_SIZE);
    indicator.setMaxSize(javafx.scene.control.Control.USE_PREF_SIZE,
            javafx.scene.control.Control.USE_PREF_SIZE);
    indicator.setStyle("-fx-progress-color: black;");

    getDialog().setAndShowOverlay(indicator);

    final BugReport report = this.generateReport();
    this.attachProject(report);

    // Do not use SwingWorker in Java FX.
    new Thread(() -> {
        try {
            uploadToRedmine(report);
        } catch (Throwable t) {
            Logger.throwable(t, report);
        }
        Platform.runLater(() -> {
            getDialog().close();
        });
    }).start();
}