diff flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java @ 1989:156304542edf

Finished the ChartSection part of the chart Settings returned by the XYChartGenerator. flys-artifacts/trunk@3423 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 15 Dec 2011 12:05:06 +0000
parents 590d9bc88ff5
children 0bd7c3cf0af1
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Thu Dec 15 10:09:02 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Thu Dec 15 12:05:06 2011 +0000
@@ -115,6 +115,22 @@
     }
 
 
+    @Override
+    protected String getChartSubtitle() {
+        double[] dist = getRange();
+
+        Object[] args = new Object[] {
+            getRiverName(),
+
+            dist[0],
+
+            dist[1]
+        };
+
+        return msg(getChartSubtitleKey(), "", args);
+    }
+
+
     /**
      * Gets key to look up internationalized String for the charts subtitle.
      * @return key to look up translated subtitle.
@@ -130,17 +146,7 @@
      */
     @Override
     protected void addSubtitles(JFreeChart chart) {
-        double[] dist = getRange();
-
-        Object[] args = new Object[] {
-            getRiverName(),
-
-            dist[0],
-
-            dist[1]
-        };
-
-        String subtitle = msg(getChartSubtitleKey(), "", args);
+        String subtitle = getChartSubtitle();
         chart.addSubtitle(new TextTitle(subtitle));
     }
 

http://dive4elements.wald.intevation.org