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


Java CombinedRangeCategoryPlot类代码示例

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


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

示例1: createPlot

import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入依赖的package包/类
/**
 * Creates a sample plot.
 * 
 * @return A plot.
 */
private CombinedRangeCategoryPlot createPlot() {
    
    CategoryDataset dataset1 = createDataset1();
    NumberAxis rangeAxis1 = new NumberAxis("Value");
    rangeAxis1.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    LineAndShapeRenderer renderer1 = new LineAndShapeRenderer();
    renderer1.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
    CategoryPlot subplot1 = new CategoryPlot(dataset1, null, rangeAxis1, renderer1);
    subplot1.setDomainGridlinesVisible(true);
    
    CategoryDataset dataset2 = createDataset2();
    NumberAxis rangeAxis2 = new NumberAxis("Value");
    rangeAxis2.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    BarRenderer renderer2 = new BarRenderer();
    renderer2.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
    CategoryPlot subplot2 = new CategoryPlot(dataset2, null, rangeAxis2, renderer2);
    subplot2.setDomainGridlinesVisible(true);

    NumberAxis rangeAxis = new NumberAxis("Value");
    CombinedRangeCategoryPlot plot = new CombinedRangeCategoryPlot(rangeAxis);
    plot.add(subplot1, 2);
    plot.add(subplot2, 1);
    return plot;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:CombinedRangeCategoryPlotTests.java

示例2: testNotification

import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入依赖的package包/类
/**
 * Check that only one chart change event is generated by a change to a
 * subplot.
 */
public void testNotification() {
    CombinedRangeCategoryPlot plot = createPlot();
    JFreeChart chart = new JFreeChart(plot);
    chart.addChangeListener(this);
    CategoryPlot subplot1 = (CategoryPlot) plot.getSubplots().get(0);
    NumberAxis yAxis = (NumberAxis) subplot1.getRangeAxis();
    yAxis.setAutoRangeIncludesZero(!yAxis.getAutoRangeIncludesZero());
    assertEquals(1, this.events.size());

    // a redraw should NOT trigger another change event
    BufferedImage image = new BufferedImage(200, 100,
            BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = image.createGraphics();
    this.events.clear();
    chart.draw(g2, new Rectangle2D.Double(0.0, 0.0, 200.0, 100.0));
    assertTrue(this.events.isEmpty());
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:22,代码来源:CombinedRangeCategoryPlotTests.java

示例3: testEquals

import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入依赖的package包/类
/**
 * Test the equals() method.
 */
public void testEquals() {
    
    CombinedRangeCategoryPlot plot1 = createPlot();
    CombinedRangeCategoryPlot plot2 = createPlot();
    assertTrue(plot1.equals(plot2));    
    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:11,代码来源:CombinedRangeCategoryPlotTests.java

示例4: testRemoveSubplot

import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入依赖的package包/类
/**
 * This is a test to replicate the bug report 1121172.
 */
public void testRemoveSubplot() {
    CombinedRangeCategoryPlot plot = new CombinedRangeCategoryPlot();
    CategoryPlot plot1 = new CategoryPlot();
    CategoryPlot plot2 = new CategoryPlot();
    CategoryPlot plot3 = new CategoryPlot();
    plot.add(plot1);
    plot.add(plot2);
    plot.add(plot3);
    plot.remove(plot2);
    List plots = plot.getSubplots();
    assertEquals(2, plots.size());
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:16,代码来源:CombinedRangeCategoryPlotTests.java

示例5: createPlot

import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入依赖的package包/类
/**
 * Creates a sample plot.
 * 
 * @return A plot.
 */
private CombinedRangeCategoryPlot createPlot() {
    CategoryDataset dataset1 = createDataset1();
    NumberAxis rangeAxis1 = new NumberAxis("Value");
    rangeAxis1.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    LineAndShapeRenderer renderer1 = new LineAndShapeRenderer();
    renderer1.setBaseToolTipGenerator(
        new StandardCategoryToolTipGenerator()
    );
    CategoryPlot subplot1 = new CategoryPlot(
        dataset1, null, rangeAxis1, renderer1
    );
    subplot1.setDomainGridlinesVisible(true);
    
    CategoryDataset dataset2 = createDataset2();
    NumberAxis rangeAxis2 = new NumberAxis("Value");
    rangeAxis2.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    BarRenderer renderer2 = new BarRenderer();
    renderer2.setBaseToolTipGenerator(
        new StandardCategoryToolTipGenerator()
    );
    CategoryPlot subplot2 = new CategoryPlot(
        dataset2, null, rangeAxis2, renderer2
    );
    subplot2.setDomainGridlinesVisible(true);

    NumberAxis rangeAxis = new NumberAxis("Value");
    CombinedRangeCategoryPlot plot 
        = new CombinedRangeCategoryPlot(rangeAxis);
    plot.add(subplot1, 2);
    plot.add(subplot2, 1);
    return plot;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:38,代码来源:CombinedRangeCategoryPlotTests.java

示例6: createPlot

import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入依赖的package包/类
/**
 * Creates a sample plot.
 *
 * @return A plot.
 */
private CombinedRangeCategoryPlot createPlot() {
    CategoryDataset dataset1 = createDataset1();
    CategoryAxis catAxis1 = new CategoryAxis("Category");
    LineAndShapeRenderer renderer1 = new LineAndShapeRenderer();
    renderer1.setBaseToolTipGenerator(
            new StandardCategoryToolTipGenerator());
    CategoryPlot subplot1 = new CategoryPlot(dataset1, catAxis1, null,
            renderer1);
    subplot1.setDomainGridlinesVisible(true);

    CategoryDataset dataset2 = createDataset2();
    CategoryAxis catAxis2 = new CategoryAxis("Category");
    BarRenderer renderer2 = new BarRenderer();
    renderer2.setBaseToolTipGenerator(
            new StandardCategoryToolTipGenerator());
    CategoryPlot subplot2 = new CategoryPlot(dataset2, catAxis2, null,
            renderer2);
    subplot2.setDomainGridlinesVisible(true);

    NumberAxis rangeAxis = new NumberAxis("Value");
    CombinedRangeCategoryPlot plot = new CombinedRangeCategoryPlot(
            rangeAxis);
    plot.add(subplot1, 2);
    plot.add(subplot2, 1);
    return plot;
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:32,代码来源:CombinedRangeCategoryPlotTests.java

示例7: testEquals

import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入依赖的package包/类
/**
 * Test the equals() method.
 */
public void testEquals() {
    CombinedRangeCategoryPlot plot1 = createPlot();
    CombinedRangeCategoryPlot plot2 = createPlot();
    assertTrue(plot1.equals(plot2));    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:9,代码来源:CombinedRangeCategoryPlotTests.java

示例8: testEquals

import org.jfree.chart.plot.CombinedRangeCategoryPlot; //导入依赖的package包/类
/**
 * Test the equals() method.
 */
public void testEquals() {
    CombinedRangeCategoryPlot plot1 = createPlot();
    CombinedRangeCategoryPlot plot2 = createPlot();
    assertTrue(plot1.equals(plot2));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:9,代码来源:CombinedRangeCategoryPlotTests.java


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