Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.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 | 582aaac447ad |
children | ffd4e2b0381c 0a5239a1e46e |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.java Thu Jan 18 20:10:59 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.java Thu Jan 18 20:12:01 2018 +0100 @@ -152,13 +152,17 @@ ChartRenderingInfo info = new ChartRenderingInfo(); - chart.draw(graphics, new Rectangle2D.Double(0.0D, 0.0D,size[0],size[1]), info); + chart.draw( + graphics, + new Rectangle2D.Double(0.0D, 0.0D,size[0],size[1]), + info); try { graphics.stream(new OutputStreamWriter(out, encoding)); } catch (SVGGraphics2DIOException svge) { - log.error("Error while writing svg export to output stream.", svge); + log.error( + "Error while writing svg export to output stream.", svge); } catch (UnsupportedEncodingException uee) { log.error("Unsupported encoding: " + encoding, uee); @@ -220,7 +224,8 @@ float spaceX = width - marginLeft - marginRight; if (size[0] > spaceX) { - log.warn("Width of the chart is too big for pdf -> resize it now."); + log.warn( + "Width of the chart is too big for pdf -> resize it now."); double ratio = ((double)spaceX) / size[0]; size[0] *= ratio; size[1] *= ratio; @@ -229,7 +234,8 @@ float spaceY = height - marginTop - marginBottom; if (size[1] > spaceY) { - log.warn("Height of the chart is too big for pdf -> resize it now."); + log.warn( + "Height of the chart is too big for pdf -> resize it now."); double ratio = ((double)spaceY) / size[1]; size[0] *= ratio; size[1] *= ratio; @@ -247,7 +253,8 @@ try { PdfWriter writer = PdfWriter.getInstance(document, out); - document.addSubject(chart.getTitle() != null ? chart.getTitle().getText() : ""); + document.addSubject( + chart.getTitle() != null ? chart.getTitle().getText() : ""); document.addCreationDate(); document.open(); @@ -422,7 +429,7 @@ /** - * This method returns the anchor of the chart so that the chart is centered + * Returns the anchor of the chart so that the chart is centered * according to the given parameters. * * @param mLeft Left margin