comparison flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java @ 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
parents 73794985a899
children 68260e38029a
comparison
equal deleted inserted replaced
1666:09c1292cf36d 1667:f1af0c07a6ee
24 import de.intevation.flys.artifacts.FLYSArtifact; 24 import de.intevation.flys.artifacts.FLYSArtifact;
25 25
26 import de.intevation.flys.artifacts.model.FacetTypes; 26 import de.intevation.flys.artifacts.model.FacetTypes;
27 import de.intevation.flys.artifacts.model.WQKms; 27 import de.intevation.flys.artifacts.model.WQKms;
28 28
29 import de.intevation.flys.artifacts.model.WstFactory;
30 import de.intevation.flys.jfree.StickyAxisAnnotation;
29 import de.intevation.flys.model.Annotation; 31 import de.intevation.flys.model.Annotation;
30 import de.intevation.flys.jfree.StickyAxisAnnotation; 32 import de.intevation.flys.model.Wst;
33 import de.intevation.flys.utils.FLYSUtils;
31 34
32 35
33 /** 36 /**
34 * An OutGenerator that generates discharge curves. 37 * An OutGenerator that generates discharge curves.
35 * 38 *
118 return c; 121 return c;
119 } 122 }
120 123
121 124
122 protected String getXAxisLabel() { 125 protected String getXAxisLabel() {
123 return msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL_DEFAULT); 126 FLYSArtifact flys = (FLYSArtifact) master;
127
128 return msg(
129 I18N_XAXIS_LABEL,
130 I18N_XAXIS_LABEL_DEFAULT,
131 new Object[] { FLYSUtils.getRiver(flys).getName() });
124 } 132 }
125 133
126 134
127 protected String getYAxisLabel() { 135 protected String getYAxisLabel() {
128 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); 136 FLYSArtifact flys = (FLYSArtifact) master;
137
138 Wst wst = WstFactory.getWst(FLYSUtils.getRiver(flys));
139 String unit = wst.getUnit().getName();
140
141 return msg(
142 I18N_YAXIS_LABEL,
143 I18N_YAXIS_LABEL_DEFAULT,
144 new Object[] { unit });
129 } 145 }
130 146
131 147
132 protected void adjustAxes(XYPlot plot) { 148 protected void adjustAxes(XYPlot plot) {
133 super.adjustAxes(plot); 149 super.adjustAxes(plot);

http://dive4elements.wald.intevation.org