org.jfree.chart.plot.Plot.datasetChanged()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(91)

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

Plot.datasetChanged介绍

[英]Receives notification of a change to the plot's dataset.

The plot reacts by passing on a plot change event to all registered listeners.
[中]接收绘图数据集更改的通知。
绘图的反应是将绘图更改事件传递给所有注册的侦听器。

代码示例

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

/**
 * Receives notification of a change to the plot's m_Dataset.
 * <P>
 * The axis ranges are updated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {
  if (this.axis != null) {
    this.axis.configure();
  }
  if (getParent() != null) {
    getParent().datasetChanged(event);
  }
  else {
    super.datasetChanged(event);
  }
}

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

/**
 * Receives notification of a change to the plot's m_Dataset.
 * <P>
 * The axis ranges are updated if necessary.
 *
 * @param event  information about the event (not used here).
 */
@Override
public void datasetChanged(DatasetChangeEvent event) {
  for (int i = 0; i < this.axes.size(); i++) {
    final ValueAxis axis = (ValueAxis) this.axes.get(i);
    if (axis != null) {
      axis.configure();
    }
  }
  if (getParent() != null) {
    getParent().datasetChanged(event);
  }
  else {
    super.datasetChanged(event);
  }
}

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

/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The chart reacts by passing on a chart change event to all registered
 * listeners.
 *
 * @param event  Information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {
  if (this.domainAxis != null) {
    this.domainAxis.configure();
  }
  if (this.rangeAxis != null) {
    this.rangeAxis.configure();
  }
  if (this.colorBar != null) {
    this.colorBar.configure(this);
  }
  super.datasetChanged(event);
}

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

/**
 * Checks to see if a new value means the axis range needs adjusting.
 *
 * @param event  the dataset change event.
 */
@Override
public void datasetChanged(DatasetChangeEvent event) {
  if (this.dataset != null) {
    Number vn = this.dataset.getValue();
    if (vn != null) {
      double value = vn.doubleValue();
      if (inSubrange(NORMAL, value)) {
        this.subrange = NORMAL;
      }
      else if (inSubrange(WARNING, value)) {
        this.subrange = WARNING;
      }
      else if (inSubrange(CRITICAL, value)) {
        this.subrange = CRITICAL;
      }
      else {
        this.subrange = -1;
      }
      setAxisRange();
    }
  }
  super.datasetChanged(event);
}

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

/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
@Override
public void datasetChanged(DatasetChangeEvent event) {
  for (ValueAxis yAxis : this.rangeAxes.values()) {
    if (yAxis != null) {
      yAxis.configure();
    }
  }
  if (getParent() != null) {
    getParent().datasetChanged(event);
  } else {
    PlotChangeEvent e = new PlotChangeEvent(this);
    e.setType(ChartChangeEventType.DATASET_UPDATED);
    notifyListeners(e);
  }
}

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

/**
 * Checks to see if a new value means the axis range needs adjusting.
 *
 * @param event  the dataset change event.
 */
public void datasetChanged(DatasetChangeEvent event) {
  if (this.dataset != null) {
    Number vn = this.dataset.getValue();
    if (vn != null) {
      double value = vn.doubleValue();
      if (inSubrange(NORMAL, value)) {
        this.subrange = NORMAL;
      }
      else if (inSubrange(WARNING, value)) {
        this.subrange = WARNING;
      }
      else if (inSubrange(CRITICAL, value)) {
        this.subrange = CRITICAL;
      }
      else {
        this.subrange = -1;
      }
      setAxisRange();
    }
  }
  super.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) {
  configureDomainAxes();
  configureRangeAxes();
  if (getParent() != null) {
    getParent().datasetChanged(event);
  }
  else {
    PlotChangeEvent e = new PlotChangeEvent(this);
    e.setType(ChartChangeEventType.DATASET_UPDATED);
    notifyListeners(e);
  }
}

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

/**
 * 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).
 */
public void datasetChanged(DatasetChangeEvent event) {
  configureDomainAxes();
  configureRangeAxes();
  if (getParent() != null) {
    getParent().datasetChanged(event);
  }
  else {
    PlotChangeEvent e = new PlotChangeEvent(this);
    e.setType(ChartChangeEventType.DATASET_UPDATED);
    notifyListeners(e);
  }
}

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

/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {
  int count = this.rangeAxes.size();
  for (int axisIndex = 0; axisIndex < count; axisIndex++) {
    ValueAxis yAxis = getRangeAxis(axisIndex);
    if (yAxis != null) {
      yAxis.configure();
    }
  }
  if (getParent() != null) {
    getParent().datasetChanged(event);
  }
  else {
    PlotChangeEvent e = new PlotChangeEvent(this);
    e.setType(ChartChangeEventType.DATASET_UPDATED);
    notifyListeners(e);
  }
}

相关文章