Mercurial > dive4elements > river
changeset 5864:f2e46a668fe6
River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/AnnotationFacet.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/AnnotationFacet.java Sun Apr 28 15:04:44 2013 +0200 @@ -19,7 +19,7 @@ import org.dive4elements.river.artifacts.AnnotationArtifact; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StickyAxisAnnotation; import org.dive4elements.river.model.Annotation; @@ -97,7 +97,7 @@ StickyAxisAnnotation.SimpleAxis.X_AXIS)); } - return new FLYSAnnotation(description, xy); + return new RiverAnnotation(description, xy); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesQFacet.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesQFacet.java Sun Apr 28 15:04:44 2013 +0200 @@ -21,7 +21,7 @@ import org.dive4elements.river.artifacts.MainValuesArtifact; import org.dive4elements.river.artifacts.math.Linear; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StickyAxisAnnotation; import org.dive4elements.river.exports.DurationCurveGenerator; @@ -143,7 +143,7 @@ } } - return new FLYSAnnotation(description, xy); + return new RiverAnnotation(description, xy); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesWFacet.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesWFacet.java Sun Apr 28 15:04:44 2013 +0200 @@ -21,7 +21,7 @@ import org.dive4elements.river.artifacts.MainValuesArtifact; import org.dive4elements.river.artifacts.math.Linear; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StickyAxisAnnotation; @@ -122,7 +122,7 @@ } } - return new FLYSAnnotation(description, xy); + return new RiverAnnotation(description, xy); }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -24,7 +24,7 @@ import org.dive4elements.river.jfree.CollisionFreeXYTextAnnotation; import org.dive4elements.river.jfree.DoubleBounds; import org.dive4elements.river.jfree.EnhancedLineAndShapeRenderer; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StableXYDifferenceRenderer; import org.dive4elements.river.jfree.StickyAxisAnnotation; import org.dive4elements.river.jfree.Style; @@ -80,7 +80,7 @@ * The base class for chart creation. It should provide some basic things that * equal in all chart types. * - * Annotations are added as FLYSAnnotations and come in mutliple basic forms: + * Annotations are added as RiverAnnotations and come in mutliple basic forms: * TextAnnotations are labels somewhere in data space, StickyAnnotations are * labels of a slice or line in one data dimension (i.e. visualized as label * on a single axis). @@ -135,7 +135,7 @@ protected SortedMap<Integer, AxisDataset> datasets; /** List of annotations to insert in plot. */ - protected List<FLYSAnnotation> annotations = new ArrayList<FLYSAnnotation>(); + protected List<RiverAnnotation> annotations = new ArrayList<RiverAnnotation>(); /** * A mini interface that allows to walk over the YAXIS enums defined in @@ -183,7 +183,7 @@ /** * Adds annotations to list. The given annotation will be visible. */ - public void addAnnotations(FLYSAnnotation annotation) { + public void addAnnotations(RiverAnnotation annotation) { annotations.add(annotation); } @@ -449,7 +449,7 @@ plot.getRangeAxis().getRange()); // Walk over all Annotation sets. - for (FLYSAnnotation fa: annotations) { + for (RiverAnnotation fa: annotations) { // Access text styling, if any. Document theme = fa.getTheme(); @@ -620,7 +620,7 @@ * @param visible The visibility of the annotations. */ protected void doAnnotations( - FLYSAnnotation annotations, + RiverAnnotation annotations, ArtifactAndFacet aandf, Document theme, boolean visible
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -16,7 +16,7 @@ import org.dive4elements.river.artifacts.model.FacetTypes; import org.dive4elements.river.artifacts.model.WKms; import org.dive4elements.river.artifacts.model.WQKms; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StickyAxisAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; @@ -131,7 +131,7 @@ || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W) || name.equals(MAINVALUES_W) ) { - doAnnotations((FLYSAnnotation) + doAnnotations((RiverAnnotation) artifactFacet.getData(context), artifactFacet, attr, visible); } else if (name.equals(STATIC_WKMS_INTERPOL) || name.equals(HEIGHTMARKS_POINTS)) { @@ -228,7 +228,7 @@ (float) data[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS)); } - doAnnotations(new FLYSAnnotation(aandf.getFacetDescription(), xy), + doAnnotations(new RiverAnnotation(aandf.getFacetDescription(), xy), aandf, theme, visible); } @@ -257,7 +257,7 @@ (float) data[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS)); } - doAnnotations(new FLYSAnnotation(facet.getDescription(), xy), + doAnnotations(new RiverAnnotation(facet.getDescription(), xy), aandf, theme, visible); } else { @@ -269,7 +269,7 @@ xy.add(new StickyAxisAnnotation(aandf.getFacetDescription(), (float) w, StickyAxisAnnotation.SimpleAxis.Y_AXIS)); - doAnnotations(new FLYSAnnotation(facet.getDescription(), xy), + doAnnotations(new RiverAnnotation(facet.getDescription(), xy), aandf, theme, visible); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/CrossSectionGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/CrossSectionGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -31,7 +31,7 @@ import org.dive4elements.river.artifacts.model.FacetTypes; import org.dive4elements.river.artifacts.model.HYKFactory; import org.dive4elements.river.artifacts.resources.Resources; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.model.FastCrossSectionLine; import org.dive4elements.river.themes.LineStyle; @@ -182,7 +182,7 @@ plot.getDomainAxis(0).getRange(), plot.getRangeAxis().getRange()); - for(FLYSAnnotation fa : this.annotations) { + for(RiverAnnotation fa : this.annotations) { // Access text styling, if any. Document theme = fa.getTheme(); @@ -405,7 +405,7 @@ // Actual Styling is done in XYChartGenerator. if (visible) { - addAnnotations(new FLYSAnnotation(seriesName, null, zones, theme)); + addAnnotations(new RiverAnnotation(seriesName, null, zones, theme)); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -13,7 +13,7 @@ import org.dive4elements.river.artifacts.model.FacetTypes; import org.dive4elements.river.artifacts.model.WQKms; import org.dive4elements.river.jfree.Bounds; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.model.Gauge; import org.dive4elements.river.model.River; @@ -143,7 +143,7 @@ || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W) || name.equals(MAINVALUES_W)) { - doAnnotations((FLYSAnnotation) artifactFacet.getData(context), + doAnnotations((RiverAnnotation) artifactFacet.getData(context), artifactFacet, theme, visible); } else if (FacetTypes.IS.MANUALPOINTS(name)) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeLongitudinalSectionGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeLongitudinalSectionGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -23,7 +23,7 @@ import org.dive4elements.river.exports.process.Processor; import org.dive4elements.river.exports.process.WOutProcessor; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; @@ -77,7 +77,7 @@ visible); } else if (name.equals(LONGITUDINAL_ANNOTATION)) { - doAnnotations((FLYSAnnotation) artifactFacet.getData(context), + doAnnotations((RiverAnnotation) artifactFacet.getData(context), artifactFacet, attr, visible); } else if (FacetTypes.IS.MANUALPOINTS(name)) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -12,7 +12,7 @@ import org.dive4elements.river.artifacts.model.FacetTypes; import org.dive4elements.river.artifacts.model.WQDay; import org.dive4elements.river.jfree.Bounds; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; import java.awt.Font; @@ -205,7 +205,7 @@ || name.equals(MAINVALUES_W) ) { doAnnotations( - (FLYSAnnotation) artifactFacet.getData(context), + (RiverAnnotation) artifactFacet.getData(context), artifactFacet, attr, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -30,7 +30,7 @@ import org.dive4elements.river.jfree.Bounds; import org.dive4elements.river.jfree.DoubleBounds; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.utils.FLYSUtils; @@ -305,7 +305,7 @@ else if (name.equals(FLOW_VELOCITY_ANNOTATION)) { doAnnotations( - (FLYSAnnotation) artifactAndFacet.getData(context), + (RiverAnnotation) artifactAndFacet.getData(context), artifactAndFacet, attr, visible); @@ -327,7 +327,7 @@ } else if (name.equals(LONGITUDINAL_ANNOTATION)) { doAnnotations( - (FLYSAnnotation) artifactAndFacet.getData(context), + (RiverAnnotation) artifactAndFacet.getData(context), artifactAndFacet, attr, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeWQCurveGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeWQCurveGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -19,7 +19,7 @@ import org.dive4elements.river.artifacts.model.Timerange; import org.dive4elements.river.artifacts.model.WQKms; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledValueMarker; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.utils.FLYSUtils; @@ -135,11 +135,11 @@ visible, YAXIS.W.idx); } else if (HISTORICAL_DISCHARGE_MAINVALUES_Q.equals(name)) { - doAnnotations((FLYSAnnotation) + doAnnotations((RiverAnnotation) artifactFacet.getData(context), artifactFacet, theme, visible); } else if (HISTORICAL_DISCHARGE_MAINVALUES_W.equals(name)) { - doAnnotations((FLYSAnnotation) + doAnnotations((RiverAnnotation) artifactFacet.getData(context), artifactFacet, theme, visible); } else {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -17,7 +17,7 @@ import org.dive4elements.river.artifacts.model.WKms; import org.dive4elements.river.artifacts.model.WQKms; import org.dive4elements.river.exports.process.WOutProcessor; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledAreaSeriesCollection; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.utils.DataUtil; @@ -346,7 +346,7 @@ } else if (name.equals(LONGITUDINAL_ANNOTATION)) { doAnnotations( - (FLYSAnnotation) artifactAndFacet.getData(context), + (RiverAnnotation) artifactAndFacet.getData(context), artifactAndFacet, attr, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -16,7 +16,7 @@ import org.dive4elements.river.exports.process.BedheightProcessor; import org.dive4elements.river.exports.process.Processor; import org.dive4elements.river.exports.process.WOutProcessor; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.utils.FLYSUtils; @@ -193,7 +193,7 @@ } else if (name.equals(MIDDLE_BED_HEIGHT_ANNOTATION)) { doAnnotations( - (FLYSAnnotation) artifactAndFacet.getData(context), + (RiverAnnotation) artifactAndFacet.getData(context), artifactAndFacet, attr, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -13,7 +13,7 @@ import org.dive4elements.river.artifacts.model.WW; import org.dive4elements.river.artifacts.model.WW.ApplyFunctionIterator; import org.dive4elements.river.artifacts.model.WWAxisTypes; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.utils.Formatter; @@ -169,7 +169,7 @@ } else if (name.equals(MAINVALUES_W)) { doAnnotations( - ((FLYSAnnotation) artifactFacet.getData(context)).flipStickyAxis(), + ((RiverAnnotation) artifactFacet.getData(context)).flipStickyAxis(), artifactFacet, theme, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -13,7 +13,7 @@ import org.dive4elements.river.jfree.Bounds; import org.dive4elements.river.jfree.CollisionFreeXYTextAnnotation; import org.dive4elements.river.jfree.DoubleBounds; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledTimeSeries; import org.dive4elements.river.jfree.TimeBounds; @@ -738,8 +738,8 @@ names.get(series.getTimePeriod(i)), x, y)); logger.debug("doPoints(): x=" + x + " y=" + y); } - FLYSAnnotation annotations = - new FLYSAnnotation(null, null, null, theme); + RiverAnnotation annotations = + new RiverAnnotation(null, null, null, theme); annotations.setTextAnnotations(xy); // Do not generate second legend entry. (null was passed for the aand before).
--- a/artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -44,7 +44,7 @@ import org.dive4elements.river.jfree.Bounds; import org.dive4elements.river.jfree.CollisionFreeXYTextAnnotation; import org.dive4elements.river.jfree.DoubleBounds; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledAreaSeriesCollection; import org.dive4elements.river.jfree.StyledXYSeries; @@ -1021,7 +1021,7 @@ logger.error("Could not decode json."); } - FLYSAnnotation annotations = new FLYSAnnotation(null, null, null, theme); + RiverAnnotation annotations = new RiverAnnotation(null, null, null, theme); annotations.setTextAnnotations(xy); // Do not generate second legend entry. (null was passed for the aand before).
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -19,7 +19,7 @@ import org.dive4elements.river.artifacts.resources.Resources; import org.dive4elements.river.exports.TimeseriesChartGenerator; import org.dive4elements.river.jfree.CollisionFreeXYTextAnnotation; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledDomainMarker; import org.dive4elements.river.jfree.StyledTimeSeries; import org.dive4elements.river.jfree.StyledValueMarker; @@ -286,7 +286,7 @@ qwd.qwd.getDeltaW()); textAnnos.add(anno); - FLYSAnnotation flysAnno = new FLYSAnnotation(null, null, null, theme); + RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme); flysAnno.setTextAnnotations(textAnnos); addAnnotations(flysAnno); } @@ -382,7 +382,7 @@ textAnnos.add(anno); } - FLYSAnnotation flysAnno = new FLYSAnnotation(null, null, null, theme); + RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme); flysAnno.setTextAnnotations(textAnnos); addAnnotations(flysAnno); }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixLongitudinalSectionGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixLongitudinalSectionGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -24,7 +24,7 @@ import org.dive4elements.river.exports.ChartGenerator; import org.dive4elements.river.exports.process.KMIndexProcessor; import org.dive4elements.river.exports.process.Processor; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledAreaSeriesCollection; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.utils.KMIndex; @@ -82,7 +82,7 @@ } else if (name.equals(LONGITUDINAL_ANNOTATION)) { doAnnotations( - (FLYSAnnotation) aaf.getData(context), + (RiverAnnotation) aaf.getData(context), aaf, doc, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -46,7 +46,7 @@ import org.dive4elements.river.exports.ChartGenerator; import org.dive4elements.river.exports.StyledSeriesBuilder; import org.dive4elements.river.jfree.CollisionFreeXYTextAnnotation; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.JFreeUtil; import org.dive4elements.river.jfree.StickyAxisAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; @@ -214,7 +214,7 @@ addAxisSeries(series, 0, visible); if(visible && ThemeUtil.parseShowPointLabel(doc)) { - FLYSAnnotation flysAnno = new FLYSAnnotation(null, null, null, doc); + RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, doc); flysAnno.setTextAnnotations(textAnnos); addAnnotations(flysAnno); } @@ -247,7 +247,7 @@ addAxisSeries(series, 0, visible); if(visible && ThemeUtil.parseShowPointLabel(doc)) { - FLYSAnnotation flysAnno = new FLYSAnnotation(null, null, null, doc); + RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, doc); flysAnno.setTextAnnotations(textAnnos); addAnnotations(flysAnno); } @@ -409,7 +409,7 @@ (float) data[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS)); } - doAnnotations(new FLYSAnnotation(facet.getDescription(), xy), + doAnnotations(new RiverAnnotation(facet.getDescription(), xy), aandf, theme, visible); } else { @@ -425,7 +425,7 @@ xy.add(new StickyAxisAnnotation(aandf.getFacetDescription(), (float) w, StickyAxisAnnotation.SimpleAxis.Y_AXIS)); - doAnnotations(new FLYSAnnotation(facet.getDescription(), xy), + doAnnotations(new RiverAnnotation(facet.getDescription(), xy), aandf, theme, visible); } } @@ -524,8 +524,8 @@ addAxisSeries(series, 0, visible); if (visible && ThemeUtil.parseShowPointLabel(theme)) { - FLYSAnnotation flysAnno = - new FLYSAnnotation(null, null, null, theme); + RiverAnnotation flysAnno = + new RiverAnnotation(null, null, null, theme); flysAnno.setTextAnnotations(textAnnos); addAnnotations(flysAnno); }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDiffHeightYearGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDiffHeightYearGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -23,7 +23,7 @@ import org.dive4elements.river.exports.process.Processor; import org.dive4elements.river.jfree.Bounds; import org.dive4elements.river.jfree.DoubleBounds; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; @@ -126,7 +126,7 @@ } else if (name.equals(LONGITUDINAL_ANNOTATION)) { doAnnotations( - (FLYSAnnotation) bundle.getData(context), + (RiverAnnotation) bundle.getData(context), bundle, attr, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -26,7 +26,7 @@ import org.dive4elements.river.exports.process.WOutProcessor; import org.dive4elements.river.jfree.Bounds; import org.dive4elements.river.jfree.DoubleBounds; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.utils.DataUtil; @@ -169,7 +169,7 @@ } else if (name.equals(LONGITUDINAL_ANNOTATION)) { doAnnotations( - (FLYSAnnotation) bundle.getData(context), + (RiverAnnotation) bundle.getData(context), bundle, attr, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceYearGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceYearGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -26,7 +26,7 @@ import org.dive4elements.river.exports.process.WOutProcessor; import org.dive4elements.river.jfree.Bounds; import org.dive4elements.river.jfree.DoubleBounds; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.utils.DataUtil; @@ -174,7 +174,7 @@ } else if (name.equals(LONGITUDINAL_ANNOTATION)) { doAnnotations( - (FLYSAnnotation) bundle.getData(context), + (RiverAnnotation) bundle.getData(context), bundle, attr, visible); @@ -296,4 +296,4 @@ setInverted(true); } } -} \ No newline at end of file +}
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -20,7 +20,7 @@ import org.dive4elements.river.artifacts.model.minfo.BedloadDiameterResult; import org.dive4elements.river.exports.StyledSeriesBuilder; import org.dive4elements.river.exports.XYChartGenerator; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; @@ -193,7 +193,7 @@ } else if (name.equals(LONGITUDINAL_ANNOTATION)) { doAnnotations( - (FLYSAnnotation) artifactAndFacet.getData(context), + (RiverAnnotation) artifactAndFacet.getData(context), artifactAndFacet, attr, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java Sun Apr 28 14:40:59 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java Sun Apr 28 15:04:44 2013 +0200 @@ -28,7 +28,7 @@ import org.dive4elements.river.exports.XYChartGenerator; import org.dive4elements.river.jfree.Bounds; import org.dive4elements.river.jfree.DoubleBounds; -import org.dive4elements.river.jfree.FLYSAnnotation; +import org.dive4elements.river.jfree.RiverAnnotation; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.utils.DataUtil; @@ -197,7 +197,7 @@ } else if (name.equals(LONGITUDINAL_ANNOTATION)) { doAnnotations( - (FLYSAnnotation) bundle.getData(context), + (RiverAnnotation) bundle.getData(context), bundle, attr, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/FLYSAnnotation.java Sun Apr 28 14:40:59 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU AGPL (>=v3) - * and comes with ABSOLUTELY NO WARRANTY! Check out the - * documentation coming with Dive4Elements River for details. - */ - -package org.dive4elements.river.jfree; - -import org.dive4elements.river.artifacts.model.HYKFactory; - -import java.util.Collections; -import java.util.List; - -import org.jfree.chart.annotations.XYTextAnnotation; -import org.w3c.dom.Document; - -/** - * List of Text- Annotations (Sticky to one axis or in space) - * and 'HYK'-Annotations (rectangles/areas) with name and theme. - */ -public class FLYSAnnotation { - - /** 'Other' Text Annotations. */ - protected List<XYTextAnnotation> textAnnotations; - - /** Annotations at axis. */ - protected List<StickyAxisAnnotation> axisTextAnnotations; - - /** Areas at axis. */ - protected List<HYKFactory.Zone> boxes; - - /** Styling information. */ - protected Document theme; - - /** Chart-legend information. */ - protected String label; - - - public FLYSAnnotation(String label, List<StickyAxisAnnotation> annotations) { - this(label, annotations, null, null); - } - - - /** Create annotations, parameter might be null. */ - public FLYSAnnotation(String label, List<StickyAxisAnnotation> annotations, - List<HYKFactory.Zone> bAnnotations - ) { - this(label, annotations, bAnnotations, null); - } - - - /** Create annotations, parameter might be null. */ - public FLYSAnnotation(String label, List<StickyAxisAnnotation> annotations, - List<HYKFactory.Zone> bAnnotations, Document theme - ) { - this.label = label; - this.axisTextAnnotations = (annotations != null) - ? annotations - : Collections.<StickyAxisAnnotation>emptyList(); - this.boxes = (bAnnotations != null) - ? bAnnotations - : Collections.<HYKFactory.Zone>emptyList(); - this.textAnnotations = Collections.<XYTextAnnotation>emptyList(); - this.setTheme(theme); - } - - - public void setLabel(String label) { - this.label = label; - } - - public String getLabel() { - return label; - } - - public List<StickyAxisAnnotation> getAxisTextAnnotations() { - return axisTextAnnotations; - } - - public void setTextAnnotations(List<XYTextAnnotation> annotations) { - this.textAnnotations = annotations; - } - - /** Set the "other" Text Annotations. */ - public List<XYTextAnnotation> getTextAnnotations() { - return textAnnotations; - } - - public List<HYKFactory.Zone> getBoxes() { - return boxes; - } - - public void setTheme(Document theme) { - this.theme = theme; - } - - public Document getTheme() { - return theme; - } - - /** - * Set sticky axis of all axisTextAnnotations - * to the X axis if it is currently Y, and vice versa. - * @return this - */ - public FLYSAnnotation flipStickyAxis() { - for (StickyAxisAnnotation saa: axisTextAnnotations) { - saa.flipStickyAxis(); - } - return this; - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/RiverAnnotation.java Sun Apr 28 15:04:44 2013 +0200 @@ -0,0 +1,115 @@ +/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU AGPL (>=v3) + * and comes with ABSOLUTELY NO WARRANTY! Check out the + * documentation coming with Dive4Elements River for details. + */ + +package org.dive4elements.river.jfree; + +import org.dive4elements.river.artifacts.model.HYKFactory; + +import java.util.Collections; +import java.util.List; + +import org.jfree.chart.annotations.XYTextAnnotation; +import org.w3c.dom.Document; + +/** + * List of Text- Annotations (Sticky to one axis or in space) + * and 'HYK'-Annotations (rectangles/areas) with name and theme. + */ +public class RiverAnnotation { + + /** 'Other' Text Annotations. */ + protected List<XYTextAnnotation> textAnnotations; + + /** Annotations at axis. */ + protected List<StickyAxisAnnotation> axisTextAnnotations; + + /** Areas at axis. */ + protected List<HYKFactory.Zone> boxes; + + /** Styling information. */ + protected Document theme; + + /** Chart-legend information. */ + protected String label; + + + public RiverAnnotation(String label, List<StickyAxisAnnotation> annotations) { + this(label, annotations, null, null); + } + + + /** Create annotations, parameter might be null. */ + public RiverAnnotation(String label, List<StickyAxisAnnotation> annotations, + List<HYKFactory.Zone> bAnnotations + ) { + this(label, annotations, bAnnotations, null); + } + + + /** Create annotations, parameter might be null. */ + public RiverAnnotation(String label, List<StickyAxisAnnotation> annotations, + List<HYKFactory.Zone> bAnnotations, Document theme + ) { + this.label = label; + this.axisTextAnnotations = (annotations != null) + ? annotations + : Collections.<StickyAxisAnnotation>emptyList(); + this.boxes = (bAnnotations != null) + ? bAnnotations + : Collections.<HYKFactory.Zone>emptyList(); + this.textAnnotations = Collections.<XYTextAnnotation>emptyList(); + this.setTheme(theme); + } + + + public void setLabel(String label) { + this.label = label; + } + + public String getLabel() { + return label; + } + + public List<StickyAxisAnnotation> getAxisTextAnnotations() { + return axisTextAnnotations; + } + + public void setTextAnnotations(List<XYTextAnnotation> annotations) { + this.textAnnotations = annotations; + } + + /** Set the "other" Text Annotations. */ + public List<XYTextAnnotation> getTextAnnotations() { + return textAnnotations; + } + + public List<HYKFactory.Zone> getBoxes() { + return boxes; + } + + public void setTheme(Document theme) { + this.theme = theme; + } + + public Document getTheme() { + return theme; + } + + /** + * Set sticky axis of all axisTextAnnotations + * to the X axis if it is currently Y, and vice versa. + * @return this + */ + public RiverAnnotation flipStickyAxis() { + for (StickyAxisAnnotation saa: axisTextAnnotations) { + saa.flipStickyAxis(); + } + return this; + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :