Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/TimeseriesChartGenerator.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 | ee5eca3871cb |
children | bece6f604899 |
comparison
equal
deleted
inserted
replaced
2585:a71fc8f2030c | 2586:8cd6358eb7f8 |
---|---|
1 package de.intevation.flys.exports; | 1 package de.intevation.flys.exports; |
2 | 2 |
3 import java.awt.Color; | 3 import java.awt.Color; |
4 import java.awt.Font; | |
4 | 5 |
5 import java.util.ArrayList; | 6 import java.util.ArrayList; |
6 import java.util.HashMap; | 7 import java.util.HashMap; |
7 import java.util.List; | 8 import java.util.List; |
8 import java.util.Map; | 9 import java.util.Map; |
166 plot.setBackgroundPaint(Color.WHITE); | 167 plot.setBackgroundPaint(Color.WHITE); |
167 | 168 |
168 addSubtitles(chart); | 169 addSubtitles(chart); |
169 adjustPlot(plot); | 170 adjustPlot(plot); |
170 addDatasets(plot); | 171 addDatasets(plot); |
172 adjustAxes(plot); | |
171 | 173 |
172 adaptZoom(plot); | 174 adaptZoom(plot); |
173 | 175 |
174 return chart; | 176 return chart; |
175 } | 177 } |
489 else { | 491 else { |
490 logger.debug("No user specified zoom values found!"); | 492 logger.debug("No user specified zoom values found!"); |
491 total.applyBounds(axis, AXIS_SPACE); | 493 total.applyBounds(axis, AXIS_SPACE); |
492 } | 494 } |
493 } | 495 } |
496 | |
497 | |
498 /** | |
499 * Adjusts the axes of a plot. This method sets the <i>labelFont</i> of the | |
500 * X axis. | |
501 * | |
502 * @param plot The XYPlot of the chart. | |
503 */ | |
504 protected void adjustAxes(XYPlot plot) { | |
505 ValueAxis xaxis = plot.getDomainAxis(); | |
506 | |
507 ChartSettings chartSettings = getChartSettings(); | |
508 if (chartSettings == null) { | |
509 return; | |
510 } | |
511 | |
512 Font labelFont = new Font( | |
513 DEFAULT_FONT_NAME, | |
514 Font.BOLD, | |
515 getXAxisLabelFontSize()); | |
516 | |
517 xaxis.setLabelFont(labelFont); | |
518 } | |
494 } | 519 } |
495 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 520 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |