# HG changeset patch # User Ingo Weinzierl # Date 1324975828 0 # Node ID a653295c9ac0431a3f0831f2b5ba9c2405081f27 # Parent f9a972d375ba21e48d8d7a6766f5dce7a12189c3 Make use of user defined axes font sizes. flys-artifacts/trunk@3544 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r f9a972d375ba -r a653295c9ac0 flys-artifacts/ChangeLog --- 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 + + * 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 * src/main/java/de/intevation/flys/exports/AxisSection.java: Added method diff -r f9a972d375ba -r a653295c9ac0 flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java --- 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 labelFont 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); }