diff artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java @ 7545:4dbbdf0c8b2c

More on flys/issue1585: Do not fill circle for interpolated W/Q points.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 08 Nov 2013 16:15:38 +0100
parents 988dde49ae65
children 8ebca831486b
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java	Fri Nov 08 12:27:08 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java	Fri Nov 08 16:15:38 2013 +0100
@@ -111,8 +111,7 @@
 
     public final static String SHOWEXTRAMARK = "showextramark";
 
-
-    private Document document;
+    public final static String USE_FILL_PAINT = "usefillpaint";
 
     private Map<String, String> values;
 
@@ -120,18 +119,22 @@
     }
 
     public ThemeDocument(Document document) {
-        this.document = document;
         values = extractValues(document);
     }
 
-    public Document getDocument() {
-        return document;
+    public ThemeDocument(ThemeDocument other) {
+        values = new HashMap<String, String>(other.values);
     }
 
-    private String getValue(String key) {
+
+    public String getValue(String key) {
         return values.get(key);
     }
 
+    public void setValue(String key, String value) {
+        values.put(key, value);
+    }
+
     private static Map<String, String> extractValues(Document document) {
         Map<String, String> values = new HashMap<String, String>();
         if (document == null) {
@@ -433,6 +436,13 @@
         return parseBoolean(show, false);
     }
 
+    public Boolean parseUseFillPaint() {
+        String use = getValue(USE_FILL_PAINT);
+        return use != null
+            ? parseBoolean(use, false)
+            : null;
+    }
+
     public int parseTextSize() {
         String size = getValue(LABEL_FONT_SIZE);
         if (size == null) {

http://dive4elements.wald.intevation.org