comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 2056:76eeb3b4358e

Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'. flys-artifacts/trunk@3547 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 27 Dec 2011 10:12:14 +0000
parents 3cec0575d655
children 49b7c2b1a6a7
comparison
equal deleted inserted replaced
2055:3cec0575d655 2056:76eeb3b4358e
1267 1267
1268 ChartSettings settings = new ChartSettings(); 1268 ChartSettings settings = new ChartSettings();
1269 1269
1270 ChartSection chartSection = buildChartSection(); 1270 ChartSection chartSection = buildChartSection();
1271 LegendSection legendSection = buildLegendSection(); 1271 LegendSection legendSection = buildLegendSection();
1272 ExportSection exportSection = buildExportSection();
1272 1273
1273 settings.setChartSection(chartSection); 1274 settings.setChartSection(chartSection);
1274 settings.setLegendSection(legendSection); 1275 settings.setLegendSection(legendSection);
1276 settings.setExportSection(exportSection);
1275 1277
1276 List<AxisSection> axisSections = buildAxisSections(); 1278 List<AxisSection> axisSections = buildAxisSections();
1277 for (AxisSection axisSection: axisSections) { 1279 for (AxisSection axisSection: axisSections) {
1278 settings.addAxisSection(axisSection); 1280 settings.addAxisSection(axisSection);
1279 } 1281 }
1304 protected LegendSection buildLegendSection() { 1306 protected LegendSection buildLegendSection() {
1305 LegendSection legendSection = new LegendSection(); 1307 LegendSection legendSection = new LegendSection();
1306 legendSection.setVisibility(isLegendVisible()); 1308 legendSection.setVisibility(isLegendVisible());
1307 legendSection.setFontSize(getLegendFontSize()); 1309 legendSection.setFontSize(getLegendFontSize());
1308 return legendSection; 1310 return legendSection;
1311 }
1312
1313
1314 /**
1315 * Creates a new <i>ExportSection</i> with default values <b>WIDTH=600</b>
1316 * and <b>HEIGHT=400</b>.
1317 *
1318 * @return a new <i>ExportSection</i>.
1319 */
1320 protected ExportSection buildExportSection() {
1321 ExportSection exportSection = new ExportSection();
1322 exportSection.setWidth(600);
1323 exportSection.setHeight(400);
1324 return exportSection;
1309 } 1325 }
1310 1326
1311 1327
1312 /** 1328 /**
1313 * Creates a list of Sections that contains all axes of the chart (including 1329 * Creates a list of Sections that contains all axes of the chart (including

http://dive4elements.wald.intevation.org