Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 3063:33c167d6fff6
Move marker generation to XYChartGenerator
flys-artifacts/trunk@4643 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Tue, 12 Jun 2012 13:20:48 +0000 |
parents | 4b6fb6d91192 |
children | 478e8d9d88ba |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Tue Jun 12 12:40:44 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Tue Jun 12 13:20:48 2012 +0000 @@ -81,6 +81,8 @@ protected int axisSymbol; /** List of assigned datasets (in order). */ protected List<XYDataset> datasets; + /** List of assigned vertical markers */ + protected List<Marker> domainMarkers = new ArrayList<Marker>(); /** Range to use to include all given datasets. */ protected Range range; /** Index of axis in plot. */ @@ -235,6 +237,8 @@ //debugDatasets(plot); + addMarkers(plot); + recoverEmptyPlot(plot); preparePointRanges(plot); @@ -356,6 +360,25 @@ } } + + /** + * Add the given vertical marker to the chart. + */ + public void addDomainMarker(Marker marker) { + if (marker == null) { + return null; + } + + this.domainMarkers.add(marker); + } + + + protected void addMarkers(XYPlot plot) { + for(Marker marker : domainMarkers) { + plot.addDomainMarker(plot); + } + } + /** * Effect: extend range of x axis to include given limits.