Mercurial > dive4elements > river
changeset 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 | 8a2ce10da352 |
children | 28c403ec0a27 |
files | artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java artifacts/src/main/java/org/dive4elements/river/jfree/StableXYDifferenceRenderer.java |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
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) {
--- 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)). */