Java Code Examples for org.jfree.chart.title.Title#addChangeListener()

The following examples show how to use org.jfree.chart.title.Title#addChangeListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Cardumen_00193_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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();
}
 
Example 2
Source File: Cardumen_00241_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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();
}
 
Example 3
Source File: JFreeChart.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a chart subtitle, and notifies registered listeners that the chart
 * has been modified.
 *
 * @param subtitle  the subtitle (<code>null</code> not permitted).
 *
 * @see #getSubtitle(int)
 */
public void addSubtitle(Title subtitle) {
    if (subtitle == null) {
        throw new IllegalArgumentException("Null 'subtitle' argument.");
    }
    this.subtitles.add(subtitle);
    subtitle.addChangeListener(this);
    fireChartChanged();
}
 
Example 4
Source File: Cardumen_0077_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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();
}
 
Example 5
Source File: Cardumen_00141_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clones the object, and takes care of listeners.
 * Note: caller shall register its own listeners on cloned graph.
 * 
 * @return A clone.
 * 
 * @throws CloneNotSupportedException if the chart is not cloneable.
 */
public Object clone() throws CloneNotSupportedException {
    JFreeChart chart = (JFreeChart) super.clone();

    chart.renderingHints = (RenderingHints) this.renderingHints.clone();
    // private boolean borderVisible;
    // private transient Stroke borderStroke;
    // private transient Paint borderPaint;

    if (this.title != null) {
        chart.title = (TextTitle) this.title.clone();
        chart.title.addChangeListener(chart);
    }

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

    if (this.plot != null) {
        chart.plot = (Plot) this.plot.clone();
        chart.plot.addChangeListener(chart);
    }

    chart.progressListeners = new EventListenerList();
    chart.changeListeners = new EventListenerList();
    return chart;
}
 
Example 6
Source File: Cardumen_0077_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clones the object, and takes care of listeners.
 * Note: caller shall register its own listeners on cloned graph.
 * 
 * @return A clone.
 * 
 * @throws CloneNotSupportedException if the chart is not cloneable.
 */
public Object clone() throws CloneNotSupportedException {
    JFreeChart chart = (JFreeChart) super.clone();

    chart.renderingHints = (RenderingHints) this.renderingHints.clone();
    // private boolean borderVisible;
    // private transient Stroke borderStroke;
    // private transient Paint borderPaint;

    if (this.title != null) {
        chart.title = (TextTitle) this.title.clone();
        chart.title.addChangeListener(chart);
    }

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

    if (this.plot != null) {
        chart.plot = (Plot) this.plot.clone();
        chart.plot.addChangeListener(chart);
    }

    chart.progressListeners = new EventListenerList();
    chart.changeListeners = new EventListenerList();
    return chart;
}
 
Example 7
Source File: jKali_0052_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Adds a chart subtitle, and notifies registered listeners that the chart 
 * has been modified.
 *
 * @param subtitle  the subtitle (<code>null</code> not permitted).
 * 
 * @see #getSubtitle(int)
 */
public void addSubtitle(Title subtitle) {
    if (subtitle == null) {
        throw new IllegalArgumentException("Null 'subtitle' argument.");
    }
    this.subtitles.add(subtitle);
    subtitle.addChangeListener(this);
    fireChartChanged();
}
 
Example 8
Source File: Cardumen_00193_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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();
}
 
Example 9
Source File: Cardumen_00141_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Adds a chart subtitle, and notifies registered listeners that the chart 
 * has been modified.
 *
 * @param subtitle  the subtitle (<code>null</code> not permitted).
 * 
 * @see #getSubtitle(int)
 */
public void addSubtitle(Title subtitle) {
    if (subtitle == null) {
        throw new IllegalArgumentException("Null 'subtitle' argument.");
    }
    this.subtitles.add(subtitle);
    subtitle.addChangeListener(this);
    fireChartChanged();
}
 
Example 10
Source File: JGenProg2015_000_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Adds a chart subtitle, and notifies registered listeners that the chart 
 * has been modified.
 *
 * @param subtitle  the subtitle (<code>null</code> not permitted).
 * 
 * @see #getSubtitle(int)
 */
public void addSubtitle(Title subtitle) {
    if (subtitle == null) {
        throw new IllegalArgumentException("Null 'subtitle' argument.");
    }
    this.subtitles.add(subtitle);
    subtitle.addChangeListener(this);
    fireChartChanged();
}
 
