comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 3179:436ab826e82b

flys-artifacts/trunk@4794 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 26 Jun 2012 10:34:44 +0000
parents 4616436a84f4
children f1e09a003f78
comparison
equal deleted inserted replaced
3178:59b14bc676ec 3179:436ab826e82b
202 protected Map<Integer, Bounds> xBounds; 202 protected Map<Integer, Bounds> xBounds;
203 203
204 /** The max Y range to include all Y values of all series for each axis. */ 204 /** The max Y range to include all Y values of all series for each axis. */
205 protected Map<Integer, Bounds> yBounds; 205 protected Map<Integer, Bounds> yBounds;
206 206
207 207 /** (Empty) shape for aggregated Legend Items. */
208 private static final Line2D.Double SPACE = new Line2D.Double(0,0,0,0);
209
208 public XYChartGenerator() { 210 public XYChartGenerator() {
209 super(); 211 super();
210 212
211 xBounds = new HashMap<Integer, Bounds>(); 213 xBounds = new HashMap<Integer, Bounds>();
212 yBounds = new HashMap<Integer, Bounds>(); 214 yBounds = new HashMap<Integer, Bounds>();
1355 // to prevent "overfill" of legenditemblock. 1357 // to prevent "overfill" of legenditemblock.
1356 for (int i = 0; i < itemList.size(); i++) { 1358 for (int i = 0; i < itemList.size(); i++) {
1357 if (i != 0) { 1359 if (i != 0) {
1358 LegendItem litem = itemList.get(i); 1360 LegendItem litem = itemList.get(i);
1359 1361
1360 // TODO Like in D-Flys, define a static "SPACE" shape.
1361 // Make shape and line really small. 1362 // Make shape and line really small.
1362 LegendItem merged = new LegendItem( 1363 LegendItem merged = new LegendItem(
1363 ", " + litem.getLabel(), litem.getDescription(), litem.getToolTipText(), 1364 ", " + litem.getLabel(), litem.getDescription(), litem.getToolTipText(),
1364 litem.getURLText(), false, /*litem.getShape()*/ new Line2D.Double(0,0,0,0), 1365 litem.getURLText(), false, SPACE,
1365 false, litem.getFillPaint(), false, 1366 false, litem.getFillPaint(), false,
1366 litem.getOutlinePaint(), litem.getOutlineStroke(), false, 1367 litem.getOutlinePaint(), litem.getOutlineStroke(), false,
1367 new Line2D.Double(0,0,0,0) 1368 SPACE, litem.getLineStroke(), litem.getLinePaint());
1368 /*litem.getLine()*/, litem.getLineStroke(), litem.getLinePaint());
1369 newLegend.add(merged); 1369 newLegend.add(merged);
1370 } 1370 }
1371 else { 1371 else {
1372 newLegend.add(itemList.get(i)); 1372 newLegend.add(itemList.get(i));
1373 } 1373 }

http://dive4elements.wald.intevation.org