Mercurial > dive4elements > river
changeset 1734:25d481cad4fb
Simplified handling of W(Q)Kms data to plot.
flys-artifacts/trunk@3019 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 18 Oct 2011 15:34:07 +0000 |
parents | ffab6de07dc5 |
children | 5966a20fc72c |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java |
diffstat | 2 files changed, 13 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Oct 18 15:28:02 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Oct 18 15:34:07 2011 +0000 @@ -1,3 +1,10 @@ +2011-10-18 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Simplify rendereing W(Q)Kms in WDifferencesCurveGenerator. + + * src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java: + (doWOut, doWOut): Simplified. + 2011-10-18 Felix Wolfsteller <felix.wolfsteller@intevation.de> Render zus and flood-protections in WDifferences-diagrams.
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java Tue Oct 18 15:28:02 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java Tue Oct 18 15:34:07 2011 +0000 @@ -146,7 +146,7 @@ doWOut((WQKms) f.getData(artifact, context), facet, attr, visible); } else if (name.equals("other.wkms")) { - doWOut((WKms) f.getData(artifact, context), attr, visible); + doWOut((WKms) f.getData(artifact, context), facet, attr, visible); } else { logger.warn("Unknown facet name: " + name); @@ -162,9 +162,8 @@ * @param wqkms The wqkms to add to the diagram. * @param theme The theme that contains styling information. */ - @Override protected void doWOut( - WQKms wqkms, + WKms wkms, Facet facet, Document theme, boolean visible @@ -173,28 +172,6 @@ XYSeries series = new StyledXYSeries(facet.getDescription(), theme); - int size = wqkms.size(); - - for (int i = 0; i < size; i++) { - series.add(wqkms.getKm(i), wqkms.getW(i)); - } - - // Note: the only difference in the super-implementation - // (in LongitudinalSectionGenerator) is here (adds with - // addFirstAxisSeries() . - addSecondAxisSeries(series, visible); - - if (needInvertAxis(wqkms)) { - setInverted(true); - } - } - - - protected void doWOut(WKms wkms, Document theme, boolean visible) { - logger.debug("WDifferencesCurveGenerator.doWOut"); - - XYSeries series = new StyledXYSeries("Wurb", theme);//getSeriesName(wqkms, "W"), theme); - int size = wkms.size(); for (int i = 0; i < size; i++) { @@ -206,12 +183,11 @@ // addFirstAxisSeries() . addSecondAxisSeries(series, visible); - /* - TODO - if (needInvertAxis(wkms)) { - setInverted(true); + if (wkms instanceof WQKms) { + if (needInvertAxis((WQKms) wkms)) { + setInverted(true); + } } - */ }