changeset 1667:f1af0c07a6ee

Bugfix: #346 Modified x and y axis titles of longitudinal section charts. flys-artifacts/trunk@2878 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 04 Oct 2011 07:37:05 +0000 (2011-10-04)
parents 09c1292cf36d
children 6566c7868456
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java flys-artifacts/src/main/resources/messages.properties flys-artifacts/src/main/resources/messages_de.properties flys-artifacts/src/main/resources/messages_de_DE.properties flys-artifacts/src/main/resources/messages_en.properties
diffstat 6 files changed, 42 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Sep 30 14:29:26 2011 +0000
+++ b/flys-artifacts/ChangeLog	Tue Oct 04 07:37:05 2011 +0000
@@ -1,3 +1,18 @@
+2011-10-04  Ingo Weinzierl <ingo@intevation.de>
+
+	flys/issue346 (W-INFO / Anzeige der Höheninformation)
+
+	* src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java:
+	  Modified x and y axis title. The x axis title is now "RIVERNAME-km"; the
+	  y axis title is now "W[WST_UNIT]" where WST_UNIT depends on the unit of
+	  the WST.
+
+	* src/main/resources/messages.properties,
+	  src/main/resources/messages_de_DE.properties,
+	  src/main/resources/messages_en.properties,
+	  src/main/resources/messages_de.properties: Modified i18n expressions for
+	  x and y axis of longitudinal section charts.
+
 2011-09-30  Ingo Weinzierl <ingo@intevation.de>
 
 	flys/issue351 (W-INFO / Wasserspiegellagenberechnungen)
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Fri Sep 30 14:29:26 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Tue Oct 04 07:37:05 2011 +0000
@@ -26,8 +26,11 @@
 import de.intevation.flys.artifacts.model.FacetTypes;
 import de.intevation.flys.artifacts.model.WQKms;
 
+import de.intevation.flys.artifacts.model.WstFactory;
+import de.intevation.flys.jfree.StickyAxisAnnotation;
 import de.intevation.flys.model.Annotation;
-import de.intevation.flys.jfree.StickyAxisAnnotation;
+import de.intevation.flys.model.Wst;
+import de.intevation.flys.utils.FLYSUtils;
 
 
 /**
@@ -120,12 +123,25 @@
 
 
     protected String getXAxisLabel() {
-        return msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL_DEFAULT);
+        FLYSArtifact flys = (FLYSArtifact) master;
+
+        return msg(
+            I18N_XAXIS_LABEL,
+            I18N_XAXIS_LABEL_DEFAULT,
+            new Object[] { FLYSUtils.getRiver(flys).getName() });
     }
 
 
     protected String getYAxisLabel() {
-        return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT);
+        FLYSArtifact flys = (FLYSArtifact) master;
+
+        Wst    wst  = WstFactory.getWst(FLYSUtils.getRiver(flys));
+        String unit = wst.getUnit().getName();
+
+        return msg(
+            I18N_YAXIS_LABEL,
+            I18N_YAXIS_LABEL_DEFAULT,
+            new Object[] { unit });
     }
 
 
--- a/flys-artifacts/src/main/resources/messages.properties	Fri Sep 30 14:29:26 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages.properties	Tue Oct 04 07:37:05 2011 +0000
@@ -32,8 +32,8 @@
 
 chart.longitudinal.section.title = W-Longitudinal Section
 chart.longitudinal.section.subtitle = Range: {0}-km {1,number,#.###} - {2,number,#.###}
-chart.longitudinal.section.xaxis.label = km
-chart.longitudinal.section.yaxis.label = W [NN + m]
+chart.longitudinal.section.xaxis.label = {0}-km
+chart.longitudinal.section.yaxis.label = W [{0}]
 chart.longitudinal.section.yaxis.second.label = Q [m\u00b3/s]
 chart.longitudinal.annotations.label = {0}.km
 
--- a/flys-artifacts/src/main/resources/messages_de.properties	Fri Sep 30 14:29:26 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_de.properties	Tue Oct 04 07:37:05 2011 +0000
@@ -38,8 +38,8 @@
 
 chart.longitudinal.section.title = W-L\u00e4ngsschnitt
 chart.longitudinal.section.subtitle = Bereich: {0}-km {1,number,#.###} - {2,number,#.###}
-chart.longitudinal.section.xaxis.label = km
-chart.longitudinal.section.yaxis.label = W [NN + m]
+chart.longitudinal.section.xaxis.label = {0}-km
+chart.longitudinal.section.yaxis.label = W [{0}]
 chart.longitudinal.section.yaxis.second.label = Q [m\u00b3/s]
 chart.longitudinal.annotations.label = {0}.km
 chart.discharge.curve.title = Abflusskurve
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties	Fri Sep 30 14:29:26 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_de_DE.properties	Tue Oct 04 07:37:05 2011 +0000
@@ -38,8 +38,8 @@
 
 chart.longitudinal.section.title = W-L\u00e4ngsschnitt
 chart.longitudinal.section.subtitle = Bereich: {0}-km {1,number,#.###} - {2,number,#.###}
-chart.longitudinal.section.xaxis.label = km
-chart.longitudinal.section.yaxis.label = W [NN + m]
+chart.longitudinal.section.xaxis.label = {0}-km
+chart.longitudinal.section.yaxis.label = W [{0}]
 chart.longitudinal.section.yaxis.second.label = Q [m\u00b3/s]
 chart.longitudinal.annotations.label = {0}.km
 chart.discharge.curve.title = Abflusskurve
--- a/flys-artifacts/src/main/resources/messages_en.properties	Fri Sep 30 14:29:26 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_en.properties	Tue Oct 04 07:37:05 2011 +0000
@@ -38,8 +38,8 @@
 
 chart.longitudinal.section.title = W-Longitudinal Section
 chart.longitudinal.section.subtitle = Range: {0}-km {1,number,#.###} - {2,number,#.###}
-chart.longitudinal.section.xaxis.label = km
-chart.longitudinal.section.yaxis.label = W [NN + m]
+chart.longitudinal.section.xaxis.label = {0}-km
+chart.longitudinal.section.yaxis.label = W [{0}]
 chart.longitudinal.section.yaxis.second.label = Q [m\u00b3/s]
 chart.longitudinal.annotations.label = {0}.km
 chart.discharge.curve.title = Discharge Curve

http://dive4elements.wald.intevation.org