/** * Sets the interval position factor. This controls where the x-value is in * relation to the interval surrounding the x-value (0.0 means the x-value * will be positioned at the start, 0.5 in the middle, and 1.0 at the end). * * @param factor the factor. */ public void setIntervalPositionFactor(double factor) { this.intervalDelegate.setIntervalPositionFactor(factor); 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 and sends a {@link DatasetChangeEvent} to all * registered listeners. * * @param width the width (negative values not permitted). */ public void setIntervalWidth(double width) { if (width < 0.0) { throw new IllegalArgumentException("Negative 'width' argument."); } this.intervalDelegate.setFixedIntervalWidth(width); fireDatasetChanged(); }
/** * Sets the interval position factor. This controls where the x-value is in * relation to the interval surrounding the x-value (0.0 means the x-value * will be positioned at the start, 0.5 in the middle, and 1.0 at the end). * * @param factor the factor. */ public void setIntervalPositionFactor(double factor) { this.intervalDelegate.setIntervalPositionFactor(factor); fireDatasetChanged(); }
/** * Sets the flag that indicates wether 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 and sends a {@link DatasetChangeEvent} to all * registered listeners. * * @param width the width (negative values not permitted). */ public void setIntervalWidth(double width) { if (width < 0.0) { throw new IllegalArgumentException("Negative 'width' argument."); } this.intervalDelegate.setFixedIntervalWidth(width); 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(); fireDatasetChanged(); }
/** * Adds a series to the collection and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param series the series (<code>null</code> not permitted). */ public void addSeries(XYSeries series) { if (series == null) { throw new IllegalArgumentException("Null 'series' argument."); } this.data.add(series); series.addChangeListener(this); 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) { if (series == null) { throw new IllegalArgumentException("Null 'series' argument."); } if (this.data.contains(series)) { series.removeChangeListener(this); this.data.remove(series); fireDatasetChanged(); } }
/** * Removes a series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series index (zero-based). */ public void removeSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds."); } // fetch the series, remove the change listener, then remove the series. XYSeries ts = (XYSeries) this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); 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); series.removeVetoableChangeListener(this); } // Remove all the series from the collection and notify listeners. this.data.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); series.removeVetoableChangeListener(this); this.data.remove(series); fireDatasetChanged(); } }
/** * Adds a series to the collection and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param series the series ({@code null} not permitted). * * @throws IllegalArgumentException if the key for the series is null or * not unique within the dataset. */ public void addSeries(XYSeries series) { Args.nullNotPermitted(series, "series"); if (getSeriesIndex(series.getKey()) >= 0) { throw new IllegalArgumentException( "This dataset already contains a series with the key " + series.getKey()); } this.data.add(series); series.addChangeListener(this); series.addVetoableChangeListener(this); fireDatasetChanged(); }