Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 2049:2d5f2bc68cc6
Centralized the creation of new NumberAxis - new NumberAxis instances in FLYS will be from type IdentifiableNumberAxis which subclasses JFreeChart's NumberAxis.
flys-artifacts/trunk@3539 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 23 Dec 2011 15:10:13 +0000 |
parents | 3157a78e6494 |
children | c4e0e433f825 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Fri Dec 23 14:24:57 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Fri Dec 23 15:10:13 2011 +0000 @@ -668,6 +668,11 @@ for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) { ValueAxis yaxis = plot.getRangeAxis(i); + if (yaxis instanceof IdentifiableNumberAxis) { + logger.info("!!! IdentifiableNumberAxis found !!!"); + // TODO Watch for fixed axes and the specified range + } + if (yaxis == null) { logger.debug("Zoom problem: no Y Axis for index: " + i); continue; @@ -1067,6 +1072,21 @@ /** + * Creates a new instance of <i>IdentifiableNumberAxis</i>. + * + * @param idx The index of the new axis. + * @param label The label of the new axis. + * + * @return an instance of IdentifiableNumberAxis. + */ + protected NumberAxis createNumberAxis(int idx, String label) { + YAxisWalker walker = getYAxisWalker(); + + return new IdentifiableNumberAxis(walker.getId(idx), label); + } + + + /** * Returns an instance of <i>ChartSettings</i> with a chart specific section * but with no axes settings. *