comparison flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java @ 2996:55f91fae8a7b

Respect new theme setting when drawing line to curve. flys-artifacts/trunk@4551 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 29 May 2012 08:23:03 +0000
parents 2be59d5b342c
children 5642a83420f2
comparison
equal deleted inserted replaced
2995:7d33aec0b61d 2996:55f91fae8a7b
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_VERTICAL_LINE =
56 "/theme/field[@name='showverticalline']/@default";
57
58 public final static String XPATH_SHOW_HORIZONTAL_LINE =
59 "/theme/field[@name='showhorizontalline']/@default";
54 60
55 public final static String XPATH_SHOW_LINE_LABEL = 61 public final static String XPATH_SHOW_LINE_LABEL =
56 "/theme/field[@name='showlinelabel']/@default"; 62 "/theme/field[@name='showlinelabel']/@default";
57 63
58 public final static String XPATH_LINE_LABEL_FONT = 64 public final static String XPATH_LINE_LABEL_FONT =
265 * @param theme The theme. 271 * @param theme The theme.
266 */ 272 */
267 public static boolean parseShowArea(Document theme) { 273 public static boolean parseShowArea(Document theme) {
268 String show = XMLUtils.xpathString(theme, XPATH_SHOW_AREA, null); 274 String show = XMLUtils.xpathString(theme, XPATH_SHOW_AREA, null);
269 return parseBoolean(show, false); 275 return parseBoolean(show, false);
276 }
277
278 /**
279 * Parses the attribute 'showverticalline', defaults to true.
280 * @param theme The theme.
281 */
282 public static boolean parseShowVerticalLine(Document theme) {
283 String show = XMLUtils.xpathString(theme, XPATH_SHOW_VERTICAL_LINE, null);
284 return parseBoolean(show, true);
285 }
286
287 /**
288 * Parses the attribute 'showhorizontalline', defaults to true.
289 * @param theme The theme.
290 */
291 public static boolean parseShowHorizontalLine(Document theme) {
292 String show = XMLUtils.xpathString(theme, XPATH_SHOW_HORIZONTAL_LINE, null);
293 return parseBoolean(show, true);
270 } 294 }
271 295
272 /** 296 /**
273 * Parses the attribute 'showlines', defaults to true. 297 * Parses the attribute 'showlines', defaults to true.
274 * @param theme The theme. 298 * @param theme The theme.

http://dive4elements.wald.intevation.org