Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledXYSeries.java @ 3155:74c974b10c75
Output code to trackdown the linecolor problem
flys-artifacts/trunk@4767 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Sun, 24 Jun 2012 06:51:05 +0000 |
parents | 5642a83420f2 |
children | 8c78c707aa2d |
comparison
equal
deleted
inserted
replaced
3154:a08538e21b55 | 3155:74c974b10c75 |
---|---|
1 package de.intevation.flys.jfree; | 1 package de.intevation.flys.jfree; |
2 | 2 |
3 import java.util.List; | |
3 | 4 |
4 import org.apache.log4j.Logger; | 5 import org.apache.log4j.Logger; |
5 | 6 |
6 import org.w3c.dom.Document; | 7 import org.w3c.dom.Document; |
7 | 8 |
9 import org.jfree.data.xy.XYDataItem; | |
8 import org.jfree.data.xy.XYSeries; | 10 import org.jfree.data.xy.XYSeries; |
9 | 11 |
10 import de.intevation.flys.jfree.HasLabel; | 12 import de.intevation.flys.jfree.HasLabel; |
11 | 13 |
12 | 14 |
24 | 26 |
25 | 27 |
26 public StyledXYSeries(String key, Document theme) { | 28 public StyledXYSeries(String key, Document theme) { |
27 this(key, true, theme); | 29 this(key, true, theme); |
28 this.label = key.toString(); | 30 this.label = key.toString(); |
31 } | |
32 | |
33 | |
34 public StyledXYSeries(String key, Document theme, XYSeries unstyledSeries) { | |
35 this(key, theme); | |
36 add(unstyledSeries); | |
29 } | 37 } |
30 | 38 |
31 | 39 |
32 /** | 40 /** |
33 * @param sorted whether or not to sort the points. Sorting will move NANs | 41 * @param sorted whether or not to sort the points. Sorting will move NANs |
60 | 68 |
61 @Override | 69 @Override |
62 public void setLabel(String label) { | 70 public void setLabel(String label) { |
63 this.label = label; | 71 this.label = label; |
64 } | 72 } |
73 | |
74 protected void add(XYSeries series) { | |
75 List<XYDataItem> items = series.getItems(); | |
76 add(items); | |
77 } | |
78 | |
79 protected void add(List<XYDataItem> items) { | |
80 for(XYDataItem item : items) { | |
81 add(item.getXValue(), item.getYValue()); | |
82 } | |
83 } | |
65 } | 84 } |
66 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 85 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |