Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java @ 2663:33d61e2a49a2
Added and respect two new properties of waterlevels in cross-sections.
flys-artifacts/trunk@4339 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 03 May 2012 08:56:19 +0000 |
parents | bdc86e61428c |
children | 6da7e064ae90 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java Thu May 03 07:48:12 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java Thu May 03 08:56:19 2012 +0000 @@ -73,6 +73,12 @@ public final static String XPATH_LINE_LABEL_SHOWBG = "/theme/field[@name='linelabelshowbg']/@default"; + public final static String XPATH_SHOW_WIDTH = + "/theme/field[@name='showwidth']/@default"; + + public final static String XPATH_SHOW_LEVEL = + "/theme/field[@name='showwidth']/@default"; + public final static String XPATH_TRANSPARENCY = "/theme/field[@name='transparent']/@default"; @@ -343,6 +349,16 @@ } + public static boolean parseShowWidth(Document theme) { + String show = XMLUtils.xpathString(theme, XPATH_SHOW_WIDTH, null); + return parseBoolean(show, false); + } + + public static boolean parseShowLevel(Document theme) { + String show = XMLUtils.xpathString(theme, XPATH_SHOW_LEVEL, null); + return parseBoolean(show, false); + } + /** * Parses the textorientation, defaults to 'vertical'. * @param theme The theme.