comparison 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
comparison
equal deleted inserted replaced
7544:34faa9c55b4b 7545:4dbbdf0c8b2c
109 109
110 public final static String BANDWIDTH = "bandwidth"; 110 public final static String BANDWIDTH = "bandwidth";
111 111
112 public final static String SHOWEXTRAMARK = "showextramark"; 112 public final static String SHOWEXTRAMARK = "showextramark";
113 113
114 114 public final static String USE_FILL_PAINT = "usefillpaint";
115 private Document document;
116 115
117 private Map<String, String> values; 116 private Map<String, String> values;
118 117
119 public ThemeDocument() { 118 public ThemeDocument() {
120 } 119 }
121 120
122 public ThemeDocument(Document document) { 121 public ThemeDocument(Document document) {
123 this.document = document;
124 values = extractValues(document); 122 values = extractValues(document);
125 } 123 }
126 124
127 public Document getDocument() { 125 public ThemeDocument(ThemeDocument other) {
128 return document; 126 values = new HashMap<String, String>(other.values);
129 } 127 }
130 128
131 private String getValue(String key) { 129
130 public String getValue(String key) {
132 return values.get(key); 131 return values.get(key);
132 }
133
134 public void setValue(String key, String value) {
135 values.put(key, value);
133 } 136 }
134 137
135 private static Map<String, String> extractValues(Document document) { 138 private static Map<String, String> extractValues(Document document) {
136 Map<String, String> values = new HashMap<String, String>(); 139 Map<String, String> values = new HashMap<String, String>();
137 if (document == null) { 140 if (document == null) {
429 } 432 }
430 433
431 public boolean parseShowExtraMark() { 434 public boolean parseShowExtraMark() {
432 String show = getValue(SHOWEXTRAMARK); 435 String show = getValue(SHOWEXTRAMARK);
433 return parseBoolean(show, false); 436 return parseBoolean(show, false);
437 }
438
439 public Boolean parseUseFillPaint() {
440 String use = getValue(USE_FILL_PAINT);
441 return use != null
442 ? parseBoolean(use, false)
443 : null;
434 } 444 }
435 445
436 public int parseTextSize() { 446 public int parseTextSize() {
437 String size = getValue(LABEL_FONT_SIZE); 447 String size = getValue(LABEL_FONT_SIZE);
438 if (size == null) { 448 if (size == null) {

http://dive4elements.wald.intevation.org