[PATCH] issue1149: Be able to add label/annotation to event points

Wald Commits scm-commit at wald.intevation.org
Fri Jul 5 12:07:19 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1373019406 -7200
# Node ID c5945aca0c8d209847428f3cb57418965ca99eb7
# Parent  4b42ab2e9060bcff951044cde29c75dd40a6b3e4
issue1149: Be able to add label/annotation to event points.

diff -r 4b42ab2e9060 -r c5945aca0c8d artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java
--- 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;
             }
         }


More information about the Dive4elements-commits mailing list