当前位置: 首页>>代码示例>>Java>>正文


Java PiePlot.setURLGenerator方法代码示例

本文整理汇总了Java中org.jfree.chart.plot.PiePlot.setURLGenerator方法的典型用法代码示例。如果您正苦于以下问题:Java PiePlot.setURLGenerator方法的具体用法?Java PiePlot.setURLGenerator怎么用?Java PiePlot.setURLGenerator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.chart.plot.PiePlot的用法示例。


在下文中一共展示了PiePlot.setURLGenerator方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createPieChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a pie chart with default settings.
 * <P>
 * The chart object returned by this method uses a {@link PiePlot} instance as the
 * plot.

 * @param title  the chart title (<code>null</code> permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 * @param tooltips  configure chart to generate tool tips?
 * @param urls  configure chart to generate URLs?
 *
 * @return A pie chart.
 */
public static JFreeChart createPieChart(String title,
                                        PieDataset dataset,
                                        boolean legend,
                                        boolean tooltips,
                                        boolean urls) {

    PiePlot plot = new PiePlot(dataset);
    plot.setLabelGenerator(new StandardPieItemLabelGenerator());
    plot.setInsets(new Insets(0, 5, 5, 5));
    if (tooltips) {
        plot.setToolTipGenerator(
            new StandardPieItemLabelGenerator(
                StandardPieItemLabelGenerator.DEFAULT_SECTION_LABEL_FORMAT
            )
        );
    }
    if (urls) {
        plot.setURLGenerator(new StandardPieURLGenerator());
    }
    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:37,代码来源:ChartFactory.java

示例2: createPieChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a pie chart with default settings.
 * <P>
 * The chart object returned by this method uses a {@link PiePlot} instance 
 * as the plot.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 * @param tooltips  configure chart to generate tool tips?
 * @param urls  configure chart to generate URLs?
 *
 * @return A pie chart.
 */
public static JFreeChart createPieChart(String title,
                                        PieDataset dataset,
                                        boolean legend,
                                        boolean tooltips,
                                        boolean urls) {

    PiePlot plot = new PiePlot(dataset);
    plot.setLabelGenerator(new StandardPieSectionLabelGenerator());
    plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
    if (tooltips) {
        plot.setToolTipGenerator(new StandardPieToolTipGenerator(
                StandardPieToolTipGenerator.DEFAULT_SECTION_LABEL_FORMAT));
    }
    if (urls) {
        plot.setURLGenerator(new StandardPieURLGenerator());
    }
    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, 
            legend);

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:35,代码来源:ChartFactory.java

示例3: createPieChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a pie chart with default settings.
 * <P>
 * The chart object returned by this method uses a {@link PiePlot} instance
 * as the plot.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 * @param tooltips  configure chart to generate tool tips?
 * @param urls  configure chart to generate URLs?
 *
 * @return A pie chart.
 */
public static JFreeChart createPieChart(String title, PieDataset dataset,
        boolean legend, boolean tooltips, boolean urls) {

    PiePlot plot = new PiePlot(dataset);
    plot.setLabelGenerator(new StandardPieSectionLabelGenerator());
    plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
    if (tooltips) {
        plot.setToolTipGenerator(new StandardPieToolTipGenerator());
    }
    if (urls) {
        plot.setURLGenerator(new StandardPieURLGenerator());
    }
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:32,代码来源:ChartFactory.java

示例4: createPieChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a pie chart with default settings.
 * <P>
 * The chart object returned by this method uses a {@link PiePlot} instance
 * as the plot.
 *
 * @param title  the chart title ({@code null} permitted).
 * @param dataset  the dataset for the chart ({@code null} permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 * @param tooltips  configure chart to generate tool tips?
 * @param urls  configure chart to generate URLs?
 *
 * @return A pie chart.
 */
public static JFreeChart createPieChart(String title, PieDataset dataset,
        boolean legend, boolean tooltips, boolean urls) {

    PiePlot plot = new PiePlot(dataset);
    plot.setLabelGenerator(new StandardPieSectionLabelGenerator());
    plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
    if (tooltips) {
        plot.setToolTipGenerator(new StandardPieToolTipGenerator());
    }
    if (urls) {
        plot.setURLGenerator(new StandardPieURLGenerator());
    }
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:32,代码来源:ChartFactory.java

示例5: createPieChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
/**
 * Creates a pie chart with default settings.
 * <P>
 * The chart object returned by this method uses a {@link PiePlot} instance
 * as the plot.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 * @param tooltips  configure chart to generate tool tips?
 * @param urls  configure chart to generate URLs?
 *
 * @return A pie chart.
 */
public static JFreeChart createPieChart(String title,
                                        PieDataset dataset,
                                        boolean legend,
                                        boolean tooltips,
                                        boolean urls) {

    PiePlot plot = new PiePlot(dataset);
    plot.setLabelGenerator(new StandardPieSectionLabelGenerator());
    plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
    if (tooltips) {
        plot.setToolTipGenerator(new StandardPieToolTipGenerator());
    }
    if (urls) {
        plot.setURLGenerator(new StandardPieURLGenerator());
    }
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:35,代码来源:ChartFactory.java

示例6: makePlot

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
@Override
protected Plot makePlot(final JFreeChartBuilder.PlotParameters parameters) {

    final KeyedValuesDataset tmpDataset = this.getDataset();

    final PiePlot retVal = new PiePlot(tmpDataset);

    retVal.setShadowXOffset(0);
    retVal.setShadowYOffset(0);

    retVal.setBackgroundPaint(parameters.getBackground());
    retVal.setOutlinePaint(parameters.getOutline());

    retVal.setLabelGenerator(new StandardPieSectionLabelGenerator());

    if (this.isTooltips()) {
        retVal.setToolTipGenerator(new StandardPieToolTipGenerator());
    }
    if (this.isUrls()) {
        retVal.setURLGenerator(new StandardPieURLGenerator());
    }

    for (final Entry<Comparable<?>, Paint> tmpEntry : this.getColourSet()) {
        retVal.setSectionPaint(tmpEntry.getKey(), tmpEntry.getValue());
    }

    return retVal;
}
 
开发者ID:optimatika,项目名称:ojAlgo-extensions,代码行数:29,代码来源:PieChartBuilder.java

示例7: generatePieChart

import org.jfree.chart.plot.PiePlot; //导入方法依赖的package包/类
private void generatePieChart() {
        if (currentTestSuite == null) {
            return;
        }

        File testSummaryFile = new File(reportFile.getParentFile(), testSummaryFileName);
        File tempTestSummaryFile = new File(testSummaryFile.getPath() + ".tmp");

        final DefaultPieDataset pieDataSet = new DefaultPieDataset();

        pieDataSet.setValue("Passed", new Integer(currentTestSuite.getNbTestsPassed()));
        pieDataSet.setValue("Failed", new Integer(currentTestSuite.getNbTestsFailed()));
        pieDataSet.setValue("Tests in error", new Integer(currentTestSuite.getNbTestsNotAvailable()));
        pieDataSet.setValue("Not executed",
              new Integer(currentTestSuite.getNbTestsToExecute() - currentTestSuite.getNbTestsExecuted()));
        JFreeChart chart;

        // create the chart...
//        if (drilldown) {
        final PiePlot plot = new PiePlot(pieDataSet);

        Color[] colors = {new Color(100, 230, 40), new Color(210, 35, 35), new Color(230, 210, 40), new Color(100, 90, 40)};
        PieRenderer renderer = new PieRenderer(colors);
        renderer.setColor(plot, pieDataSet);

        plot.setURLGenerator(new StandardPieURLGenerator("pie_chart_detail.jsp"));
        plot.setLabelGenerator(new TestSectiontLabelPieGenerator());
        chart = new JFreeChart("Test summary", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
//        } else {
//            chart = ChartFactory.createPieChart("Test summary" /* chart title */, pieDataSet /* data */,
//                  true /* include legend */, true, false);
//        }

        chart.setBackgroundPaint(java.awt.Color.white);

        try {
            final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
            ChartUtilities.saveChartAsPNG(tempTestSummaryFile, chart, 600, 400, info);
        } catch (IOException e) {
            logger.error("Problem saving png chart", e);
        }

        testSummaryFile.delete();
        if (!tempTestSummaryFile.renameTo(testSummaryFile)) {
            logger.error("Couldn't rename test summary file " + tempTestSummaryFile + " into " + testSummaryFile);
        }
    }
 
开发者ID:qspin,项目名称:qtaste,代码行数:48,代码来源:HTMLReportFormatter.java


注:本文中的org.jfree.chart.plot.PiePlot.setURLGenerator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。