/** * Removes the specified series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series (<code>null</code> not permitted). */ public void removeSeries(TimeSeries series) { if (series == null) { throw new IllegalArgumentException("Null 'series' argument."); } this.data.remove(series); series.removeChangeListener(this); fireDatasetChanged(); }
/** * Removes all the series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. */ public void removeAllSeries() { // deregister the collection as a change listener to each series in the // collection for (int i = 0; i < this.data.size(); i++) { TimeSeries series = (TimeSeries) this.data.get(i); series.removeChangeListener(this); } // remove all the series from the collection and notify listeners. this.data.clear(); fireDatasetChanged(); }
/** * Removes all the series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. */ public void removeAllSeries() { // deregister the collection as a change listener to each series in the // collection for (int i = 0; i < this.data.size(); i++) { TimeSeries series = (TimeSeries) this.data.get(i); series.removeChangeListener(this); series.removeVetoableChangeListener(this); } // remove all the series from the collection and notify listeners. this.data.clear(); fireDatasetChanged(); }
/** * Removes the specified series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series ({@code null} not permitted). */ public void removeSeries(TimeSeries series) { Args.nullNotPermitted(series, "series"); this.data.remove(series); series.removeChangeListener(this); series.removeVetoableChangeListener(this); fireDatasetChanged(); }