Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalCrossSectionChart.java @ 1140:f576fc74ee80
dummy merge for repo head
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:15:17 +0200 |
parents | f953c9a559d8 |
children |
rev | line source |
---|---|
1115
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
842
diff
changeset
|
1 /* |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
842
diff
changeset
|
2 * Copyright (c) 2010 by Intevation GmbH |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
842
diff
changeset
|
3 * |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
842
diff
changeset
|
4 * This program is free software under the LGPL (>=v2.1) |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
842
diff
changeset
|
5 * Read the file LGPL.txt coming with the software for details |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
842
diff
changeset
|
6 * or visit http://www.gnu.org/licenses/ if it does not exist. |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
842
diff
changeset
|
7 */ |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
842
diff
changeset
|
8 |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 package de.intevation.gnv.chart; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
11 import de.intevation.gnv.jfreechart.PolygonDataset; |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
12 import de.intevation.gnv.jfreechart.PolygonPlot; |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
13 import de.intevation.gnv.jfreechart.PolygonRenderer; |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
14 import de.intevation.gnv.jfreechart.PolygonSeries; |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
16 import de.intevation.gnv.math.AttributedXYColumns; |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
17 |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
18 import de.intevation.gnv.raster.Palette; |
450
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
19 |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 import java.awt.Color; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 import java.awt.Paint; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
23 import java.text.NumberFormat; |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
25 import java.util.HashSet; |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
26 import java.util.Locale; |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
27 import java.util.Map; |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 import org.jfree.chart.JFreeChart; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
31 import org.jfree.chart.axis.NumberAxis; |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
32 import org.jfree.chart.axis.SymbolAxis; |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
33 import org.jfree.chart.axis.ValueAxis; |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
34 |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
35 import org.jfree.chart.plot.PlotOrientation; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
36 |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
37 import org.jfree.chart.renderer.LookupPaintScale; |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
38 |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
39 import org.jfree.chart.title.PaintScaleLegend; |
492
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
40 import org.jfree.chart.title.TextTitle; |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
41 |
841
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
42 import org.jfree.data.Range; |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
43 |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
44 import org.jfree.ui.RectangleEdge; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
45 import org.jfree.ui.RectangleInsets; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
46 |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
47 /** |
817
3f447e92024a
Added JavaDoc package descriptions.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
803
diff
changeset
|
48 * This class represents a 2D chart containing polygon data. |
3f447e92024a
Added JavaDoc package descriptions.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
803
diff
changeset
|
49 * |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
50 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
51 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 */ |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
53 public class VerticalCrossSectionChart |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 implements Chart |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 { |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
56 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
57 * Lookup class for retrieving a color which corresponds to a specific |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
58 * integer value. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
59 */ |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 public static final class PalettePaintLookup |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 implements PolygonRenderer.PaintLookup |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
62 { |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
63 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
64 * Object storing information about value ranges and its coresponding |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
65 * colors and descriptions. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
66 */ |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
67 private Palette palette; |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
68 |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
69 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
70 * Map containing some special <code>Paint</code> like ground fillcolor. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
71 */ |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
72 private Map<Integer, Paint> special; |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
73 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
74 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
75 * Constructor |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
76 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
77 * @param palette See {@link #palette} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
78 */ |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
79 public PalettePaintLookup(Palette palette) { |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
80 this(palette, null); |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
81 } |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
82 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
83 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
84 * Constructor |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
85 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
86 * @param palette See {@link #palette} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
87 * @param special See {@link #special} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
88 */ |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
89 public PalettePaintLookup( |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
767
diff
changeset
|
90 Palette palette, |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
91 Map<Integer, Paint> special |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
92 ) { |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
93 this.palette = palette; |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
94 this.special = special; |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 } |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
96 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
97 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
98 * @param index Index of a <code>Paint</code> |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
99 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
100 * @return <code>Paint</code> object for a given index. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
101 */ |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
102 public Paint getPaint(int index) { |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
103 if (special != null) { |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
104 Paint paint = special.get(index); |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
105 if (paint != null) { |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
106 return paint; |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
107 } |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
108 } |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
109 return index < 0 |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
110 ? Color.black |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 : palette.getColor(index); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
112 } |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
113 } // class PalettePaintLookup |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
114 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
115 /** |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
767
diff
changeset
|
116 * This class is used to turn labels which represent a number into a |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
117 * specific format. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
118 */ |
450
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
119 public static class LocalizedLabelGenerator |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
120 extends PolygonRenderer.DefaultLabelGenerator |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
121 { |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
122 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
123 * <code>NumberFormat</code> which is used to turn a number into a |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
124 * specific format. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
125 */ |
450
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
126 protected NumberFormat format; |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
127 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
128 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
129 * Constructor |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
130 */ |
450
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
131 public LocalizedLabelGenerator() { |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
132 } |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
133 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
134 /** |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
767
diff
changeset
|
135 * Constructor |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
136 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
137 * @param format See {@link #format} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
138 */ |
450
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
139 public LocalizedLabelGenerator(NumberFormat format) { |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
140 this.format = format; |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
141 } |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
142 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
143 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
144 * If label is a <code>Number</code>, it is turned into a format |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
145 * specified by {@link #format}. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
146 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
147 * @param label Label to format. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
148 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
149 * @return String representation of label. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
150 */ |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
151 @Override |
450
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
152 protected String toString(Object label) { |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
153 return label instanceof Number |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
154 ? format.format(((Number)label).doubleValue()) |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
155 : super.toString(label); |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
156 } |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
157 } // class LocalizedLabelGenerator |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
158 |
841
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
159 public static double MARGIN_TOP = 0.05d; |
842
31f63a14a2c3
Improved the workaround of rev955: There is no gap between the left & bottom border and data area anymore (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
841
diff
changeset
|
160 public static double MARGIN_BOTTOM = 0.00d; |
31f63a14a2c3
Improved the workaround of rev955: There is no gap between the left & bottom border and data area anymore (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
841
diff
changeset
|
161 public static double MARGIN_LEFT = 0.00d; |
841
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
162 public static double MARGIN_RIGHT = 0.05d; |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
163 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
164 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
165 * JFreeChart object stored at this place after chart creation. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
166 */ |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
167 protected JFreeChart chart; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
168 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
169 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
170 * Stores {@link de.intevation.gnv.jfreechart.PolygonDataset} which is used |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
171 * to create a vertical cross chart. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
172 */ |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
173 protected AttributedXYColumns columns; |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
174 |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
175 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
176 * Map which contains colors to fill polygons draw by this chart. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
177 */ |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
178 protected Map<Integer, Paint> special; |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
179 |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
180 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
181 * Object used to map value intervals to specific colors and descriptions. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
182 */ |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
183 protected Palette palette; |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
184 |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
185 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
186 * Locale object used for i18n support. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
187 */ |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
188 protected Locale locale; |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
189 |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
190 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
191 * Labels for decorating the chart. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
192 */ |
492
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
193 protected ChartLabels labels; |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
194 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
195 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
196 * Default Constructor |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
197 */ |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
198 public VerticalCrossSectionChart() { |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
199 } |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
200 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
201 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
202 * Constructor for VerticalCrossSectionChart creation. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
203 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
204 * @param columns See {@link #columns} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
205 * @param palette See {@link #palette} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
206 * @param locale See {@link #locale} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
207 * @param labels See {@link #labels} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
208 */ |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
209 public VerticalCrossSectionChart( |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
210 AttributedXYColumns columns, |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
211 Palette palette, |
492
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
212 Locale locale, |
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
213 ChartLabels labels |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
214 ) { |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
215 this(columns, palette, null, locale, labels); |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
216 } |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
217 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
218 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
219 * Constructor for VerticalCrossSectionChart creation. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
220 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
221 * @param columns See {@link #columns} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
222 * @param palette See {@link #palette} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
223 * @param special See {@link #special} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
224 * @param locale See {@link #locale} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
225 * @param labels See {@link #labels} |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
226 */ |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
227 public VerticalCrossSectionChart( |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
228 AttributedXYColumns columns, |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
229 Palette palette, |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
230 Map<Integer, Paint> special, |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
231 Locale locale, |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
232 ChartLabels labels |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
233 ) { |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
234 this.columns = columns; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
235 this.palette = palette; |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
236 this.special = special; |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
237 this.locale = locale; |
492
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
238 this.labels = labels; |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
239 } |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
240 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
241 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
242 * This method is used to create a JFreeChart from this object. A 2D plot is |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
243 * drawn and a legend panel is created containing each value range. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
244 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
245 * @return JFreeChart object |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
246 */ |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
247 protected JFreeChart createChart() { |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
248 |
492
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
249 boolean legendB = false; |
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
250 boolean tooltips = false; |
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
251 boolean urls = false; |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
252 |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
253 PlotOrientation po = PlotOrientation.HORIZONTAL; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
254 PolygonDataset data = columns.getPolygonDataset(); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
255 |
449
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
256 HashSet<Integer> usedColors = new HashSet<Integer>(); |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
257 |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
258 for (int i = data.getSeriesCount()-1; i >= 0; --i) { |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
259 PolygonSeries ps = data.getSeries(i); |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
260 Integer fill = (Integer)ps.getAttribute("fill"); |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
261 if (fill != null |
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
262 && (special != null && !special.containsKey(fill))) { |
449
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
263 usedColors.add(fill); |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
264 } |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
265 } |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
266 |
450
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
267 NumberFormat format = NumberFormat.getInstance(locale); |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
268 format.setMinimumFractionDigits(0); |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
269 format.setMaximumFractionDigits(2); |
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
270 |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
271 PolygonRenderer renderer = new PolygonRenderer( |
521
1bf058f1a2d1
Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
492
diff
changeset
|
272 new PalettePaintLookup(palette, special), |
450
20a480753ff9
Render labels in vertical cross section charts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
449
diff
changeset
|
273 new LocalizedLabelGenerator(format)); |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
274 |
492
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
275 ValueAxis domainAxis = new NumberAxis(this.labels.getDomainAxisLabel()); |
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
276 ValueAxis rangeAxis = new NumberAxis(this.labels.getRangeAxisLabel()); |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
277 |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
278 PolygonPlot plot = new PolygonPlot( |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
279 data, |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
280 renderer, |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
281 domainAxis, |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
282 rangeAxis, |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
283 null); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
284 |
534
92d7a8cd1ef1
Set white border for 'Profilschnitte' as default.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
527
diff
changeset
|
285 plot.setOutlinePaint(Color.WHITE); |
92d7a8cd1ef1
Set white border for 'Profilschnitte' as default.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
527
diff
changeset
|
286 |
449
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
287 String [] labels = new String[usedColors.size()]; |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
288 |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
289 int colors = palette.getSize(); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
290 LookupPaintScale lookupPaint = |
449
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
291 new LookupPaintScale(-0.5d, labels.length-0.5d, Color.white); |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
292 |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
293 Color color = null; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
294 |
449
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
295 for (int i = 0, j = labels.length-1; i < colors && j >= 0; i++) { |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
296 if (usedColors.contains(i)) { |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
297 Palette.Entry entry = palette.getEntryByIndex(i); |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
298 color = entry.getColor(); |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
299 labels[j] = entry.getDescription(); |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
300 lookupPaint.add(j-0.5d, color); |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
301 --j; |
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
302 } |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
303 } |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
304 |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
305 JFreeChart chart = new JFreeChart( |
492
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
306 this.labels.getTitle(), |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
307 JFreeChart.DEFAULT_TITLE_FONT, |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
308 plot, |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
309 legendB); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
310 |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
311 chart.removeLegend(); |
492
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
312 chart.addSubtitle(new TextTitle(this.labels.getSubtitle())); |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
313 |
492
79e80c289018
Added labels and titles to 'Profilschnitt' charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
450
diff
changeset
|
314 SymbolAxis scale = new SymbolAxis(this.labels.getParameterName(), labels); |
449
c7ca2fce041f
Add only color to scale of vertical cross section which are in the chart.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
446
diff
changeset
|
315 scale.setRange(-1.5d, labels.length+0.5d); |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
316 scale.setGridBandsVisible(false); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
317 scale.setPlot(plot); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
318 |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
319 PaintScaleLegend legend = new PaintScaleLegend( |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
320 lookupPaint, scale); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
321 legend.setMargin(new RectangleInsets(3d, 10d, 3d, 10d)); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
322 legend.setPosition(RectangleEdge.LEFT); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
323 legend.setAxisOffset(5d); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
324 |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
325 chart.addSubtitle(legend); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
326 |
841
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
327 // XXX Workaround, because Axes labels are cut at the |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
328 // left/right/top/bottom edge. The following lines add a white border |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
329 // between data area and plot border. |
842
31f63a14a2c3
Improved the workaround of rev955: There is no gap between the left & bottom border and data area anymore (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
841
diff
changeset
|
330 // see http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=22177&start=0&hilit=axis+labels+cut |
841
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
331 ValueAxis xAxis = plot.getDomainAxis(); |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
332 Range xRange = xAxis.getRange(); |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
333 xRange = Range.expand(xRange, MARGIN_LEFT, MARGIN_RIGHT); |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
334 xAxis.setRange(xRange); |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
335 plot.setDomainAxis(xAxis); |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
336 |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
337 ValueAxis yAxis = plot.getRangeAxis(); |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
338 Range yRange = yAxis.getRange(); |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
339 yRange = Range.expand(yRange, MARGIN_BOTTOM, MARGIN_TOP); |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
340 yAxis.setRange(yRange); |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
341 plot.setRangeAxis(yAxis); |
9cbc8343a04d
Implemented a workaround to avoid an amount of cut axis labels in 2D charts (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
817
diff
changeset
|
342 |
842
31f63a14a2c3
Improved the workaround of rev955: There is no gap between the left & bottom border and data area anymore (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
841
diff
changeset
|
343 chart.setPadding(new RectangleInsets(10d, 10d, 10d, 10d)); |
31f63a14a2c3
Improved the workaround of rev955: There is no gap between the left & bottom border and data area anymore (issue163).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
841
diff
changeset
|
344 |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
345 return chart; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
346 } |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
347 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
348 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
349 * @see de.intevation.gnv.chart.Chart#generateChart() |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
350 */ |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
351 public JFreeChart generateChart() { |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
352 if (chart == null) { |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
353 chart = createChart(); |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
354 } |
527
f598702b2a10
Fixed issue157: Verticalcrosssection charts have a white background as all other chart types have.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
521
diff
changeset
|
355 |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
356 return chart; |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
357 } |
527
f598702b2a10
Fixed issue157: Verticalcrosssection charts have a white background as all other chart types have.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
521
diff
changeset
|
358 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
359 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
360 * Set the background paint of {@link #chart}. |
803
feae2f9d6c6f
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
788
diff
changeset
|
361 * @param paint |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
534
diff
changeset
|
362 */ |
527
f598702b2a10
Fixed issue157: Verticalcrosssection charts have a white background as all other chart types have.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
521
diff
changeset
|
363 public void setBackgroundPaint(Paint paint) { |
f598702b2a10
Fixed issue157: Verticalcrosssection charts have a white background as all other chart types have.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
521
diff
changeset
|
364 chart.setBackgroundPaint(paint); |
f598702b2a10
Fixed issue157: Verticalcrosssection charts have a white background as all other chart types have.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
521
diff
changeset
|
365 } |
446
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
366 } |
f5a041000357
Connected vertical cross section with chart generation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
367 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |