comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java @ 2662:bdc86e61428c

Respect show line label bg setting. flys-artifacts/trunk@4337 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 03 May 2012 07:48:12 +0000
parents 1a044c51abe4
children 22def36d37b7
comparison
equal deleted inserted replaced
2661:17927c60ac1c 2662:bdc86e61428c
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); 44 applyLineLabelColor(r, idx);
45 applyShowLineLabelBG(r, idx);
45 applyLineLabelBGColor(r, idx); 46 applyLineLabelBGColor(r, idx);
46 47
47 return r; 48 return r;
48 } 49 }
49 50
62 } 63 }
63 boolean showLabelLine = ThemeUtil.parseShowLineLabel(theme); 64 boolean showLabelLine = ThemeUtil.parseShowLineLabel(theme);
64 ((EnhancedLineAndShapeRenderer)r).setShowLineLabel(showLabelLine, idx); 65 ((EnhancedLineAndShapeRenderer)r).setShowLineLabel(showLabelLine, idx);
65 } 66 }
66 67
68
69 /** Tells the renderer whether or not to fill the bg of a lines label. */
70 protected void applyShowLineLabelBG(XYLineAndShapeRenderer r, int idx) {
71 if (!(r instanceof EnhancedLineAndShapeRenderer)) {
72 return;
73 }
74 boolean showLabelLine = ThemeUtil.parseShowLineLabelBG(theme);
75 ((EnhancedLineAndShapeRenderer)r).setShowLineLabelBG(idx, showLabelLine);
76 }
67 77
68 /** Tell the renderer which font (and -size and -style) to use for 78 /** Tell the renderer which font (and -size and -style) to use for
69 * linelabels. */ 79 * linelabels. */
70 protected void applyLineLabelFont(XYLineAndShapeRenderer r, int idx) { 80 protected void applyLineLabelFont(XYLineAndShapeRenderer r, int idx) {
71 if (!(r instanceof EnhancedLineAndShapeRenderer)) { 81 if (!(r instanceof EnhancedLineAndShapeRenderer)) {

http://dive4elements.wald.intevation.org