2
* JasperReports - Free Java Reporting Library.
3
* Copyright (C) 2001 - 2009 Jaspersoft Corporation. All rights reserved.
4
* http://www.jaspersoft.com
6
* Unless you have purchased a commercial license agreement from Jaspersoft,
7
* the following license terms apply:
9
* This program is part of JasperReports.
11
* JasperReports is free software: you can redistribute it and/or modify
12
* it under the terms of the GNU Lesser General Public License as published by
13
* the Free Software Foundation, either version 3 of the License, or
14
* (at your option) any later version.
16
* JasperReports is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Lesser General Public License for more details.
21
* You should have received a copy of the GNU Lesser General Public License
22
* along with JasperReports. If not, see <http://www.gnu.org/licenses/>.
24
package net.sf.jasperreports.renderers;
26
import java.io.IOException;
27
import java.io.ObjectInputStream;
30
import net.sf.jasperreports.charts.util.TimePeriodChartHyperlinkProvider;
31
import net.sf.jasperreports.engine.JRConstants;
32
import net.sf.jasperreports.engine.JRPrintHyperlink;
34
import org.jfree.chart.JFreeChart;
35
import org.jfree.chart.entity.ChartEntity;
39
* Image map renderer used for charts with time period datasets.
43
* @author Lucian Chirita (lucianc@users.sourceforge.net)
44
* @version $Id: JRTimePeriodChartImageMapRenderer.java 3715 2010-04-08 18:08:49Z teodord $
46
public class JRTimePeriodChartImageMapRenderer extends JRAbstractChartImageMapRenderer
49
private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
51
private TimePeriodChartHyperlinkProvider timePeriodChartHyperlinkProvider = null;
53
public JRTimePeriodChartImageMapRenderer(JFreeChart chart, Map itemHyperlinks)
57
this.timePeriodChartHyperlinkProvider = new TimePeriodChartHyperlinkProvider(itemHyperlinks);
61
public JRPrintHyperlink getEntityHyperlink(ChartEntity entity)
63
return timePeriodChartHyperlinkProvider.getEntityHyperlink(entity);
66
public boolean hasHyperlinks()
68
return timePeriodChartHyperlinkProvider.hasHyperlinks();
72
* These fields are only for serialization backward compatibility.
77
private Map itemHyperlinks;
79
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
81
in.defaultReadObject();
83
if (timePeriodChartHyperlinkProvider == null)
85
this.timePeriodChartHyperlinkProvider = new TimePeriodChartHyperlinkProvider(itemHyperlinks);
86
itemHyperlinks = null;