/** * Sets the interval width to a fixed value, and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param d the new interval width (must be > 0). */ public void setIntervalWidth(double d) { this.intervalDelegate.setFixedIntervalWidth(d); fireDatasetChanged(); }
/** * Sets the flag that indicates whether the interval width is automatically * calculated or not. * * @param b a boolean. */ public void setAutoWidth(boolean b) { this.intervalDelegate.setAutoWidth(b); fireDatasetChanged(); }
/** * Sets the interval position factor. Must be between 0.0 and 1.0 inclusive. * If the factor is 0.5, the gap is in the middle of the x values. If it * is lesser than 0.5, the gap is farther to the left and if greater than * 0.5 it gets farther to the right. * * @param d the new interval position factor. */ public void setIntervalPositionFactor(double d) { this.intervalDelegate.setIntervalPositionFactor(d); fireDatasetChanged(); }
/** * Sets the flag that indicates whether the interval width is automatically * calculated or not. * * @param b a boolean. */ public void setAutoWidth(boolean b) { this.intervalDelegate.setAutoWidth(b); fireDatasetChanged(); }
/** * Sets the interval width to a fixed value, and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param d the new interval width (must be > 0). */ public void setIntervalWidth(double d) { this.intervalDelegate.setFixedIntervalWidth(d); fireDatasetChanged(); }
/** * Sets the interval position factor. Must be between 0.0 and 1.0 inclusive. * If the factor is 0.5, the gap is in the middle of the x values. If it * is lesser than 0.5, the gap is farther to the left and if greater than * 0.5 it gets farther to the right. * * @param d the new interval position factor. */ public void setIntervalPositionFactor(double d) { this.intervalDelegate.setIntervalPositionFactor(d); fireDatasetChanged(); }
/** * This method receives notification when a series belonging to the dataset * changes. It responds by updating the x-points for the entire dataset * and sending a {@link DatasetChangeEvent} to all registered listeners. * * @param event information about the change. */ public void seriesChanged(SeriesChangeEvent event) { if (this.propagateEvents) { updateXPoints(); fireDatasetChanged(); } }
/** * This method receives notification when a series belonging to the dataset * changes. It responds by updating the x-points for the entire dataset * and sending a {@link DatasetChangeEvent} to all registered listeners. * * @param event information about the change. */ @Override public void seriesChanged(SeriesChangeEvent event) { if (this.propagateEvents) { updateXPoints(); fireDatasetChanged(); } }
/** * Removes all the series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. */ 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(); }
/** * Removes all the series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. */ 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(); }
/** * Removes the items from all series for a given x value. * * @param x the x-value. */ public void removeAllValuesForX(Number x) { if (x == null) { throw new IllegalArgumentException("Null 'x' argument."); } boolean savedState = this.propagateEvents; this.propagateEvents = false; for (int s = 0; s < this.data.size(); s++) { XYSeries series = (XYSeries) this.data.get(s); series.remove(x); } this.propagateEvents = savedState; this.xPoints.remove(x); fireDatasetChanged(); }
/** * Removes a series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series (<code>null</code> not permitted). */ public void removeSeries(XYSeries series) { // check arguments... if (series == null) { throw new IllegalArgumentException("Null 'series' argument."); } // remove the series... if (this.data.contains(series)) { series.removeChangeListener(this); this.data.remove(series); if (this.data.size() == 0) { this.xPoints.clear(); } fireDatasetChanged(); } }
/** * Removes a series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series ({@code null} not permitted). */ public void removeSeries(XYSeries series) { Args.nullNotPermitted(series, "series"); if (this.data.contains(series)) { series.removeChangeListener(this); this.data.remove(series); if (this.data.isEmpty()) { this.xPoints.clear(); } fireDatasetChanged(); } }
/** * Removes the items from all series for a given x value. * * @param x the x-value. */ public void removeAllValuesForX(Number x) { Args.nullNotPermitted(x, "x"); boolean savedState = this.propagateEvents; this.propagateEvents = false; for (int s = 0; s < this.data.size(); s++) { XYSeries series = (XYSeries) this.data.get(s); series.remove(x); } this.propagateEvents = savedState; this.xPoints.remove(x); fireDatasetChanged(); }
/** * Removes a series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series (zero based index). */ 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(); }
/** * Removes a series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series (zero based index). */ 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.size() == 0) { this.xPoints.clear(); } else if (this.autoPrune) { prune(); } fireDatasetChanged(); }
/** * Adds a series to the collection and sends a {@link DatasetChangeEvent} * to all registered listeners. The series should be configured to NOT * allow duplicate x-values. * * @param series the series (<code>null</code> not permitted). */ public void addSeries(XYSeries series) { if (series == null) { throw new IllegalArgumentException("Null 'series' argument."); } if (series.getAllowDuplicateXValues()) { throw new IllegalArgumentException( "Cannot accept XYSeries that allow duplicate values. " + "Use XYSeries(seriesName, <sort>, false) constructor." ); } updateXPoints(series); this.data.add(series); series.addChangeListener(this); fireDatasetChanged(); }
/** * Adds a series to the collection and sends a {@link DatasetChangeEvent} * to all registered listeners. The series should be configured to NOT * allow duplicate x-values. * * @param series the series ({@code null} not permitted). */ public void addSeries(XYSeries series) { Args.nullNotPermitted(series, "series"); if (series.getAllowDuplicateXValues()) { throw new IllegalArgumentException( "Cannot accept XYSeries that allow duplicate values. " + "Use XYSeries(seriesName, <sort>, false) constructor." ); } updateXPoints(series); this.data.add(series); series.addChangeListener(this); fireDatasetChanged(); }