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


Java IntervalCategoryToolTipGenerator类代码示例

本文整理汇总了Java中org.jfree.chart.labels.IntervalCategoryToolTipGenerator的典型用法代码示例。如果您正苦于以下问题:Java IntervalCategoryToolTipGenerator类的具体用法?Java IntervalCategoryToolTipGenerator怎么用?Java IntervalCategoryToolTipGenerator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: createChart

import org.jfree.chart.labels.IntervalCategoryToolTipGenerator; //导入依赖的package包/类
private static JFreeChart createChart() {
    final CategoryAxis domainAxis = new CategoryAxis("");
    final NumberAxis rangeAxis = new NumberAxis("");
    final IntervalBarRenderer renderer = new IntervalBarRenderer();
    renderer.setBaseToolTipGenerator(new IntervalCategoryToolTipGenerator());
    renderer.setBaseToolTipGenerator((dataset, row, column) -> {
        final IntervalCategoryDataset icd = (IntervalCategoryDataset) dataset;
        return icd.getRowKey(row) + ": " + (icd.getEndValue(row, column).doubleValue() - icd.getStartValue(row, column).doubleValue());
    });

    final CategoryPlot plot = new CategoryPlot(null, domainAxis, rangeAxis, renderer);
    final JFreeChart chart = new JFreeChart("Unternehmenswert", plot);
    plot.setDomainGridlinesVisible(true);
    plot.setRangePannable(true);
    ChartUtilities.applyCurrentTheme(chart);
    return chart;

}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:19,代码来源:DeterResultPanel.java

示例2: createGanttChart

import org.jfree.chart.labels.IntervalCategoryToolTipGenerator; //导入依赖的package包/类
/**
 * Creates a Gantt chart using the supplied attributes plus default values
 * where required.  The chart object returned by this method uses a
 * {@link CategoryPlot} instance as the plot, with a {@link CategoryAxis}
 * for the domain axis, a {@link DateAxis} as the range axis, and a
 * {@link GanttRenderer} as the renderer.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param categoryAxisLabel  the label for the category axis
 *                           (<code>null</code> permitted).
 * @param dateAxisLabel  the label for the date axis
 *                       (<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.
 *
 * @return A Gantt chart.
 */
public static JFreeChart createGanttChart(String title,
        String categoryAxisLabel, String dateAxisLabel,
        IntervalCategoryDataset dataset, boolean legend) {

    CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    DateAxis dateAxis = new DateAxis(dateAxisLabel);
    CategoryItemRenderer renderer = new GanttRenderer();
    renderer.setBaseToolTipGenerator(
                new IntervalCategoryToolTipGenerator(
                "{3} - {4}", DateFormat.getDateInstance()));
    CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, dateAxis,
            renderer);
    plot.setOrientation(PlotOrientation.HORIZONTAL);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

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

示例3: createGanttChart

import org.jfree.chart.labels.IntervalCategoryToolTipGenerator; //导入依赖的package包/类
/**
 * Creates a Gantt chart using the supplied attributes plus default values where required.
 * <P>
 * The chart object returned by this method uses a {@link CategoryPlot} instance as the
 * plot, with a {@link CategoryAxis} for the domain axis, a {@link DateAxis} as the
 * range axis, and a {@link GanttRenderer} as the renderer.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param categoryAxisLabel  the label for the category axis (<code>null</code> permitted).
 * @param dateAxisLabel  the label for the date axis (<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 Gantt chart.
 */
public static JFreeChart createGanttChart(String title,
                                          String categoryAxisLabel,
                                          String dateAxisLabel,
                                          IntervalCategoryDataset dataset,
                                          boolean legend,
                                          boolean tooltips,
                                          boolean urls) {

    CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    DateAxis dateAxis = new DateAxis(dateAxisLabel);

    CategoryItemRenderer renderer = new GanttRenderer();
    if (tooltips) {
        renderer.setToolTipGenerator(
            new IntervalCategoryToolTipGenerator("{3} - {4}", DateFormat.getDateInstance())
        );
    }
    if (urls) {
        renderer.setItemURLGenerator(new StandardCategoryURLGenerator());
    }

    CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, dateAxis, renderer);
    plot.setOrientation(PlotOrientation.HORIZONTAL);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);

    return chart;

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

