Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledDomainMarker.java @ 4686:85876e3a5346
Fixed and improved theme handling for areas.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Mon, 17 Dec 2012 15:32:53 +0100 |
parents | 940cd2ef149f |
children |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledDomainMarker.java Mon Dec 17 15:31:07 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledDomainMarker.java Mon Dec 17 15:32:53 2012 +0100 @@ -16,19 +16,21 @@ private static final long serialVersionUID = -4369417661339512342L; - private final Color fillColor, backgroundColor; + private final Color backgroundColor, backgroundColor2; public StyledDomainMarker(double start, double end, Document theme) { super(start, end); backgroundColor = ThemeUtil.parseColor( - ThemeUtil.getBackgroundColorString(theme)); - fillColor = ThemeUtil.parseColor( - ThemeUtil.getFillColorString(theme)); + ThemeUtil.getAreaBackgroundColorString(theme)); + backgroundColor2 = new Color( + 255 - backgroundColor.getRed(), + 255 - backgroundColor.getGreen(), + 255 - backgroundColor.getBlue()); useSecondColor(false); int alpha = 100 - ThemeUtil.parseInteger( - ThemeUtil.getTransparencyString(theme), 50); + ThemeUtil.getAreaTransparencyString(theme), 50); setAlpha(alpha / 100.0f); } @@ -38,13 +40,13 @@ * @param secondColor */ public void useSecondColor(boolean secondColor) { - if(secondColor) { + if(!secondColor) { if(backgroundColor != null) setPaint(backgroundColor); } else { - if(fillColor != null) - setPaint(fillColor); + if(backgroundColor2 != null) + setPaint(backgroundColor2); } } }