List of usage examples for org.jfree.data.xy XYSeries removeChangeListener
public void removeChangeListener(SeriesChangeListener listener)
From source file:org.jfree.data.xy.DefaultTableXYDataset.java
/** * Removes all the series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. *///from w w w . j a va 2 s . co m public void removeAllSeries() { // Unregister the collection as a change listener to each series in // the collection. for (int i = 0; i < this.data.size(); i++) { XYSeries series = (XYSeries) this.data.get(i); series.removeChangeListener(this); } // Remove all the series from the collection and notify listeners. this.data.clear(); this.xPoints.clear(); fireDatasetChanged(); }
From source file:org.jfree.data.xy.DefaultTableXYDataset.java
/** * Removes a series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series (zero based index). *//* ww w . j a v a2 s . c om*/ public void removeSeries(int series) { // check arguments... if ((series < 0) || (series > getSeriesCount())) { throw new IllegalArgumentException("Index outside valid range."); } // fetch the series, remove the change listener, then remove the series. XYSeries s = (XYSeries) this.data.get(series); s.removeChangeListener(this); this.data.remove(series); if (this.data.isEmpty()) { this.xPoints.clear(); } else if (this.autoPrune) { prune(); } fireDatasetChanged(); }
From source file:org.jfree.data.xy.DefaultTableXYDataset.java
/** * Removes a series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series (<code>null</code> not permitted). *///from w w w . ja v a 2 s .c om public void removeSeries(XYSeries series) { ParamChecks.nullNotPermitted(series, "series"); if (this.data.contains(series)) { series.removeChangeListener(this); this.data.remove(series); if (this.data.isEmpty()) { this.xPoints.clear(); } fireDatasetChanged(); } }
From source file:org.jfree.data.xy.XYSeriesCollection.java
/** * Removes all the series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. *//*from w w w . j av a 2s . c o m*/ public void removeAllSeries() { // Unregister the collection as a change listener to each series in // the collection. for (int i = 0; i < this.data.size(); i++) { XYSeries series = (XYSeries) this.data.get(i); series.removeChangeListener(this); series.removeVetoableChangeListener(this); } // Remove all the series from the collection and notify listeners. this.data.clear(); fireDatasetChanged(); }
From source file:org.jfree.data.xy.XYSeriesCollection.java
/** * Removes a series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series (<code>null</code> not permitted). *///from w ww . j a v a2 s. co m public void removeSeries(XYSeries series) { ParamChecks.nullNotPermitted(series, "series"); if (this.data.contains(series)) { series.removeChangeListener(this); series.removeVetoableChangeListener(this); this.data.remove(series); fireDatasetChanged(); } }