Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java Sat Jun 23 18:15:17 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java Sun Jun 24 06:51:05 2012 +0000 @@ -4,6 +4,7 @@ import java.awt.Color; import java.awt.geom.Ellipse2D; +import org.apache.log4j.Logger; import org.w3c.dom.Document; @@ -18,10 +19,13 @@ */ public class XYStyle implements Style { + private static Logger logger = Logger.getLogger(XYStyle.class); + protected Document theme; protected XYLineAndShapeRenderer renderer; + public XYStyle(Document theme) { this.theme = theme; this.renderer = null; @@ -56,7 +60,13 @@ /** Set line color to renderer. */ protected void applyLineColor(XYLineAndShapeRenderer r, int idx) { Color c = ThemeUtil.parseLineColorField(theme); - r.setSeriesPaint(idx, c); + if(c != null) { + logger.debug("applyLineColor " + c.toString()); + r.setSeriesPaint(idx, c); + } + else { + logger.warn("applyLineColor: color is null - malformed linecolor field?"); + } }