本文整理汇总了Java中net.sf.jasperreports.charts.JRCategorySeries类的典型用法代码示例。如果您正苦于以下问题:Java JRCategorySeries类的具体用法?Java JRCategorySeries怎么用?Java JRCategorySeries使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JRCategorySeries类属于net.sf.jasperreports.charts包,在下文中一共展示了JRCategorySeries类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JRBaseCategoryDataset
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
/**
*
*/
public JRBaseCategoryDataset(JRCategoryDataset dataset, JRBaseObjectFactory factory)
{
super(dataset, factory);
/* */
JRCategorySeries[] srcCategorySeries = dataset.getSeries();
if (srcCategorySeries != null && srcCategorySeries.length > 0)
{
categorySeries = new JRCategorySeries[srcCategorySeries.length];
for(int i = 0; i < categorySeries.length; i++)
{
categorySeries[i] = factory.getCategorySeries(srcCategorySeries[i]);
}
}
}
示例2: removeCategorySeries
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
/**
*
*/
public JRCategorySeries removeCategorySeries(JRCategorySeries categorySeries)
{
if (categorySeries != null)
{
int idx = categorySeriesList.indexOf(categorySeries);
if (idx >= 0)
{
categorySeriesList.remove(idx);
getEventSupport().fireCollectionElementRemovedEvent(PROPERTY_CATEGORY_SERIES,
categorySeries, idx);
}
}
return categorySeries;
}
示例3: JRFillCategoryDataset
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
/**
*
*/
public JRFillCategoryDataset(
JRCategoryDataset categoryDataset,
JRFillObjectFactory factory
)
{
super(categoryDataset, factory);
/* */
JRCategorySeries[] srcCategorySeries = categoryDataset.getSeries();
if (srcCategorySeries != null && srcCategorySeries.length > 0)
{
categorySeries = new JRFillCategorySeries[srcCategorySeries.length];
for(int i = 0; i < categorySeries.length; i++)
{
categorySeries[i] = (JRFillCategorySeries)factory.getCategorySeries(srcCategorySeries[i]);
}
}
}
示例4: getCategorySeries
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
@Override
public JRCategorySeries getCategorySeries(JRCategorySeries categorySeries)
{
JRBaseCategorySeries baseCategorySeries = null;
if (categorySeries != null)
{
baseCategorySeries = (JRBaseCategorySeries)get(categorySeries);
if (baseCategorySeries == null)
{
baseCategorySeries = new JRBaseCategorySeries(categorySeries, this);
}
}
return baseCategorySeries;
}
示例5: writeCategoryDataSet
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
/**
*
*/
private void writeCategoryDataSet(JRCategoryDataset dataset) throws IOException
{
writer.startElement(JRXmlConstants.ELEMENT_categoryDataset);
writeElementDataset(dataset);
/* */
JRCategorySeries[] categorySeries = dataset.getSeries();
if (categorySeries != null && categorySeries.length > 0)
{
for(int i = 0; i < categorySeries.length; i++)
{
writeCategorySeries(categorySeries[i]);
}
}
writer.closeElement();
}
示例6: writeCategoryDataSet
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
/**
*
*/
private void writeCategoryDataSet( JRCategoryDataset dataset, String parentName, String datasetNameSuffix)
{
if(dataset != null)
{
String datasetName = parentName + datasetNameSuffix;
write( "JRDesignCategoryDataset " + datasetName + " = new JRDesignCategoryDataset("+ parentName + ".getDataset());\n");
writeElementDataset( dataset, datasetName);
JRCategorySeries[] categorySeries = dataset.getSeries();
if (categorySeries != null && categorySeries.length > 0)
{
for(int i = 0; i < categorySeries.length; i++)
{
writeCategorySeries( categorySeries[i], datasetName, i);
}
}
write( parentName + ".setDataset(" + datasetName + ");\n");
flush();
}
}
示例7: writeCategorySeries
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
/**
*
*/
private void writeCategorySeries( JRCategorySeries categorySeries, String parentName, int index)
{
if(categorySeries != null)
{
String categorySeriesName = parentName + "CategorySeries" + index;
write( "JRDesignCategorySeries " + categorySeriesName + " = new JRDesignCategorySeries();\n");
writeExpression( categorySeries.getSeriesExpression(), categorySeriesName, "SeriesExpression");
writeExpression( categorySeries.getCategoryExpression(), categorySeriesName, "CategoryExpression");
writeExpression( categorySeries.getValueExpression(), categorySeriesName, "ValueExpression");
writeExpression( categorySeries.getLabelExpression(), categorySeriesName, "LabelExpression");
writeHyperlink( categorySeries.getItemHyperlink(), categorySeriesName, "ItemHyperlink");
write( parentName + ".addCategorySeries(" + categorySeriesName + ");\n");
flush();
}
}
示例8: getCategorySeries
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
@Override
public JRCategorySeries getCategorySeries(JRCategorySeries categorySeries)
{
JRFillCategorySeries fillCategorySeries = null;
if (categorySeries != null)
{
fillCategorySeries = (JRFillCategorySeries)get(categorySeries);
if (fillCategorySeries == null)
{
fillCategorySeries = new JRFillCategorySeries(categorySeries, this);
}
}
return fillCategorySeries;
}
示例9: writeSpiderDataSet
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
private void writeSpiderDataSet(SpiderDataset dataset, JRXmlWriteHelper writer, JRXmlWriter reportWriter, XmlNamespace namespace) throws IOException
{
writer.startElement(ELEMENT_spiderDataset, namespace);
reportWriter.writeElementDataset(dataset);
/* */
JRCategorySeries[] categorySeries = dataset.getSeries();
if (categorySeries != null && categorySeries.length > 0)
{
for(int i = 0; i < categorySeries.length; i++)
{
writeCategorySeries(categorySeries[i], writer, reportWriter);
}
}
writer.closeElement();
}
示例10: collectExpressions
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
public static void collectExpressions(SpiderDataset dataset, JRExpressionCollector collector)
{
if(dataset != null)
{
collector.collect(dataset);
JRCategorySeries[] categorySeries = dataset.getSeries();
if (categorySeries != null && categorySeries.length > 0)
{
JRExpressionCollector seriesCollector = collector.getCollector(dataset);
for(int j = 0; j < categorySeries.length; j++)
{
seriesCollector.addExpression(categorySeries[j].getSeriesExpression());
seriesCollector.addExpression(categorySeries[j].getCategoryExpression());
seriesCollector.addExpression(categorySeries[j].getValueExpression());
seriesCollector.addExpression(categorySeries[j].getLabelExpression());
seriesCollector.collectHyperlink(categorySeries[j].getItemHyperlink());
}
}
}
}
示例11: FillSpiderDataset
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
/**
*
*/
public FillSpiderDataset(
SpiderDataset spiderDataset,
JRFillObjectFactory factory
)
{
super(spiderDataset, factory);
/* */
JRCategorySeries[] srcCategorySeries = spiderDataset.getSeries();
if (srcCategorySeries != null && srcCategorySeries.length > 0)
{
categorySeries = new JRFillCategorySeries[srcCategorySeries.length];
for(int i = 0; i < srcCategorySeries.length; i++)
{
categorySeries[i] = (JRFillCategorySeries)factory.getCategorySeries(srcCategorySeries[i]);
}
}
}
示例12: setSeries
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
private void setSeries(int selection) {
List<JRCategorySeries> seriesList = dataset.getSeriesList();
if (!seriesList.isEmpty()) {
String[] srnames = new String[seriesList.size()];
for (int i = 0; i < seriesList.size(); i++) {
JRCategorySeries cs = seriesList.get(i);
JRExpression se = cs.getSeriesExpression();
srnames[i] = se != null && se.getText() != null ? se.getText()
: ""; //$NON-NLS-1$
}
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);
}
}
示例13: setSeries
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
private void setSeries(int selection) {
List<JRCategorySeries> seriesList = dataset.getSeriesList();
if (!seriesList.isEmpty()) {
String[] srnames = new String[seriesList.size()];
for (int i = 0; i < seriesList.size(); i++) {
JRCategorySeries cs = seriesList.get(i);
JRExpression se = cs.getSeriesExpression();
srnames[i] = se != null && se.getText() != null ? se.getText()
: "";
}
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);
}
}
示例14: jMenuItemPasteActionPerformed
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
private void jMenuItemPasteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemPasteActionPerformed
java.util.List series = IReportManager.getInstance().getChartSeriesClipBoard();
//getChartSeriesClipBoard()
if (currentSelectedChartComponent == null) return;
if (series != null && series.size() > 0) {
for (int i=0; i<series.size(); ++i) {
if (series.get(i) instanceof JRCategorySeries) {
JRDesignCategorySeries cs = (JRDesignCategorySeries)series.get(i);
try {
cs = cloneChartDatasetItem((JRDesignCategorySeries)cs);
} catch (Exception ex) {
ex.printStackTrace();
continue;
}
((StandardSpiderDataset)currentSelectedChartComponent.getDataset()).addCategorySeries(cs);
((javax.swing.DefaultListModel)jList1.getModel()).addElement(cs);
}
}
jList1.updateUI();
}
}
示例15: JRBaseCategorySeries
import net.sf.jasperreports.charts.JRCategorySeries; //导入依赖的package包/类
/**
*
*/
public JRBaseCategorySeries(JRCategorySeries categorySeries, JRBaseObjectFactory factory)
{
factory.put(categorySeries, this);
seriesExpression = factory.getExpression(categorySeries.getSeriesExpression());
categoryExpression = factory.getExpression(categorySeries.getCategoryExpression());
valueExpression = factory.getExpression(categorySeries.getValueExpression());
labelExpression = factory.getExpression(categorySeries.getLabelExpression());
itemHyperlink = factory.getHyperlink(categorySeries.getItemHyperlink());
}