diff artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents bbf6cf555e89
children a7f1d4c9add4 0a5239a1e46e
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java	Thu Jan 18 20:10:59 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java	Thu Jan 18 20:12:01 2018 +0100
@@ -206,10 +206,12 @@
          */
         java.net.URL imageURL;
         if (logo.equals("Intevation")) {
-            imageURL = XYChartGenerator.class.getResource("/images/intevation.png");
+            imageURL = XYChartGenerator.class.getResource(
+                "/images/intevation.png");
         }
         else { // TODO else if ...
-            imageURL = XYChartGenerator.class.getResource("/images/bfg_logo.gif");
+            imageURL = XYChartGenerator.class.getResource(
+                "/images/bfg_logo.gif");
         }
         imageIcon = new ImageIcon(imageURL);
 
@@ -229,7 +231,8 @@
             yPos = (Double)getYBounds(0).getLower();
         }
         else if (placev.equals("center")) {
-            yPos = ((Double)getYBounds(0).getUpper() + (Double)getYBounds(0).getLower())/2d;
+            yPos = ((Double)getYBounds(0).getUpper()
+                + (Double)getYBounds(0).getLower())/2d;
         }
         else {
             log.debug("Unknown place-v value: " + placev);
@@ -245,7 +248,8 @@
             xPos = getRightX();
         }
         else if (placeh.equals("center")) {
-            xPos = ((Double)getXBounds(0).getUpper() + (Double)getXBounds(0).getLower())/2d;
+            xPos = ((Double)getXBounds(0).getUpper()
+                + (Double)getXBounds(0).getLower())/2d;
         }
         else {
             log.debug("Unknown place-h value: " + placeh);
@@ -291,7 +295,8 @@
 
         XYAnnotation xyannotation =
             new XYImageAnnotation(xPos, yPos, imageIcon.getImage(), anchor);
-        plot.getRenderer().addAnnotation(xyannotation, org.jfree.ui.Layer.BACKGROUND);
+        plot.getRenderer().addAnnotation(
+            xyannotation, org.jfree.ui.Layer.BACKGROUND);
     }
 
 
@@ -366,9 +371,14 @@
      * Registers an area to be drawn.
      * @param area Area to be drawn.
      * @param index 'axis index'
-     * @param visible Whether or not to be visible (important for range calculations).
+     * @param visible Whether or not to be visible
+     *                (important for range calculations).
      */
-    public void addAreaSeries(StyledAreaSeriesCollection area, int index, boolean visible) {
+    public void addAreaSeries(
+        StyledAreaSeriesCollection area,
+        int index,
+        boolean visible
+    ) {
         if (area == null) {
             log.warn("Cannot yet render above/under curve.");
             return;
@@ -536,7 +546,8 @@
 
 
             if (b != null && b.getLower().equals(b.getUpper())) {
-                log.debug("Check whether to expand a x axis.i ("+b.getLower() + "-" + b.getUpper()+")");
+                log.debug("Check whether to expand a x axis.i ("
+                    + b.getLower() + "-" + b.getUpper() + ")");
                 setXBounds(key, ChartHelper.expandBounds(b, 5));
             }
         }
@@ -658,12 +669,22 @@
     }
 
 
-    protected boolean zoomX(XYPlot plot, ValueAxis axis, Bounds bounds, Range x) {
+    protected boolean zoomX(
+        XYPlot plot,
+        ValueAxis axis,
+        Bounds bounds,
+        Range x
+    ) {
         return zoom(plot, axis, bounds, x);
     }
 
 
-    protected boolean zoomY(XYPlot plot, ValueAxis axis, Bounds bounds, Range x) {
+    protected boolean zoomY(
+        XYPlot plot,
+        ValueAxis axis,
+        Bounds bounds,
+        Range x
+    ) {
         return zoom(plot, axis, bounds, x);
     }
 
@@ -910,10 +931,12 @@
             log.error("Could not decode json.");
         }
 
-        RiverAnnotation annotations = new RiverAnnotation(null, null, null, theme);
+        RiverAnnotation annotations =
+            new RiverAnnotation(null, null, null, theme);
         annotations.setTextAnnotations(xy);
 
-        // Do not generate second legend entry. (null was passed for the aand before).
+        // Do not generate second legend entry.
+        // (null was passed for the aand before).
         doAnnotations(annotations, null, theme, visible);
         addAxisSeries(series, axisIndex, visible);
     }
@@ -925,7 +948,8 @@
      * @return hash for given legenditem to identify mergeables.
      */
     public static String legendItemHash(LegendItem li) {
-        // TODO Do proper implementation. Ensure that only mergable sets are created.
+        // TODO Do proper implementation.
+        // Ensure that only mergable sets are created.
         // getFillPaint()
         // getFillPaintTransformer()
         // getLabel()

http://dive4elements.wald.intevation.org