Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java @ 9123:1cc7653ca84f
Cleanup of ChartGenerator and ChartGenerator2 code. Put some of the copy/pasted code into a common abstraction.
author | gernotbelger |
---|---|
date | Tue, 05 Jun 2018 19:21:16 +0200 |
parents | 5e38e2924c07 |
children |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java Tue Jun 05 19:10:38 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java Tue Jun 05 19:21:16 2018 +0200 @@ -69,6 +69,7 @@ this.generator = generator; } + @Override public void setup(Object config) { log.debug("ChartInfoGenerator.setup"); } @@ -81,6 +82,7 @@ * @param out * @param context */ + @Override public void init( String outName, Document request, @@ -98,21 +100,21 @@ * * @param master The master artifact */ + @Override public void setMasterArtifact(Artifact master) { generator.setMasterArtifact(master); } - /** * Dispatches the operation to the instantiated generator. * * @param collection The collection. */ + @Override public void setCollection(D4EArtifactCollection collection) { generator.setCollection(collection); } - - + /** * Dispatches the operation to the instantiated generator. */ @@ -137,7 +139,7 @@ { log.debug("ChartInfoGenerator.generate"); - JFreeChart chart = generator.generateChart(); + JFreeChart chart = generator.generateChart(generator.getContext()); int[] size = generator.getSize(); if (size == null) {