Java Code Examples for org.jfree.chart.renderer.category.BarRenderer#setAutoPopulateSeriesFillPaint()

The following examples show how to use org.jfree.chart.renderer.category.BarRenderer#setAutoPopulateSeriesFillPaint() . 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: AbstractRendererTest.java    From openstock with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Some checks for the fill paint lookup mechanism.
 */
@Test
public void testFillPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.white, r.getBaseFillPaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesFillPaint(false);
    assertEquals(Color.white, r.lookupSeriesFillPaint(0));
    assertNull(r.getSeriesFillPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesFillPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE[0],
            r.lookupSeriesFillPaint(0));
    assertNotNull(r.getSeriesFillPaint(0));
}
 
Example 2
Source File: AbstractRendererTest.java    From ccu-historian with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Some checks for the fill paint lookup mechanism.
 */
@Test
public void testFillPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.white, r.getBaseFillPaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesFillPaint(false);
    assertEquals(Color.white, r.lookupSeriesFillPaint(0));
    assertNull(r.getSeriesFillPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesFillPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE[0],
            r.lookupSeriesFillPaint(0));
    assertNotNull(r.getSeriesFillPaint(0));
}
 
Example 3
Source File: AbstractRendererTest.java    From SIMVA-SoS with Apache License 2.0 6 votes vote down vote up
/**
 * Some checks for the fill paint lookup mechanism.
 */
@Test
public void testFillPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.white, r.getBaseFillPaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesFillPaint(false);
    assertEquals(Color.white, r.lookupSeriesFillPaint(0));
    assertNull(r.getSeriesFillPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesFillPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE[0],
            r.lookupSeriesFillPaint(0));
    assertNotNull(r.getSeriesFillPaint(0));
}
 
Example 4
Source File: AbstractRendererTest.java    From ECG-Viewer with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Some checks for the fill paint lookup mechanism.
 */
@Test
public void testFillPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.white, r.getBaseFillPaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesFillPaint(false);
    assertEquals(Color.white, r.lookupSeriesFillPaint(0));
    assertNull(r.getSeriesFillPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesFillPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE[0],
            r.lookupSeriesFillPaint(0));
    assertNotNull(r.getSeriesFillPaint(0));
}
 
Example 5
Source File: AbstractRendererTests.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Some checks for the fill paint lookup mechanism.
 */
public void testFillPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.white, r.getBaseFillPaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesFillPaint(false);
    assertEquals(Color.white, r.lookupSeriesFillPaint(0));
    assertNull(r.getSeriesFillPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesFillPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE[0],
            r.lookupSeriesFillPaint(0));
    assertNotNull(r.getSeriesFillPaint(0));
}
 
Example 6
Source File: AbstractRendererTests.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Some checks for the fill paint lookup mechanism.
 */
public void testFillPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.white, r.getBaseFillPaint());
    
    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesFillPaint(false);
    assertEquals(Color.white, r.lookupSeriesFillPaint(0));
    assertNull(r.getSeriesFillPaint(0));
    
    // now check autoPopulate==true
    r.setAutoPopulateSeriesFillPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE[0], 
            r.lookupSeriesFillPaint(0));
    assertNotNull(r.getSeriesFillPaint(0));
}
 
Example 7
Source File: AbstractRendererTest.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Some checks for the fill paint lookup mechanism.
 */
@Test
public void testFillPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.white, r.getBaseFillPaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesFillPaint(false);
    assertEquals(Color.white, r.lookupSeriesFillPaint(0));
    assertNull(r.getSeriesFillPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesFillPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE[0],
            r.lookupSeriesFillPaint(0));
    assertNotNull(r.getSeriesFillPaint(0));
}