org.jfree.chart.JFreeChart.clearSubtitles()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(99)

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

JFreeChart.clearSubtitles介绍

[英]Clears all subtitles from the chart and sends a ChartChangeEventto all registered listeners.
[中]清除图表中的所有字幕,并向所有注册的侦听器发送ChartChangeEvent。

代码示例

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

/**
 * Sets the title list for the chart (completely replaces any existing
 * titles) and sends a {@link ChartChangeEvent} to all registered
 * listeners.
 *
 * @param subtitles  the new list of subtitles (<code>null</code> not
 *                   permitted).
 *
 * @see #getSubtitles()
 */
public void setSubtitles(List subtitles) {
  if (subtitles == null) {
    throw new NullPointerException("Null 'subtitles' argument.");
  }
  setNotify(false);
  clearSubtitles();
  Iterator iterator = subtitles.iterator();
  while (iterator.hasNext()) {
    Title t = (Title) iterator.next();
    if (t != null) {
      addSubtitle(t);
    }
  }
  setNotify(true);  // this fires a ChartChangeEvent
}

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

/**
 * Sets the title list for the chart (completely replaces any existing
 * titles) and sends a {@link ChartChangeEvent} to all registered
 * listeners.
 *
 * @param subtitles  the new list of subtitles ({@code null} not
 *                   permitted).
 *
 * @see #getSubtitles()
 */
public void setSubtitles(List<Title> subtitles) {
  Args.nullNotPermitted(subtitles, "subtitles");
  setNotify(false);
  clearSubtitles();
  for (Title t: subtitles) {
    if (t != null) {
      addSubtitle(t);
    }
  }
  setNotify(true);  // this fires a ChartChangeEvent
}

相关文章