List of usage examples for org.jfree.data.xy VectorSeries removeChangeListener
public void removeChangeListener(SeriesChangeListener listener)
From source file:org.jfree.data.xy.VectorSeriesCollection.java
/** * Removes all the series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. *///w ww . j a v a2 s . c o m 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++) { VectorSeries series = (VectorSeries) this.data.get(i); series.removeChangeListener(this); } // remove all the series from the collection and notify listeners. this.data.clear(); fireDatasetChanged(); }
From source file:org.jfree.data.xy.VectorSeriesCollection.java
/** * 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). * * @return A boolean indicating whether the series has actually been * removed./* www . ja va 2 s . com*/ */ public boolean removeSeries(VectorSeries series) { ParamChecks.nullNotPermitted(series, "series"); boolean removed = this.data.remove(series); if (removed) { series.removeChangeListener(this); fireDatasetChanged(); } return removed; }