示例4: createGanttChart

import org.jfree.chart.labels.IntervalCategoryToolTipGenerator; //导入依赖的package包/类
/**
 * Creates a Gantt chart using the supplied attributes plus default values 
 * where required.  The chart object returned by this method uses a 
 * {@link CategoryPlot} instance as the plot, with a {@link CategoryAxis} 
 * for the domain axis, a {@link DateAxis} as the range axis, and a 
 * {@link GanttRenderer} as the renderer.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param categoryAxisLabel  the label for the category axis 
 *                           (<code>null</code> permitted).
 * @param dateAxisLabel  the label for the date axis 
 *                       (<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 Gantt chart.
 */
public static JFreeChart createGanttChart(String title,
                                          String categoryAxisLabel,
                                          String dateAxisLabel,
                                          IntervalCategoryDataset dataset,
                                          boolean legend,
                                          boolean tooltips,
                                          boolean urls) {

    CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    DateAxis dateAxis = new DateAxis(dateAxisLabel);

    CategoryItemRenderer renderer = new GanttRenderer();
    if (tooltips) {
        renderer.setBaseToolTipGenerator(
                new IntervalCategoryToolTipGenerator(
                "{3} - {4}", DateFormat.getDateInstance()));
    }
    if (urls) {
        renderer.setBaseItemURLGenerator(
                new StandardCategoryURLGenerator());
    }

    CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, dateAxis, 
            renderer);
    plot.setOrientation(PlotOrientation.HORIZONTAL);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);

    return chart;

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

示例5: createGanttChart

import org.jfree.chart.labels.IntervalCategoryToolTipGenerator; //导入依赖的package包/类
/**
 * Creates a Gantt chart using the supplied attributes plus default values
 * where required.  The chart object returned by this method uses a
 * {@link CategoryPlot} instance as the plot, with a {@link CategoryAxis}
 * for the domain axis, a {@link DateAxis} as the range axis, and a
 * {@link GanttRenderer} as the renderer.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param categoryAxisLabel  the label for the category axis
 *                           (<code>null</code> permitted).
 * @param dateAxisLabel  the label for the date axis
 *                       (<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 Gantt chart.
 */
public static JFreeChart createGanttChart(String title,
        String categoryAxisLabel, String dateAxisLabel,
        IntervalCategoryDataset dataset, boolean legend, boolean tooltips,
        boolean urls) {

    CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    DateAxis dateAxis = new DateAxis(dateAxisLabel);

    CategoryItemRenderer renderer = new GanttRenderer();
    if (tooltips) {
        renderer.setBaseToolTipGenerator(
                new IntervalCategoryToolTipGenerator(
                "{3} - {4}", DateFormat.getDateInstance()));
    }
    if (urls) {
        renderer.setBaseItemURLGenerator(
                new StandardCategoryURLGenerator());
    }

    CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, dateAxis,
            renderer);
    plot.setOrientation(PlotOrientation.HORIZONTAL);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:48,代码来源:ChartFactory.java

示例6: createGanttChart

import org.jfree.chart.labels.IntervalCategoryToolTipGenerator; //导入依赖的package包/类
/**
 * Creates a Gantt chart using the supplied attributes plus default values
 * where required.  The chart object returned by this method uses a
 * {@link CategoryPlot} instance as the plot, with a {@link CategoryAxis}
 * for the domain axis, a {@link DateAxis} as the range axis, and a
 * {@link GanttRenderer} as the renderer.
 *
 * @param title  the chart title ({@code null} permitted).
 * @param categoryAxisLabel  the label for the category axis
 *                           ({@code null} permitted).
 * @param dateAxisLabel  the label for the date axis
 *                       ({@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 Gantt chart.
 */
