comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledXYSeries.java @ 2793:6310b1582f2d

merged flys-artifacts/2.7
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:30 +0200
parents 9d2a06c3a134
children 5642a83420f2
comparison
equal deleted inserted replaced
2548:ada02bbd3b7f 2793:6310b1582f2d
1 package de.intevation.flys.jfree;
2
3
4 import org.apache.log4j.Logger;
5
6 import org.w3c.dom.Document;
7
8 import org.jfree.data.xy.XYSeries;
9
10 import de.intevation.flys.jfree.HasLabel;
11
12
13 /**
14 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
15 */
16 public class StyledXYSeries extends XYSeries implements StyledSeries, HasLabel {
17
18 private static final Logger logger = Logger.getLogger(StyledXYSeries.class);
19
20 protected Style style;
21
22 /** If this Series is to be labelled, use this String as label. */
23 protected String label;
24
25
26 public StyledXYSeries(String key, Document theme) {
27 this(key, true, theme);
28 this.label = key.toString();
29 }
30
31
32 /**
33 * @param sorted whether or not to sort the points. Sorting will move NANs
34 * to one extrema which can cause problems in certain
35 * algorithms.
36 */
37 public StyledXYSeries(String key, boolean sorted, Document theme) {
38 super(key, sorted);
39 setStyle(new XYStyle(theme));
40 this.label = key.toString();
41 }
42
43
44 @Override
45 public void setStyle(Style style) {
46 this.style = style;
47 }
48
49
50 @Override
51 public Style getStyle() {
52 return style;
53 }
54
55
56 @Override
57 public String getLabel() {
58 return label;
59 }
60
61 @Override
62 public void setLabel(String label) {
63 this.label = label;
64 }
65 }
66 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org