comparison artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.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 a071f0a80883
children d20a26e96ef1
comparison
equal deleted inserted replaced
6904:d710bd3df387 6905:1b35b2ddfc28
9 package org.dive4elements.river.jfree; 9 package org.dive4elements.river.jfree;
10 10
11 import java.util.List; 11 import java.util.List;
12 12
13 import org.apache.log4j.Logger; 13 import org.apache.log4j.Logger;
14 14 import org.dive4elements.river.themes.ThemeDocument;
15 import org.w3c.dom.Document;
16 15
17 import org.jfree.data.xy.XYDataItem; 16 import org.jfree.data.xy.XYDataItem;
18 import org.jfree.data.xy.XYSeries; 17 import org.jfree.data.xy.XYSeries;
19 18
20 /** 19 /**
28 27
29 /** If this Series is to be labelled, use this String as label. */ 28 /** If this Series is to be labelled, use this String as label. */
30 protected String label; 29 protected String label;
31 30
32 31
33 public StyledXYSeries(String key, Document theme) { 32 public StyledXYSeries(String key, ThemeDocument theme) {
34 this(key, true, theme); 33 this(key, true, theme);
35 this.label = key.toString(); 34 this.label = key.toString();
36 } 35 }
37 36
38 37
39 public StyledXYSeries(String key, Document theme, XYSeries unstyledSeries) { 38 public StyledXYSeries(String key, ThemeDocument theme, XYSeries unstyledSeries) {
40 this(key, theme); 39 this(key, theme);
41 add(unstyledSeries); 40 add(unstyledSeries);
42 } 41 }
43 42
44 43
45 /** 44 /**
46 * @param sorted whether or not to sort the points. Sorting will move NANs 45 * @param sorted whether or not to sort the points. Sorting will move NANs
47 * to one extrema which can cause problems in certain 46 * to one extrema which can cause problems in certain
48 * algorithms. 47 * algorithms.
49 */ 48 */
50 public StyledXYSeries(String key, boolean sorted, Document theme) { 49 public StyledXYSeries(String key, boolean sorted, ThemeDocument theme) {
51 super(key, sorted); 50 super(key, sorted);
52 setStyle(new XYStyle(theme)); 51 setStyle(new XYStyle(theme));
53 this.label = key.toString(); 52 this.label = key.toString();
54 } 53 }
55 54
56 public StyledXYSeries( 55 public StyledXYSeries(
57 String key, 56 String key,
58 boolean sorted, 57 boolean sorted,
59 boolean allowDuplicateXValues, 58 boolean allowDuplicateXValues,
60 Document theme 59 ThemeDocument theme
61 ) { 60 ) {
62 super(key, sorted, allowDuplicateXValues); 61 super(key, sorted, allowDuplicateXValues);
63 setStyle(new XYStyle(theme)); 62 setStyle(new XYStyle(theme));
64 this.label = key.toString(); 63 this.label = key.toString();
65 } 64 }

http://dive4elements.wald.intevation.org