I want to use a ProgressBar for heavy computations (monte-carlo simulations). Sadly I do not know how that could work, if the computation is not performed within the same class (respectively even not within the UI project). So far, I thought I just have to add the ProgressBar like this:
BeanItem<SimulationProcess> beanItem = new BeanItem<SimulationProcess>(this.simulationProcess);
Property<Float> propertyRatio = beanItem.getItemProperty("finishingRatio");
this.progressBar = new ProgressBar(propertyRatio);
this.addComponent(this.progressBar)
And then start the simulation. The value of “finishingRatio” is updated within the operation “performSimulation”, so I hoped the progressBar automatically updateds its value each 500ms, but it does not.
public void startSimulation() {
UI.getCurrent().setPollInterval(500);
this.simulationProcess.performSimulation();
}
Has anyone an idea how to deal with that problem?
Hello Patric,
recently I read about ProgressIndicator in the book “Vaadin 7 UI Design By Example” by Alejandro Duarte. I’m new at Vaadin framework and started with version 8.1.3. There are some differences regarding version 7. I think one should use ProgressBar now. This led me to the following program (created with Vaadin 8.1.4 and the plugin for Eclipse). A worker thread class