/** * 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(); }
/** * Returns the key for a series. * * @param seriesIndex zero-based series index. * * @return The key for a series. */ @Override public Comparable getSeriesKey(int seriesIndex) { return getSeries(seriesIndex).getKey(); }
/** * 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(); }
/** * Returns the series having the specified index. * * @param seriesIndex zero-based series index. * * @return The series. */ public MatrixSeries getSeries(int seriesIndex) { if ((seriesIndex < 0) || (seriesIndex > getSeriesCount())) { throw new IllegalArgumentException("Index outside valid range."); } MatrixSeries series = (MatrixSeries) this.seriesList.get(seriesIndex); return series; }
/** * 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(); }
/** * Returns the series having the specified index. * * @param seriesIndex zero-based series index. * * @return The series. * * @throws IllegalArgumentException */ public MatrixSeries getSeries(int seriesIndex) { if ((seriesIndex < 0) || (seriesIndex > getSeriesCount())) { throw new IllegalArgumentException("Index outside valid range."); } MatrixSeries series = (MatrixSeries) this.seriesList.get(seriesIndex); return series; }
/** * 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(); }
/** * Adds a series to the collection. * <P> * Notifies all registered listeners that the dataset has changed. * </p> * * @param series the series. * * @throws IllegalArgumentException */ public void addSeries(MatrixSeries series) { // check arguments... if (series == null) { throw new IllegalArgumentException("Cannot add null series."); } // FIXME: Check that there isn't already a series with the same key // add the series... this.seriesList.add(series); series.addChangeListener(this); fireDatasetChanged(); }
/** * Returns the number of items in the specified series. * * @param seriesIndex zero-based series index. * * @return The number of items in the specified series. */ @Override public int getItemCount(int seriesIndex) { return getSeries(seriesIndex).getItemCount(); }
/** * 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(); } }
/** * Returns the key for a series. * * @param seriesIndex zero-based series index. * * @return The key for a series. */ public Comparable getSeriesKey(int seriesIndex) { return getSeries(seriesIndex).getKey(); }
/** * 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(); } }
/** * Returns the number of items in the specified series. * * @param seriesIndex zero-based series index. * * @return The number of items in the specified series. */ public int getItemCount(int seriesIndex) { return getSeries(seriesIndex).getItemCount(); }
/** * Adds a series to the collection. * <P> * Notifies all registered listeners that the dataset has changed. * </p> * * @param series the series ({@code null} not permitted). */ public void addSeries(MatrixSeries series) { Args.nullNotPermitted(series, "series"); // FIXME: Check that there isn't already a series with the same key // add the series... this.seriesList.add(series); series.addChangeListener(this); fireDatasetChanged(); }