Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
7909:8a2ce10da352 | 7910:432addd00687 |
---|---|
81 Color color = theme.parseLineColorField(); | 81 Color color = theme.parseLineColorField(); |
82 if (color == null) { | 82 if (color == null) { |
83 color = Color.BLACK; | 83 color = Color.BLACK; |
84 } | 84 } |
85 | 85 |
86 Color textColor = theme.parseTextColor(); | |
87 if (textColor == null) { | |
88 textColor = Color.BLACK; | |
89 } | |
90 | |
86 LegendItem newItem = new LegendItem(fa.getLabel(), color); | 91 LegendItem newItem = new LegendItem(fa.getLabel(), color); |
87 LegendSection ls = (settings != null ? | 92 LegendSection ls = (settings != null ? |
88 settings.getLegendSection() : null); | 93 settings.getLegendSection() : null); |
89 newItem.setLabelFont (new Font( | 94 newItem.setLabelFont (new Font( |
90 DEFAULT_FONT_NAME, | 95 DEFAULT_FONT_NAME, |
91 Font.PLAIN, | 96 Font.PLAIN, |
92 ls != null ? ls.getFontSize() : null) | 97 ls != null ? ls.getFontSize() : null) |
93 ); | 98 ); |
99 | |
100 newItem.setLabelPaint(textColor); | |
94 | 101 |
95 lic.add(newItem); | 102 lic.add(newItem); |
96 // (Re-)Add prior legend entries. | 103 // (Re-)Add prior legend entries. |
97 if (old != null) { | 104 if (old != null) { |
98 old.addAll(lic); | 105 old.addAll(lic); |