changeset 3015:9cea02b51241

Added better doc and todo. flys-artifacts/trunk@4580 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 05 Jun 2012 11:53:51 +0000
parents e341606faeb4
children 75e83b02bb9d
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java
diffstat 2 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Jun 05 09:11:24 2012 +0000
+++ b/flys-artifacts/ChangeLog	Tue Jun 05 11:53:51 2012 +0000
@@ -1,3 +1,8 @@
+2012-06-05	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java:
+	  Added better doc and TODO.
+
 2012-06-05	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java,
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java	Tue Jun 05 09:11:24 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java	Tue Jun 05 11:53:51 2012 +0000
@@ -66,8 +66,17 @@
     }
 
 
-    /** Draw a background-box of a text to render. */
-    public static void drawTextBox(Graphics2D g2, String text, float textX, float textY, Color bgColor) {
+    /**
+     * Draw a background-box of a text to render.
+     * @param g2 graphics device to use
+     * @param text text to draw
+     * @param textX x-position for text
+     * @param textY y-position for text
+     * @param bgColor color to fill box with.
+     */
+    public static void drawTextBox(Graphics2D g2,
+        String text, float textX, float textY, Color bgColor
+    ) {
         Rectangle2D hotspotBox = g2.getFontMetrics().getStringBounds(text, g2);
         float w = (float) hotspotBox.getWidth(), h = (float) hotspotBox.getHeight();
         hotspotBox.setRect(textX, textY-h, w, h);
@@ -263,6 +272,7 @@
         }
 
         // Draw label of line.
+        // TODO add colision detection
         if (isShowLineLabel(series) && isMinimumX (dataset, series, item)) {
             XYSeries xYSeries = ((XYSeriesCollection) dataset).getSeries(series);
             String waterlevelLabel = (xYSeries instanceof HasLabel)

http://dive4elements.wald.intevation.org