diff flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java @ 3184:12440c6b8b66

Refactored legend item aggregation again. flys-artifacts/trunk@4799 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 26 Jun 2012 13:04:51 +0000
parents b6da650b0718
children abc2db630815
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java	Tue Jun 26 12:48:26 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java	Tue Jun 26 13:04:51 2012 +0000
@@ -1386,6 +1386,22 @@
 
 
     /**
+     * Create new legend entries, dependent on settings.
+     * @param plot The plot for which to modify the legend.
+     */
+    public void aggregateLegendEntries(XYPlot plot) {
+        int AGGR_THRESHOLD = 0;
+
+        Integer threshold = getChartSettings().getLegendSection()
+            .getAggregationThreshold();
+
+        AGGR_THRESHOLD = (threshold != null) ? threshold.intValue() : 0;
+
+        LegendProcessor.aggregateLegendEntries(plot, AGGR_THRESHOLD);
+    }
+
+
+    /**
      * Returns a transparently textured paint.
      *
      * @return a transparently textured paint.

http://dive4elements.wald.intevation.org