diff flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 1991:0bd7c3cf0af1

Added axis sections into charts Settings. flys-artifacts/trunk@3427 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 15 Dec 2011 17:10:42 +0000
parents 5c1e7c1e9e09
children 210020108ca4
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Thu Dec 15 15:58:56 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Thu Dec 15 17:10:42 2011 +0000
@@ -885,6 +885,11 @@
         settings.setChartSection(chartSection);
         settings.setLegendSection(legendSection);
 
+        List<Section> axisSections = buildAxisSections();
+        for (Section axisSection: axisSections) {
+            settings.addAxisSection(axisSection);
+        }
+
         return settings;
     }
 
@@ -914,5 +919,17 @@
         legendSection.setFontSize(getLegendFontSize());
         return legendSection;
     }
+
+
+    /**
+     * Creates new Sections for chart axes. Subclasses of this ChartGenerator
+     * should override this method to include all necessary axes in that
+     * concrete chart.
+     *
+     * @return an empty list.
+     */
+    protected List<Section> buildAxisSections() {
+        return new ArrayList<Section>();
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org