Example usage for org.jfree.chart.event RendererChangeEvent RendererChangeEvent

List of usage examples for org.jfree.chart.event RendererChangeEvent RendererChangeEvent

Introduction

In this page you can find the example usage for org.jfree.chart.event RendererChangeEvent RendererChangeEvent.

Prototype

public RendererChangeEvent(Object renderer, boolean seriesVisibilityChanged) 

Source Link

Document

Creates a new event.

Usage

From source file:KIDLYAbstractRenderer.java

/**
 * Sets the flag that controls whether a series is visible and, if
 * requested, sends a {@link RendererChangeEvent} to all registered
 * listeners.//from   w  w w.  j a  v a  2s  .c o  m
 *
 * @param series  the series index.
 * @param visible  the flag (<code>null</code> permitted).
 * @param notify  notify listeners?
 *
 * @see #getSeriesVisible(int)
 */
public void setSeriesVisible(int series, Boolean visible, boolean notify) {
    this.seriesVisibleList.setBoolean(series, visible);
    if (notify) {
        // we create an event with a special flag set...the purpose of
        // this is to communicate to the plot (the default receiver of
        // the event) that series visibility has changed so the axis
        // ranges might need updating...
        RendererChangeEvent e = new RendererChangeEvent(this, true);
        notifyListeners(e);
    }
}

From source file:KIDLYAbstractRenderer.java

/**
 * Sets the base visibility and, if requested, sends
 * a {@link RendererChangeEvent} to all registered listeners.
 *
 * @param visible  the visibility./* ww w.ja v a 2  s. co  m*/
 * @param notify  notify listeners?
 *
 * @see #getBaseSeriesVisible()
 */
public void setBaseSeriesVisible(boolean visible, boolean notify) {
    this.baseSeriesVisible = visible;
    if (notify) {
        // we create an event with a special flag set...the purpose of
        // this is to communicate to the plot (the default receiver of
        // the event) that series visibility has changed so the axis
        // ranges might need updating...
        RendererChangeEvent e = new RendererChangeEvent(this, true);
        notifyListeners(e);
    }
}

From source file:KIDLYAbstractRenderer.java

/**
 * Sets the flag that controls whether or not the data bounds reported
 * by this renderer will exclude non-visible series and sends a
 * {@link RendererChangeEvent} to all registered listeners.
 *
 * @param visibleOnly  include only visible series.
 *
 * @since 1.0.13/*from   w  ww  .  jav  a  2  s .c om*/
 */
public void setDataBoundsIncludesVisibleSeriesOnly(boolean visibleOnly) {
    this.dataBoundsIncludesVisibleSeriesOnly = visibleOnly;
    notifyListeners(new RendererChangeEvent(this, true));
}

From source file:KIDLYAbstractRenderer.java

/**
 * Sets the flag that controls the visibility of ALL series and sends a
 * {@link RendererChangeEvent} to all registered listeners.  This flag
 * overrides the per series and default settings - you must set it to
 * <code>null</code> if you want the other settings to apply.
 *
 * @param visible  the flag (<code>null</code> permitted).
 * @param notify  notify listeners?/*from   www  .  ja  v a  2  s.c  o  m*/
 *
 * @see #getSeriesVisible()
 *
 * @deprecated This method should no longer be used (as of version 1.0.6).
 *     It is sufficient to rely on {@link #setSeriesVisible(int, Boolean)}
 *     and {@link #setBaseSeriesVisible(boolean)}.
 */
public void setSeriesVisible(Boolean visible, boolean notify) {
    this.seriesVisible = visible;
    if (notify) {
        // we create an event with a special flag set...the purpose of
        // this is to communicate to the plot (the default receiver of
        // the event) that series visibility has changed so the axis
        // ranges might need updating...
        RendererChangeEvent e = new RendererChangeEvent(this, true);
        notifyListeners(e);
    }
}