comparison artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java @ 7087:ada424214b02 generator-refactoring

Use Object instead of DOM Element as argument for setup of out generators. First step to remove dependency to XML DOM when using configuration.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 22 Sep 2013 21:05:12 +0200
parents 42e243c640a0
children 41567bf1e131
comparison
equal deleted inserted replaced
7086:42e243c640a0 7087:ada424214b02
102 xBounds = new HashMap<Integer, Bounds>(); 102 xBounds = new HashMap<Integer, Bounds>();
103 yBounds = new HashMap<Integer, Bounds>(); 103 yBounds = new HashMap<Integer, Bounds>();
104 } 104 }
105 105
106 @Override 106 @Override
107 public void setup(Element config) { 107 public void setup(Object config) {
108 Element cfg = (Element)config;
108 logger.debug("DiagramGenerator.setup"); 109 logger.debug("DiagramGenerator.setup");
109 // TODO: XML DOM is not thread safe! We have to re-factor this. 110 // TODO: XML DOM is not thread safe! We have to re-factor this.
110 synchronized (config.getOwnerDocument()) { 111 synchronized (cfg.getOwnerDocument()) {
111 diagramAttributes = new DiagramAttributes(config); 112 diagramAttributes = new DiagramAttributes(cfg);
112 } 113 }
113 } 114 }
114 115
115 /** 116 /**
116 * Generate the chart anew (including localized axis and all). 117 * Generate the chart anew (including localized axis and all).

http://dive4elements.wald.intevation.org