use of javafx.scene.control.ProgressIndicator in project POL-POM-5 by PhoenicisOrg.
the class StepRepresentationSpin method drawStepContent.
@Override
protected void drawStepContent() {
super.drawStepContent();
Region spacerAbove = new Region();
VBox.setVgrow(spacerAbove, Priority.ALWAYS);
this.addToContentPane(spacerAbove);
ProgressIndicator progressIndicator = new ProgressIndicator();
this.addToContentPane(progressIndicator);
Region spacerBelow = new Region();
VBox.setVgrow(spacerBelow, Priority.ALWAYS);
this.addToContentPane(spacerBelow);
}
use of javafx.scene.control.ProgressIndicator in project honest-profiler by jvm-profiling-tools.
the class FxUtil method getProgressIndicator.
/**
* Returns an indeterminate {@link ProgressIndicator} with the specified dimensions.
* <p>
* @param maxWidth the maximum width of the {@link ProgressIndicator}
* @param maxHeight the maximum height of the {@link ProgressIndicator}
* @return the created {@link ProgressIndicator}
*/
public static ProgressIndicator getProgressIndicator(double maxWidth, double maxHeight) {
ProgressIndicator progress = new ProgressIndicator();
progress.setMaxSize(maxWidth, maxHeight);
return progress;
}
use of javafx.scene.control.ProgressIndicator in project phoenicis by PhoenicisOrg.
the class StepRepresentationSpin method drawStepContent.
@Override
protected void drawStepContent() {
super.drawStepContent();
Region spacerAbove = new Region();
VBox.setVgrow(spacerAbove, Priority.ALWAYS);
this.addToContentPane(spacerAbove);
ProgressIndicator progressIndicator = new ProgressIndicator();
this.addToContentPane(progressIndicator);
Region spacerBelow = new Region();
VBox.setVgrow(spacerBelow, Priority.ALWAYS);
this.addToContentPane(spacerBelow);
}
use of javafx.scene.control.ProgressIndicator in project kanonizo by kanonizo.
the class KanonizoFrame method addErrors.
private void addErrors(Object alg) {
if (alg instanceof SearchAlgorithm) {
bottom.getChildren().removeAll(activeErrors);
activeErrors.clear();
ProgressIndicator p = new ProgressIndicator();
List<Method> prerequisites = Framework.getPrerequisites((SearchAlgorithm) alg);
Task<Void> task = new Task<Void>() {
@Override
protected Void call() throws Exception {
boolean anyFail = false;
int row = 2;
// run all prerequisites, not terminating on first failure
for (int i = 0; i < prerequisites.size(); i++) {
Method requirement = prerequisites.get(i);
try {
boolean passed = (boolean) requirement.invoke(null, null);
if (!passed) {
anyFail = true;
// find readable error message
String error = requirement.getAnnotation(Prerequisite.class).failureMessage();
Label er = new Label(error);
activeErrors.add(er);
// css styling to make errors red
er.getStyleClass().add("error");
int errorRow = row++;
Platform.runLater(() -> bottom.add(er, 0, errorRow, 2, 1));
}
} catch (InvocationTargetException e) {
logger.error(e);
}
}
// if any pre-requisite failed, we can't run the algorithm
if (anyFail && !goButton.isDisabled()) {
goButton.setDisable(true);
} else if (!anyFail) {
goButton.setDisable(false);
}
return null;
}
};
// show progress indicator over original layout
VBox box = new VBox(p);
box.setAlignment(Pos.CENTER);
task.setOnSucceeded(e -> {
mainLayout.getChildren().remove(box);
borderPane.setDisable(false);
});
mainLayout.getChildren().add(box);
borderPane.setDisable(true);
new Thread(task).start();
}
}
use of javafx.scene.control.ProgressIndicator in project dwoss by gg-net.
the class ClientView method initFxComponents.
private void initFxComponents() {
try {
progressIndicator = new ProgressIndicator();
progressIndicator.setProgress(0);
BorderPane pane = new BorderPane(progressIndicator);
JFXPanel wrap = SwingCore.wrap(pane);
extraProgressPanel.add(wrap, BorderLayout.CENTER);
} catch (InterruptedException ex) {
Ui.handle(ex);
}
}
Aggregations