changeset 6542:c5945aca0c8d

issue1149: Be able to add label/annotation to event points.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 05 Jul 2013 12:16:46 +0200
parents 4b42ab2e9060
children 1ca0688dddc7
files artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java	Fri Jul 05 09:36:14 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java	Fri Jul 05 12:16:46 2013 +0200
@@ -360,6 +360,17 @@
             if (Math.abs(kms[i] - ckm) <= EPSILON) {
                 series.add(wqkms.getQ(i), wqkms.getW(i));
                 addAxisSeries(series, YAXIS.W.idx, visible);
+                if(visible && ThemeUtil.parseShowPointLabel(theme)) {
+                    List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
+                    XYTextAnnotation anno = new CollisionFreeXYTextAnnotation(
+                            title,
+                            wqkms.getQ(i),
+                            wqkms.getW(i));
+                    textAnnos.add(anno);
+                    RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme);
+                    flysAnno.setTextAnnotations(textAnnos);
+                    addAnnotations(flysAnno);
+                }
                 return;
             }
         }

http://dive4elements.wald.intevation.org