/*
* Copyright (C) 2011-2014 GeoForge Project
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.geoforge.jfreechart.chart;
import org.geoforge.java.awt.color.GfrColor;
import org.geoforge.jfreechart.handler.IHandlerStepRenderer;
import org.geoforge.jfreechart.xyplot.GfrCombinedDomainXYPlotAbs;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.Plot;
/**
*
* @author bantchao
*/
abstract public class GfrJFreeChartDepLgrStepLogsAbs extends GfrJFreeChartDepLgrAbs implements
IHandlerStepRenderer
{
// beg tempo
public void updateSeriesNameChanged(
String strOldValue,
String strNewValue)
{
Plot plt = super.getPlot();
if (plt instanceof GfrCombinedDomainXYPlotAbs)
((GfrCombinedDomainXYPlotAbs) plt).updateSeriesNameChanged(
strOldValue,
strNewValue);
else
{
String strAttn = "ATTN: GfrJFreeChartDepLgrStepLogsAbs.updateSeriesNameChanged(...): plt instanceof GfrCombinedDomainXYPlotAbs";
System.err.println(strAttn);
}
/*else if (plt instanceof GfrXYPlotGridLinLgrLogsAbs)
{
GfrXYPlotGridLinLgrLogsAbs plotLogs = (GfrXYPlotGridLinLgrLogsAbs) plt;
GfrXYSeriesCollectionDstLogsAbs serCollection = (GfrXYSeriesCollectionDstLogsAbs) plotLogs.getDataset();
for (int intSer = 0; intSer < serCollection.getSeriesCount(); intSer++)
{
XYSeries ser = serCollection.getSeries(intSer);
System.out.println(ser.getKey());
}
}*/
}
// end tempo
@Override
public void setRendererStep(boolean bln) throws Exception
{
((IHandlerStepRenderer) getPlot()).setRendererStep(bln);
}
protected GfrJFreeChartDepLgrStepLogsAbs(Plot plt)
{
super(
"", // String strTitle
JFreeChart.DEFAULT_TITLE_FONT,
plt,
true // blnCreateLegend
);
super.setBackgroundPaint(GfrColor.white);
}
}