Mercurial > dive4elements > river
changeset 2054:a653295c9ac0
Make use of user defined axes font sizes.
flys-artifacts/trunk@3544 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 27 Dec 2011 08:50:28 +0000 |
parents | f9a972d375ba |
children | 3cec0575d655 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java |
diffstat | 2 files changed, 21 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Dec 27 08:22:07 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Dec 27 08:50:28 2011 +0000 @@ -1,3 +1,9 @@ +2011-12-27 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/exports/XYChartGenerator.java: + Implemented adjustAxes(). This method now sets the label Font of the X + axis. Its size is determined by getXAxisLabelFontSize(). + 2011-12-27 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/exports/AxisSection.java: Added method
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Tue Dec 27 08:22:07 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Tue Dec 27 08:50:28 2011 +0000 @@ -952,20 +952,25 @@ /** - * Adjusts the axes of a plot (the first axis does not include zero). - * To be overridden by children. + * Adjusts the axes of a plot. This method sets the <i>labelFont</i> of the + * X axis. + * * @param plot The XYPlot of the chart. */ protected void adjustAxes(XYPlot plot) { - /* - NumberAxis yAxis = (NumberAxis) plot.getRangeAxis(); - if (yAxis == null) { - logger.warn("No Axis to setAutoRangeIncludeZero."); + ValueAxis xaxis = plot.getDomainAxis(); + + ChartSettings chartSettings = getChartSettings(); + if (chartSettings == null) { + return; } - else { - yAxis.setAutoRangeIncludesZero(false); - } - */ + + Font labelFont = new Font( + DEFAULT_FONT_NAME, + Font.BOLD, + getXAxisLabelFontSize()); + + xaxis.setLabelFont(labelFont); }