本文整理汇总了Java中org.jfree.data.general.SeriesChangeEvent类的典型用法代码示例。如果您正苦于以下问题:Java SeriesChangeEvent类的具体用法?Java SeriesChangeEvent怎么用?Java SeriesChangeEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SeriesChangeEvent类属于org.jfree.data.general包,在下文中一共展示了SeriesChangeEvent类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: seriesChanged
import org.jfree.data.general.SeriesChangeEvent; //导入依赖的package包/类
/**
* This method receives notification when a series belonging to the dataset
* changes. It responds by updating the x-points for the entire dataset
* and sending a {@link DatasetChangeEvent} to all registered listeners.
*
* @param event information about the change.
*/
@Override
public void seriesChanged(SeriesChangeEvent event) {
if (this.propagateEvents) {
updateXPoints();
fireDatasetChanged();
}
}
示例2: seriesChanged
import org.jfree.data.general.SeriesChangeEvent; //导入依赖的package包/类
@Override
public void seriesChanged(final SeriesChangeEvent event) {
if (utilityModel.utilityOutputModel != null) {
final double utility = utilityModel.utilityOutputModel.getValue();
accumulator.add(utility, 1);
}
if (isPeriodEnd()) {
writeCsvLine(getPeriodLabel(),
Double.toString(accumulator.getAmount()));
accumulator.reset();
}
}
示例3: seriesChanged
import org.jfree.data.general.SeriesChangeEvent; //导入依赖的package包/类
@Override
public void seriesChanged(final SeriesChangeEvent event) {
if (industryModel.outputModel != null) {
final double output = industryModel.outputModel.getValue();
accumulator.add(output, 1);
}
if (isPeriodEnd()) {
writeCsvLine(getPeriodLabel(),
Double.toString(accumulator.getAmount()));
accumulator.reset();
}
}
示例4: seriesChanged
import org.jfree.data.general.SeriesChangeEvent; //导入依赖的package包/类
@Override
public void seriesChanged(final SeriesChangeEvent event) {
if (m1Model != null) {
final double output = m1Model.getValue();
accumulator.add(output, 1);
}
if (isPeriodEnd()) {
writeCsvLine(getPeriodLabel(),
Double.toString(accumulator.getAmount()));
accumulator.reset();
}
}
示例5: seriesChanged
import org.jfree.data.general.SeriesChangeEvent; //导入依赖的package包/类
@Override
public void seriesChanged(final SeriesChangeEvent event) {
if (pricingBehaviourModel.soldModel != null) {
final double output = pricingBehaviourModel.soldModel.getValue();
accumulator.add(output, 1);
}
if (isPeriodEnd()) {
writeCsvLine(getPeriodLabel(),
Double.toString(accumulator.getAmount()));
accumulator.reset();
}
}
示例6: fireSeriesChanged
import org.jfree.data.general.SeriesChangeEvent; //导入依赖的package包/类
/**
* Sends a {@link SeriesChangeEvent} to all registered listeners.
*/
protected void fireSeriesChanged() {
seriesChanged(new SeriesChangeEvent(this));
}
示例7: seriesChanged
import org.jfree.data.general.SeriesChangeEvent; //导入依赖的package包/类
/**
* Called when a series belonging to the dataset changes.
*
* @param event information about the change.
*/
@Override
public void seriesChanged(SeriesChangeEvent event) {
refreshKeys();
fireDatasetChanged();
}
示例8: update
import org.jfree.data.general.SeriesChangeEvent; //导入依赖的package包/类
/**
* Update a series displayed in the excitationPanel corresponding to passed in index
*/
public void update(int series)
{
XYSeriesCollection seriesCollection = (XYSeriesCollection) getChart().getXYPlot().getDataset();
ExcitationRenderer renderer = (ExcitationRenderer) getChart().getXYPlot().getRenderer();
// Current value of use_steps
//boolean useStepsFlag = renderer.getControl().getUseSteps();
//renderer.getControl().setUseSteps(!useStepsFlag);
// update he functions
if (renderer==null)
return;
SetControlNodes cnodes=null;
if (series==0)
cnodes = renderer.getControl().getControlValues();
else if (series==1)
cnodes=renderer.getControl().getControlMinValues();
else
cnodes=renderer.getControl().getControlMaxValues();
XYSeries ser=seriesCollection.getSeries(series);
ser.clear();
// RenderingInfo keeps stale refs need to be removed from the Chart
XYFunctionInterface ctrlFunction = null;
if (series==0)
ctrlFunction=ExcitationEditorJPanel.createFunctionFromControlLinear((FunctionXYSeries) ser,
cnodes, !renderer.getControl().getUseSteps());
else
ctrlFunction=ExcitationEditorJPanel.createFunctionFromControlLinear((FunctionXYSeries) ser,
cnodes, true);
//XYFunctionInterface xyFunc = new XYFunctionInterface(ctrlFunction);
renderer.replaceFunction(series, ctrlFunction);
// The following is a hack adopted from the FunctionPanel to nvoke methods on listeners directly instead of using events!!
Object[] listeners = functionPanelListeners.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == FunctionPanelListener.class) {
((ExcitationPanelListener) listeners[i + 1]).replaceFunction(ctrlFunction, series);
}
}
seriesCollection.seriesChanged(new SeriesChangeEvent(this));
setChanged(true);
}