List of usage examples for org.jfree.data.general SeriesChangeEvent SeriesChangeEvent
public SeriesChangeEvent(Object source)
From source file:edu.gmu.cs.sim.util.media.chart.ChartGenerator.java
/** Override this to remove a series from the chart. Be sure to call super(...) first. */ public void removeSeries(int index) { // stop the inspector.... SeriesAttributes[] c = getSeriesAttributes(); SeriesChangeListener tmpObj = c[index].getStoppable(); if (tmpObj != null) { tmpObj.seriesChanged(new SeriesChangeEvent(this)); }/*from w w w. j av a 2s. c o m*/ // for good measure, set the index of the component to something crazy just in case a stoppable tries to continue pulsing it Component comp = seriesAttributes.getComponent(index); ((SeriesAttributes) comp).setSeriesIndex(-1); // remove the attribute and rebuild indices seriesAttributes.remove(index); rebuildAttributeIndices(); revalidate(); }
From source file:org.jfree.data.general.Series.java
/** * General method for signalling to registered listeners that the series * has been changed.//from w w w.j a v a 2 s. c o m */ public void fireSeriesChanged() { if (this.notify) { notifyListeners(new SeriesChangeEvent(this)); } }