Java Code Examples for org.jfree.chart.plot.FastScatterPlot#setDomainGridlinesVisible()

The following examples show how to use org.jfree.chart.plot.FastScatterPlot#setDomainGridlinesVisible() . 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: FastScatterPlotTests.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() {

    FastScatterPlot plot1 = new FastScatterPlot();
    FastScatterPlot plot2 = new FastScatterPlot();
    assertTrue(plot1.equals(plot2));
    assertTrue(plot2.equals(plot1));

    plot1.setPaint(new GradientPaint(1.0f, 2.0f, Color.red,
            3.0f, 4.0f, Color.yellow));
    assertFalse(plot1.equals(plot2));
    plot2.setPaint(new GradientPaint(1.0f, 2.0f, Color.red,
            3.0f, 4.0f, Color.yellow));
    assertTrue(plot1.equals(plot2));

    plot1.setDomainGridlinesVisible(false);
    assertFalse(plot1.equals(plot2));
    plot2.setDomainGridlinesVisible(false);
    assertTrue(plot1.equals(plot2));

    plot1.setDomainGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.blue,
            3.0f, 4.0f, Color.yellow));
    assertFalse(plot1.equals(plot2));
    plot2.setDomainGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.blue,
            3.0f, 4.0f, Color.yellow));
    assertTrue(plot1.equals(plot2));

    Stroke s = new BasicStroke(1.5f);
    plot1.setDomainGridlineStroke(s);
    assertFalse(plot1.equals(plot2));
    plot2.setDomainGridlineStroke(s);
    assertTrue(plot1.equals(plot2));

    plot1.setRangeGridlinesVisible(false);
    assertFalse(plot1.equals(plot2));
    plot2.setRangeGridlinesVisible(false);
    assertTrue(plot1.equals(plot2));

    plot1.setRangeGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.green,
            3.0f, 4.0f, Color.yellow));
    assertFalse(plot1.equals(plot2));
    plot2.setRangeGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.green,
            3.0f, 4.0f, Color.yellow));
    assertTrue(plot1.equals(plot2));

    Stroke s2 = new BasicStroke(1.5f);
    plot1.setRangeGridlineStroke(s2);
    assertFalse(plot1.equals(plot2));
    plot2.setRangeGridlineStroke(s2);
    assertTrue(plot1.equals(plot2));

    plot1.setDomainPannable(true);
    assertFalse(plot1.equals(plot2));
    plot2.setDomainPannable(true);
    assertTrue(plot1.equals(plot2));

    plot1.setRangePannable(true);
    assertFalse(plot1.equals(plot2));
    plot2.setRangePannable(true);
    assertTrue(plot1.equals(plot2));

}
 
Example 2
Source File: FastScatterPlotTests.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() {
    
    FastScatterPlot plot1 = new FastScatterPlot();
    FastScatterPlot plot2 = new FastScatterPlot();
    assertTrue(plot1.equals(plot2));    
    assertTrue(plot2.equals(plot1));
    
    plot1.setPaint(new GradientPaint(1.0f, 2.0f, Color.red, 
            3.0f, 4.0f, Color.yellow));
    assertFalse(plot1.equals(plot2));
    plot2.setPaint(new GradientPaint(1.0f, 2.0f, Color.red, 
            3.0f, 4.0f, Color.yellow));
    assertTrue(plot1.equals(plot2));
    
    plot1.setDomainGridlinesVisible(false);
    assertFalse(plot1.equals(plot2));
    plot2.setDomainGridlinesVisible(false);
    assertTrue(plot1.equals(plot2));
    
    plot1.setDomainGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.blue, 
            3.0f, 4.0f, Color.yellow));
    assertFalse(plot1.equals(plot2));
    plot2.setDomainGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.blue, 
            3.0f, 4.0f, Color.yellow));
    assertTrue(plot1.equals(plot2));
    
    Stroke s = new BasicStroke(1.5f);
    plot1.setDomainGridlineStroke(s);
    assertFalse(plot1.equals(plot2));
    plot2.setDomainGridlineStroke(s);
    assertTrue(plot1.equals(plot2));
    
    plot1.setRangeGridlinesVisible(false);
    assertFalse(plot1.equals(plot2));
    plot2.setRangeGridlinesVisible(false);
    assertTrue(plot1.equals(plot2));
    
    plot1.setRangeGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.green, 
            3.0f, 4.0f, Color.yellow));
    assertFalse(plot1.equals(plot2));
    plot2.setRangeGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.green, 
            3.0f, 4.0f, Color.yellow));
    assertTrue(plot1.equals(plot2));
    
    Stroke s2 = new BasicStroke(1.5f);
    plot1.setRangeGridlineStroke(s2);
    assertFalse(plot1.equals(plot2));
    plot2.setRangeGridlineStroke(s2);
    assertTrue(plot1.equals(plot2));
    
}