本文整理汇总了Java中net.sf.jasperreports.charts.JRMultiAxisPlot.getAxes方法的典型用法代码示例。如果您正苦于以下问题:Java JRMultiAxisPlot.getAxes方法的具体用法?Java JRMultiAxisPlot.getAxes怎么用?Java JRMultiAxisPlot.getAxes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jasperreports.charts.JRMultiAxisPlot
的用法示例。
在下文中一共展示了JRMultiAxisPlot.getAxes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JRBaseMultiAxisPlot
import net.sf.jasperreports.charts.JRMultiAxisPlot; //导入方法依赖的package包/类
/**
* Creates a copy of an existing multiple axis chart plot and registers
* any expression contained in the plot with the specified factory. Since
* the plot contains multiple other charts nested inside of it all of the
* expressions used by those charts is also registered with the factory.
*
* @param multiAxisPlot the plot to copy
* @param factory the factory to register expressions with
*/
public JRBaseMultiAxisPlot(JRMultiAxisPlot multiAxisPlot, JRBaseObjectFactory factory)
{
super(multiAxisPlot, factory);
List<JRChartAxis> origAxes = multiAxisPlot.getAxes();
axes.clear();
if (origAxes != null)
{
Iterator<JRChartAxis> iter = origAxes.iterator();
while (iter.hasNext())
{
JRChartAxis axis = iter.next();
axes.add(factory.getChartAxis(axis));
}
}
}
示例2: writeMultiAxisChart
import net.sf.jasperreports.charts.JRMultiAxisPlot; //导入方法依赖的package包/类
/**
* Writes the definition of a multiple axis chart to the output stream.
*
* @param chart the multiple axis chart to write
*/
public void writeMultiAxisChart( JRChart chart, String chartName)
{
if(chart != null)
{
write( "JRDesignChart " + chartName + " = new JRDesignChart(jasperDesign, JRChart.CHART_TYPE_MULTI_AXIS);\n");
writeChart( chart, chartName);
JRMultiAxisPlot plot = (JRMultiAxisPlot) chart.getPlot();
String plotName = chartName + "MultiAxisPlot";
write( "JRDesignMultiAxisPlot " + plotName + " = (JRDesignMultiAxisPlot)" + chartName + ".getPlot();\n");
write( plotName + ".setChart(" + chartName + ");\n");//FIXMECHART why is this needed since we get the plot from chart?
writePlot( chart.getPlot(), plotName);
List<JRChartAxis> axes = plot.getAxes();
if (axes != null && axes.size() > 0)
{
for (int i = 0; i < axes.size(); i++)
{
JRChartAxis chartAxis = axes.get(i);
writeChartAxis( chartAxis, plotName, plotName + "Axis" + i, chartName);
}
}
flush();
}
}
示例3: JRFillMultiAxisPlot
import net.sf.jasperreports.charts.JRMultiAxisPlot; //导入方法依赖的package包/类
public JRFillMultiAxisPlot(JRMultiAxisPlot multiAxisPlot, JRFillObjectFactory factory)
{
super(multiAxisPlot, factory);
List<JRChartAxis> parentAxes = multiAxisPlot.getAxes();
this.axes = new ArrayList<JRChartAxis>(parentAxes.size());
Iterator<JRChartAxis> iter = parentAxes.iterator();
while (iter.hasNext())
{
JRChartAxis axis = iter.next();
this.axes.add(factory.getChartAxis(axis));
}
}
示例4: writeMultiAxisChart
import net.sf.jasperreports.charts.JRMultiAxisPlot; //导入方法依赖的package包/类
/**
* Writes the definition of a multiple axis chart to the output stream.
*
* @param chart the multiple axis chart to write
*/
public void writeMultiAxisChart(JRChart chart) throws IOException
{
writer.startElement(JRXmlConstants.ELEMENT_multiAxisChart, getNamespace());
writeChart(chart);
// write plot
JRMultiAxisPlot plot = (JRMultiAxisPlot) chart.getPlot();
writer.startElement(JRXmlConstants.ELEMENT_multiAxisPlot);
writePlot(chart.getPlot());
List<JRChartAxis> axes = plot.getAxes();
if (axes != null)
{
Iterator<JRChartAxis> iter = axes.iterator();
while (iter.hasNext())
{
JRChartAxis chartAxis = iter.next();
writeChartAxis(chartAxis);
}
}
writer.closeElement();
writer.closeElement();
}
示例5: getChildren4Element
import net.sf.jasperreports.charts.JRMultiAxisPlot; //导入方法依赖的package包/类
public List<?> getChildren4Element(Object jrObject) {
List<Object> ch = new ArrayList<Object>();
if (jrObject instanceof JRDesignCategoryDataset)
ch.addAll(((JRDesignCategoryDataset) jrObject).getSeriesList());
else if (jrObject instanceof JRDesignGanttDataset)
ch.addAll(((JRDesignGanttDataset) jrObject).getSeriesList());
else if (jrObject instanceof JRDesignPieDataset)
ch.addAll(((JRDesignPieDataset) jrObject).getSeriesList());
else if (jrObject instanceof JRDesignTimePeriodDataset)
ch.addAll(((JRDesignTimePeriodDataset) jrObject).getSeriesList());
else if (jrObject instanceof JRDesignTimeSeriesDataset)
ch.addAll(((JRDesignTimeSeriesDataset) jrObject).getSeriesList());
else if (jrObject instanceof JRDesignXyDataset)
ch.addAll(((JRDesignXyDataset) jrObject).getSeriesList());
else if (jrObject instanceof JRDesignXyzDataset)
ch.addAll(((JRDesignXyzDataset) jrObject).getSeriesList());
else if (jrObject instanceof JRDesignChartAxis)
ch.add(((JRDesignChartAxis) jrObject).getChart().getDataset());
if (jrObject instanceof JRChart) {
ch.add(((JRChart) jrObject).getDataset());
}
if (jrObject instanceof JRChart && ((JRChart) jrObject).getPlot() instanceof JRMultiAxisPlot) {
JRMultiAxisPlot slc = (JRMultiAxisPlot) ((JRChart) jrObject).getPlot();
if (slc.getAxes() != null)
ch.addAll(slc.getAxes());
}
return ch;
}