Reset the progressmeter to zero when the MonteCarlo chart is closed
FEA: ItEr68S04BugFixing
This commit is contained in:
parent
14640be74a
commit
a8a1c8b6d8
2 changed files with 23 additions and 3 deletions
|
|
@ -29,6 +29,7 @@ import java.util.Map;
|
|||
|
||||
import org.joda.time.LocalDate;
|
||||
import org.navalplanner.web.common.Util;
|
||||
import org.navalplanner.web.montecarlo.MonteCarloGraphController.IOnClose;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
|
|
@ -228,7 +229,6 @@ public class MonteCarloController extends GenericForwardComposer {
|
|||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
progressMonteCarloCalculation.setValue(0);
|
||||
}
|
||||
|
||||
private Window createMonteCarloGraphWindow(
|
||||
|
|
@ -243,7 +243,14 @@ public class MonteCarloController extends GenericForwardComposer {
|
|||
|
||||
final String orderName = monteCarloModel.getOrderName();
|
||||
final boolean groupByWeeks = cbGroupByWeeks.isChecked();
|
||||
controller.generateMonteCarloGraph(orderName, data, groupByWeeks);
|
||||
controller.generateMonteCarloGraph(orderName, data,
|
||||
groupByWeeks, new IOnClose() {
|
||||
|
||||
@Override
|
||||
public void montecarloGraphClosed() {
|
||||
progressMonteCarloCalculation.setValue(0);
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,17 @@ public class MonteCarloGraphController extends GenericForwardComposer {
|
|||
self.setVariable("monteCarloGraphController", this, true);
|
||||
}
|
||||
|
||||
public void generateMonteCarloGraph(String orderName, Map<LocalDate, BigDecimal> data, boolean byWeek) {
|
||||
public interface IOnClose {
|
||||
|
||||
public void montecarloGraphClosed();
|
||||
}
|
||||
|
||||
private IOnClose onClose = null;
|
||||
|
||||
public void generateMonteCarloGraph(String orderName,
|
||||
Map<LocalDate, BigDecimal> data, boolean byWeek, IOnClose onClose) {
|
||||
this.onClose = onClose;
|
||||
|
||||
CategoryModel xymodel;
|
||||
|
||||
initializeMonteCarloValues(data);
|
||||
|
|
@ -180,6 +190,9 @@ public class MonteCarloGraphController extends GenericForwardComposer {
|
|||
|
||||
public void cancel() {
|
||||
self.setVisible(false);
|
||||
if (onClose != null) {
|
||||
onClose.montecarloGraphClosed();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue