comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledDomainMarker.java @ 3464:0b9b2a0c4e64

Point labels can have a background color now. flys-artifacts/trunk@5132 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Christian Lins <christian.lins@intevation.de>
date Thu, 26 Jul 2012 10:02:07 +0000
parents 9422b559b2d5
children 34da25796c21
comparison
equal deleted inserted replaced
3463:7198f04e4221 3464:0b9b2a0c4e64
1 package de.intevation.flys.jfree; 1 package de.intevation.flys.jfree;
2
3 import de.intevation.flys.utils.ThemeUtil;
4 2
5 import java.awt.Color; 3 import java.awt.Color;
6 4
7 import org.jfree.chart.plot.IntervalMarker; 5 import org.jfree.chart.plot.IntervalMarker;
8 import org.w3c.dom.Document; 6 import org.w3c.dom.Document;
7
8 import de.intevation.flys.utils.ThemeUtil;
9 9
10 /** 10 /**
11 * Marker that represents a highlighted interval. 11 * Marker that represents a highlighted interval.
12 * @author <a href="mailto:christian.lins@intevation.de">Christian Lins</a> 12 * @author <a href="mailto:christian.lins@intevation.de">Christian Lins</a>
13 */ 13 */
35 * we can use this switch to toggle between two colors. 35 * we can use this switch to toggle between two colors.
36 * @param secondColor 36 * @param secondColor
37 */ 37 */
38 public void useSecondColor(boolean secondColor) { 38 public void useSecondColor(boolean secondColor) {
39 if(secondColor) { 39 if(secondColor) {
40 setPaint(backgroundColor); 40 if(backgroundColor != null)
41 setPaint(backgroundColor);
41 } 42 }
42 else { 43 else {
43 setPaint(fillColor); 44 if(fillColor != null)
45 setPaint(fillColor);
44 } 46 }
45 } 47 }
46 } 48 }
47 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 49 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org