comparison flys-artifacts/src/main/java/de/intevation/flys/exports/StyledXYSeries.java @ 2072:4cdd9c4896f6

#393 Added a new Renderer and Options in Themes that allow displaying minimum and maximum of a chart series. flys-artifacts/trunk@3581 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 04 Jan 2012 12:24:35 +0000
parents e384d78ff78b
children
comparison
equal deleted inserted replaced
2071:fd95bfbb2ec2 2072:4cdd9c4896f6
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 applyShowMinimum(r, idx);
57 applyShowMaximum(r, idx);
56 58
57 return r; 59 return r;
58 } 60 }
59 61
60 62
110 112
111 protected void applyShowLine(XYLineAndShapeRenderer r, int idx) { 113 protected void applyShowLine(XYLineAndShapeRenderer r, int idx) {
112 boolean show = ThemeUtil.parseShowLine(theme); 114 boolean show = ThemeUtil.parseShowLine(theme);
113 r.setSeriesLinesVisible(idx, show); 115 r.setSeriesLinesVisible(idx, show);
114 } 116 }
117
118
119 protected void applyShowMinimum(XYLineAndShapeRenderer r, int idx) {
120 if (!(r instanceof EnhancedLineAndShapeRenderer)) {
121 return;
122 }
123
124 boolean visible = ThemeUtil.parseShowMinimum(theme);
125
126 EnhancedLineAndShapeRenderer er = (EnhancedLineAndShapeRenderer) r;
127 er.setIsMinimumShapeVisisble(idx, visible);
128 }
129
130
131 protected void applyShowMaximum(XYLineAndShapeRenderer r, int idx) {
132 if (!(r instanceof EnhancedLineAndShapeRenderer)) {
133 return;
134 }
135
136 boolean visible = ThemeUtil.parseShowMaximum(theme);
137
138 EnhancedLineAndShapeRenderer er = (EnhancedLineAndShapeRenderer) r;
139 er.setIsMaximumShapeVisible(idx, visible);
140 }
115 } 141 }
116 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 142 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org