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

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

Introduction

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

Prototype

public Paint getOutlinePaint() 

Source Link

Document

Returns the paint used to draw the outline of 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   w w w  . j ava  2 s  .com
            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);
}