[PATCH] Added text color for annotation labels

Wald Commits scm-commit at wald.intevation.org
Wed Jun 4 10:59:57 CEST 2014


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1401872104 -7200
# Node ID 432addd006875906a7b68cf8a3f49c5324e91d41
# Parent  8a2ce10da352f0878a993a2ec4d2e6ea787b31ab
Added text color for annotation labels.

diff -r 8a2ce10da352 -r 432addd00687 artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java	Tue Jun 03 17:57:07 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java	Wed Jun 04 10:55:04 2014 +0200
@@ -83,6 +83,11 @@
                         color = Color.BLACK;
                     }
 
+                    Color textColor = theme.parseTextColor();
+                    if (textColor == null) {
+                        textColor = Color.BLACK;
+                    }
+
                     LegendItem newItem = new LegendItem(fa.getLabel(), color);
                     LegendSection ls = (settings != null ?
                             settings.getLegendSection() : null);
@@ -92,6 +97,8 @@
                         ls != null ? ls.getFontSize() : null)
                     );
 
+                    newItem.setLabelPaint(textColor);
+
                     lic.add(newItem);
                     // (Re-)Add prior legend entries.
                     if (old != null) {
diff -r 8a2ce10da352 -r 432addd00687 artifacts/src/main/java/org/dive4elements/river/jfree/StableXYDifferenceRenderer.java
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/StableXYDifferenceRenderer.java	Tue Jun 03 17:57:07 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/jfree/StableXYDifferenceRenderer.java	Wed Jun 04 10:55:04 2014 +0200
@@ -157,7 +157,7 @@
     /** For serialization. */
     private static final long serialVersionUID = -8447915602375584857L;
 
-    /** The paint used to highlight positive differences (y(0) > y(1)). */
+    /** The paint used to highlight positive differences (y(0) > y(1)). */
     private transient Paint positivePaint;
 
     /** The paint used to highlight negative differences (y(0) < y(1)). */


More information about the Dive4Elements-commits mailing list