comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 1685:022f62c75878

Cosmetics. flys-artifacts/trunk@2903 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 07 Oct 2011 13:14:37 +0000
parents bdb05dc9b763
children e8d1e531687a
comparison
equal deleted inserted replaced
1684:bdb05dc9b763 1685:022f62c75878
57 protected XYSeriesCollection second; 57 protected XYSeriesCollection second;
58 58
59 /** List of annotations to insert in plot. */ 59 /** List of annotations to insert in plot. */
60 protected List<FLYSAnnotation> annotations; 60 protected List<FLYSAnnotation> annotations;
61 61
62 /** The max X range that includes all X values of all series for each axis.*/ 62 /** The max X range to include all X values of all series for each axis. */
63 protected Map<Integer, Range> xRanges; 63 protected Map<Integer, Range> xRanges;
64 64
65 /** The max Y range that includes all Y values of all series for each axis.*/ 65 /** The max Y range to include all Y values of all series for each axis. */
66 protected Map<Integer, Range> yRanges; 66 protected Map<Integer, Range> yRanges;
67
68 67
69 public static final Color DEFAULT_GRID_COLOR = Color.GRAY; 68 public static final Color DEFAULT_GRID_COLOR = Color.GRAY;
70 public static final float DEFAULT_GRID_LINE_WIDTH = 0.3f; 69 public static final float DEFAULT_GRID_LINE_WIDTH = 0.3f;
71 70
72 71
142 141
143 return chart; 142 return chart;
144 } 143 }
145 144
146 145
146 /**
147 * Add first and second dataset to plot.
148 * @param plot plot to add datasets to.
149 */
147 protected void addDatasets(XYPlot plot) { 150 protected void addDatasets(XYPlot plot) {
148 if (first != null) { 151 if (first != null) {
149 logger.debug("Set the first axis dataset."); 152 logger.debug("Set the first axis dataset.");
150 plot.setDataset(0, first); 153 plot.setDataset(0, first);
151 } 154 }
278 281
279 for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) { 282 for (int i = 0, num = plot.getRangeAxisCount(); i < num; i++) {
280 Range[] ranges = new Range[] { 283 Range[] ranges = new Range[] {
281 xRanges.get(0), 284 xRanges.get(0),
282 yRanges.get(new Integer(i)) }; 285 yRanges.get(new Integer(i)) };
283
284 286
285 if (i == 0) { 287 if (i == 0) {
286 ValueAxis xaxis = plot.getDomainAxis(); 288 ValueAxis xaxis = plot.getDomainAxis();
287 zoomX(plot, xaxis, ranges[0], xrange); 289 zoomX(plot, xaxis, ranges[0], xrange);
288 } 290 }

http://dive4elements.wald.intevation.org