Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/jfree/StyledDomainMarker.java @ 6905:1b35b2ddfc28
Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 22 Aug 2013 23:31:38 +0200 |
parents | af13ceeba52a |
children | 819481cc9195 |
comparison
equal
deleted
inserted
replaced
6904:d710bd3df387 | 6905:1b35b2ddfc28 |
---|---|
9 package org.dive4elements.river.jfree; | 9 package org.dive4elements.river.jfree; |
10 | 10 |
11 import java.awt.Color; | 11 import java.awt.Color; |
12 | 12 |
13 import org.jfree.chart.plot.IntervalMarker; | 13 import org.jfree.chart.plot.IntervalMarker; |
14 import org.w3c.dom.Document; | |
15 | 14 |
16 import org.dive4elements.river.utils.ThemeUtil; | 15 import org.dive4elements.river.themes.ThemeDocument; |
17 | 16 |
18 /** | 17 /** |
19 * Marker that represents a highlighted interval. | 18 * Marker that represents a highlighted interval. |
20 * | 19 * |
21 * @author <a href="mailto:christian.lins@intevation.de">Christian Lins</a> | 20 * @author <a href="mailto:christian.lins@intevation.de">Christian Lins</a> |
24 | 23 |
25 private static final long serialVersionUID = -4369417661339512342L; | 24 private static final long serialVersionUID = -4369417661339512342L; |
26 | 25 |
27 private final Color backgroundColor, backgroundColor2; | 26 private final Color backgroundColor, backgroundColor2; |
28 | 27 |
29 public StyledDomainMarker(double start, double end, Document theme) { | 28 public StyledDomainMarker(double start, double end, ThemeDocument theme) { |
30 super(start, end); | 29 super(start, end); |
31 | 30 |
32 backgroundColor = ThemeUtil.parseColor( | 31 backgroundColor = ThemeDocument.parseColor( |
33 ThemeUtil.getAreaBackgroundColorString(theme)); | 32 theme.getAreaBackgroundColorString()); |
34 backgroundColor2 = new Color( | 33 backgroundColor2 = new Color( |
35 255 - backgroundColor.getRed(), | 34 255 - backgroundColor.getRed(), |
36 255 - backgroundColor.getGreen(), | 35 255 - backgroundColor.getGreen(), |
37 255 - backgroundColor.getBlue()); | 36 255 - backgroundColor.getBlue()); |
38 useSecondColor(false); | 37 useSecondColor(false); |
39 | 38 |
40 int alpha = 100 - ThemeUtil.parseInteger( | 39 int alpha = 100 - ThemeDocument.parseInteger( |
41 ThemeUtil.getAreaTransparencyString(theme), 50); | 40 theme.getAreaTransparencyString(), 50); |
42 setAlpha(alpha / 100.0f); | 41 setAlpha(alpha / 100.0f); |
43 } | 42 } |
44 | 43 |
45 /** | 44 /** |
46 * To properly differentiate several styled domain markers side by side, | 45 * To properly differentiate several styled domain markers side by side, |