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

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

Introduction

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

Prototype

public Stroke getOutlineStroke() 

Source Link

Document

Returns the stroke 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 . jav a2s  .  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);
}