List of usage examples for org.jfree.data.general SeriesChangeListener SeriesChangeListener
SeriesChangeListener
From source file:sim.portrayal.inspector.TimeSeriesChartingPropertyInspector.java
private void setupSeriesAttributes(Properties properties, int index) { if (isValidInspector()) { if (getGenerator().getNumSeriesAttributes() == 0) // recall that we've not been added yet {/*from ww w . ja v a 2 s . c om*/ // take control getGenerator().setTitle("" + properties.getName(index) + " of " + properties.getObject()); ((XYChartGenerator) getGenerator()).setYAxisLabel("" + properties.getName(index)); ((XYChartGenerator) getGenerator()).setXAxisLabel("Time"); } chartSeries = new XYSeries(properties.getName(index), false); // add our series seriesAttributes = ((TimeSeriesChartGenerator) generator).addSeries(chartSeries, new SeriesChangeListener() { public void seriesChanged(SeriesChangeEvent event) { getStopper().stop(); } }); } }