comparison 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
comparison
equal deleted inserted replaced
2647:4b7a28e81643 2648:8aaa7f4ce06a
49 public final static String XPATH_SHOW_POINTS = 49 public final static String XPATH_SHOW_POINTS =
50 "/theme/field[@name='showpoints']/@default"; 50 "/theme/field[@name='showpoints']/@default";
51 51
52 public final static String XPATH_SHOW_LINE = 52 public final static String XPATH_SHOW_LINE =
53 "/theme/field[@name='showlines']/@default"; 53 "/theme/field[@name='showlines']/@default";
54
55 public final static String XPATH_SHOW_LINE_LABEL =
56 "/theme/field[@name='showlinelabel']/@default";
54 57
55 public final static String XPATH_TRANSPARENCY = 58 public final static String XPATH_TRANSPARENCY =
56 "/theme/field[@name='transparent']/@default"; 59 "/theme/field[@name='transparent']/@default";
57 60
58 public final static String XPATH_TEXT_COLOR = 61 public final static String XPATH_TEXT_COLOR =
216 public static boolean parseShowLine(Document theme) { 219 public static boolean parseShowLine(Document theme) {
217 String show = XMLUtils.xpathString(theme, XPATH_SHOW_LINE, null); 220 String show = XMLUtils.xpathString(theme, XPATH_SHOW_LINE, null);
218 return parseBoolean(show, true); 221 return parseBoolean(show, true);
219 } 222 }
220 223
224 /**
225 * Parses the attribute 'showlinelabel', defaults to true.
226 * @param theme The theme.
227 */
228 public static boolean parseShowLineLabel(Document theme) {
229 String show = XMLUtils.xpathString(theme, XPATH_SHOW_LINE_LABEL, null);
230 return parseBoolean(show, true);
231 }
221 232
222 /** 233 /**
223 * Parses text color. 234 * Parses text color.
224 * @param theme The theme. 235 * @param theme The theme.
225 */ 236 */

http://dive4elements.wald.intevation.org