comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledXYSeries.java @ 2076:41037d51c8b6

Added support for pointsize in chart themes. flys-artifacts/trunk@3589 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 04 Jan 2012 16:13:10 +0000
parents a026d005accd
children 991e4a5df323
comparison
equal deleted inserted replaced
2075:f42b0e624e97 2076:41037d51c8b6
51 applyLineColor(r, idx); 51 applyLineColor(r, idx);
52 applyLineSize(r, idx); 52 applyLineSize(r, idx);
53 applyLineType(r, idx); 53 applyLineType(r, idx);
54 applyShowLine(r, idx); 54 applyShowLine(r, idx);
55 applyShowPoints(r, idx); 55 applyShowPoints(r, idx);
56 applyPointSize(r, idx);
56 applyShowMinimum(r, idx); 57 applyShowMinimum(r, idx);
57 applyShowMaximum(r, idx); 58 applyShowMaximum(r, idx);
58 59
59 return r; 60 return r;
60 } 61 }
93 dashes, 94 dashes,
94 0.0f)); 95 0.0f));
95 } 96 }
96 97
97 98
99 protected void applyPointSize(XYLineAndShapeRenderer r, int idx) {
100 int size = ThemeUtil.parsePointWidth(theme);
101 int dim = 2 * size;
102
103 r.setSeriesShape(idx, new Ellipse2D.Double(-size, -size, dim, dim));
104 }
105
106
98 /** 107 /**
99 * Sets form and visibility of points. 108 * Sets form and visibility of points.
100 */ 109 */
101 protected void applyShowPoints(XYLineAndShapeRenderer r, int idx) { 110 protected void applyShowPoints(XYLineAndShapeRenderer r, int idx) {
102 boolean show = ThemeUtil.parseShowPoints(theme); 111 boolean show = ThemeUtil.parseShowPoints(theme);
103 int size = ThemeUtil.parseLineWidth(theme); 112
104 r.setSeriesShape(idx, new Ellipse2D.Double(- size,
105 - size,
106 2 * size,
107 2 * size));
108 r.setSeriesShapesVisible(idx, show); 113 r.setSeriesShapesVisible(idx, show);
109 r.setDrawOutlines(true); 114 r.setDrawOutlines(true);
110 } 115 }
111 116
112 117

http://dive4elements.wald.intevation.org