Java Code Examples for org.jfree.data.xy.XYIntervalSeries#addChangeListener()

The following examples show how to use org.jfree.data.xy.XYIntervalSeries#addChangeListener() . 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: XYIntervalSeriesTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Some checks for the clear() method.
 */
public void testClear() {
    XYIntervalSeries s1 = new XYIntervalSeries("S1");
    s1.addChangeListener(this);
    s1.clear();
    assertNull(this.lastEvent);
    assertTrue(s1.isEmpty());
    s1.add(1.0, 2.0, 3.0, 4.0, 5.0, 6.0);
    assertFalse(s1.isEmpty());
    s1.clear();
    assertNotNull(this.lastEvent);
    assertTrue(s1.isEmpty());
}
 
Example 2
Source File: XYIntervalSeriesTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Some checks for the clear() method.
 */
public void testClear() {
	XYIntervalSeries s1 = new XYIntervalSeries("S1");
    s1.addChangeListener(this);
    s1.clear();
    assertNull(this.lastEvent);
    assertTrue(s1.isEmpty());
    s1.add(1.0, 2.0, 3.0, 4.0, 5.0, 6.0);
    assertFalse(s1.isEmpty());
    s1.clear();
    assertNotNull(this.lastEvent);
    assertTrue(s1.isEmpty());
}