diff flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java @ 3395:2a8919e0ed28

Cosmetics, doc. flys-artifacts/trunk@5025 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 17 Jul 2012 18:40:25 +0000
parents 0f7abd95c6e2
children 0b9b2a0c4e64
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java	Tue Jul 17 18:31:34 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java	Tue Jul 17 18:40:25 2012 +0000
@@ -123,6 +123,7 @@
     }
 
 
+    /** Get fill paint for the maximum indicators. */
     public Paint getMaximumFillPaint(int series, int column) {
         Paint p = getItemPaint(series, column);
 
@@ -142,6 +143,7 @@
     }
 
 
+    /** Get fill paint for the minimum indicators. */
     public Paint getMinimumFillPaint(int series, int column) {
         Paint p = getItemPaint(series, column);
 
@@ -274,14 +276,17 @@
             yy = transX1;
         }
 
-        // draw the item label if there is one...
+        // Draw the item label if there is one...
         if (isItemLabelVisible(series, item)) {
             drawItemLabel(g2, orientation, dataset, series, item, xx, yy,
                     (y1 < 0.0));
         }
 
         // Draw label of line.
-        if (dataset instanceof XYSeriesCollection && isShowLineLabel(series) && isMinimumX (dataset, series, item)) {
+        if (dataset instanceof XYSeriesCollection
+            && isShowLineLabel(series)
+            && isMinimumX (dataset, series, item)
+            ) {
             XYSeries xYSeries = ((XYSeriesCollection) dataset).getSeries(series);
             String waterlevelLabel = (xYSeries instanceof HasLabel)
                 ? ((HasLabel)xYSeries).getLabel()
@@ -297,9 +302,11 @@
 
             // Move to right until no collisions exist anymore
             Shape hotspot = TextUtilities.calculateRotatedStringBounds(
-                waterlevelLabel, g2, (float)xx, (float)yy-3f, TextAnchor.CENTER_LEFT,
+                waterlevelLabel, g2, (float)xx, (float)yy-3f,
+                TextAnchor.CENTER_LEFT,
                 0f, TextAnchor.CENTER_LEFT);
-            while (JFreeUtil.collides(hotspot, entities, CollisionFreeLineLabelEntity.class)) {
+            while (JFreeUtil.collides(hotspot, entities,
+                                      CollisionFreeLineLabelEntity.class)) {
                 xx += 5f;
                 hotspot = TextUtilities.calculateRotatedStringBounds(
                     waterlevelLabel, g2, (float)xx, (float)yy-3f, TextAnchor.CENTER_LEFT,
@@ -327,7 +334,7 @@
         updateCrosshairValues(crosshairState, x1, y1, domainAxisIndex,
                 rangeAxisIndex, transX1, transY1, orientation);
 
-        // add an entity for the item, but only if it falls within the data
+        // Add an entity for the item, but only if it falls within the data
         // area...
         if (entities != null && isPointInRect(dataArea, xx, yy)) {
             addEntity(entities, entityArea, dataset, series, item, xx, yy);
@@ -343,6 +350,9 @@
     }
 
 
+    /**
+     * Whether or not the minimum should be rendered with shape.
+     */
     public boolean isMinimumShapeVisible(int series) {
         if (this.isMinimumShapeVisible.size() <= series) {
             return false;
@@ -352,11 +362,17 @@
     }
 
 
+    /**
+     * Sets whether or not the maximum should be rendered with shape.
+     */
     public void setIsMaximumShapeVisible(int series, boolean isVisible) {
         this.isMaximumShapeVisible.setBoolean(series, isVisible);
     }
 
 
+    /**
+     * Whether or not the maximum should be rendered with shape.
+     */
     public boolean isMaximumShapeVisible(int series) {
         if (this.isMaximumShapeVisible.size() <= series) {
             return false;
@@ -380,6 +396,7 @@
         this.showLineLabel.setBoolean(series, showLineLabel);
     }
 
+
     /** Whether or not a label should be shown for series. */
     public boolean isShowLineLabelBG(int series) {
         if (this.showLineLabelBG.size() <= series) {
@@ -389,6 +406,7 @@
         return showLineLabelBG.getBoolean(series);
     }
 
+
     public void setShowLineLabelBG(int series, boolean doShow) {
         this.showLineLabelBG.setBoolean(series, doShow);
     }

http://dive4elements.wald.intevation.org