Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java @ 3134:5a0aef74c316
Use different stylings for real and interpolated data points.
flys-artifacts/trunk@4741 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 21 Jun 2012 13:15:48 +0000 |
parents | 22def36d37b7 |
children | 74c974b10c75 |
comparison
equal
deleted
inserted
replaced
3133:6f6a8e5fb7a4 | 3134:5a0aef74c316 |
---|---|
18 */ | 18 */ |
19 public class XYStyle implements Style { | 19 public class XYStyle implements Style { |
20 | 20 |
21 protected Document theme; | 21 protected Document theme; |
22 | 22 |
23 protected XYLineAndShapeRenderer renderer; | |
23 | 24 |
24 public XYStyle(Document theme) { | 25 public XYStyle(Document theme) { |
25 this.theme = theme; | 26 this.theme = theme; |
27 this.renderer = null; | |
26 } | 28 } |
27 | 29 |
28 | 30 |
29 /** | 31 /** |
30 * Applies line color, size and type attributes to renderer, also | 32 * Applies line color, size and type attributes to renderer, also |
31 * whether to draw lines and/or points. | 33 * whether to draw lines and/or points. |
32 */ | 34 */ |
33 public XYLineAndShapeRenderer applyTheme(XYLineAndShapeRenderer r, int idx){ | 35 public XYLineAndShapeRenderer applyTheme(XYLineAndShapeRenderer r, int idx){ |
36 this.renderer = r; | |
34 applyLineColor(r, idx); | 37 applyLineColor(r, idx); |
35 applyLineSize(r, idx); | 38 applyLineSize(r, idx); |
36 applyLineType(r, idx); | 39 applyLineType(r, idx); |
37 applyShowLine(r, idx); | 40 applyShowLine(r, idx); |
38 applyShowPoints(r, idx); | 41 applyShowPoints(r, idx); |
190 boolean visible = ThemeUtil.parseShowMaximum(theme); | 193 boolean visible = ThemeUtil.parseShowMaximum(theme); |
191 | 194 |
192 EnhancedLineAndShapeRenderer er = (EnhancedLineAndShapeRenderer) r; | 195 EnhancedLineAndShapeRenderer er = (EnhancedLineAndShapeRenderer) r; |
193 er.setIsMaximumShapeVisible(idx, visible); | 196 er.setIsMaximumShapeVisible(idx, visible); |
194 } | 197 } |
198 | |
199 | |
200 public XYLineAndShapeRenderer getRenderer() { | |
201 return this.renderer; | |
202 } | |
195 } | 203 } |
196 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 204 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |