Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/jfreechart/PolygonSeries.java @ 809:d05b17a4f3d0
Added javadoc in describedata package.
gnv-artifacts/trunk@891 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 09 Apr 2010 07:27:38 +0000 |
parents | cdade5005cba |
children | 22c18083225e |
rev | line source |
---|---|
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.jfreechart; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
779
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
447
diff
changeset
|
3 import java.util.HashMap; |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 import java.util.Map; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 import org.jfree.data.Range; |
779
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
447
diff
changeset
|
7 |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 import org.jfree.data.general.Series; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 /** |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
11 * This class represents a series of polygon items. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
12 * |
780
c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
779
diff
changeset
|
13 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha Teichmann</a> |
c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
779
diff
changeset
|
14 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 */ |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 public class PolygonSeries |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 extends Series |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
18 { |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
19 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
20 * Polygons. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
21 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 protected CompactXYItems [] rings; |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
23 |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
24 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
25 * A map containing attribues. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
26 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 protected Map attributes; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
29 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
30 * The unique key of this series. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
31 */ |
436
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
32 private static long uniqueKey; |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
33 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
34 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
35 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
36 * @return a unique key. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
37 */ |
436
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
38 protected synchronized static Long createUniqueKey() { |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
39 return new Long(uniqueKey++); |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
40 } |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
41 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
42 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
43 * Constructor to create an empty PolygonSeries with a unique key. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
44 */ |
436
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
45 public PolygonSeries() { |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
46 this(createUniqueKey(), null); |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
47 } |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
48 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
49 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
50 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
51 * @param key The key used for this series. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
52 * @param rings Polygons. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
53 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 public PolygonSeries(Comparable key, CompactXYItems [] rings) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 this(key, null, rings, new HashMap()); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
56 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
57 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
58 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
59 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
60 * @param key The key used for this series. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
61 * @param description A description of this series. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
62 * @param rings Polygons. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
63 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
64 public PolygonSeries( |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
65 Comparable key, |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
66 String description, |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
67 CompactXYItems[] rings |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
68 ) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
69 this(key, description, rings, new HashMap()); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
70 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
71 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
72 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
73 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
74 * @param key The key used for this series. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
75 * @param description A description of this series. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
76 * @param rings Polygons. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
77 * @param attributes Some attribues. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
78 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
79 public PolygonSeries( |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
80 Comparable key, |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
81 String description, |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
82 CompactXYItems [] rings, |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
83 Map attributes |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
84 ) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
85 super(key, description); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
86 this.rings = rings; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
87 this.attributes = attributes; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
88 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
89 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
90 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
91 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
92 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
93 * @param rings |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
94 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 public void setRings(CompactXYItems [] rings) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
96 this.rings = rings; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
97 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
98 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
99 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
100 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
101 * @return |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
102 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
103 public CompactXYItems [] getRings() { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 return rings; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
105 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
106 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
107 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
108 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
109 * @param newRing |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
110 */ |
436
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
111 public void addRing(CompactXYItems newRing) { |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
112 if (rings == null) { |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
113 rings = new CompactXYItems [] { newRing }; |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
114 } |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
115 else { |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
116 CompactXYItems [] nRings = new CompactXYItems[rings.length + 1]; |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
117 System.arraycopy(rings, 0, nRings, 0, rings.length); |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
118 nRings[rings.length] = newRing; |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
119 rings = nRings; |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
120 } |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
121 } |
6642ab6c583c
Added vectorizer rings callback which generates polygon datasets suitable
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
422
diff
changeset
|
122 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
123 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
124 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
125 * @param newRings |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
126 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
127 public void addRings(CompactXYItems [] newRings) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
128 if (newRings == null || newRings.length == 0) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
129 return; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
130 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
131 if (rings == null || rings.length == 0) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
132 rings = newRings; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
133 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
134 else { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
135 CompactXYItems [] both = |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
136 new CompactXYItems[rings.length + newRings.length]; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
137 System.arraycopy(rings, 0, both, 0, rings.length); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
138 System.arraycopy(newRings, 0, both, rings.length, newRings.length); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
139 rings = both; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
140 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
141 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
142 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
143 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
144 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
145 * @param key |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
146 * @return |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
147 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
148 public Object getAttribute(Object key) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
149 return attributes.get(key); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
150 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
151 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
152 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
153 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
154 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
155 * @param key |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
156 * @param value |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
157 * @return |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
158 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
159 public Object setAttribute(Object key, Object value) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
160 return attributes.put(key, value); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
161 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
162 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
163 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
164 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
165 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
166 * @return |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
167 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
168 public int getItemCount() { |
447
92b7ccbf6163
Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
436
diff
changeset
|
169 return rings != null ? rings.length : 0; |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
170 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
171 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
172 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
173 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
174 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
175 * @param idx |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
176 * @return |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
177 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
178 public CompactXYItems getItem(int idx) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
179 return rings[idx]; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
180 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
181 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
182 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
183 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
184 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
185 * @param key |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
186 * @return |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
187 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
188 public Object removeAttribute(Object key) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
189 return attributes.remove(key); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
190 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
191 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
192 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
193 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
194 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
195 * @param key |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
196 * @return |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
197 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
198 public boolean hasAttribute(Object key) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
199 return attributes.containsKey(key); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
200 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
201 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
202 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
203 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
204 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
205 * @return the range of the x axis. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
206 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
207 public Range getDomainBounds() { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
208 double upper = Double.NEGATIVE_INFINITY; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
209 double lower = Double.POSITIVE_INFINITY; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
210 int count = getItemCount(); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
211 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
212 for (int i = 0; i < count; i++) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
213 CompactXYItems items = getItem(i); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
214 double minX = items.getMinX(); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
215 double maxX = items.getMaxX(); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
216 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
217 if (!Double.isNaN(minX)) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
218 lower = Math.min(lower, minX); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
219 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
220 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
221 if (!Double.isNaN(maxX)) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
222 upper = Math.max(upper, maxX); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
223 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
224 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
225 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
226 if (lower > upper) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
227 return null; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
228 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
229 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
230 return new Range(lower, upper); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
231 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
232 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
233 |
795
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
234 /** |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
235 * |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
236 * @return the range of the y axis. |
cdade5005cba
Added javadoc in jfreechart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
237 */ |
422
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
238 public Range getRangeBounds() { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
239 double upper = Double.NEGATIVE_INFINITY; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
240 double lower = Double.POSITIVE_INFINITY; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
241 int count = getItemCount(); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
242 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
243 for (int i = 0; i < count; i++) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
244 CompactXYItems items = getItem(i); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
245 double minY = items.getMinY(); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
246 double maxY = items.getMaxY(); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
247 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
248 if (!Double.isNaN(minY)) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
249 lower = Math.min(lower, minY); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
250 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
251 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
252 if (!Double.isNaN(maxY)) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
253 upper = Math.max(upper, maxY); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
254 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
255 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
256 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
257 if (lower > upper) { |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
258 return null; |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
259 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
260 |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
261 return new Range(lower, upper); |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
262 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
263 } |
f426f55d4f7a
Added Ingo Weinzierl's special JFreeChart classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
264 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |