/** * Removes all bins and sends a {@link DatasetChangeEvent} to all * registered listeners. * * @since 1.0.6 * * @see #addBin(SimpleHistogramBin) */ public void removeAllBins() { this.bins = new ArrayList(); notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Removes all bins and sends a {@link DatasetChangeEvent} to all * registered listeners. * * @since 1.0.6 * * @see #addBin(SimpleHistogramBin) */ public void removeAllBins() { this.bins = new ArrayList(); notifyListeners(new DatasetChangeEvent(this, this)); }
public void updateChart() { // synchronized (plot) { plot.datasetChanged(new DatasetChangeEvent(this, series)); lastUpdate = System.currentTimeMillis(); // } }
/** * Notifies all registered listeners that the dataset has changed. * * @see #addChangeListener(DatasetChangeListener) */ protected void fireDatasetChanged() { notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Sets the value and sends a {@link DatasetChangeEvent} to all registered * listeners. * * @param value the new value ({@code null} permitted). */ public void setValue(Number value) { this.value = value; notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Notifies all registered listeners that the dataset has changed, * provided that the {@code notify} flag has not been set to * {@code false}. * * @see #addChangeListener(DatasetChangeListener) */ protected void fireDatasetChanged() { if (this.notify) { notifyListeners(new DatasetChangeEvent(this, this)); } }
/** * Sets the bar width and sends a {@link DatasetChangeEvent} to all * registered listeners. * * @param barWidth the bar width. * * @see #getBarWidth() * @since 1.0.4 */ public void setBarWidth(double barWidth) { this.barWidth = barWidth; notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Sets the value and sends a {@link DatasetChangeEvent} to all registered * listeners. * * @param value the new value (<code>null</code> permitted). */ public void setValue(Number value) { this.value = value; notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Sets the bar width and sends a {@link DatasetChangeEvent} to all * registered listeners. * * @param barWidth the bar width. * * @see #getBarWidth() * @since 1.0.4 */ public void setBarWidth(double barWidth) { this.barWidth = barWidth; notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Sets a flag that controls whether the domain is treated as 'points in * time', or time periods. A {@link DatasetChangeEvent} is sent to all * registered listeners. * * @param flag the new value of the flag. * * @see #getDomainIsPointsInTime() */ public void setDomainIsPointsInTime(boolean flag) { this.domainIsPointsInTime = flag; notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Sets the flag that controls whether or not the bin count is divided by * the bin size in the {@link #getYValue(int, int)} method, and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param adjust the flag. * * @see #getAdjustForBinSize() */ public void setAdjustForBinSize(boolean adjust) { this.adjustForBinSize = adjust; notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Sets the histogram type and sends a {@link DatasetChangeEvent} to all * registered listeners. * * @param type the type (<code>null</code> not permitted). */ public void setType(HistogramType type) { if (type == null) { throw new IllegalArgumentException("Null 'type' argument"); } this.type = type; notifyListeners(new DatasetChangeEvent(this, this)); }
public void removeSeries(String seriesKey) { int seriesIndex = indexOf(seriesKey); if (seriesIndex >= 0) { seriesKeys.remove(seriesIndex); seriesList.remove(seriesIndex); notifyListeners(new DatasetChangeEvent(this, this)); } } }
public void reset() { series.removeAllSeries(); seriesMap.clear(); pivotValue = 0.0d; plot.datasetChanged(new DatasetChangeEvent(this, series)); }
/** * Sets the value for the dataset and sends a {@link DatasetChangeEvent} to * all registered listeners. * * @param key the key. * @param value the value ({@code null} permitted). */ public void setValue(Comparable key, Number value) { this.data = new DefaultKeyedValue(key, value); notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Sets the value for the dataset and sends a {@link DatasetChangeEvent} to * all registered listeners. * * @param key the key. * @param value the value (<code>null</code> permitted). */ public void setValue(Comparable key, Number value) { this.data = new DefaultKeyedValue(key, value); notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Sets the position within each time period that is used for the X values * when the collection is used as an {@link XYDataset}, then sends a * {@link DatasetChangeEvent} is sent to all registered listeners. * * @param anchor the anchor position ({@code null} not permitted). */ public void setXPosition(TimePeriodAnchor anchor) { Args.nullNotPermitted(anchor, "anchor"); this.xPosition = anchor; notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Sets the position within each time period that is used for the X values, * then sends a {@link DatasetChangeEvent} to all registered listeners. * * @param anchor the anchor position ({@code null} not permitted). * * @see #getXPosition() */ public void setXPosition(TimePeriodAnchor anchor) { Args.nullNotPermitted(anchor, "anchor"); this.xPosition = anchor; notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Adds one SeriesDataset to the combination. Listeners are notified of the * change. * * @param data the SeriesDataset to add. */ public void add(SeriesDataset data) { fastAdd(data); DatasetChangeEvent event = new DatasetChangeEvent(this, this); notifyListeners(event); }
/** * Adds a set of values to the dataset and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param values the values (<code>null</code> not permitted). * * @see #clearObservations() */ public void addObservations(double[] values) { for (int i = 0; i < values.length; i++) { addObservation(values[i], false); } notifyListeners(new DatasetChangeEvent(this, this)); }