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


Java MinMaxCategoryRenderer类代码示例

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


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

示例1: testDrawWithNullInfo

import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
 * Draws the chart with a <code>null</code> info object to make sure that 
 * no exceptions are thrown (particularly by code in the renderer).
 */
public void testDrawWithNullInfo() {
    boolean success = false;
    try {
        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        dataset.addValue(1.0, "S1", "C1");
        CategoryPlot plot = new CategoryPlot(dataset, 
                new CategoryAxis("Category"), new NumberAxis("Value"), 
                new MinMaxCategoryRenderer());
        JFreeChart chart = new JFreeChart(plot);
        /* BufferedImage image = */ chart.createBufferedImage(300, 200, 
                null);
        success = true;
    }
    catch (NullPointerException e) {
        e.printStackTrace();
        success = false;
    }
    assertTrue(success);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:24,代码来源:MinMaxCategoryRendererTests.java

示例2: testEquals

import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
 * Check that the equals() method distinguishes all fields.
 */
public void testEquals() {
    MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
    MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer();
    assertEquals(r1, r2);

    r1.setDrawLines(true);
    assertFalse(r1.equals(r2));
    r2.setDrawLines(true);
    assertTrue(r1.equals(r2));

    r1.setGroupPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f,
            Color.yellow));
    assertFalse(r1.equals(r2));
    r2.setGroupPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f,
            Color.yellow));
    assertTrue(r1.equals(r2));

    r1.setGroupStroke(new BasicStroke(1.2f));
    assertFalse(r1.equals(r2));
    r2.setGroupStroke(new BasicStroke(1.2f));
    assertTrue(r1.equals(r2));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:26,代码来源:MinMaxCategoryRendererTests.java

示例3: testDrawWithNullInfo

import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
 * Draws the chart with a <code>null</code> info object to make sure that
 * no exceptions are thrown (particularly by code in the renderer).
 */
public void testDrawWithNullInfo() {
    boolean success = false;
    try {
        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        dataset.addValue(1.0, "S1", "C1");
        CategoryPlot plot = new CategoryPlot(dataset,
                new CategoryAxis("Category"), new NumberAxis("Value"),
                new MinMaxCategoryRenderer());
        JFreeChart chart = new JFreeChart(plot);
        /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                null);
        success = true;
    }
    catch (NullPointerException e) {
        e.printStackTrace();
        success = false;
    }
    assertTrue(success);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:24,代码来源:MinMaxCategoryRendererTests.java

示例4: testHashcode

