Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java @ 3409:97ad960f5579
Add subtitle to Fix W/Q chart and refactor addSubtitle() method(s)
flys-artifacts/trunk@5062 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Thu, 19 Jul 2012 12:59:56 +0000 |
parents | 4a70525c5b0d |
children | e74e707ff650 |
comparison
equal
deleted
inserted
replaced
3408:50d61a2494cb | 3409:97ad960f5579 |
---|---|
19 import java.awt.Stroke; | 19 import java.awt.Stroke; |
20 import java.text.NumberFormat; | 20 import java.text.NumberFormat; |
21 import java.util.List; | 21 import java.util.List; |
22 | 22 |
23 import org.apache.log4j.Logger; | 23 import org.apache.log4j.Logger; |
24 import org.jfree.chart.JFreeChart; | |
25 import org.jfree.chart.LegendItemCollection; | 24 import org.jfree.chart.LegendItemCollection; |
26 import org.jfree.chart.annotations.XYBoxAnnotation; | 25 import org.jfree.chart.annotations.XYBoxAnnotation; |
27 import org.jfree.chart.annotations.XYTextAnnotation; | 26 import org.jfree.chart.annotations.XYTextAnnotation; |
28 import org.jfree.chart.plot.XYPlot; | 27 import org.jfree.chart.plot.XYPlot; |
29 import org.jfree.chart.title.TextTitle; | |
30 import org.jfree.data.xy.XYSeries; | 28 import org.jfree.data.xy.XYSeries; |
31 import org.w3c.dom.Document; | 29 import org.w3c.dom.Document; |
32 | 30 |
33 | 31 |
34 /** | 32 /** |
125 }; | 123 }; |
126 | 124 |
127 return msg(I18N_CHART_SUBTITLE, "", args); | 125 return msg(I18N_CHART_SUBTITLE, "", args); |
128 } | 126 } |
129 | 127 |
130 | |
131 @Override | |
132 protected void addSubtitles(JFreeChart chart) { | |
133 String subtitle = getChartSubtitle(); | |
134 chart.addSubtitle(new TextTitle(subtitle)); | |
135 } | |
136 | 128 |
137 /** Get color for hyk zones by their type (which is the name). */ | 129 /** Get color for hyk zones by their type (which is the name). */ |
138 protected Paint colorForHYKZone(String zoneName) { | 130 protected Paint colorForHYKZone(String zoneName) { |
139 if (zoneName.startsWith("R")) { | 131 if (zoneName.startsWith("R")) { |
140 // Brownish. | 132 // Brownish. |