changeset 7051:c4bacc5ddd9b generator-refactoring

Parse config when setup a new diagram.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 19 Sep 2013 11:39:00 +0200
parents 25a5ce8abfef
children 7056fa3b1f75
files artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Thu Sep 19 11:29:35 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Thu Sep 19 11:39:00 2013 +0200
@@ -51,6 +51,8 @@
 import org.dive4elements.river.jfree.StyledXYSeries;
 import org.dive4elements.river.themes.ThemeDocument;
 
+import org.w3c.dom.Element;
+
 /* TODO remove after hackish testing */
 import org.dive4elements.river.exports.process.Processor;
 import org.dive4elements.river.exports.process.BedDiffHeightYearProcessor;
@@ -101,6 +103,8 @@
     /** Whether or not the plot is inverted (left-right). */
     private boolean inverted;
 
+    protected DiagramAttributes diagramAttributes;
+
     public DiagramGenerator() {
         super();
 
@@ -108,6 +112,12 @@
         yBounds  = new HashMap<Integer, Bounds>();
     }
 
+    @Override
+    public void setup(Element config) {
+        logger.debug("DiagramGenerator.setup");
+        diagramAttributes = new DiagramAttributes(config);
+    }
+
 
     /**
      * Generate the chart anew (including localized axis and all).

http://dive4elements.wald.intevation.org