Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java @ 2051:4ba5036109d2
Make use of user defined axes labels during chart creation.
flys-artifacts/trunk@3541 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 27 Dec 2011 07:52:25 +0000 |
parents | 2d5f2bc68cc6 |
children | f9a972d375ba |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Tue Dec 27 07:17:07 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Tue Dec 27 07:52:25 2011 +0000 @@ -182,7 +182,8 @@ /** * Get internationalized label for the x axis. */ - protected String getXAxisLabel() { + @Override + protected String getDefaultXAxisLabel() { FLYSArtifact flys = (FLYSArtifact) master; return msg( @@ -193,10 +194,23 @@ @Override - protected String getYAxisLabel() { - return getWAxisLabel(); + protected String getDefaultYAxisLabel(int index) { + String label = "default"; + + if (index == YAXIS.W.idx) { + label = getWAxisLabel(); + } + else if (index == YAXIS.Q.idx) { + label = msg(getQAxisLabelKey(), getQAxisDefaultLabel()); + } + else if (index == YAXIS.D.idx) { + label = msg(I18N_WDIFF_YAXIS_LABEL, I18N_WDIFF_YAXIS_LABEL_DEFAULT); + } + + return label; } + /** * Get internationalized label for the y axis. */ @@ -234,23 +248,6 @@ } - protected String getYAxisLabel(int index) { - String label = "default"; - - if (index == YAXIS.W.idx) { - label = getWAxisLabel(); - } - else if (index == YAXIS.Q.idx) { - label = msg(getQAxisLabelKey(), getQAxisDefaultLabel()); - } - else if (index == YAXIS.D.idx) { - label = msg(I18N_WDIFF_YAXIS_LABEL, I18N_WDIFF_YAXIS_LABEL_DEFAULT); - } - - return label; - } - - /** * Get default value for the second Y-Axis' label (if no translation was * found).