List of usage examples for org.jfree.data.general SeriesChangeListener seriesChanged
public void seriesChanged(SeriesChangeEvent event);
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 a v 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(); }