comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java @ 2057:49b7c2b1a6a7

Make use of the export size for charts specified in ChartSettings if a chart export is requested. flys-artifacts/trunk@3549 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 27 Dec 2011 11:19:44 +0000
parents 0318fa6f0844
children e8fc770d2f8c
comparison
equal deleted inserted replaced
2056:76eeb3b4358e 2057:49b7c2b1a6a7
231 231
232 /** 232 /**
233 * Returns the size of a chart export as array which has been specified by 233 * Returns the size of a chart export as array which has been specified by
234 * the incoming request document. 234 * the incoming request document.
235 * 235 *
236 * @return the size of a chart as [width, height] or the result of 236 * @return the size of a chart as [width, height] or null if no width or
237 * getDefaultSize() if no width or height are given in the request document. 237 * height are given in the request document.
238 */ 238 */
239 protected int[] getSize() { 239 protected int[] getSize() {
240 int[] size = new int[2]; 240 int[] size = new int[2];
241 241
242 Element sizeEl = (Element)XMLUtils.xpath( 242 Element sizeEl = (Element)XMLUtils.xpath(
260 logger.warn("Wrong values for chart width/height."); 260 logger.warn("Wrong values for chart width/height.");
261 } 261 }
262 } 262 }
263 } 263 }
264 264
265 return size[0] > 0 && size[1] > 0 ? size : getDefaultSize(); 265 return size[0] > 0 && size[1] > 0 ? size : null;
266 } 266 }
267 267
268 268
269 protected String getFormat() { 269 protected String getFormat() {
270 String format = (String) XMLUtils.xpath( 270 String format = (String) XMLUtils.xpath(

http://dive4elements.wald.intevation.org