diff flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 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
line wrap: on
line diff
--- 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);
     }
 
 

http://dive4elements.wald.intevation.org