Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/HistoricalDischargeCurveGenerator.java @ 2586:8cd6358eb7f8
Enabeld axes label font sizes for timeseries charts.
flys-artifacts/trunk@4141 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 14 Mar 2012 15:12:45 +0000 |
parents | 1fcaeced48f2 |
children | 26cd4dfafdf1 |
comparison
equal
deleted
inserted
replaced
2585:a71fc8f2030c | 2586:8cd6358eb7f8 |
---|---|
6 import org.w3c.dom.Document; | 6 import org.w3c.dom.Document; |
7 | 7 |
8 import org.apache.log4j.Logger; | 8 import org.apache.log4j.Logger; |
9 | 9 |
10 import org.jfree.chart.JFreeChart; | 10 import org.jfree.chart.JFreeChart; |
11 import org.jfree.chart.axis.NumberAxis; | |
12 import org.jfree.chart.title.TextTitle; | 11 import org.jfree.chart.title.TextTitle; |
13 | 12 |
14 import org.jfree.data.general.SeriesException; | 13 import org.jfree.data.general.SeriesException; |
15 import org.jfree.data.time.Day; | 14 import org.jfree.data.time.Day; |
16 import org.jfree.data.time.RegularTimePeriod; | 15 import org.jfree.data.time.RegularTimePeriod; |
124 return msg(I18N_YAXIS_SECOND_LABEL, I18N_YAXIS_SECOND_LABEL); | 123 return msg(I18N_YAXIS_SECOND_LABEL, I18N_YAXIS_SECOND_LABEL); |
125 } | 124 } |
126 else { | 125 else { |
127 return "NO TITLE FOR Y AXIS: " + pos; | 126 return "NO TITLE FOR Y AXIS: " + pos; |
128 } | 127 } |
129 } | |
130 | |
131 | |
132 /** | |
133 * Creates a new Y-Axis. | |
134 * | |
135 * @param index the index of the Y axis. | |
136 * | |
137 * @return an new NumberAxis with label from <i>getYAxisLabel()</i>. | |
138 */ | |
139 @Override | |
140 protected NumberAxis createYAxis(int index) { | |
141 Font labelFont = new Font("Tahoma", Font.BOLD, 14); | |
142 String label = "default"; | |
143 | |
144 if (index == YAXIS.Q.idx) { | |
145 label = getYAxisLabel(0); | |
146 } | |
147 | |
148 NumberAxis axis = createNumberAxis(index, label); | |
149 axis.setLabelFont(labelFont); | |
150 axis.setAutoRangeIncludesZero(false); | |
151 | |
152 return axis; | |
153 } | 128 } |
154 | 129 |
155 | 130 |
156 public void doOut( | 131 public void doOut( |
157 ArtifactAndFacet artifactFacet, | 132 ArtifactAndFacet artifactFacet, |