import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashcode() {
    MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
    MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer();
    assertTrue(r1.equals(r2));
    int h1 = r1.hashCode();
    int h2 = r2.hashCode();
    assertEquals(h1, h2);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:MinMaxCategoryRendererTests.java

示例5: applyToCategoryItemRenderer

import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
 * Applies the settings of this theme to the specified renderer.
 *
 * @param renderer  the renderer ({@code null} not permitted).
 */
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer) {
    Args.nullNotPermitted(renderer, "renderer");

    if (renderer instanceof AbstractRenderer) {
        applyToAbstractRenderer((AbstractRenderer) renderer);
    }

    renderer.setDefaultItemLabelFont(this.regularFont);
    renderer.setDefaultItemLabelPaint(this.itemLabelPaint);

    // now we handle some special cases - yes, UGLY code alert!

    // BarRenderer
    if (renderer instanceof BarRenderer) {
        BarRenderer br = (BarRenderer) renderer;
        br.setBarPainter(this.barPainter);
        br.setShadowVisible(this.shadowVisible);
        br.setShadowPaint(this.shadowPaint);
    }


    //  StatisticalBarRenderer
    if (renderer instanceof StatisticalBarRenderer) {
        StatisticalBarRenderer sbr = (StatisticalBarRenderer) renderer;
        sbr.setErrorIndicatorPaint(this.errorIndicatorPaint);
    }

    // MinMaxCategoryRenderer
    if (renderer instanceof MinMaxCategoryRenderer) {
        MinMaxCategoryRenderer mmcr = (MinMaxCategoryRenderer) renderer;
        mmcr.setGroupPaint(this.errorIndicatorPaint);
    }
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:39,代码来源:StandardChartTheme.java

示例6: testHashcode

import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
 * Two objects that are equal are required to return the same hashCode.
 */
public void testHashcode() {
    MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
    MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer();
    assertTrue(r1.equals(r2));
    int h1 = r1.hashCode();
    int h2 = r2.hashCode();
    assertEquals(h1, h2);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:12,代码来源:MinMaxCategoryRendererTests.java

示例7: testEquals

import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
 * Problem that the equals(...) method distinguishes all fields.
 */
public void testEquals() {
    MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
    MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer();
    assertEquals(r1, r2);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:9,代码来源:MinMaxCategoryRendererTests.java

示例8: testEquals

import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
 * Check that the equals() method distinguishes all fields.
 */
public void testEquals() {
    MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
    MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer();
    assertEquals(r1, r2);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:9,代码来源:MinMaxCategoryRendererTests.java

示例9: applyToCategoryItemRenderer

import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
 * Applies the settings of this theme to the specified renderer.
 *
 * @param renderer  the renderer (<code>null</code> not permitted).
 */
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer) {
    ParamChecks.nullNotPermitted(renderer, "renderer");

    if (renderer instanceof AbstractRenderer) {
        applyToAbstractRenderer((AbstractRenderer) renderer);
    }

    renderer.setBaseItemLabelFont(this.regularFont);
    renderer.setBaseItemLabelPaint(this.itemLabelPaint);

    // now we handle some special cases - yes, UGLY code alert!

    // BarRenderer
    if (renderer instanceof BarRenderer) {
        BarRenderer br = (BarRenderer) renderer;
        br.setBarPainter(this.barPainter);
        br.setShadowVisible(this.shadowVisible);
        br.setShadowPaint(this.shadowPaint);
    }

    // BarRenderer3D
    if (renderer instanceof BarRenderer3D) {
        BarRenderer3D br3d = (BarRenderer3D) renderer;
        br3d.setWallPaint(this.wallPaint);
    }

    // LineRenderer3D
    if (renderer instanceof LineRenderer3D) {
        LineRenderer3D lr3d = (LineRenderer3D) renderer;
        lr3d.setWallPaint(this.wallPaint);
    }

    //  StatisticalBarRenderer
    if (renderer instanceof StatisticalBarRenderer) {
        StatisticalBarRenderer sbr = (StatisticalBarRenderer) renderer;
        sbr.setErrorIndicatorPaint(this.errorIndicatorPaint);
    }

    // MinMaxCategoryRenderer
    if (renderer instanceof MinMaxCategoryRenderer) {
        MinMaxCategoryRenderer mmcr = (MinMaxCategoryRenderer) renderer;
        mmcr.setGroupPaint(this.errorIndicatorPaint);
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:50,代码来源:StandardChartTheme.java

示例10: applyToCategoryItemRenderer

import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
 * Applies the settings of this theme to the specified renderer.
 *
 * @param renderer  the renderer (<code>null</code> not permitted).
 */
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer) {
    if (renderer == null) {
        throw new IllegalArgumentException("Null 'renderer' argument.");
    }

    if (renderer instanceof AbstractRenderer) {
        applyToAbstractRenderer((AbstractRenderer) renderer);
    }

    renderer.setBaseItemLabelFont(this.regularFont);
    renderer.setBaseItemLabelPaint(this.itemLabelPaint);

    // now we handle some special cases - yes, UGLY code alert!

    // BarRenderer
    if (renderer instanceof BarRenderer) {
        BarRenderer br = (BarRenderer) renderer;
        br.setBarPainter(this.barPainter);
        br.setShadowVisible(this.shadowVisible);
        br.setShadowPaint(this.shadowPaint);
    }

    // BarRenderer3D
    if (renderer instanceof BarRenderer3D) {
        BarRenderer3D br3d = (BarRenderer3D) renderer;
        br3d.setWallPaint(this.wallPaint);
    }

    // LineRenderer3D
    if (renderer instanceof LineRenderer3D) {
        LineRenderer3D lr3d = (LineRenderer3D) renderer;
        lr3d.setWallPaint(this.wallPaint);
    }

    //  StatisticalBarRenderer
    if (renderer instanceof StatisticalBarRenderer) {
        StatisticalBarRenderer sbr = (StatisticalBarRenderer) renderer;
        sbr.setErrorIndicatorPaint(this.errorIndicatorPaint);
    }

    // MinMaxCategoryRenderer
    if (renderer instanceof MinMaxCategoryRenderer) {
        MinMaxCategoryRenderer mmcr = (MinMaxCategoryRenderer) renderer;
        mmcr.setGroupPaint(this.errorIndicatorPaint);
    }
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:52,代码来源:StandardChartTheme.java

示例11: testPublicCloneable

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


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