List of usage examples for org.jfree.data.general DatasetChangeEvent DatasetChangeEvent
public DatasetChangeEvent(Object source, Dataset dataset)
From source file:ca.sqlpower.wabit.swingui.chart.effect.PieChartAnimator.java
@Override protected void doFrame(int frame, double pct) { JFreeChart pieChart = mpplot.getPieChart(); PiePlot plot = (PiePlot) pieChart.getPlot(); plot.setStartAngle(spinInterpolator.value(initialAngle, finalAngle, pct)); plot.setForegroundAlpha((float) alphaInterpolator.value(0.0, 1.0, pct)); // need to trigger a repaint, because the pie plot is just a stamper mpplot.datasetChanged(new DatasetChangeEvent(pieChart, mpplot.getDataset())); }
From source file:net.sf.mzmine.modules.visualization.twod.BaseXYPlot.java
void switchPalette() { TwoDPaletteType types[] = TwoDPaletteType.values(); int newIndex = paletteType.ordinal() + 1; if (newIndex >= types.length) newIndex = 0;/*from w w w .j av a2 s . co m*/ paletteType = types[newIndex]; zoomOutBitmap = null; datasetChanged(new DatasetChangeEvent(dataset, dataset)); }
From source file:peakml.util.jfreechart.FastErrorBarPlot.java
public void setShowAll(boolean v) { if (showall != v) { showall = v;// w ww .ja va2s. c o m datasetChanged(new DatasetChangeEvent(this, null)); } }
From source file:org.jfree.chart.demo.SampleXYDataset.java
/** * Sets the translation constant for the x-axis. * * @param translate the translation factor. *//*from w ww. jav a2s. c om*/ public void setTranslate(final double translate) { this.translate = translate; notifyListeners(new DatasetChangeEvent(this, this)); }
From source file:net.sf.mzmine.modules.visualization.twod.BaseXYPlot.java
void setPlotMode(PlotMode plotMode) { this.plotMode = plotMode; // clear the zoom out image cache zoomOutBitmap = null;/*from w w w .ja v a 2 s . co m*/ datasetChanged(new DatasetChangeEvent(dataset, dataset)); }
From source file:net.sf.mzmine.modules.visualization.twod.BaseXYPlot.java
void setLogScale(boolean logscale) { logScale = logscale;/*from w w w . j a v a2 s . c o m*/ // clear the zoom out image cache zoomOutBitmap = null; datasetChanged(new DatasetChangeEvent(dataset, dataset)); }
From source file:org.jfree.data.general.DefaultValueDataset.java
/** * Sets the value and sends a {@link DatasetChangeEvent} to all registered * listeners./* www. j a v a2 s.com*/ * * @param value the new value (<code>null</code> permitted). */ public void setValue(Number value) { this.value = value; notifyListeners(new DatasetChangeEvent(this, this)); }
From source file:org.jfree.data.time.ohlc.OHLCSeriesCollection.java
/** * 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). * * @since 1.0.11//from w w w. java 2s . co m */ public void setXPosition(TimePeriodAnchor anchor) { ParamChecks.nullNotPermitted(anchor, "anchor"); this.xPosition = anchor; notifyListeners(new DatasetChangeEvent(this, this)); }
From source file:org.jfree.data.xy.XYBarDataset.java
/** * Sets the bar width and sends a {@link DatasetChangeEvent} to all * registered listeners.// w ww.j ava 2 s . com * * @param barWidth the bar width. * * @see #getBarWidth() * @since 1.0.4 */ public void setBarWidth(double barWidth) { this.barWidth = barWidth; notifyListeners(new DatasetChangeEvent(this, this)); }
From source file:org.jfree.data.general.DefaultKeyedValueDataset.java
/** * Sets the value for the dataset and sends a {@link DatasetChangeEvent} to * all registered listeners.//from w ww .jav a 2 s. c o m * * @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)); }