comparison flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java @ 2674:2be59d5b342c

Added and respect theme prop whether or not to display (not yet calculated) middle height. flys-artifacts/trunk@4368 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 09 May 2012 20:05:46 +0000
parents 6da7e064ae90
children 55f91fae8a7b
comparison
equal deleted inserted replaced
2673:0143b44631cc 2674:2be59d5b342c
82 public final static String XPATH_TRANSPARENCY = 82 public final static String XPATH_TRANSPARENCY =
83 "/theme/field[@name='transparent']/@default"; 83 "/theme/field[@name='transparent']/@default";
84 84
85 public final static String XPATH_SHOW_AREA = 85 public final static String XPATH_SHOW_AREA =
86 "/theme/field[@name='showarea']/@default"; 86 "/theme/field[@name='showarea']/@default";
87
88 public final static String XPATH_SHOW_MIDDLE_HEIGHT =
89 "/theme/field[@name='showmiddleheight']/@default";
87 90
88 public final static String XPATH_TEXT_COLOR = 91 public final static String XPATH_TEXT_COLOR =
89 "/theme/field[@name='textcolor']/@default"; 92 "/theme/field[@name='textcolor']/@default";
90 93
91 public final static String XPATH_TEXT_SIZE = 94 public final static String XPATH_TEXT_SIZE =
243 * Parses the attribute 'showpoints', defaults to false. 246 * Parses the attribute 'showpoints', defaults to false.
244 * @param theme The theme. 247 * @param theme The theme.
245 */ 248 */
246 public static boolean parseShowPoints(Document theme) { 249 public static boolean parseShowPoints(Document theme) {
247 String show = XMLUtils.xpathString(theme, XPATH_SHOW_POINTS, null); 250 String show = XMLUtils.xpathString(theme, XPATH_SHOW_POINTS, null);
251 return parseBoolean(show, false);
252 }
253
254 /**
255 * Parses the attribute 'showmiddleheight', defaults to false.
256 * @param theme The theme.
257 */
258 public static boolean parseShowMiddleHeight(Document theme) {
259 String show = XMLUtils.xpathString(theme, XPATH_SHOW_MIDDLE_HEIGHT, null);
248 return parseBoolean(show, false); 260 return parseBoolean(show, false);
249 } 261 }
250 262
251 /** 263 /**
252 * Parses the attribute 'showarea', defaults to false. 264 * Parses the attribute 'showarea', defaults to false.

http://dive4elements.wald.intevation.org