Example usage for org.jfree.chart.plot.dial DialCap getFillPaint

List of usage examples for org.jfree.chart.plot.dial DialCap getFillPaint

Introduction

In this page you can find the example usage for org.jfree.chart.plot.dial DialCap getFillPaint.

Prototype

public Paint getFillPaint() 

Source Link

Document

Returns the paint used to fill the cap.

Usage

From source file:org.pentaho.chart.plugin.jfreechart.dial.JFreeDialChartGeneratorIT.java

public void testCapStyle() throws Exception {
    JFreeChart chart = getJFreeChart("testchart.xml", new Object[][] { { 8D } }); //$NON-NLS-1$
    DialPlot plot = (DialPlot) chart.getPlot();
    DialCap cap = (DialCap) plot.getCap();
    assertEquals(cap.getFillPaint(), new Color(0, 128, 0)); // CSS constant green is 0, 128, 0
    assertEquals(cap.getOutlinePaint(), Color.RED);
    assertEquals(//from   www .j  av  a2  s.  c  o m
            String.format("expected: %s but was: %s", 1D, //$NON-NLS-1$
                    ((BasicStroke) cap.getOutlineStroke()).getLineWidth()), cap.getOutlineStroke(), new BasicStroke(1F));
    assertEquals(cap.getRadius(), 0.06D);
}