Skip to content

Commit f16d36f

Browse files
committed
Fixed bug reporting bound value in progress bar.
1 parent cb483a6 commit f16d36f

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

src/main/java/net/finmath/experiments/ui/ExperimentUI.java

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,17 +162,21 @@ public synchronized Parent getContent() {
162162
debounce.setOnFinished(e -> runCalculationAsync());
163163

164164
// Buttons
165-
HBox buttons = new HBox(10);
166-
Button btnReset = new Button("Reset");
167-
btnReset.setOnAction(e -> resetToDefaults());
168-
Button btnCompute = new Button("Calculate");
169-
btnCompute.setOnAction(e -> runCalculationAsync());
170-
171-
buttons.getChildren().addAll(btnReset, btnCompute, progressIndicator);
172-
buttons.setAlignment(Pos.CENTER_LEFT);
173-
165+
Button buttonRest = new Button("Reset");
166+
buttonRest.setOnAction(e -> resetToDefaults());
167+
Button buttonCalculate = new Button("Calculate");
168+
buttonCalculate.setOnAction(e -> runCalculationAsync());
169+
170+
// Progress Indicator
171+
if(progressIndicator.visibleProperty().isBound()) progressIndicator.visibleProperty().unbind();
172+
progressIndicator.setVisible(false);
173+
174+
// Controls
175+
HBox controls = new HBox(10);
176+
controls.getChildren().addAll(buttonRest, buttonCalculate, progressIndicator);
177+
controls.setAlignment(Pos.CENTER_LEFT);
174178

175-
VBox vbox = new VBox(12, grid, buttons);
179+
VBox vbox = new VBox(12, grid, controls);
176180
vbox.setPadding(new Insets(14));
177181

178182
TitledPane content = new TitledPane(getTitle(), vbox);

0 commit comments

Comments
 (0)