# HG changeset patch # User Ingo Weinzierl # Date 1317713825 0 # Node ID f1af0c07a6eeeb47ec42bf8cf6958e8d459fb512 # Parent 09c1292cf36d5aee4958e9fef804a8045c7865a4 Bugfix: #346 Modified x and y axis titles of longitudinal section charts. flys-artifacts/trunk@2878 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 09c1292cf36d -r f1af0c07a6ee flys-artifacts/ChangeLog --- 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 + + 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 flys/issue351 (W-INFO / Wasserspiegellagenberechnungen) diff -r 09c1292cf36d -r f1af0c07a6ee flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java --- 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 }); } diff -r 09c1292cf36d -r f1af0c07a6ee flys-artifacts/src/main/resources/messages.properties --- 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 diff -r 09c1292cf36d -r f1af0c07a6ee flys-artifacts/src/main/resources/messages_de.properties --- 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 diff -r 09c1292cf36d -r f1af0c07a6ee flys-artifacts/src/main/resources/messages_de_DE.properties --- 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 diff -r 09c1292cf36d -r f1af0c07a6ee flys-artifacts/src/main/resources/messages_en.properties --- 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