List of usage examples for org.jfree.data.time.ohlc OHLCSeries removeChangeListener
public void removeChangeListener(SeriesChangeListener listener)
From source file:org.jfree.data.time.ohlc.OHLCSeriesCollection.java
/** * Removes all the series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @since 1.0.14/*ww w . j a v a 2 s . c o m*/ */ public void removeAllSeries() { if (this.data.isEmpty()) { return; // nothing to do } // deregister the collection as a change listener to each series in the // collection for (int i = 0; i < this.data.size(); i++) { OHLCSeries series = (OHLCSeries) 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.time.ohlc.OHLCSeriesCollection.java
/** * Removes the specified series from the dataset and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series (<code>null</code> not permitted). * * @return <code>true</code> if the series was removed, and * <code>false</code> otherwise. * * @since 1.0.14//from www .j ava2s. com */ public boolean removeSeries(OHLCSeries series) { ParamChecks.nullNotPermitted(series, "series"); boolean removed = this.data.remove(series); if (removed) { series.removeChangeListener(this); fireDatasetChanged(); } return removed; }