changeset 2642:42b05a4bed25

Cosmetics, added doc, TODO and OPTIMIZE to Enhanced*Renderer. flys-artifacts/trunk@4297 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 25 Apr 2012 14:40:32 +0000
parents 2bad13107161
children d6794864a4b8
files flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java	Wed Apr 25 14:21:09 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java	Wed Apr 25 14:40:32 2012 +0000
@@ -21,7 +21,9 @@
 import org.jfree.util.BooleanList;
 import org.jfree.util.ShapeUtilities;
 
-
+/**
+ * Renderer with additional functionality.
+ */
 public class EnhancedLineAndShapeRenderer extends XYLineAndShapeRenderer {
 
     private static final Logger logger =
@@ -145,6 +147,9 @@
         if (getItemShapeVisible(dataset, series, item)) {
             Shape shape = null;
 
+            // OPTIMIZE instead of calculating minimum and maximum for every
+            //          point, calculate it just once (assume that dataset
+            //          content does not change during rendering).
             boolean isMinimum = isMinimumShapeVisible(series)
                 && isMinimum(dataset, series, item);
 
@@ -208,6 +213,7 @@
                     g2.draw(shape);
                 }
             }
+            // TODO labeling of waterlevels could happen here, too.
         }
 
         double xx = transX1;

http://dive4elements.wald.intevation.org