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

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

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

JFreeChart.getSubtitleCount介绍

[英]Returns the number of titles for the chart.
[中]返回图表的标题数。

代码示例

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

/**
 * Returns a chart subtitle.
 *
 * @param index  the index of the chart subtitle (zero based).
 *
 * @return A chart subtitle.
 *
 * @see #addSubtitle(Title)
 */
public Title getSubtitle(int index) {
  if ((index < 0) || (index >= getSubtitleCount())) {
    throw new IllegalArgumentException("Index out of range.");
  }
  return this.subtitles.get(index);
}

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

/**
 * Returns a chart subtitle.
 *
 * @param index  the index of the chart subtitle (zero based).
 *
 * @return A chart subtitle.
 *
 * @see #addSubtitle(Title)
 */
public Title getSubtitle(int index) {
  if ((index < 0) || (index >= getSubtitleCount())) {
    throw new IllegalArgumentException("Index out of range.");
  }
  return (Title) this.subtitles.get(index);
}

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

/**
 * Adds a subtitle at a particular position in the subtitle list, and sends
 * a {@link ChartChangeEvent} to all registered listeners.
 *
 * @param index  the index (in the range 0 to {@link #getSubtitleCount()}).
 * @param subtitle  the subtitle to add (<code>null</code> not permitted).
 *
 * @since 1.0.6
 */
public void addSubtitle(int index, Title subtitle) {
  if (index < 0 || index > getSubtitleCount()) {
    throw new IllegalArgumentException(
        "The 'index' argument is out of range.");
  }
  if (subtitle == null) {
    throw new IllegalArgumentException("Null 'subtitle' argument.");
  }
  this.subtitles.add(index, subtitle);
  subtitle.addChangeListener(this);
  fireChartChanged();
}

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

/**
 * Adds a subtitle at a particular position in the subtitle list, and sends
 * a {@link ChartChangeEvent} to all registered listeners.
 *
 * @param index  the index (in the range 0 to {@link #getSubtitleCount()}).
 * @param subtitle  the subtitle to add ({@code null} not permitted).
 *
 * @since 1.0.6
 */
public void addSubtitle(int index, Title subtitle) {
  if (index < 0 || index > getSubtitleCount()) {
    throw new IllegalArgumentException(
        "The 'index' argument is out of range.");
  }
  Args.nullNotPermitted(subtitle, "subtitle");
  this.subtitles.add(index, subtitle);
  subtitle.addChangeListener(this);
  fireChartChanged();
}

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

for (int i = 0; i < getSubtitleCount(); i++) {
  Title subtitle = (Title) getSubtitle(i).clone();
  chart.subtitles.add(subtitle);

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

for (int i = 0; i < getSubtitleCount(); i++) {
  Title subtitle = (Title) getSubtitle(i).clone();
  chart.subtitles.add(subtitle);

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

/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream)
  throws IOException, ClassNotFoundException {
  stream.defaultReadObject();
  this.borderStroke = SerialUtilities.readStroke(stream);
  this.borderPaint = SerialUtilities.readPaint(stream);
  this.backgroundPaint = SerialUtilities.readPaint(stream);
  this.progressListeners = new EventListenerList();
  this.changeListeners = new EventListenerList();
  this.renderingHints = new RenderingHints(
      RenderingHints.KEY_ANTIALIASING,
      RenderingHints.VALUE_ANTIALIAS_ON);
  // register as a listener with sub-components...
  if (this.title != null) {
    this.title.addChangeListener(this);
  }
  for (int i = 0; i < getSubtitleCount(); i++) {
    getSubtitle(i).addChangeListener(this);
  }
  this.plot.addChangeListener(this);
}

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

for (int i = 0; i < getSubtitleCount(); i++) {
  getSubtitle(i).addChangeListener(this);

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

/**
 * Applies this theme to the supplied chart.
 *
 * @param chart  the chart (<code>null</code> not permitted).
 */
public void apply(JFreeChart chart) {
  if (chart == null) {
    throw new IllegalArgumentException("Null 'chart' argument.");
  }
  TextTitle title = chart.getTitle();
  if (title != null) {
    title.setFont(this.extraLargeFont);
    title.setPaint(this.titlePaint);
  }
  int subtitleCount = chart.getSubtitleCount();
  for (int i = 0; i < subtitleCount; i++) {
    applyToTitle(chart.getSubtitle(i));
  }
  chart.setBackgroundPaint(this.chartBackgroundPaint);
  // now process the plot if there is one
  Plot plot = chart.getPlot();
  if (plot != null) {
    applyToPlot(plot);
  }
}

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

size = Integer.parseInt(fontSizeStr);
for (int i = 0; i < chart.getSubtitleCount(); i++) {
  Title t = chart.getSubtitle(i);
  if (t instanceof TextTitle) {

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

/**
 * Applies this theme to the supplied chart.
 *
 * @param chart  the chart ({@code null} not permitted).
 */
@Override
public void apply(JFreeChart chart) {
  Args.nullNotPermitted(chart, "chart");
  TextTitle title = chart.getTitle();
  if (title != null) {
    title.setFont(this.extraLargeFont);
    title.setPaint(this.titlePaint);
  }
  int subtitleCount = chart.getSubtitleCount();
  for (int i = 0; i < subtitleCount; i++) {
    applyToTitle(chart.getSubtitle(i));
  }
  chart.setBackgroundPaint(this.chartBackgroundPaint);
  // now process the plot if there is one
  Plot plot = chart.getPlot();
  if (plot != null) {
    applyToPlot(plot);
  }
}

代码示例来源:origin: datacleaner/DataCleaner

for (int i = 0; i < chart.getSubtitleCount(); i++) {
  final Title subtitle = chart.getSubtitle(i);
  if (subtitle instanceof TextTitle) {

相关文章