comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ChartSettings.java @ 3153:46b9391b122a

Parse legend aggregation threshold value for settings. flys-artifacts/trunk@4765 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Sat, 23 Jun 2012 14:31:02 +0000
parents 76eeb3b4358e
children b0ba96bbf01d
comparison
equal deleted inserted replaced
3152:368d1837ce5d 3153:46b9391b122a
248 protected static void parseLegend(ChartSettings target, Node legend) { 248 protected static void parseLegend(ChartSettings target, Node legend) {
249 LegendSection section = new LegendSection(); 249 LegendSection section = new LegendSection();
250 250
251 String vis = XMLUtils.xpathString(legend, "legend/visibility", null); 251 String vis = XMLUtils.xpathString(legend, "legend/visibility", null);
252 String fSize = XMLUtils.xpathString(legend, "legend/font-size", null); 252 String fSize = XMLUtils.xpathString(legend, "legend/font-size", null);
253 String lthre = XMLUtils.xpathString(legend, "legend/aggregation-threshold", null);
253 254
254 if (logger.isDebugEnabled()) { 255 if (logger.isDebugEnabled()) {
255 logger.debug("Found legend visibility: '" + vis + "'"); 256 logger.debug("Found legend visibility: '" + vis + "'");
256 logger.debug("Found legend font size : '" + fSize + "'"); 257 logger.debug("Found legend font size : '" + fSize + "'");
258 logger.debug("Found legend aggregation threshold : '" + lthre + "'");
257 } 259 }
258 260
259 section.setVisibility(Boolean.valueOf(vis)); 261 section.setVisibility(Boolean.valueOf(vis));
260 section.setFontSize(Integer.valueOf(fSize.length() > 0 ? fSize : "-1")); 262 section.setFontSize(Integer.valueOf(fSize.length() > 0 ? fSize : "-1"));
263 section.setAggregationThreshold(Integer.valueOf(lthre.length() >0 ? lthre : "-1"));
261 264
262 target.setLegendSection(section); 265 target.setLegendSection(section);
263 } 266 }
264 267
265 268

http://dive4elements.wald.intevation.org