Example usage for javafx.util Duration INDEFINITE

List of usage examples for javafx.util Duration INDEFINITE

Introduction

In this page you can find the example usage for javafx.util Duration INDEFINITE.

Prototype

Duration INDEFINITE

To view the source code for javafx.util Duration INDEFINITE.

Click Source Link

Document

An Infinite Duration.

Usage

From source file:caillou.company.clonemanager.gui.customComponent.results.ConfirmSuppressionController.java

@FXML
private void confirmAction(ActionEvent event) throws Exception {
    DeleteFilesTask deleteFilesTask = SpringFxmlLoader.getBean(DeleteFilesTask.class);
    deleteFilesTask.setFilesToDelete(filesToShowViewId.getItems());
    RemoveFromViewHandler removeFromViewHandler = SpringFxmlLoader.getBean(RemoveFromViewHandler.class);
    removeFromViewHandler.setGUIApplicationFileList(guiApplicationFileList);
    removeFromViewHandler.setTableView(tableView);
    removeFromViewHandler.setSuppressOnlyOnSelected(suppressOnlyOnSelected);
    removeFromViewHandler.checkArguments();
    deleteFilesTask.setOnSucceeded(removeFromViewHandler);
    new Thread(deleteFilesTask).start();
    confirmAction = true;// www .j  a v a  2s.  c  o  m
    dialog.hide();
    if (!deleteFilesTask.getFilesNotDeleted().isEmpty()) {
        StringBuilder stringBuilder = new StringBuilder();
        for (GUIApplicationFile guiApplicationFile : deleteFilesTask.getFilesNotDeleted()) {
            stringBuilder.append(guiApplicationFile.getAbsolutePath());
            stringBuilder.append("\n");
        }
        Notifications.create().title("Errors encountered while deleting the files")
                .text(stringBuilder.toString()).hideAfter(Duration.INDEFINITE).showError();
    }
}

From source file:caillou.company.clonemanager.gui.customComponent.results.ResultController.java

public void displayErrors() {
    if (!this.cloneManagerIOExceptionBean.getReadingErrors().isEmpty()) {
        StringBuilder stringBuilder = new StringBuilder();
        for (CloneManagerIOException cloneManagerIOException : this.cloneManagerIOExceptionBean
                .getReadingErrors()) {//  w  ww  .  j a v  a2  s. c om
            stringBuilder.append(cloneManagerIOException.getMessage());
            stringBuilder.append("\n");
        }

        Notifications.create().title("Errors encountered while scanning the files")
                .text(stringBuilder.toString()).hideAfter(Duration.INDEFINITE).showError();
    }
}