Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/jfree/FLYSAnnotation.java @ 1686:e8d1e531687a
Bugfix: #114 Enabled rendering charts with a single data point.
flys-artifacts/trunk@2904 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 07 Oct 2011 13:15:48 +0000 |
parents | 69929c471646 |
children | 7e19449d7826 |
rev | line source |
---|---|
1677
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.jfree; |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.util.List; |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
5 import org.w3c.dom.Document; |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
6 |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
7 import org.jfree.chart.annotations.XYTextAnnotation; |
1677
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 public class FLYSAnnotation { |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
12 protected List<XYTextAnnotation> annotations; |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
13 |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
14 protected Document theme; |
1677
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 protected String label; |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
19 public FLYSAnnotation(String label, List<XYTextAnnotation> annotations) { |
1677
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 this.label = label; |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 this.annotations = annotations; |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 } |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 public String getLabel() { |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 return label; |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 } |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
28 public List<XYTextAnnotation> getAnnotations() { |
1677
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 return annotations; |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 } |
1679
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
31 |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
32 public void setTheme(Document theme) { |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
33 this.theme = theme; |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
34 } |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
35 |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
36 public Document getTheme() { |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
37 return theme; |
69929c471646
Improved the creation/rendering of annotations (km favorites, mainvalues).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1677
diff
changeset
|
38 } |
1677
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 } |
dd9dfe1e48fa
Bugfixes for various issues: Improved rendering process of annotations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |