本文整理汇总了Java中net.sf.jasperreports.charts.JRPieSeries类的典型用法代码示例。如果您正苦于以下问题:Java JRPieSeries类的具体用法?Java JRPieSeries怎么用?Java JRPieSeries使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JRPieSeries类属于net.sf.jasperreports.charts包,在下文中一共展示了JRPieSeries类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JRBasePieDataset
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
/**
*
*/
public JRBasePieDataset(JRPieDataset dataset, JRBaseObjectFactory factory)
{
super(dataset, factory);
minPercentage = dataset.getMinPercentage();
maxCount = dataset.getMaxCount();
/* */
JRPieSeries[] srcPieSeries = dataset.getSeries();
if (srcPieSeries != null && srcPieSeries.length > 0)
{
pieSeries = new JRPieSeries[srcPieSeries.length];
for(int i = 0; i < pieSeries.length; i++)
{
pieSeries[i] = factory.getPieSeries(srcPieSeries[i]);
}
}
otherKeyExpression = factory.getExpression(dataset.getOtherKeyExpression());
otherLabelExpression = factory.getExpression(dataset.getOtherLabelExpression());
otherSectionHyperlink = factory.getHyperlink(dataset.getOtherSectionHyperlink());
}
示例2: readObject
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
in.defaultReadObject();
if (pieSeries == null)
{
pieSeries = new JRPieSeries[1];
JRDesignPieSeries ps = new JRDesignPieSeries();
ps.setKeyExpression(keyExpression);
ps.setValueExpression(valueExpression);
ps.setLabelExpression(labelExpression);
ps.setSectionHyperlink(sectionHyperlink);
pieSeries[0] = ps;
keyExpression = null;
valueExpression = null;
labelExpression = null;
sectionHyperlink = null;
}
}
示例3: removePieSeries
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
/**
*
*/
public JRPieSeries removePieSeries(JRPieSeries pieSeries)
{
if (pieSeries != null)
{
int idx = pieSeriesList.indexOf(pieSeries);
if (idx >= 0)
{
pieSeriesList.remove(idx);
getEventSupport().fireCollectionElementRemovedEvent(PROPERTY_PIE_SERIES,
pieSeries, idx);
}
}
return pieSeries;
}
示例4: readObject
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
in.defaultReadObject();
if (pieSeriesList == null)
{
pieSeriesList = new ArrayList<JRPieSeries>();
JRDesignPieSeries ps = new JRDesignPieSeries();
ps.setKeyExpression(keyExpression);
ps.setValueExpression(valueExpression);
ps.setLabelExpression(labelExpression);
ps.setSectionHyperlink(sectionHyperlink);
pieSeriesList.add(ps);
keyExpression = null;
valueExpression = null;
labelExpression = null;
sectionHyperlink = null;
}
}
示例5: JRFillPieDataset
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
/**
*
*/
public JRFillPieDataset(
JRPieDataset pieDataset,
JRFillObjectFactory factory
)
{
super(pieDataset, factory);
/* */
JRPieSeries[] srcPieSeries = pieDataset.getSeries();
if (srcPieSeries != null && srcPieSeries.length > 0)
{
pieSeries = new JRFillPieSeries[srcPieSeries.length];
for(int i = 0; i < pieSeries.length; i++)
{
pieSeries[i] = (JRFillPieSeries)factory.getPieSeries(srcPieSeries[i]);
}
}
}
示例6: getPieSeries
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
@Override
public JRPieSeries getPieSeries(JRPieSeries pieSeries)
{
JRBasePieSeries basePieSeries = null;
if (pieSeries != null)
{
basePieSeries = (JRBasePieSeries)get(pieSeries);
if (basePieSeries == null)
{
basePieSeries = new JRBasePieSeries(pieSeries, this);
}
}
return basePieSeries;
}
示例7: writePieSeries
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
/**
*
*/
private void writePieSeries( JRPieSeries pieSeries, String parentName, int index)
{
if(pieSeries != null)
{
String pieSeriesName = parentName + "PieSeries" + index;
write( "JRDesignPieSeries " + pieSeriesName + " = new JRDesignPieSeries();\n");
writeExpression( pieSeries.getKeyExpression(), pieSeriesName, "KeyExpression");
writeExpression( pieSeries.getValueExpression(), pieSeriesName, "ValueExpression");
writeExpression( pieSeries.getLabelExpression(), pieSeriesName, "LabelExpression");
writeHyperlink( pieSeries.getSectionHyperlink(),pieSeriesName, "SectionHyperlink");
write( parentName + ".addPieSeries(" + pieSeriesName + ");\n");
flush();
}
}
示例8: getPieSeries
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
@Override
public JRPieSeries getPieSeries(JRPieSeries pieSeries)
{
JRFillPieSeries fillPieSeries = null;
if (pieSeries != null)
{
fillPieSeries = (JRFillPieSeries)get(pieSeries);
if (fillPieSeries == null)
{
fillPieSeries = new JRFillPieSeries(pieSeries, this);
}
}
return fillPieSeries;
}
示例9: setSeries
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
private void setSeries(int selection) {
List<JRPieSeries> seriesList = dataset.getSeriesList();
if (!seriesList.isEmpty()) {
String[] srnames = new String[seriesList.size()];
for (int i = 0; i < seriesList.size(); i++) {
srnames[i] = String.format("Pie series (%d)", i);
}
seriesCombo.setItems(srnames);
seriesCombo.select(selection);
hyperlinkBtn.setEnabled(true);
handleSelectSeries(selection);
} else {
seriesCombo.setItems(new String[0]);
hyperlinkBtn.setEnabled(false);
hyperlinkBtn.setText(Messages.DSCategory_hyperlinkButtonDisabled);
handleSelectSeries(-1);
}
}
示例10: JRBasePieSeries
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
/**
*
*/
public JRBasePieSeries(JRPieSeries pieSeries, JRBaseObjectFactory factory)
{
factory.put(pieSeries, this);
keyExpression = factory.getExpression(pieSeries.getKeyExpression());
valueExpression = factory.getExpression(pieSeries.getValueExpression());
labelExpression = factory.getExpression(pieSeries.getLabelExpression());
sectionHyperlink = factory.getHyperlink(pieSeries.getSectionHyperlink());
}
示例11: getSeries
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
@Override
public JRPieSeries[] getSeries()
{
JRPieSeries[] pieSeriesArray = new JRPieSeries[pieSeriesList.size()];
pieSeriesList.toArray(pieSeriesArray);
return pieSeriesArray;
}
示例12: addPieSeries
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
/**
*
*/
public void addPieSeries(JRPieSeries pieSeries)
{
pieSeriesList.add(pieSeries);
getEventSupport().fireCollectionElementAddedEvent(PROPERTY_PIE_SERIES,
pieSeries, pieSeriesList.size() - 1);
}
示例13: JRFillPieSeries
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
/**
*
*/
public JRFillPieSeries(
JRPieSeries pieSeries,
JRFillObjectFactory factory
)
{
factory.put(pieSeries, this);
parent = pieSeries;
}
示例14: writePieSeries
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
/**
*
*/
private void writePieSeries(JRPieSeries pieSeries) throws IOException
{
writer.startElement(JRXmlConstants.ELEMENT_pieSeries);
writeExpression(JRXmlConstants.ELEMENT_keyExpression, pieSeries.getKeyExpression(), false);
writeExpression(JRXmlConstants.ELEMENT_valueExpression, pieSeries.getValueExpression(), false);
writeExpression(JRXmlConstants.ELEMENT_labelExpression, pieSeries.getLabelExpression(), false);
writeHyperlink(JRXmlConstants.ELEMENT_sectionHyperlink, pieSeries.getSectionHyperlink());
writer.closeElement();
}
示例15: collect
import net.sf.jasperreports.charts.JRPieSeries; //导入依赖的package包/类
/**
*
*/
private void collect(JRPieSeries pieSeries)
{
addExpression(pieSeries.getKeyExpression());
addExpression(pieSeries.getValueExpression());
addExpression(pieSeries.getLabelExpression());
collectHyperlink(pieSeries.getSectionHyperlink());
}