Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java @ 2032:5746c74c69cf
Added a transparency setting to area theme style.
flys-artifacts/trunk@3497 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 20 Dec 2011 15:06:41 +0000 |
parents | 796dfe96b6b2 |
children | 4cdd9c4896f6 |
comparison
equal
deleted
inserted
replaced
2031:8e7e56db96a5 | 2032:5746c74c69cf |
---|---|
41 public final static String XPATH_SHOW_POINTS = | 41 public final static String XPATH_SHOW_POINTS = |
42 "/theme/field[@name='showpoints']/@default"; | 42 "/theme/field[@name='showpoints']/@default"; |
43 | 43 |
44 public final static String XPATH_SHOW_LINE = | 44 public final static String XPATH_SHOW_LINE = |
45 "/theme/field[@name='showlines']/@default"; | 45 "/theme/field[@name='showlines']/@default"; |
46 | |
47 public final static String XPATH_TRANSPARENCY = | |
48 "/theme/field[@name='transparent']/@default"; | |
46 | 49 |
47 public final static String XPATH_TEXT_COLOR = | 50 public final static String XPATH_TEXT_COLOR = |
48 "/theme/field[@name='textcolor']/@default"; | 51 "/theme/field[@name='textcolor']/@default"; |
49 | 52 |
50 public final static String XPATH_TEXT_SIZE = | 53 public final static String XPATH_TEXT_SIZE = |
316 | 319 |
317 public static String getSymbol(Document theme) { | 320 public static String getSymbol(Document theme) { |
318 return XMLUtils.xpathString(theme, XPATH_SYMBOL, null); | 321 return XMLUtils.xpathString(theme, XPATH_SYMBOL, null); |
319 } | 322 } |
320 | 323 |
324 public static String getTransparencyString(Document theme) { | |
325 return XMLUtils.xpathString(theme, XPATH_TRANSPARENCY, null); | |
326 } | |
327 | |
321 | 328 |
322 /** | 329 /** |
323 * Gets color from color field. | 330 * Gets color from color field. |
324 * @param theme the theme document. | 331 * @param theme the theme document. |
325 * @return color. | 332 * @return color. |
330 | 337 |
331 public static boolean parseShowBorder(Document theme) { | 338 public static boolean parseShowBorder(Document theme) { |
332 return parseBoolean(getShowBorderString(theme), false); | 339 return parseBoolean(getShowBorderString(theme), false); |
333 } | 340 } |
334 | 341 |
342 public static boolean parseTransparency(Document theme) { | |
343 return parseBoolean(getTransparencyString(theme), false); | |
344 } | |
335 | 345 |
336 /** | 346 /** |
337 * Gets color from color field. | 347 * Gets color from color field. |
338 * @param theme the theme document. | 348 * @param theme the theme document. |
339 * @return color. | 349 * @return color. |