/** * 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)); }
/** * Receives notification of a change to the plot's dataset. * <P> * The axis ranges are updated if necessary. * * @param event information about the event (not used here). */ @Override public void datasetChanged(DatasetChangeEvent event) { super.datasetChanged(event); if (this.subplots == null) { return; // this can happen during plot construction } XYDataset dataset = null; if (event.getDataset() instanceof XYDataset) { dataset = (XYDataset) event.getDataset(); } for (XYPlot subplot : this.subplots) { if (subplot.indexOf(dataset) >= 0) { subplot.configureRangeAxes(); } } }
/** * 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)); }
CategoryDataset dataset = (CategoryDataset) event.getDataset();
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)); }
/** * 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 a flag that controls whether the domain is treated as 'points in * time', or time periods. * * @param flag the flag. * * @deprecated This flag is no longer used, as of 1.0.1. The * <code>includeInterval</code> flag in methods such as * {@link #getDomainBounds(boolean)} makes this unnecessary. */ public void setDomainIsPointsInTime(boolean flag) { this.domainIsPointsInTime = flag; 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</code> not permitted). */ public void setXPosition(TimePeriodAnchor anchor) { if (anchor == null) { throw new IllegalArgumentException("Null 'anchor' argument."); } 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</code> not permitted). * * @see #getXPosition() */ public void setXPosition(TimePeriodAnchor anchor) { if (anchor == null) { throw new IllegalArgumentException("Null 'anchor' argument."); } this.xPosition = anchor; notifyListeners(new DatasetChangeEvent(this, this)); }
public void datasetChanged() { notifyListeners(new DatasetChangeEvent(this, this)); }