Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.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 | be5ce2882708 |
children | 0071702ba03f |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java Thu Jan 18 20:10:59 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java Thu Jan 18 20:12:01 2018 +0100 @@ -183,10 +183,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); double xPos = 0d, yPos = 0d; @@ -204,7 +206,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); @@ -220,7 +223,8 @@ xPos = getRightX(); } else if (placeh.equals("center")) { - xPos = ((Long)getXBounds(0).getUpper() + (Long)getXBounds(0).getLower())/2d; + xPos = ((Long)getXBounds(0).getUpper() + + (Long)getXBounds(0).getLower())/2d; } else { log.debug("Unknown place-h value: " + placeh); @@ -266,7 +270,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); } /** @@ -528,8 +533,10 @@ long max = total.getUpper().longValue(); long diff = max > min ? max - min : min - max; - long newMin = Math.round(min + user.getLower().doubleValue() * diff); - long newMax = Math.round(min + user.getUpper().doubleValue() * diff); + long newMin = Math.round( + min + user.getLower().doubleValue() * diff); + long newMax = Math.round( + min + user.getUpper().doubleValue() * diff); TimeBounds newBounds = new TimeBounds(newMin, newMax); @@ -585,7 +592,8 @@ /** - * Adjusts the (look of) axes of a plot. This method sets the <i>labelFont</i> of the + * Adjusts the (look of) axes of a plot. + * This method sets the <i>labelFont</i> of the * X axis. * * (Duplicate in XYChartGenerator). @@ -610,7 +618,8 @@ } - protected Date decodeXAxisValue(JSONArray array) throws JSONException, ParseException { + protected Date decodeXAxisValue(JSONArray array) + throws JSONException, ParseException { try { double x = array.getDouble(0); long l = (new Double(x)).longValue(); @@ -639,7 +648,8 @@ // Add text annotations for single points. List<XYTextAnnotation> xy = new ArrayList<XYTextAnnotation>(); - HashMap<FixedMillisecond, String> names = new HashMap<FixedMillisecond, String>(); + HashMap<FixedMillisecond, String> names = + new HashMap<FixedMillisecond, String>(); try { JSONArray points = new JSONArray((String) o); @@ -685,7 +695,8 @@ 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); addAxisDataset(tsc, axisIndex, visible); @@ -768,7 +779,8 @@ legendItem.getLinePaint() ); interLegend.setSeriesKey(series.getKey()); - log.debug("applySeriesAttributes: draw unfilled legend item"); + log.debug("applySeriesAttributes: " + + "draw unfilled legend item"); plot.getLegendItems().add(interLegend); } }