comparison artifacts/src/main/java/org/dive4elements/river/exports/ChartSettings.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents 6dfc3a1fc70d
children 3f619f8dfa8e 0a5239a1e46e
comparison
equal deleted inserted replaced
8855:d7c005e12af0 8856:5e38e2924c07
227 log.debug("Found axis sug. label:'" + sugLabel + "'"); 227 log.debug("Found axis sug. label:'" + sugLabel + "'");
228 } 228 }
229 229
230 section.setIdentifier(id); 230 section.setIdentifier(id);
231 section.setLabel(label); 231 section.setLabel(label);
232 section.setFontSize(Integer.parseInt(fSize.length() > 0 ? fSize : "-1")); 232 section.setFontSize(
233 Integer.parseInt(fSize.length() > 0 ? fSize : "-1"));
233 section.setFixed(Boolean.valueOf(fixation)); 234 section.setFixed(Boolean.valueOf(fixation));
234 if (upTime != null && !upTime.isEmpty() && lowTime != null && !lowTime.isEmpty()) { 235 if (upTime != null
236 && !upTime.isEmpty()
237 && lowTime != null
238 && !lowTime.isEmpty()
239 ) {
235 section.setLowerTimeRange(Long.parseLong(lowTime)); 240 section.setLowerTimeRange(Long.parseLong(lowTime));
236 section.setUpperTimeRange(Long.parseLong(upTime)); 241 section.setUpperTimeRange(Long.parseLong(upTime));
237 } else { 242 } else {
238 section.setLowerRange(Double.parseDouble(low.length() > 0 ? low : "0")); 243 section.setLowerRange(
239 section.setUpperRange(Double.parseDouble(up.length() > 0 ? up : "0")); 244 Double.parseDouble(low.length() > 0 ? low : "0"));
245 section.setUpperRange(
246 Double.parseDouble(up.length() > 0 ? up : "0"));
240 } 247 }
241 section.setSuggestedLabel(sugLabel); 248 section.setSuggestedLabel(sugLabel);
242 249
243 target.addAxisSection(section); 250 target.addAxisSection(section);
244 } 251 }
281 protected static void parseLegend(ChartSettings target, Node legend) { 288 protected static void parseLegend(ChartSettings target, Node legend) {
282 LegendSection section = new LegendSection(); 289 LegendSection section = new LegendSection();
283 290
284 String vis = XMLUtils.xpathString(legend, "legend/visibility", null); 291 String vis = XMLUtils.xpathString(legend, "legend/visibility", null);
285 String fSize = XMLUtils.xpathString(legend, "legend/font-size", null); 292 String fSize = XMLUtils.xpathString(legend, "legend/font-size", null);
286 String lthre = XMLUtils.xpathString(legend, "legend/aggregation-threshold", null); 293 String lthre = XMLUtils.xpathString(
294 legend, "legend/aggregation-threshold", null);
287 295
288 if (log.isDebugEnabled()) { 296 if (log.isDebugEnabled()) {
289 log.debug("Found legend visibility: '" + vis + "'"); 297 log.debug("Found legend visibility: '" + vis + "'");
290 log.debug("Found legend font size : '" + fSize + "'"); 298 log.debug("Found legend font size : '" + fSize + "'");
291 log.debug("Found legend aggregation threshold : '" + lthre + "'"); 299 log.debug("Found legend aggregation threshold : '" + lthre + "'");
292 } 300 }
293 301
294 section.setVisibility(Boolean.valueOf(vis)); 302 section.setVisibility(Boolean.valueOf(vis));
295 section.setFontSize(Integer.valueOf(fSize.length() > 0 ? fSize : "-1")); 303 section.setFontSize(
296 section.setAggregationThreshold(Integer.valueOf(lthre.length() >0 ? lthre : "-1")); 304 Integer.valueOf(fSize.length() > 0 ? fSize : "-1"));
305 section.setAggregationThreshold(
306 Integer.valueOf(lthre.length() >0 ? lthre : "-1"));
297 307
298 target.setLegendSection(section); 308 target.setLegendSection(section);
299 } 309 }
300 310
301 311

http://dive4elements.wald.intevation.org