Java Code Examples for org.jfree.chart.renderer.category.ScatterRenderer#setSeriesShapesFilled()

The following examples show how to use org.jfree.chart.renderer.category.ScatterRenderer#setSeriesShapesFilled() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScatterRendererTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Test that the equals() method distinguishes all fields.
 */
public void testEquals() {

    ScatterRenderer r1 = new ScatterRenderer();
    ScatterRenderer r2 = new ScatterRenderer();
    assertEquals(r1, r2);

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

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

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

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

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

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

}
 
Example 2
Source File: ScatterRendererTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks that the two renderers are equal but independent of one another.
 *
 * @param r1  renderer 1.
 * @param r2  renderer 2.
 *
 * @return A boolean.
 */
private boolean checkIndependence(ScatterRenderer r1,
        ScatterRenderer r2) {

    // should be equal...
    if (!r1.equals(r2)) {
        return false;
    }

    // and independent...
    r1.setSeriesShapesFilled(1, true);
    if (r1.equals(r2)) {
        return false;
    }
    r2.setSeriesShapesFilled(1, true);
    if (!r1.equals(r2)) {
        return false;
    }

    r1.setBaseShapesFilled(false);
    r2.setBaseShapesFilled(true);
    if (r1.equals(r2)) {
        return false;
    }
    r2.setBaseShapesFilled(false);
    if (!r1.equals(r2)) {
        return false;
    }
    return true;

}
 
Example 3
Source File: ScatterRendererTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Test that the equals() method distinguishes all fields.
 */
public void testEquals() {
    
    ScatterRenderer r1 = new ScatterRenderer();
    ScatterRenderer r2 = new ScatterRenderer();
    assertEquals(r1, r2);
    
    r1.setSeriesShapesFilled(1, true);
    assertFalse(r1.equals(r2));
    r2.setSeriesShapesFilled(1, true);
    assertTrue(r1.equals(r2));
    
    r1.setBaseShapesFilled(false);
    assertFalse(r1.equals(r2));
    r2.setBaseShapesFilled(false);
    assertTrue(r1.equals(r2));
    
    r1.setUseFillPaint(true);
    assertFalse(r1.equals(r2));
    r2.setUseFillPaint(true);
    assertTrue(r1.equals(r2));
    
    r1.setDrawOutlines(true);
    assertFalse(r1.equals(r2));
    r2.setDrawOutlines(true);
    assertTrue(r1.equals(r2));
    
    r1.setUseOutlinePaint(true);
    assertFalse(r1.equals(r2));
    r2.setUseOutlinePaint(true);
    assertTrue(r1.equals(r2));
    
    r1.setUseSeriesOffset(false);
    assertFalse(r1.equals(r2));
    r2.setUseSeriesOffset(false);
    assertTrue(r1.equals(r2));
    
}
 
Example 4
Source File: ScatterRendererTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks that the two renderers are equal but independent of one another.
 * 
 * @param r1  renderer 1.
 * @param r2  renderer 2.
 * 
 * @return A boolean.
 */
private boolean checkIndependence(ScatterRenderer r1, 
        ScatterRenderer r2) {

    // should be equal...
    if (!r1.equals(r2)) {
        return false;
    }
    
    // and independent...
    r1.setSeriesShapesFilled(1, true);
    if (r1.equals(r2)) {
        return false;
    }
    r2.setSeriesShapesFilled(1, true);
    if (!r1.equals(r2)) {
        return false;
    }
    
    r1.setBaseShapesFilled(false);
    r2.setBaseShapesFilled(true);
    if (r1.equals(r2)) {
        return false;
    }
    r2.setBaseShapesFilled(false);
    if (!r1.equals(r2)) {
        return false;
    }
    return true;

}