Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/jfree/StyledValueMarker.java @ 6905:1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 22 Aug 2013 23:31:38 +0200 |
parents | af13ceeba52a |
children |
comparison
equal
deleted
inserted
replaced
6904:d710bd3df387 | 6905:1b35b2ddfc28 |
---|---|
6 * documentation coming with Dive4Elements River for details. | 6 * documentation coming with Dive4Elements River for details. |
7 */ | 7 */ |
8 | 8 |
9 package org.dive4elements.river.jfree; | 9 package org.dive4elements.river.jfree; |
10 | 10 |
11 import org.dive4elements.river.utils.ThemeUtil; | 11 import org.dive4elements.river.themes.ThemeDocument; |
12 | 12 |
13 import java.awt.BasicStroke; | 13 import java.awt.BasicStroke; |
14 import java.awt.Color; | 14 import java.awt.Color; |
15 | 15 |
16 import org.jfree.chart.plot.ValueMarker; | 16 import org.jfree.chart.plot.ValueMarker; |
17 import org.w3c.dom.Document; | |
18 | 17 |
19 /** | 18 /** |
20 * Marker that represents a single value. | 19 * Marker that represents a single value. |
21 * @author <a href="mailto:christian.lins@intevation.de">Christian Lins</a> | 20 * @author <a href="mailto:christian.lins@intevation.de">Christian Lins</a> |
22 */ | 21 */ |
23 public class StyledValueMarker extends ValueMarker { | 22 public class StyledValueMarker extends ValueMarker { |
24 | 23 |
25 private static final long serialVersionUID = -3607777705307785140L; | 24 private static final long serialVersionUID = -3607777705307785140L; |
26 | 25 |
27 public StyledValueMarker(double value, Document theme) { | 26 public StyledValueMarker(double value, ThemeDocument theme) { |
28 super(value); | 27 super(value); |
29 | 28 |
30 Color color = ThemeUtil.parseAreaBackgroundColor(theme); | 29 Color color = theme.parseAreaBackgroundColor(); |
31 if(color == null) { | 30 if(color == null) { |
32 color = Color.BLACK; | 31 color = Color.BLACK; |
33 } | 32 } |
34 this.setPaint(color); | 33 this.setPaint(color); |
35 | 34 |
36 int size = ThemeUtil.parsePointWidth(theme); | 35 int size = theme.parsePointWidth(); |
37 setStroke(new BasicStroke(size)); | 36 setStroke(new BasicStroke(size)); |
38 } | 37 } |
39 } | 38 } |
40 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 39 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |