comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ChartSettings.java @ 3615:f84854eba0b3

Preparations for logo inclusion in charts. flys-artifacts/trunk@5278 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 28 Aug 2012 12:47:11 +0000
parents dd6e25980c91
children 05deafdcbf39
comparison
equal deleted inserted replaced
3614:68beaa827751 3615:f84854eba0b3
222 222
223 target.addAxisSection(section); 223 target.addAxisSection(section);
224 } 224 }
225 225
226 226
227 /**
228 * From document chart create ChartSection and populate it with attributes.
229 * Give this object to target as chartsection.
230 */
227 protected static void parseChart(ChartSettings target, Node chart) { 231 protected static void parseChart(ChartSettings target, Node chart) {
228 ChartSection chartSection = new ChartSection(); 232 ChartSection chartSection = new ChartSection();
229 233
230 String title = XMLUtils.xpathString(chart, "chart/title", null); 234 String title = XMLUtils.xpathString(chart, "chart/title", null);
231 String sub = XMLUtils.xpathString(chart, "chart/subtitle", null); 235 String sub = XMLUtils.xpathString(chart, "chart/subtitle", null);
232 String grid = XMLUtils.xpathString(chart, "chart/display-grid", null); 236 String grid = XMLUtils.xpathString(chart, "chart/display-grid", null);
237 String logo = XMLUtils.xpathString(chart, "chart/display-logo", null);
233 238
234 if (logger.isDebugEnabled()) { 239 if (logger.isDebugEnabled()) {
235 logger.debug("Found chart title: '" + title + "'"); 240 logger.debug("Found chart title: '" + title + "'");
236 logger.debug("Found chart subtitle: '" + sub + "'"); 241 logger.debug("Found chart subtitle: '" + sub + "'");
237 logger.debug("Found chart grid: '" + grid + "'"); 242 logger.debug("Found chart grid: '" + grid + "'");
243 logger.debug("Found chart logo: '" + logo + "'");
238 } 244 }
239 245
240 chartSection.setTitle(title); 246 chartSection.setTitle(title);
241 chartSection.setSubtitle(sub); 247 chartSection.setSubtitle(sub);
242 chartSection.setDisplayGrid(Boolean.valueOf(grid)); 248 chartSection.setDisplayGrid(Boolean.valueOf(grid));
249 chartSection.setDisplayLogo(logo);
243 250
244 target.setChartSection(chartSection); 251 target.setChartSection(chartSection);
245 } 252 }
246 253
247 254

http://dive4elements.wald.intevation.org