Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 1989:156304542edf
Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
flys-artifacts/trunk@3423 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 15 Dec 2011 12:05:06 +0000 |
parents | 3632150dbe0b |
children | 5c1e7c1e9e09 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Thu Dec 15 10:09:02 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Thu Dec 15 12:05:06 2011 +0000 @@ -146,6 +146,29 @@ /** + * This method always returns null. If a concrete subclass of this class + * requires a chart subtitle, this subclass can easily override this method. + * + * @return always null. + */ + protected String getChartSubtitle() { + // overridden this method in subclasses that need subtitles + return null; + } + + + /** + * This method is used to determine if the resulting chart should display + * grid lines or not. <b>Note: this method always returns true!</b> + * + * @return true, if the chart should display grid lines, otherwise false. + */ + protected boolean isGridVisible() { + return true; + } + + + /** * Returns the X-Axis label of a chart. * * @return the X-Axis label of a chart. @@ -834,11 +857,9 @@ ChartSettings settings = new ChartSettings(); ChartSection chartSection = new ChartSection(); - // XXX Before we can do this, the FLYSArtifactCollection needs to call - // doOut() for each facet. - //chartSection.setTitle(getChartTitle()); - //chartSection.setSubtitle("TODO SUBTITLE"); - //chartSection.setDisplayGird(true); + chartSection.setTitle(getChartTitle()); + chartSection.setSubtitle(getChartSubtitle()); + chartSection.setDisplayGird(isGridVisible()); settings.setChartSection(chartSection);