Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/jfree/XYStyle.java @ 7156:2d690611d110
Add NPE guard to XYStyle.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 25 Sep 2013 18:04:49 +0200 |
parents | 1b35b2ddfc28 |
children | d20a26e96ef1 |
comparison
equal
deleted
inserted
replaced
7155:34b5e7ef2a36 | 7156:2d690611d110 |
---|---|
39 /** | 39 /** |
40 * Applies line color, size and type attributes to renderer, also | 40 * Applies line color, size and type attributes to renderer, also |
41 * whether to draw lines and/or points. | 41 * whether to draw lines and/or points. |
42 */ | 42 */ |
43 @Override | 43 @Override |
44 public XYLineAndShapeRenderer applyTheme(XYLineAndShapeRenderer r, int idx){ | 44 public XYLineAndShapeRenderer applyTheme(XYLineAndShapeRenderer r, int idx) { |
45 if (theme == null) { | |
46 // Hurray we already applied nothing :) | |
47 return r; | |
48 } | |
45 this.renderer = r; | 49 this.renderer = r; |
46 applyLineColor(r, idx); | 50 applyLineColor(r, idx); |
47 applyLineSize(r, idx); | 51 applyLineSize(r, idx); |
48 applyLineType(r, idx); | 52 applyLineType(r, idx); |
49 applyShowLine(r, idx); | 53 applyShowLine(r, idx); |