Java Code Examples for org.jfree.chart.plot.RingPlot#setSectionDepth()

The following examples show how to use org.jfree.chart.plot.RingPlot#setSectionDepth() . 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: RingPlotTests.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Some checks for the equals() method.
 */
public void testEquals() {

    RingPlot plot1 = new RingPlot(null);
    RingPlot plot2 = new RingPlot(null);
    assertTrue(plot1.equals(plot2));
    assertTrue(plot2.equals(plot1));

    // separatorsVisible
    plot1.setSeparatorsVisible(false);
    assertFalse(plot1.equals(plot2));
    plot2.setSeparatorsVisible(false);
    assertTrue(plot1.equals(plot2));

    // separatorStroke
    Stroke s = new BasicStroke(1.1f);
    plot1.setSeparatorStroke(s);
    assertFalse(plot1.equals(plot2));
    plot2.setSeparatorStroke(s);
    assertTrue(plot1.equals(plot2));

    // separatorPaint
    plot1.setSeparatorPaint(new GradientPaint(1.0f, 2.0f, Color.red,
            2.0f, 1.0f, Color.blue));
    assertFalse(plot1.equals(plot2));
    plot2.setSeparatorPaint(new GradientPaint(1.0f, 2.0f, Color.red,
            2.0f, 1.0f, Color.blue));
    assertTrue(plot1.equals(plot2));

    // innerSeparatorExtension
    plot1.setInnerSeparatorExtension(0.01);
    assertFalse(plot1.equals(plot2));
    plot2.setInnerSeparatorExtension(0.01);
    assertTrue(plot1.equals(plot2));

    // outerSeparatorExtension
    plot1.setOuterSeparatorExtension(0.02);
    assertFalse(plot1.equals(plot2));
    plot2.setOuterSeparatorExtension(0.02);
    assertTrue(plot1.equals(plot2));

    // sectionDepth
    plot1.setSectionDepth(0.12);
    assertFalse(plot1.equals(plot2));
    plot2.setSectionDepth(0.12);
    assertTrue(plot1.equals(plot2));

}
 
Example 2
Source File: RingPlotTests.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Some checks for the equals() method.
 */
public void testEquals() {
    
    RingPlot plot1 = new RingPlot(null);
    RingPlot plot2 = new RingPlot(null);
    assertTrue(plot1.equals(plot2));
    assertTrue(plot2.equals(plot1));
            
    // separatorsVisible
    plot1.setSeparatorsVisible(false);
    assertFalse(plot1.equals(plot2));
    plot2.setSeparatorsVisible(false);
    assertTrue(plot1.equals(plot2));
    
    // separatorStroke
    Stroke s = new BasicStroke(1.1f);
    plot1.setSeparatorStroke(s);
    assertFalse(plot1.equals(plot2));
    plot2.setSeparatorStroke(s);
    assertTrue(plot1.equals(plot2));

    // separatorPaint
    plot1.setSeparatorPaint(new GradientPaint(1.0f, 2.0f, Color.red, 
            2.0f, 1.0f, Color.blue));
    assertFalse(plot1.equals(plot2));
    plot2.setSeparatorPaint(new GradientPaint(1.0f, 2.0f, Color.red, 
            2.0f, 1.0f, Color.blue));
    assertTrue(plot1.equals(plot2));
    
    // innerSeparatorExtension
    plot1.setInnerSeparatorExtension(0.01);
    assertFalse(plot1.equals(plot2));
    plot2.setInnerSeparatorExtension(0.01);
    assertTrue(plot1.equals(plot2));
    
    // outerSeparatorExtension
    plot1.setOuterSeparatorExtension(0.02);
    assertFalse(plot1.equals(plot2));
    plot2.setOuterSeparatorExtension(0.02);
    assertTrue(plot1.equals(plot2));

    // sectionDepth
    plot1.setSectionDepth(0.12);
    assertFalse(plot1.equals(plot2));
    plot2.setSectionDepth(0.12);
    assertTrue(plot1.equals(plot2));
    
}
 
Example 3
Source File: RingChartExpression.java    From pentaho-reporting with GNU Lesser General Public License v2.1 4 votes vote down vote up
protected void configureChart( final JFreeChart chart ) {
  super.configureChart( chart );

  final RingPlot ringPlot = (RingPlot) chart.getPlot();
  ringPlot.setSectionDepth( sectionDepth );
}