comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 1986:3632150dbe0b

Implemented a ChartSettings with relevant Sections and Attributes for charts (NOTE: Work still in progress). flys-artifacts/trunk@3418 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 14 Dec 2011 14:17:31 +0000
parents ddb7b7da6199
children 156304542edf
comparison
equal deleted inserted replaced
1985:07b176b14205 1986:3632150dbe0b
36 import org.jfree.data.xy.XYDataset; 36 import org.jfree.data.xy.XYDataset;
37 37
38 import org.jfree.ui.RectangleInsets; 38 import org.jfree.ui.RectangleInsets;
39 39
40 import de.intevation.artifactdatabase.state.Facet; 40 import de.intevation.artifactdatabase.state.Facet;
41 import de.intevation.artifactdatabase.state.Settings;
41 42
42 import de.intevation.flys.exports.ChartExportHelper; 43 import de.intevation.flys.exports.ChartExportHelper;
43 import de.intevation.flys.jfree.FLYSAnnotation; 44 import de.intevation.flys.jfree.FLYSAnnotation;
44 import de.intevation.flys.jfree.StickyAxisAnnotation; 45 import de.intevation.flys.jfree.StickyAxisAnnotation;
45 46
819 // Add all annotations to our annotation pool. 820 // Add all annotations to our annotation pool.
820 annotations.setTheme(theme); 821 annotations.setTheme(theme);
821 annotations.setLabel(facet.getDescription()); 822 annotations.setLabel(facet.getDescription());
822 addAnnotations(annotations, visible); 823 addAnnotations(annotations, visible);
823 } 824 }
825
826
827 /**
828 * Returns an instance of <i>ChartSettings</i> with a chart specific section
829 * but with no axes settings.
830 *
831 * @return an instance of <i>ChartSettings</i>.
832 */
833 public Settings getSettings() {
834 ChartSettings settings = new ChartSettings();
835
836 ChartSection chartSection = new ChartSection();
837 // XXX Before we can do this, the FLYSArtifactCollection needs to call
838 // doOut() for each facet.
839 //chartSection.setTitle(getChartTitle());
840 //chartSection.setSubtitle("TODO SUBTITLE");
841 //chartSection.setDisplayGird(true);
842
843 settings.setChartSection(chartSection);
844
845 return settings;
846 }
824 } 847 }
825 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 848 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org