diff 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
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Tue Jun 26 09:29:37 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Tue Jun 26 10:34:44 2012 +0000
@@ -204,7 +204,9 @@
     /** The max Y range to include all Y values of all series for each axis. */
     protected Map<Integer, Bounds> yBounds;
 
-
+    /** (Empty) shape for aggregated Legend Items. */
+    private static final Line2D.Double SPACE = new Line2D.Double(0,0,0,0);
+    
     public XYChartGenerator() {
         super();
 
@@ -1357,15 +1359,13 @@
                     if (i != 0) {
                         LegendItem litem = itemList.get(i);
 
-                        // TODO Like in D-Flys, define a static "SPACE" shape.
                         // Make shape and line really small.
                         LegendItem merged = new LegendItem(
                             ", " + litem.getLabel(), litem.getDescription(), litem.getToolTipText(),
-                            litem.getURLText(), false, /*litem.getShape()*/ new Line2D.Double(0,0,0,0),
+                            litem.getURLText(), false, SPACE,
                             false, litem.getFillPaint(), false,
                             litem.getOutlinePaint(), litem.getOutlineStroke(), false,
-                            new Line2D.Double(0,0,0,0)
-                            /*litem.getLine()*/, litem.getLineStroke(), litem.getLinePaint());
+                            SPACE, litem.getLineStroke(), litem.getLinePaint());
                         newLegend.add(merged);
                     }
                     else {

http://dive4elements.wald.intevation.org