Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java @ 2660:1a044c51abe4
Respect colors of theme for linelabels.
flys-artifacts/trunk@4334 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 02 May 2012 22:30:27 +0000 |
parents | f1dcd5f94ffa |
children | bdc86e61428c |
comparison
equal
deleted
inserted
replaced
2659:4d8959a4b49d | 2660:1a044c51abe4 |
---|---|
39 applyPointSize(r, idx); | 39 applyPointSize(r, idx); |
40 applyShowMinimum(r, idx); | 40 applyShowMinimum(r, idx); |
41 applyShowMaximum(r, idx); | 41 applyShowMaximum(r, idx); |
42 applyShowLineLabel(r, idx); | 42 applyShowLineLabel(r, idx); |
43 applyLineLabelFont(r, idx); | 43 applyLineLabelFont(r, idx); |
44 applyLineLabelColor(r, idx); | |
45 applyLineLabelBGColor(r, idx); | |
44 | 46 |
45 return r; | 47 return r; |
46 } | 48 } |
47 | 49 |
48 | 50 |
70 return; | 72 return; |
71 } | 73 } |
72 ((EnhancedLineAndShapeRenderer)r).setLineLabelFont(ThemeUtil.parseLineLabelFont(theme), idx); | 74 ((EnhancedLineAndShapeRenderer)r).setLineLabelFont(ThemeUtil.parseLineLabelFont(theme), idx); |
73 } | 75 } |
74 | 76 |
77 /** Tell the renderer which color to use for | |
78 * linelabels. */ | |
79 protected void applyLineLabelColor(XYLineAndShapeRenderer r, int idx) { | |
80 if (!(r instanceof EnhancedLineAndShapeRenderer)) { | |
81 return; | |
82 } | |
83 ((EnhancedLineAndShapeRenderer)r).setLineLabelTextColor(idx, ThemeUtil.parseLineLabelTextColor(theme)); | |
84 } | |
85 | |
86 /** Tell the renderer which color to use for bg of | |
87 * linelabels. */ | |
88 protected void applyLineLabelBGColor(XYLineAndShapeRenderer r, int idx) { | |
89 if (!(r instanceof EnhancedLineAndShapeRenderer)) { | |
90 return; | |
91 } | |
92 ((EnhancedLineAndShapeRenderer)r).setLineLabelBGColor(idx, | |
93 ThemeUtil.parseLineLabelBGColor(theme)); | |
94 } | |
75 | 95 |
76 /** Set stroke of series. */ | 96 /** Set stroke of series. */ |
77 protected void applyLineSize(XYLineAndShapeRenderer r, int idx) { | 97 protected void applyLineSize(XYLineAndShapeRenderer r, int idx) { |
78 int size = ThemeUtil.parseLineWidth(theme); | 98 int size = ThemeUtil.parseLineWidth(theme); |
79 r.setSeriesStroke( | 99 r.setSeriesStroke( |