changeset 2647:4b7a28e81643

Cosmetics, doc. flys-artifacts/trunk@4302 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 26 Apr 2012 08:11:48 +0000
parents c11da3540b70
children 8aaa7f4ce06a
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java
diffstat 2 files changed, 36 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Apr 25 16:04:37 2012 +0000
+++ b/flys-artifacts/ChangeLog	Thu Apr 26 08:11:48 2012 +0000
@@ -1,3 +1,8 @@
+2012-04-26	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java:
+          Cosmetics, doc.
+
 2012-04-25	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/math/Outlier.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java	Wed Apr 25 16:04:37 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java	Thu Apr 26 08:11:48 2012 +0000
@@ -22,15 +22,18 @@
 import org.jfree.util.ShapeUtilities;
 
 /**
- * Renderer with additional functionality.
+ * Renderer with additional the additional functionality of renderering minima
+ * and/or maxima of dataseries contained in datasets.
  */
 public class EnhancedLineAndShapeRenderer extends XYLineAndShapeRenderer {
 
+    /** Own logger. */
     private static final Logger logger =
         Logger.getLogger(EnhancedLineAndShapeRenderer.class);
 
     protected BooleanList isMinimumShapeVisible;
     protected BooleanList isMaximumShapeVisible;
+    protected BooleanList showSeriesMinimumX;;
 
     protected Map<Integer, Double> seriesMinimum;
     protected Map<Integer, Double> seriesMinimumX;
@@ -234,6 +237,7 @@
 
         boolean doWaterlevelLabel = false;
         if (isMinimumX (dataset, series, item)) {
+            // TODO find name of dataset/series
             String waterlevelLabel = "label";
             // TODO Force water of some German rivers to flow direction mountains.
             g2.drawString("waterlevel label", (float)xx, (float)yy-3f);
@@ -280,10 +284,19 @@
     }
 
 
+    /**
+     * True if the given item of given dataset has the smallest
+     * X value within this set.
+     */
     public boolean isMinimumX(XYDataset dataset, int series, int item) {
         return dataset.getXValue(series, item) == getMinimumX(dataset, series);
     }
 
+
+    /**
+     * Get Minimum X Value of a given series in a dataset.
+     * The value is stored for later use if queried the first time.
+     */
     public double getMinimumX(XYDataset dataset, int series) {
         Integer key = Integer.valueOf(series);
         Double  old = seriesMinimumX.get(key);
@@ -309,11 +322,20 @@
         return min;
     }
 
+
+    /**
+     * True if the given item of given dataset has the smallest
+     * Y value within this set.
+     */
     public boolean isMinimum(XYDataset dataset, int series, int item) {
         return dataset.getYValue(series, item) == getMinimum(dataset, series);
     }
 
 
+    /**
+     * Get Minimum Y Value of a given series in a dataset.
+     * The value is stored for later use if queried the first time.
+     */
     public double getMinimum(XYDataset dataset, int series) {
         Integer key = Integer.valueOf(series);
         Double  old = seriesMinimum.get(key);
@@ -340,12 +362,19 @@
     }
 
 
+    /**
+     * True if the given item of given dataset has the biggest
+     * Y value within this set.
+     */
     public boolean isMaximum(XYDataset dataset, int series, int item) {
         return dataset.getYValue(series, item) == getMaximum(dataset, series);
     }
 
 
-    //
+    /**
+     * Get maximum Y Value of a given series in a dataset.
+     * The value is stored for later use if queried the first time.
+     */
     public double getMaximum(XYDataset dataset, int series) {
         Integer key = Integer.valueOf(series);
         Double  old = seriesMaximum.get(key);

http://dive4elements.wald.intevation.org