changeset 1697:2a6baa9e1576

JFreeChart: Do not fire change events for each and every data point added. flys-artifacts/trunk@2928 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 10 Oct 2011 14:00:18 +0000
parents 56953439dcae
children 6e935087f6a1
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java
diffstat 3 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon Oct 10 11:40:17 2011 +0000
+++ b/flys-artifacts/ChangeLog	Mon Oct 10 14:00:18 2011 +0000
@@ -1,3 +1,9 @@
+2011-10-10	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java,
+	  src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java:
+	  Do not fire change events for each and every data point added.
+
 2011-10-10  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
 	Fix WDifferences with more than one Pair (crashed due to incorrect index for
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Mon Oct 10 11:40:17 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Mon Oct 10 14:00:18 2011 +0000
@@ -216,10 +216,11 @@
 
         XYSeries series = new StyledXYSeries(seriesName, theme);
 
-        double[][] a = (double [][]) o;
-        double [] pxs = a[0];
-        for (int i = 0; i < pxs.length; i++) {
-            series.add (a[0][i], a[1][i]);
+        double [][] a = (double [][]) o;
+        double []  xs = a[0];
+        double []  ys = a[1];
+        for (int i = 0; i < xs.length; i++) {
+            series.add (xs[i], ys[i], false);
         }
         addFirstAxisSeries(series, visible);
     }
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Mon Oct 10 11:40:17 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Mon Oct 10 14:00:18 2011 +0000
@@ -246,7 +246,7 @@
         int size = wqkms.size();
 
         for (int i = 0; i < size; i++) {
-            series.add(wqkms.getKm(i), wqkms.getW(i));
+            series.add(wqkms.getKm(i), wqkms.getW(i), false);
         }
 
         addFirstAxisSeries(series, visible);
@@ -271,7 +271,7 @@
         int size = wqkms.size();
 
         for (int i = 0; i < size; i++) {
-            series.add(wqkms.getKm(i), wqkms.getQ(i));
+            series.add(wqkms.getKm(i), wqkms.getQ(i), false);
         }
 
         addSecondAxisSeries(series, visible);

http://dive4elements.wald.intevation.org