From 57a9e9b465382a6f709da52b273b66e8af20b711 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sun, 29 May 2016 15:19:42 +0300 Subject: [PATCH] performance optimization for plots --- .../java/inr/numass/workbench/NumassWorkbenchController.java | 2 +- numass-viewer/build.gradle | 2 +- .../java/inr/numass/viewer/NumassLoaderViewComponent.java | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/numass-main/src/main/java/inr/numass/workbench/NumassWorkbenchController.java b/numass-main/src/main/java/inr/numass/workbench/NumassWorkbenchController.java index 3ebdb1c1..a2a53890 100644 --- a/numass-main/src/main/java/inr/numass/workbench/NumassWorkbenchController.java +++ b/numass-main/src/main/java/inr/numass/workbench/NumassWorkbenchController.java @@ -19,7 +19,7 @@ import hep.dataforge.exceptions.NameNotFoundException; import hep.dataforge.fx.ConsoleFragment; import hep.dataforge.fx.FXProcessManager; import hep.dataforge.fx.LogOutputPane; -import hep.dataforge.fx.MetaEditor; +import hep.dataforge.fx.configuration.MetaEditor; import hep.dataforge.fx.ProcessManagerFragment; import hep.dataforge.io.IOManager; import hep.dataforge.io.MetaFileReader; diff --git a/numass-viewer/build.gradle b/numass-viewer/build.gradle index 0e4ad5e8..2b78bb4a 100644 --- a/numass-viewer/build.gradle +++ b/numass-viewer/build.gradle @@ -5,7 +5,7 @@ if (!hasProperty('mainClass')) { } mainClassName = mainClass -version = "0.3.3" +version = "0.3.4" description = "The viewer for numass data" diff --git a/numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderViewComponent.java b/numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderViewComponent.java index 027059e4..64ae8cef 100644 --- a/numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderViewComponent.java +++ b/numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderViewComponent.java @@ -351,6 +351,7 @@ public class NumassLoaderViewComponent extends AnchorPane implements Initializab detectorPlotFrame = new JFreeChartFrame(frameMeta); } else { detectorPlotFrame = detectorPlot.getPlot(); + detectorPlotFrame.clear(); detectorPlot.removePlot(); } @@ -361,9 +362,9 @@ public class NumassLoaderViewComponent extends AnchorPane implements Initializab .setValue("showLine", true) .setValue("showSymbol", false) .setValue("showErrors", false) + .setValue("JFreeChart.cache", true) .build(); -// detectorPlotFrame.clear(); callback.setMaxProgress(points.size()); callback.setProgress(0); for (NMPoint point : points) { @@ -375,6 +376,7 @@ public class NumassLoaderViewComponent extends AnchorPane implements Initializab //TODO add update instead of replace action } detectorPlot.setPlot(detectorPlotFrame); + callback.setProgressToMax(); }); }