Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java @ 2648:8aaa7f4ce06a
Let theme define whether or not to display a (yet static) label for line).
flys-artifacts/trunk@4306 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 26 Apr 2012 09:51:13 +0000 |
parents | 27cc95e65f18 |
children | f1dcd5f94ffa |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java Thu Apr 26 08:11:48 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java Thu Apr 26 09:51:13 2012 +0000 @@ -52,6 +52,9 @@ public final static String XPATH_SHOW_LINE = "/theme/field[@name='showlines']/@default"; + public final static String XPATH_SHOW_LINE_LABEL = + "/theme/field[@name='showlinelabel']/@default"; + public final static String XPATH_TRANSPARENCY = "/theme/field[@name='transparent']/@default"; @@ -218,6 +221,14 @@ return parseBoolean(show, true); } + /** + * Parses the attribute 'showlinelabel', defaults to true. + * @param theme The theme. + */ + public static boolean parseShowLineLabel(Document theme) { + String show = XMLUtils.xpathString(theme, XPATH_SHOW_LINE_LABEL, null); + return parseBoolean(show, true); + } /** * Parses text color.