comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledDomainMarker.java @ 3738:34da25796c21

Theme transparency attribute support (#840) flys-artifacts/trunk@5414 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Christian Lins <christian.lins@intevation.de>
date Sun, 09 Sep 2012 21:05:53 +0000
parents 0b9b2a0c4e64
children 940cd2ef149f
comparison
equal deleted inserted replaced
3737:976be312a84c 3738:34da25796c21
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 */
14 public class StyledDomainMarker extends IntervalMarker { 14 public class StyledDomainMarker extends IntervalMarker {
15 15
16 private static final long serialVersionUID = -4369410661339512342L; 16 private static final long serialVersionUID = -4369417661339512342L;
17 17
18 private final Color fillColor, backgroundColor; 18 private final Color fillColor, backgroundColor;
19 19
20 public StyledDomainMarker(double start, double end, Document theme) { 20 public StyledDomainMarker(double start, double end, Document theme) {
21 super(start, end); 21 super(start, end);
24 ThemeUtil.getBackgroundColorString(theme)); 24 ThemeUtil.getBackgroundColorString(theme));
25 fillColor = ThemeUtil.parseColor( 25 fillColor = ThemeUtil.parseColor(
26 ThemeUtil.getFillColorString(theme)); 26 ThemeUtil.getFillColorString(theme));
27 useSecondColor(false); 27 useSecondColor(false);
28 28
29 int alpha = ThemeUtil.parseInteger(ThemeUtil.getTransparencyAlpha(theme), 128); 29 int alpha = 100 - ThemeUtil.parseInteger(ThemeUtil.getTransparency(theme), 50);
30 setAlpha(alpha / 255.0f); 30 setAlpha(alpha / 100.0f);
31 } 31 }
32 32
33 /** 33 /**
34 * To properly differentiate several styled domain markers side by side, 34 * To properly differentiate several styled domain markers side by side,
35 * we can use this switch to toggle between two colors. 35 * we can use this switch to toggle between two colors.

http://dive4elements.wald.intevation.org