comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledValueMarker.java @ 3254:9a4707ec7800

Add styles for W(t) chart domain markers flys-artifacts/trunk@4888 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Christian Lins <christian.lins@intevation.de>
date Fri, 06 Jul 2012 14:45:23 +0000
parents
children 17ca0a43027a
comparison
equal deleted inserted replaced
3253:209d50ee8e9f 3254:9a4707ec7800
1 package de.intevation.flys.jfree;
2
3 import de.intevation.flys.utils.ThemeUtil;
4
5 import java.awt.BasicStroke;
6 import java.awt.Color;
7
8 import org.jfree.chart.plot.ValueMarker;
9 import org.w3c.dom.Document;
10
11 /**
12 * Marker that represents a single value.
13 * @author <a href="mailto:christian.lins@intevation.de">Christian Lins</a>
14 */
15 public class StyledValueMarker extends ValueMarker {
16
17 private static final long serialVersionUID = -3607777705307785140L;
18
19 public StyledValueMarker(double value, Document theme) {
20 super(value);
21
22 Color color = ThemeUtil.parsePointColor(theme);
23 if(color == null) {
24 color = Color.BLACK;
25 }
26 this.setPaint(color);
27
28 int size = ThemeUtil.parsePointWidth(theme);
29 setStroke(new BasicStroke(size));
30 }
31
32 }

http://dive4elements.wald.intevation.org