public static JFreeChart createGanttChart(String title,
        String categoryAxisLabel, String dateAxisLabel,
        IntervalCategoryDataset dataset, boolean legend, boolean tooltips,
        boolean urls) {

    CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    DateAxis dateAxis = new DateAxis(dateAxisLabel);

    CategoryItemRenderer renderer = new GanttRenderer();
    if (tooltips) {
        renderer.setDefaultToolTipGenerator(
                new IntervalCategoryToolTipGenerator(
                "{3} - {4}", DateFormat.getDateInstance()));
    }
    if (urls) {
        renderer.setDefaultItemURLGenerator(
                new StandardCategoryURLGenerator());
    }

    CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, dateAxis,
            renderer);
    plot.setOrientation(PlotOrientation.HORIZONTAL);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:48,代码来源:ChartFactory.java

示例7: createGanttChart

import org.jfree.chart.labels.IntervalCategoryToolTipGenerator; //导入依赖的package包/类
/**
 * Creates a Gantt chart using the supplied attributes plus default values
 * where required.  The chart object returned by this method uses a
 * {@link CategoryPlot} instance as the plot, with a {@link CategoryAxis}
 * for the domain axis, a {@link DateAxis} as the range axis, and a
 * {@link GanttRenderer} as the renderer.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param categoryAxisLabel  the label for the category axis
 *                           (<code>null</code> permitted).
 * @param dateAxisLabel  the label for the date axis
 *                       (<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 Gantt chart.
 */
public static JFreeChart createGanttChart(String title,
                                          String categoryAxisLabel,
                                          String dateAxisLabel,
                                          IntervalCategoryDataset dataset,
                                          boolean legend,
                                          boolean tooltips,
                                          boolean urls) {

    CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    DateAxis dateAxis = new DateAxis(dateAxisLabel);

    CategoryItemRenderer renderer = new GanttRenderer();
    if (tooltips) {
        renderer.setBaseToolTipGenerator(
                new IntervalCategoryToolTipGenerator(
                "{3} - {4}", DateFormat.getDateInstance()));
    }
    if (urls) {
        renderer.setBaseItemURLGenerator(
                new StandardCategoryURLGenerator());
    }

    CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, dateAxis,
            renderer);
    plot.setOrientation(PlotOrientation.HORIZONTAL);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:51,代码来源:ChartFactory.java

示例8: testEquals2

import org.jfree.chart.labels.IntervalCategoryToolTipGenerator; //导入依赖的package包/类
/**
 * Check that the subclass is not equal to an instance of the superclass.
 */
public void testEquals2() {
    IntervalCategoryToolTipGenerator g1
            = new IntervalCategoryToolTipGenerator();
    StandardCategoryToolTipGenerator g2
            = new StandardCategoryToolTipGenerator(
            IntervalCategoryToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT_STRING,
            NumberFormat.getInstance());
    assertFalse(g1.equals(g2));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:13,代码来源:IntervalCategoryToolTipGeneratorTests.java

示例9: testHashCode

import org.jfree.chart.labels.IntervalCategoryToolTipGenerator; //导入依赖的package包/类
/**
 * Simple check that hashCode is implemented.
 */
public void testHashCode() {
    IntervalCategoryToolTipGenerator g1
            = new IntervalCategoryToolTipGenerator();
    IntervalCategoryToolTipGenerator g2
            = new IntervalCategoryToolTipGenerator();
    assertTrue(g1.equals(g2));
    assertTrue(g1.hashCode() == g2.hashCode());
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:12,代码来源:IntervalCategoryToolTipGeneratorTests.java

示例10: testPublicCloneable

import org.jfree.chart.labels.IntervalCategoryToolTipGenerator; //导入依赖的package包/类
/**
 * Check to ensure that this class implements PublicCloneable.
 */
public void testPublicCloneable() {
    IntervalCategoryToolTipGenerator g1
            = new IntervalCategoryToolTipGenerator();
    assertTrue(g1 instanceof PublicCloneable);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:9,代码来源:IntervalCategoryToolTipGeneratorTests.java


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