comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java @ 2656:f1dcd5f94ffa

Parse more theme properties for linelabels. flys-artifacts/trunk@4327 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 02 May 2012 15:09:04 +0000
parents 8aaa7f4ce06a
children 1a044c51abe4
comparison
equal deleted inserted replaced
2655:60925be3c84f 2656:f1dcd5f94ffa
38 applyShowPoints(r, idx); 38 applyShowPoints(r, idx);
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 44
44 return r; 45 return r;
45 } 46 }
46 47
47 48
59 } 60 }
60 boolean showLabelLine = ThemeUtil.parseShowLineLabel(theme); 61 boolean showLabelLine = ThemeUtil.parseShowLineLabel(theme);
61 ((EnhancedLineAndShapeRenderer)r).setShowLineLabel(showLabelLine, idx); 62 ((EnhancedLineAndShapeRenderer)r).setShowLineLabel(showLabelLine, idx);
62 } 63 }
63 64
65
66 /** Tell the renderer which font (and -size and -style) to use for
67 * linelabels. */
68 protected void applyLineLabelFont(XYLineAndShapeRenderer r, int idx) {
69 if (!(r instanceof EnhancedLineAndShapeRenderer)) {
70 return;
71 }
72 ((EnhancedLineAndShapeRenderer)r).setLineLabelFont(ThemeUtil.parseLineLabelFont(theme), idx);
73 }
74
75
76 /** Set stroke of series. */
64 protected void applyLineSize(XYLineAndShapeRenderer r, int idx) { 77 protected void applyLineSize(XYLineAndShapeRenderer r, int idx) {
65 int size = ThemeUtil.parseLineWidth(theme); 78 int size = ThemeUtil.parseLineWidth(theme);
66 r.setSeriesStroke( 79 r.setSeriesStroke(
67 idx, 80 idx,
68 new BasicStroke(Integer.valueOf(size))); 81 new BasicStroke(Integer.valueOf(size)));
69 } 82 }
70 83
71 84
85 /** Set stroke strength of series. */
72 protected void applyLineType(XYLineAndShapeRenderer r, int idx) { 86 protected void applyLineType(XYLineAndShapeRenderer r, int idx) {
73 int size = ThemeUtil.parseLineWidth(theme); 87 int size = ThemeUtil.parseLineWidth(theme);
74 float[] dashes = ThemeUtil.parseLineStyle(theme); 88 float[] dashes = ThemeUtil.parseLineStyle(theme);
75 89
76 // Do not apply the dashed style. 90 // Do not apply the dashed style.

http://dive4elements.wald.intevation.org