org.jfree.data.xy.XYSeries.removeChangeListener()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(70)

本文整理了Java中org.jfree.data.xy.XYSeries.removeChangeListener()方法的一些代码示例,展示了XYSeries.removeChangeListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYSeries.removeChangeListener()方法的具体详情如下:
包路径:org.jfree.data.xy.XYSeries
类名称:XYSeries
方法名:removeChangeListener

XYSeries.removeChangeListener介绍

暂无

代码示例

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Removes all the series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 */
public void removeAllSeries() {
  // Unregister the collection as a change listener to each series in
  // the collection.
  for (int i = 0; i < this.data.size(); i++) {
   XYSeries series = (XYSeries) this.data.get(i);
   series.removeChangeListener(this);
  }
  // Remove all the series from the collection and notify listeners.
  this.data.clear();
  fireDatasetChanged();
}

代码示例来源:origin: jfree/jfreechart

/**
 * Removes all the series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 */
public void removeAllSeries() {
  // Unregister the collection as a change listener to each series in
  // the collection.
  for (int i = 0; i < this.data.size(); i++) {
    XYSeries series = (XYSeries) this.data.get(i);
    series.removeChangeListener(this);
  }
  // Remove all the series from the collection and notify listeners.
  this.data.clear();
  this.xPoints.clear();
  fireDatasetChanged();
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Removes all the series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 */
public void removeAllSeries() {
  // Unregister the collection as a change listener to each series in
  // the collection.
  for (int i = 0; i < this.data.size(); i++) {
    XYSeries series = (XYSeries) this.data.get(i);
    series.removeChangeListener(this);
  }
  // Remove all the series from the collection and notify listeners.
  this.data.clear();
  this.xPoints.clear();
  fireDatasetChanged();
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Removes a series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @param series  the series (<code>null</code> not permitted).
 */
public void removeSeries(XYSeries series) {
  if (series == null) {
    throw new IllegalArgumentException("Null 'series' argument.");
  }
  if (this.data.contains(series)) {
    series.removeChangeListener(this);
    this.data.remove(series);
    fireDatasetChanged();
  }
}

代码示例来源:origin: jfree/jfreechart

/**
 * Removes a series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @param series  the series ({@code null} not permitted).
 */
public void removeSeries(XYSeries series) {
  Args.nullNotPermitted(series, "series");
  if (this.data.contains(series)) {
    series.removeChangeListener(this);
    this.data.remove(series);
    if (this.data.isEmpty()) {
      this.xPoints.clear();
    }
    fireDatasetChanged();
  }
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Removes a series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @param series  the series (<code>null</code> not permitted).
 */
public void removeSeries(XYSeries series) {
  // check arguments...
  if (series == null) {
    throw new IllegalArgumentException("Null 'series' argument.");
  }
  // remove the series...
  if (this.data.contains(series)) {
    series.removeChangeListener(this);
    this.data.remove(series);
    if (this.data.size() == 0) {
      this.xPoints.clear();
    }
    fireDatasetChanged();
  }
}

代码示例来源:origin: jfree/jfreechart

/**
 * Removes all the series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 */
public void removeAllSeries() {
  // Unregister the collection as a change listener to each series in
  // the collection.
  for (int i = 0; i < this.data.size(); i++) {
   XYSeries series = (XYSeries) this.data.get(i);
   series.removeChangeListener(this);
   series.removeVetoableChangeListener(this);
  }
  // Remove all the series from the collection and notify listeners.
  this.data.clear();
  fireDatasetChanged();
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Removes a series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @param series  the series index (zero-based).
 */
public void removeSeries(int series) {
  if ((series < 0) || (series >= getSeriesCount())) {
    throw new IllegalArgumentException("Series index out of bounds.");
  }
  // fetch the series, remove the change listener, then remove the series.
  XYSeries ts = (XYSeries) this.data.get(series);
  ts.removeChangeListener(this);
  this.data.remove(series);
  fireDatasetChanged();
}

代码示例来源:origin: jfree/jfreechart

/**
 * Removes a series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @param series  the series ({@code null} not permitted).
 */
public void removeSeries(XYSeries series) {
  Args.nullNotPermitted(series, "series");
  if (this.data.contains(series)) {
    series.removeChangeListener(this);
    series.removeVetoableChangeListener(this);
    this.data.remove(series);
    fireDatasetChanged();
  }
}

代码示例来源:origin: jfree/jfreechart

/**
 * Removes a series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @param series  the series (zero based index).
 */
public void removeSeries(int series) {
  // check arguments...
  if ((series < 0) || (series > getSeriesCount())) {
    throw new IllegalArgumentException("Index outside valid range.");
  }
  // fetch the series, remove the change listener, then remove the series.
  XYSeries s = (XYSeries) this.data.get(series);
  s.removeChangeListener(this);
  this.data.remove(series);
  if (this.data.isEmpty()) {
    this.xPoints.clear();
  }
  else if (this.autoPrune) {
    prune();
  }
  fireDatasetChanged();
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Removes a series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @param series  the series (zero based index).
 */
public void removeSeries(int series) {
  // check arguments...
  if ((series < 0) || (series > getSeriesCount())) {
    throw new IllegalArgumentException("Index outside valid range.");
  }
  // fetch the series, remove the change listener, then remove the series.
  XYSeries s = (XYSeries) this.data.get(series);
  s.removeChangeListener(this);
  this.data.remove(series);
  if (this.data.size() == 0) {
    this.xPoints.clear();
  }
  else if (this.autoPrune) {
    prune();
  }
  fireDatasetChanged();
}

相关文章