List of usage examples for org.jfree.data.xy YIntervalSeriesCollection removeSeries
public void removeSeries(YIntervalSeries series)
From source file:org.jfree.data.xy.YIntervalSeriesCollectionTest.java
/** * Some basic checks for the removeSeries() method. *///from w ww . j a v a 2s .co m @Test public void testRemoveSeries() { YIntervalSeriesCollection c = new YIntervalSeriesCollection(); YIntervalSeries s1 = new YIntervalSeries("s1"); c.addSeries(s1); c.removeSeries(0); assertEquals(0, c.getSeriesCount()); c.addSeries(s1); boolean pass = false; try { c.removeSeries(-1); } catch (IllegalArgumentException e) { pass = true; } assertTrue(pass); pass = false; try { c.removeSeries(1); } catch (IllegalArgumentException e) { pass = true; } assertTrue(pass); }
From source file:org.jfree.data.xy.junit.YIntervalSeriesCollectionTest.java
/** * Some basic checks for the removeSeries() method. *//* www .j a v a 2 s . c om*/ public void testRemoveSeries() { YIntervalSeriesCollection c = new YIntervalSeriesCollection(); YIntervalSeries s1 = new YIntervalSeries("s1"); c.addSeries(s1); c.removeSeries(0); assertEquals(0, c.getSeriesCount()); c.addSeries(s1); boolean pass = false; try { c.removeSeries(-1); } catch (IllegalArgumentException e) { pass = true; } assertTrue(pass); pass = false; try { c.removeSeries(1); } catch (IllegalArgumentException e) { pass = true; } assertTrue(pass); }