/** * Removes all the series from the collection. * <P> * Notifies all registered listeners that the dataset has changed. * </p> */ public void removeAllSeries() { // Unregister the collection as a change listener to each series in // the collection. for (int i = 0; i < this.seriesList.size(); i++) { MatrixSeries series = (MatrixSeries) this.seriesList.get(i); series.removeChangeListener(this); } // Remove all the series from the collection and notify listeners. this.seriesList.clear(); fireDatasetChanged(); }
/** * Removes all the series from the collection. * <P> * Notifies all registered listeners that the dataset has changed. * </p> */ public void removeAllSeries() { // Unregister the collection as a change listener to each series in // the collection. for (int i = 0; i < this.seriesList.size(); i++) { MatrixSeries series = (MatrixSeries) this.seriesList.get(i); series.removeChangeListener(this); } // Remove all the series from the collection and notify listeners. this.seriesList.clear(); fireDatasetChanged(); }
/** * Removes a series from the collection. * <P> * Notifies all registered listeners that the dataset has changed. * </p> * * @param series the series. * * @throws IllegalArgumentException */ public void removeSeries(MatrixSeries series) { // check arguments... if (series == null) { throw new IllegalArgumentException("Cannot remove null series."); } // remove the series... if (this.seriesList.contains(series)) { series.removeChangeListener(this); this.seriesList.remove(series); fireDatasetChanged(); } }
/** * Removes a series from the collection. * <P> * Notifies all registered listeners that the dataset has changed. * * @param seriesIndex the series (zero based index). */ public void removeSeries(int seriesIndex) { // check arguments... if ((seriesIndex < 0) || (seriesIndex > getSeriesCount())) { throw new IllegalArgumentException("Index outside valid range."); } // fetch the series, remove the change listener, then remove the series. MatrixSeries series = (MatrixSeries) this.seriesList.get(seriesIndex); series.removeChangeListener(this); this.seriesList.remove(seriesIndex); fireDatasetChanged(); }
/** * Removes a series from the collection. * <P> * Notifies all registered listeners that the dataset has changed. * </p> * * @param series the series ({@code null}). */ public void removeSeries(MatrixSeries series) { Args.nullNotPermitted(series, "series"); if (this.seriesList.contains(series)) { series.removeChangeListener(this); this.seriesList.remove(series); fireDatasetChanged(); } }
/** * Removes a series from the collection. * <P> * Notifies all registered listeners that the dataset has changed. * * @param seriesIndex the series (zero based index). * * @throws IllegalArgumentException */ public void removeSeries(int seriesIndex) { // check arguments... if ((seriesIndex < 0) || (seriesIndex > getSeriesCount())) { throw new IllegalArgumentException("Index outside valid range."); } // fetch the series, remove the change listener, then remove the series. MatrixSeries series = (MatrixSeries) this.seriesList.get(seriesIndex); series.removeChangeListener(this); this.seriesList.remove(seriesIndex); fireDatasetChanged(); }