changeset 2167:e0add4b2d4bc

Issue 461. Override buildChartSection() to disable the chart subtitle entry in ChartSettings. flys-artifacts/trunk@3762 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 25 Jan 2012 10:19:30 +0000
parents 2898b1ff6013
children a079f4e26001
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java
diffstat 2 files changed, 26 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Jan 24 22:59:44 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Jan 25 10:19:30 2012 +0000
@@ -1,3 +1,11 @@
+2012-01-25  Raimund Renkert <raimund.renkert@intevation.de>
+
+	Issue 461.
+
+	* src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java:
+	  Override buildChartSection() to disable the chart subtitle entry in
+	  ChartSettings.
+
 2012-01-24	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	I18N for WINFO calculations messages.
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Tue Jan 24 22:59:44 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Wed Jan 25 10:19:30 2012 +0000
@@ -91,7 +91,10 @@
     @Override
     protected String getChartSubtitle() {
         // XXX NOTE: overriding this method disables ChartSettings subtitle!
-        // TODO clarify XXX NOTE
+        // The default implementation of this method in ChartGenerator returns
+        // the subtitle changed via the chart settings dialog. This method
+        // always returns the subtitle containing river and km, NEVER the
+        // ChartSettings subtitle!
         return getDefaultChartSubtitle();
     }
 
@@ -257,5 +260,19 @@
 
         addAxisSeries(series, 0, visible);
     }
+
+
+    /**
+     * Creates a new <i>ChartSection</i>.
+     *
+     * @return a new <i>ChartSection</i>.
+     */
+    @Override
+    protected ChartSection buildChartSection() {
+        ChartSection chartSection = new ChartSection();
+        chartSection.setTitle(getChartTitle());
+        chartSection.setDisplayGird(isGridVisible());
+        return chartSection;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org