diff 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
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java	Tue May 29 07:37:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java	Tue May 29 08:23:03 2012 +0000
@@ -52,6 +52,12 @@
     public final static String XPATH_SHOW_LINE =
         "/theme/field[@name='showlines']/@default";
 
+    public final static String XPATH_SHOW_VERTICAL_LINE =
+        "/theme/field[@name='showverticalline']/@default";
+
+    public final static String XPATH_SHOW_HORIZONTAL_LINE =
+        "/theme/field[@name='showhorizontalline']/@default";
+
     public final static String XPATH_SHOW_LINE_LABEL =
         "/theme/field[@name='showlinelabel']/@default";
 
@@ -270,6 +276,24 @@
     }
 
     /**
+     * Parses the attribute 'showverticalline', defaults to true.
+     * @param theme The theme.
+     */
+    public static boolean parseShowVerticalLine(Document theme) {
+        String show = XMLUtils.xpathString(theme, XPATH_SHOW_VERTICAL_LINE, null);
+        return parseBoolean(show, true);
+    }
+
+    /**
+     * Parses the attribute 'showhorizontalline', defaults to true.
+     * @param theme The theme.
+     */
+    public static boolean parseShowHorizontalLine(Document theme) {
+        String show = XMLUtils.xpathString(theme, XPATH_SHOW_HORIZONTAL_LINE, null);
+        return parseBoolean(show, true);
+    }
+
+    /**
      * Parses the attribute 'showlines', defaults to true.
      * @param theme The theme.
      */

http://dive4elements.wald.intevation.org