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


Java StandardXYItemRenderer.setLegendLine方法代码示例

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

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

示例1: testEquals

import org.jfree.chart.renderer.xy.StandardXYItemRenderer; //导入方法依赖的package包/类
/**
 * Test that the equals() method distinguishes all fields.
 */
public void testEquals() {
    StandardXYItemRenderer r1 = new StandardXYItemRenderer();
    StandardXYItemRenderer r2 = new StandardXYItemRenderer();
    assertEquals(r1, r2);
    
    r1.setBaseShapesVisible(true);
    assertFalse(r1.equals(r2));
    r2.setBaseShapesVisible(true);
    assertTrue(r1.equals(r2));
    
    r1.setPlotLines(false);
    assertFalse(r1.equals(r2));
    r2.setPlotLines(false);
    assertTrue(r1.equals(r2));

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

    r1.setPlotDiscontinuous(true);
    assertFalse(r1.equals(r2));
    r2.setPlotDiscontinuous(true);
    assertTrue(r1.equals(r2));
    
    r1.setGapThresholdType(UnitType.ABSOLUTE);
    assertFalse(r1.equals(r2));
    r2.setGapThresholdType(UnitType.ABSOLUTE);
    assertTrue(r1.equals(r2));
    
    r1.setGapThreshold(1.23);
    assertFalse(r1.equals(r2));
    r2.setGapThreshold(1.23);
    assertTrue(r1.equals(r2));
    
    r1.setLegendLine(new Line2D.Double(1.0, 2.0, 3.0, 4.0));
    assertFalse(r1.equals(r2));
    r2.setLegendLine(new Line2D.Double(1.0, 2.0, 3.0, 4.0));
    assertTrue(r1.equals(r2));

    r1.setShapesFilled(false);
    assertFalse(r1.equals(r2));
    r2.setShapesFilled(false);
    assertTrue(r1.equals(r2));
    
    r1.setSeriesShapesFilled(1, Boolean.TRUE);
    assertFalse(r1.equals(r2));
    r2.setSeriesShapesFilled(1, Boolean.TRUE);
    assertTrue(r1.equals(r2));
    
    r1.setBaseShapesFilled(false);
    assertFalse(r1.equals(r2));
    r2.setBaseShapesFilled(false);
    assertTrue(r1.equals(r2));
    
    r1.setDrawSeriesLineAsPath(true);
    assertFalse(r1.equals(r2));
    r2.setDrawSeriesLineAsPath(true);
    assertTrue(r1.equals(r2));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:64,代码来源:StandardXYItemRendererTests.java


示例2: testEquals

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

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

    r1.setPlotLines(false);
    assertFalse(r1.equals(r2));
    r2.setPlotLines(false);
    assertTrue(r1.equals(r2));

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

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

    r1.setGapThresholdType(UnitType.ABSOLUTE);
    assertFalse(r1.equals(r2));
    r2.setGapThresholdType(UnitType.ABSOLUTE);
    assertTrue(r1.equals(r2));

    r1.setGapThreshold(1.23);
    assertFalse(r1.equals(r2));
    r2.setGapThreshold(1.23);
    assertTrue(r1.equals(r2));

    r1.setLegendLine(new Line2D.Double(1.0, 2.0, 3.0, 4.0));
    assertFalse(r1.equals(r2));
    r2.setLegendLine(new Line2D.Double(1.0, 2.0, 3.0, 4.0));
    assertTrue(r1.equals(r2));

    r1.setSeriesShapesFilled(1, Boolean.TRUE);
    assertFalse(r1.equals(r2));
    r2.setSeriesShapesFilled(1, Boolean.TRUE);
    assertTrue(r1.equals(r2));

    r1.setBaseShapesFilled(false);
    assertFalse(r1.equals(r2));
    r2.setBaseShapesFilled(false);
    assertTrue(r1.equals(r2));

    r1.setDrawSeriesLineAsPath(true);
    assertFalse(r1.equals(r2));
    r2.setDrawSeriesLineAsPath(true);
    assertTrue(r1.equals(r2));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:59,代码来源:StandardXYItemRendererTests.java



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