/** * Returns the number of series in the dataset. * * @return The series count. */ @Override public int getSeriesCount() { return this.underlying.getSeriesCount(); }
/** * Returns the number of series in the dataset. * * @return The series count. */ public int getSeriesCount() { return this.underlying.getSeriesCount(); }
/** * Returns a series from the collection. * * @param series the series index (zero-based). * * @return The series. * * @since 1.0.1 */ public TaskSeries getSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds"); } return (TaskSeries) this.data.get(series); }
/** * Returns a series from the collection. * * @param series the series index (zero-based). * * @return The series. * * @since 1.0.1 */ public TaskSeries getSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds"); } return (TaskSeries) this.data.get(series); }
/** * Refreshes the keys. */ private void refreshKeys() { this.keys.clear(); for (int i = 0; i < getSeriesCount(); i++) { TaskSeries series = (TaskSeries) this.data.get(i); // look for any keys that we don't already know about... Iterator iterator = series.getTasks().iterator(); while (iterator.hasNext()) { Task task = (Task) iterator.next(); String key = task.getDescription(); int index = this.keys.indexOf(key); if (index < 0) { this.keys.add(key); } } } }
/** * Refreshes the keys. */ private void refreshKeys() { this.keys.clear(); for (int i = 0; i < getSeriesCount(); i++) { TaskSeries series = (TaskSeries) this.data.get(i); // look for any keys that we don't already know about... Iterator iterator = series.getTasks().iterator(); while (iterator.hasNext()) { Task task = (Task) iterator.next(); String key = task.getDescription(); int index = this.keys.indexOf(key); if (index < 0) { this.keys.add(key); } } } }
/** * Removes a series from the collection and sends * a {@link org.jfree.data.general.DatasetChangeEvent} * to all registered listeners. * * @param series the series (zero based index). */ public void remove(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException( "TaskSeriesCollection.remove(): index outside valid range."); } // fetch the series, remove the change listener, then remove the series. TaskSeries ts = (TaskSeries) this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); fireDatasetChanged(); }
/** * Removes a series from the collection and sends * a {@link org.jfree.data.general.DatasetChangeEvent} * to all registered listeners. * * @param series the series (zero based index). */ public void remove(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException( "TaskSeriesCollection.remove(): index outside valid range."); } // fetch the series, remove the change listener, then remove the series. TaskSeries ts = (TaskSeries) this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); fireDatasetChanged(); }