Mercurial > dive4elements > river
changeset 2052:c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
flys-artifacts/trunk@3542 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 27 Dec 2011 08:04:12 +0000 |
parents | 4ba5036109d2 |
children | f9a972d375ba |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java |
diffstat | 3 files changed, 32 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Dec 27 07:52:25 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Dec 27 08:04:12 2011 +0000 @@ -1,3 +1,12 @@ +2011-12-27 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java: + Override getYAxisWalker(). + + * src/main/java/de/intevation/flys/exports/XYChartGenerator.java: Create new + instances of IdentifiableNumberAxis in createYAxis(int) default + implementation. + 2011-12-27 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/exports/AxisSection.java: Added
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java Tue Dec 27 07:52:25 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java Tue Dec 27 08:04:12 2011 +0000 @@ -55,6 +55,23 @@ } + @Override + protected YAxisWalker getYAxisWalker() { + return new YAxisWalker() { + @Override + public int length() { + return 1; + } + + /** Get identifier for this index. */ + @Override + public String getId(int idx) { + return "W"; + } + }; + } + + /** * Get localized chart title. */
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Tue Dec 27 07:52:25 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Tue Dec 27 08:04:12 2011 +0000 @@ -629,7 +629,12 @@ * Shall be overriden by subclasses. */ protected NumberAxis createYAxis(int index) { - NumberAxis axis = new NumberAxis(getYAxisLabel(index)); + YAxisWalker walker = getYAxisWalker(); + + IdentifiableNumberAxis axis = new IdentifiableNumberAxis( + walker.getId(index), + getYAxisLabel(index)); + axis.setAutoRangeIncludesZero(false); return axis; }