Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java @ 315:63f8b3fb7d9a
Localization of chart axis with locale which fits best to server and browser settings.
gnv-artifacts/trunk@373 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 26 Nov 2009 08:47:44 +0000 |
parents | 45625b5cd6d4 |
children | 22a6493e8460 |
comparison
equal
deleted
inserted
replaced
314:6f72e335e2c9 | 315:63f8b3fb7d9a |
---|---|
5 import java.util.Locale; | 5 import java.util.Locale; |
6 | 6 |
7 import org.apache.log4j.Logger; | 7 import org.apache.log4j.Logger; |
8 | 8 |
9 import org.jfree.chart.ChartTheme; | 9 import org.jfree.chart.ChartTheme; |
10 import org.jfree.chart.axis.Axis; | |
11 import org.jfree.chart.axis.NumberAxis; | |
12 import org.jfree.chart.plot.XYPlot; | |
13 import org.jfree.chart.plot.PlotOrientation; | |
10 import org.jfree.data.xy.XYSeries; | 14 import org.jfree.data.xy.XYSeries; |
11 import org.jfree.data.general.Series; | 15 import org.jfree.data.general.Series; |
12 import org.jfree.data.xy.XYSeriesCollection; | 16 import org.jfree.data.xy.XYSeriesCollection; |
13 import org.jfree.chart.plot.XYPlot; | |
14 import org.jfree.chart.plot.PlotOrientation; | |
15 | 17 |
16 import de.intevation.gnv.geobackend.base.Result; | 18 import de.intevation.gnv.geobackend.base.Result; |
17 | 19 |
18 | 20 |
19 /** | 21 /** |
122 XYSeriesCollection xysc = new XYSeriesCollection((XYSeries)series); | 124 XYSeriesCollection xysc = new XYSeriesCollection((XYSeries)series); |
123 plot.setDataset(idx, xysc); | 125 plot.setDataset(idx, xysc); |
124 } | 126 } |
125 | 127 |
126 | 128 |
129 protected void localizeDomainAxis(Axis axis, Locale locale) { | |
130 // call localizeRangeAxis from superclass which formats NumberAxis | |
131 super.localizeRangeAxis(axis, locale); | |
132 } | |
133 | |
134 | |
127 protected String createSeriesName( | 135 protected String createSeriesName( |
128 String breakPoint1, | 136 String breakPoint1, |
129 String breakPoint2, | 137 String breakPoint2, |
130 String breakPoint3 | 138 String breakPoint3 |
131 ) { | 139 ) { |
134 " " + | 142 " " + |
135 findValueTitle(measurements, breakPoint2) + | 143 findValueTitle(measurements, breakPoint2) + |
136 "m"; | 144 "m"; |
137 } | 145 } |
138 } | 146 } |
139 // vim:set ts=4 sw=4 si et sta sts=4 fenc=latin1 : | 147 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |