comparison 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
comparison
equal deleted inserted replaced
2048:3157a78e6494 2049:2d5f2bc68cc6
666 zoomX(plot, plot.getDomainAxis(), xRanges.get(0), xrange); 666 zoomX(plot, plot.getDomainAxis(), xRanges.get(0), xrange);
667 667
668 for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) { 668 for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) {
669 ValueAxis yaxis = plot.getRangeAxis(i); 669 ValueAxis yaxis = plot.getRangeAxis(i);
670 670
671 if (yaxis instanceof IdentifiableNumberAxis) {
672 logger.info("!!! IdentifiableNumberAxis found !!!");
673 // TODO Watch for fixed axes and the specified range
674 }
675
671 if (yaxis == null) { 676 if (yaxis == null) {
672 logger.debug("Zoom problem: no Y Axis for index: " + i); 677 logger.debug("Zoom problem: no Y Axis for index: " + i);
673 continue; 678 continue;
674 } 679 }
675 680
1065 addAnnotations(annotations, visible); 1070 addAnnotations(annotations, visible);
1066 } 1071 }
1067 1072
1068 1073
1069 /** 1074 /**
1075 * Creates a new instance of <i>IdentifiableNumberAxis</i>.
1076 *
1077 * @param idx The index of the new axis.
1078 * @param label The label of the new axis.
1079 *
1080 * @return an instance of IdentifiableNumberAxis.
1081 */
1082 protected NumberAxis createNumberAxis(int idx, String label) {
1083 YAxisWalker walker = getYAxisWalker();
1084
1085 return new IdentifiableNumberAxis(walker.getId(idx), label);
1086 }
1087
1088
1089 /**
1070 * Returns an instance of <i>ChartSettings</i> with a chart specific section 1090 * Returns an instance of <i>ChartSettings</i> with a chart specific section
1071 * but with no axes settings. 1091 * but with no axes settings.
1072 * 1092 *
1073 * @return an instance of <i>ChartSettings</i>. 1093 * @return an instance of <i>ChartSettings</i>.
1074 */ 1094 */

http://dive4elements.wald.intevation.org