diff artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java @ 7910:432addd00687

Added text color for annotation labels.
author Sascha L. Teichmann <teichmann@intevation.de>
date Wed, 04 Jun 2014 10:55:04 +0200
parents 41567bf1e131
children e4606eae8ea5
line wrap: on
line diff
--- 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) {

http://dive4elements.wald.intevation.org