comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java @ 3155:74c974b10c75

Output code to trackdown the linecolor problem flys-artifacts/trunk@4767 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Christian Lins <christian.lins@intevation.de>
date Sun, 24 Jun 2012 06:51:05 +0000
parents 5a0aef74c316
children 698d09930329
comparison
equal deleted inserted replaced
3154:a08538e21b55 3155:74c974b10c75
2 2
3 import java.awt.BasicStroke; 3 import java.awt.BasicStroke;
4 import java.awt.Color; 4 import java.awt.Color;
5 import java.awt.geom.Ellipse2D; 5 import java.awt.geom.Ellipse2D;
6 6
7 import org.apache.log4j.Logger;
7 8
8 import org.w3c.dom.Document; 9 import org.w3c.dom.Document;
9 10
10 import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; 11 import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
11 12
16 * Utility to apply theme-settings to a renderer. 17 * Utility to apply theme-settings to a renderer.
17 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 18 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
18 */ 19 */
19 public class XYStyle implements Style { 20 public class XYStyle implements Style {
20 21
22 private static Logger logger = Logger.getLogger(XYStyle.class);
23
21 protected Document theme; 24 protected Document theme;
22 25
23 protected XYLineAndShapeRenderer renderer; 26 protected XYLineAndShapeRenderer renderer;
27
24 28
25 public XYStyle(Document theme) { 29 public XYStyle(Document theme) {
26 this.theme = theme; 30 this.theme = theme;
27 this.renderer = null; 31 this.renderer = null;
28 } 32 }
54 58
55 59
56 /** Set line color to renderer. */ 60 /** Set line color to renderer. */
57 protected void applyLineColor(XYLineAndShapeRenderer r, int idx) { 61 protected void applyLineColor(XYLineAndShapeRenderer r, int idx) {
58 Color c = ThemeUtil.parseLineColorField(theme); 62 Color c = ThemeUtil.parseLineColorField(theme);
59 r.setSeriesPaint(idx, c); 63 if(c != null) {
64 logger.debug("applyLineColor " + c.toString());
65 r.setSeriesPaint(idx, c);
66 }
67 else {
68 logger.warn("applyLineColor: color is null - malformed linecolor field?");
69 }
60 } 70 }
61 71
62 72
63 /** Tells the renderer whether or not to add a label to a line. */ 73 /** Tells the renderer whether or not to add a label to a line. */
64 protected void applyShowLineLabel(XYLineAndShapeRenderer r, int idx) { 74 protected void applyShowLineLabel(XYLineAndShapeRenderer r, int idx) {

http://dive4elements.wald.intevation.org