Mercurial > dive4elements > river
changeset 4378:8eb1d6dc96a9
Add chart generation for fixings in bed differences generators
If matching fixanalysis data is loaded via the datacage the bed difference
generators are now able to display graphs for the additonal data.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Fri, 02 Nov 2012 15:50:35 +0100 (2012-11-02) |
parents | 512a3af69e18 |
children | 8c7e76521904 |
files | flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDiffHeightYearGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceEpochGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceYearGenerator.java |
diffstat | 3 files changed, 49 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDiffHeightYearGenerator.java Fri Nov 02 15:47:15 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDiffHeightYearGenerator.java Fri Nov 02 15:50:35 2012 +0100 @@ -9,17 +9,17 @@ import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.minfo.BedDiffYearResult; import de.intevation.flys.exports.StyledSeriesBuilder; -import de.intevation.flys.exports.XYChartGenerator; +import de.intevation.flys.exports.fixings.AbstractFixGenerator; import de.intevation.flys.jfree.FLYSAnnotation; import de.intevation.flys.jfree.StyledXYSeries; public class BedDiffHeightYearGenerator -extends XYChartGenerator +extends AbstractFixGenerator implements FacetTypes { public enum YAXIS { - D(0); + D(0), dW(1); protected int idx; @@ -78,6 +78,15 @@ (BedDiffYearResult) bundle.getData(context), bundle, attr, visible); } + else if (name.contains(FIX_SECTOR_AVERAGE_LS)) { + doSectorAverageOut( bundle, attr, visible, YAXIS.dW.idx); + } + else if (name.equals(FIX_REFERENCE_EVENTS_LS)) { + doReferenceEventsOut( bundle, attr, visible, YAXIS.dW.idx); + } + else if (name.equals(FIX_ANALYSIS_EVENTS_LS)) { + doAnalysisEventsOut( bundle, attr, visible, YAXIS.dW.idx); + } else if (name.equals(LONGITUDINAL_ANNOTATION)) { doAnnotations( (FLYSAnnotation) bundle.getData(context), @@ -99,7 +108,13 @@ @Override protected String getDefaultYAxisLabel(int pos) { - return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); + if (pos == YAXIS.D.idx) { + return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); + } + else if (pos == YAXIS.dW.idx) { + return msg(I18N_DW_YAXIS_LABEL, I18N_DW_YAXIS_LABEL_DEFAULT); + } + return "default"; } protected void doBedDifferenceYearOut(BedDiffYearResult data,
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceEpochGenerator.java Fri Nov 02 15:47:15 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceEpochGenerator.java Fri Nov 02 15:50:35 2012 +0100 @@ -9,17 +9,17 @@ import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.minfo.BedDiffEpochResult; import de.intevation.flys.exports.StyledSeriesBuilder; -import de.intevation.flys.exports.XYChartGenerator; +import de.intevation.flys.exports.fixings.AbstractFixGenerator; import de.intevation.flys.jfree.FLYSAnnotation; import de.intevation.flys.jfree.StyledXYSeries; public class BedDifferenceEpochGenerator -extends XYChartGenerator +extends AbstractFixGenerator implements FacetTypes { public enum YAXIS { - D(0), H(1); + D(0), H(1), dW(2); protected int idx; @@ -88,6 +88,15 @@ doBedDifferenceHeightsOut((BedDiffEpochResult)bundle.getData(context), bundle, attr, visible, 1); } + else if (name.contains(FIX_SECTOR_AVERAGE_LS)) { + doSectorAverageOut( bundle, attr, visible, YAXIS.dW.idx); + } + else if (name.equals(FIX_REFERENCE_EVENTS_LS)) { + doReferenceEventsOut( bundle, attr, visible, YAXIS.dW.idx); + } + else if (name.equals(FIX_ANALYSIS_EVENTS_LS)) { + doAnalysisEventsOut( bundle, attr, visible, YAXIS.dW.idx); + } else if (name.equals(LONGITUDINAL_ANNOTATION)) { doAnnotations( (FLYSAnnotation) bundle.getData(context), @@ -116,6 +125,9 @@ else if (pos == YAXIS.H.idx) { label = msg(I18N_SECOND_YAXIS_LABEL, I18N_SECOND_YAXIS_LABEL_DEFAULT); } + else if (pos == YAXIS.dW.idx) { + return msg(I18N_DW_YAXIS_LABEL, I18N_DW_YAXIS_LABEL_DEFAULT); + } return label; }
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceYearGenerator.java Fri Nov 02 15:47:15 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceYearGenerator.java Fri Nov 02 15:50:35 2012 +0100 @@ -9,17 +9,17 @@ import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.minfo.BedDiffYearResult; import de.intevation.flys.exports.StyledSeriesBuilder; -import de.intevation.flys.exports.XYChartGenerator; +import de.intevation.flys.exports.fixings.AbstractFixGenerator; import de.intevation.flys.jfree.FLYSAnnotation; import de.intevation.flys.jfree.StyledXYSeries; public class BedDifferenceYearGenerator -extends XYChartGenerator +extends AbstractFixGenerator implements FacetTypes { public enum YAXIS { - D(0), M(1), H(2); + D(0), M(1), H(2), dW(3); protected int idx; @@ -96,6 +96,15 @@ doBedDifferenceHeightsOut( (BedDiffYearResult)bundle.getData(context), bundle, attr, visible, 1); + } + else if (name.contains(FIX_SECTOR_AVERAGE_LS)) { + doSectorAverageOut( bundle, attr, visible, YAXIS.dW.idx); + } + else if (name.equals(FIX_REFERENCE_EVENTS_LS)) { + doReferenceEventsOut( bundle, attr, visible, YAXIS.dW.idx); + } + else if (name.equals(FIX_ANALYSIS_EVENTS_LS)) { + doAnalysisEventsOut( bundle, attr, visible, YAXIS.dW.idx); } else if (name.equals(LONGITUDINAL_ANNOTATION)) { doAnnotations( @@ -147,7 +156,9 @@ else if (pos == YAXIS.H.idx) { label = msg(I18N_THIRD_YAXIS_LABEL, I18N_THIRD_YAXIS_LABEL_DEFAULT); } - + else if (pos == YAXIS.dW.idx) { + label = msg(I18N_DW_YAXIS_LABEL, I18N_DW_YAXIS_LABEL_DEFAULT); + } return label; }