Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java @ 1878:84cf67a2a19e
Added support for fillcolors of polygons in floodmaps.
flys-artifacts/trunk@3237 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 11 Nov 2011 11:28:15 +0000 |
parents | dd467951335c |
children | 796dfe96b6b2 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java Fri Nov 11 11:00:31 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java Fri Nov 11 11:28:15 2011 +0000 @@ -239,7 +239,7 @@ * @param theme The theme. */ public static Color parseTextBackground(Document theme) { - String color = XMLUtils.xpathString(theme, XPATH_TEXT_BACKGROUND, null); + String color = getBackgroundColorString(theme); if (color == null || color.length() == 0) { return Color.WHITE; } @@ -296,6 +296,11 @@ } + public static String getBackgroundColorString(Document theme) { + return XMLUtils.xpathString(theme, XPATH_TEXT_BACKGROUND, null); + } + + public static String getTextColorString(Document theme) { return XMLUtils.xpathString(theme, XPATH_TEXT_COLOR, null); } @@ -318,8 +323,8 @@ public static String createMapserverStyle(Document theme) { String symbol = getSymbol(theme); + String backcolor = getBackgroundColorString(theme); String linecolor = getLineColorString(theme); - linecolor = linecolor.replace(",", ""); int linewidth = parseLineWidth(theme); @@ -328,7 +333,12 @@ Clazz c = new Clazz(" "); Style s = new Style(); - s.setOutlineColor(linecolor); + s.setOutlineColor(linecolor.replace(",", "")); + + if (backcolor != null && backcolor.length() > 0) { + s.setColor(backcolor.replace(",", "")); + } + s.setSize(linewidth); s.setSymbol(symbol); c.addItem(s);