本文整理了Java中org.jfree.chart.plot.XYPlot.datasetChanged()
方法的一些代码示例,展示了XYPlot.datasetChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYPlot.datasetChanged()
方法的具体详情如下:
包路径:org.jfree.chart.plot.XYPlot
类名称:XYPlot
方法名:datasetChanged
[英]Receives notification of a change to the plot's dataset.
The axis ranges are updated if necessary.
[中]接收绘图数据集更改的通知。
如有必要,将更新轴范围。
代码示例来源:origin: org.jwall/streams-plotter
public void updateChart() {
// synchronized (plot) {
plot.datasetChanged(new DatasetChangeEvent(this, series));
lastUpdate = System.currentTimeMillis();
// }
}
代码示例来源:origin: org.jwall/streams-plotter
public void reset() {
series.removeAllSeries();
seriesMap.clear();
pivotValue = 0.0d;
plot.datasetChanged(new DatasetChangeEvent(this, series));
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Maps the specified dataset to the axes in the list. Note that the
* conversion of data values into Java2D space is always performed using
* the first axis in the list.
*
* @param index the dataset index (zero-based).
* @param axisIndices the axis indices (<code>null</code> permitted).
*
* @since 1.0.12
*/
public void mapDatasetToRangeAxes(int index, List axisIndices) {
if (index < 0) {
throw new IllegalArgumentException("Requires 'index' >= 0.");
}
checkAxisIndices(axisIndices);
Integer key = new Integer(index);
this.datasetToRangeAxesMap.put(key, new ArrayList(axisIndices));
// fake a dataset change event to update axes...
datasetChanged(new DatasetChangeEvent(this, getDataset(index)));
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Maps the specified dataset to the axes in the list. Note that the
* conversion of data values into Java2D space is always performed using
* the first axis in the list.
*
* @param index the dataset index (zero-based).
* @param axisIndices the axis indices (<code>null</code> permitted).
*
* @since 1.0.12
*/
public void mapDatasetToDomainAxes(int index, List axisIndices) {
if (index < 0) {
throw new IllegalArgumentException("Requires 'index' >= 0.");
}
checkAxisIndices(axisIndices);
Integer key = new Integer(index);
this.datasetToDomainAxesMap.put(key, new ArrayList(axisIndices));
// fake a dataset change event to update axes...
datasetChanged(new DatasetChangeEvent(this, getDataset(index)));
}
代码示例来源:origin: jfree/jfreechart
/**
* Maps the specified dataset to the axes in the list. Note that the
* conversion of data values into Java2D space is always performed using
* the first axis in the list.
*
* @param index the dataset index (zero-based).
* @param axisIndices the axis indices ({@code null} permitted).
*
* @since 1.0.12
*/
public void mapDatasetToRangeAxes(int index, List axisIndices) {
Args.requireNonNegative(index, "index");
checkAxisIndices(axisIndices);
Integer key = new Integer(index);
this.datasetToRangeAxesMap.put(key, new ArrayList(axisIndices));
// fake a dataset change event to update axes...
datasetChanged(new DatasetChangeEvent(this, getDataset(index)));
}
代码示例来源:origin: jfree/jfreechart
/**
* Maps the specified dataset to the axes in the list. Note that the
* conversion of data values into Java2D space is always performed using
* the first axis in the list.
*
* @param index the dataset index (zero-based).
* @param axisIndices the axis indices ({@code null} permitted).
*
* @since 1.0.12
*/
public void mapDatasetToDomainAxes(int index, List axisIndices) {
Args.requireNonNegative(index, "index");
checkAxisIndices(axisIndices);
Integer key = new Integer(index);
this.datasetToDomainAxesMap.put(key, new ArrayList(axisIndices));
// fake a dataset change event to update axes...
datasetChanged(new DatasetChangeEvent(this, getDataset(index)));
}
代码示例来源:origin: jfree/jfreechart
/**
* Sets a dataset for the plot and sends a change event to all registered
* listeners.
*
* @param index the dataset index (must be >= 0).
* @param dataset the dataset ({@code null} permitted).
*
* @see #getDataset(int)
*/
public void setDataset(int index, XYDataset dataset) {
XYDataset existing = getDataset(index);
if (existing != null) {
existing.removeChangeListener(this);
}
this.datasets.put(index, dataset);
if (dataset != null) {
dataset.addChangeListener(this);
}
// send a dataset change event to self...
DatasetChangeEvent event = new DatasetChangeEvent(this, dataset);
datasetChanged(event);
}
代码示例来源:origin: jfree/jfreechart
/**
* Receives notification of a change to the plot's dataset.
* <P>
* The axis ranges are updated if necessary.
*
* @param event information about the event (not used here).
*/
@Override
public void datasetChanged(DatasetChangeEvent event) {
super.datasetChanged(event);
if (this.subplots == null) {
return; // this can happen during plot construction
}
XYDataset dataset = null;
if (event.getDataset() instanceof XYDataset) {
dataset = (XYDataset) event.getDataset();
}
for (XYPlot subplot : this.subplots) {
if (subplot.indexOf(dataset) >= 0) {
subplot.configureRangeAxes();
}
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Sets a dataset for the plot.
*
* @param index the dataset index.
* @param dataset the dataset (<code>null</code> permitted).
*
* @see #getDataset(int)
*/
public void setDataset(int index, XYDataset dataset) {
XYDataset existing = getDataset(index);
if (existing != null) {
existing.removeChangeListener(this);
}
this.datasets.set(index, dataset);
if (dataset != null) {
dataset.addChangeListener(this);
}
// send a dataset change event to self...
DatasetChangeEvent event = new DatasetChangeEvent(this, dataset);
datasetChanged(event);
}
内容来源于网络,如有侵权,请联系作者删除!