Example 11
Source File: JGenProg2017_00106_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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();
}
 
Example 12
Source File: Cardumen_00193_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Adds a chart subtitle, and notifies registered listeners that the chart 
 * has been modified.
 *
 * @param subtitle  the subtitle (<code>null</code> not permitted).
 * 
 * @see #getSubtitle(int)
 */
public void addSubtitle(Title subtitle) {
    if (subtitle == null) {
        throw new IllegalArgumentException("Null 'subtitle' argument.");
    }
    this.subtitles.add(subtitle);
    subtitle.addChangeListener(this);
    fireChartChanged();
}
 
Example 13
Source File: Cardumen_00241_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clones the object, and takes care of listeners.
 * Note: caller shall register its own listeners on cloned graph.
 * 
 * @return A clone.
 * 
 * @throws CloneNotSupportedException if the chart is not cloneable.
 */
public Object clone() throws CloneNotSupportedException {
    JFreeChart chart = (JFreeChart) super.clone();

    chart.renderingHints = (RenderingHints) this.renderingHints.clone();
    // private boolean borderVisible;
    // private transient Stroke borderStroke;
    // private transient Paint borderPaint;

    if (this.title != null) {
        chart.title = (TextTitle) this.title.clone();
        chart.title.addChangeListener(chart);
    }

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

    if (this.plot != null) {
        chart.plot = (Plot) this.plot.clone();
        chart.plot.addChangeListener(chart);
    }

    chart.progressListeners = new EventListenerList();
    chart.changeListeners = new EventListenerList();
    return chart;
}
 
Example 14
Source File: JFreeChart.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 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.");
    }
    ParamChecks.nullNotPermitted(subtitle, "subtitle");
    this.subtitles.add(index, subtitle);
    subtitle.addChangeListener(this);
    fireChartChanged();
}
 
Example 15
Source File: JGenProg2017_003_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Adds a chart subtitle, and notifies registered listeners that the chart 
 * has been modified.
 *
 * @param subtitle  the subtitle (<code>null</code> not permitted).
 * 
 * @see #getSubtitle(int)
 */
public void addSubtitle(Title subtitle) {
    if (subtitle == null) {
        throw new IllegalArgumentException("Null 'subtitle' argument.");
    }
    this.subtitles.add(subtitle);
    subtitle.addChangeListener(this);
    fireChartChanged();
}
 
Example 16
Source File: jKali_0052_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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();
}
 
Example 17
Source File: Cardumen_003_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clones the object, and takes care of listeners.
 * Note: caller shall register its own listeners on cloned graph.
 * 
 * @return A clone.
 * 
 * @throws CloneNotSupportedException if the chart is not cloneable.
 */
public Object clone() throws CloneNotSupportedException {
    JFreeChart chart = (JFreeChart) super.clone();

    chart.renderingHints = (RenderingHints) this.renderingHints.clone();
    // private boolean borderVisible;
    // private transient Stroke borderStroke;
    // private transient Paint borderPaint;

    if (this.title != null) {
        chart.title = (TextTitle) this.title.clone();
        chart.title.addChangeListener(chart);
    }

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

    if (this.plot != null) {
        chart.plot = (Plot) this.plot.clone();
        chart.plot.addChangeListener(chart);
    }

    chart.progressListeners = new EventListenerList();
    chart.changeListeners = new EventListenerList();
    return chart;
}
 
Example 18
Source File: Cardumen_0077_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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();
}
 
Example 19
Source File: JFreeChart.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 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.");
    }
    ParamChecks.nullNotPermitted(subtitle, "subtitle");
    this.subtitles.add(index, subtitle);
    subtitle.addChangeListener(this);
    fireChartChanged();
}
 
Example 20
Source File: JFreeChart.java    From SIMVA-SoS with Apache License 2.0 3 votes vote down vote up
/**
 * Adds a chart subtitle, and notifies registered listeners that the chart
 * has been modified.
 *
 * @param subtitle  the subtitle (<code>null</code> not permitted).
 *
 * @see #getSubtitle(int)
 */
public void addSubtitle(Title subtitle) {
    ParamChecks.nullNotPermitted(subtitle, "subtitle");
    this.subtitles.add(subtitle);
    subtitle.addChangeListener(this);
    fireChartChanged();
}