org.jfree.chart.event.ChartChangeEvent Java Examples

The following examples show how to use org.jfree.chart.event.ChartChangeEvent. 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: JFreeChart.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Sends a {@link ChartChangeEvent} to all registered listeners.
 *
 * @param event  information about the event that triggered the
 *               notification.
 */
protected void notifyListeners(ChartChangeEvent event) {
    if (this.notify) {
        Object[] listeners = this.changeListeners.getListenerList();
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == ChartChangeListener.class) {
                ((ChartChangeListener) listeners[i + 1]).chartChanged(
                        event);
            }
        }
    }
}
 
Example #2
Source File: ChartComposite.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Receives notification of changes to the chart, and redraws the chart.
 *
 * @param event  details of the chart change event.
 */
public void chartChanged(ChartChangeEvent event) {
    this.refreshBuffer = true;
    Plot plot = this.chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable z = (Zoomable) plot;
        this.orientation = z.getOrientation();
    }
    this.canvas.redraw();
}
 
Example #3
Source File: ChartComposite.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Receives notification of changes to the chart, and redraws the chart.
 *
 * @param event  details of the chart change event.
 */
public void chartChanged(ChartChangeEvent event) {
    this.refreshBuffer = true;
    Plot plot = this.chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable z = (Zoomable) plot;
        this.orientation = z.getOrientation();
    }
    this.canvas.redraw();
}
 
Example #4
Source File: JFreeChart.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Sends a {@link ChartChangeEvent} to all registered listeners.
 *
 * @param event  information about the event that triggered the
 *               notification.
 */
protected void notifyListeners(ChartChangeEvent event) {
    if (this.notify) {
        Object[] listeners = this.changeListeners.getListenerList();
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == ChartChangeListener.class) {
                ((ChartChangeListener) listeners[i + 1]).chartChanged(
                        event);
            }
        }
    }
}
 
Example #5
Source File: JFreeChart.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Sends a {@link ChartChangeEvent} to all registered listeners.
 *
 * @param event  information about the event that triggered the
 *               notification.
 */
protected void notifyListeners(ChartChangeEvent event) {
    if (this.notify) {
        Object[] listeners = this.changeListeners.getListenerList();
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == ChartChangeListener.class) {
                ((ChartChangeListener) listeners[i + 1]).chartChanged(
                        event);
            }
        }
    }
}
 
Example #6
Source File: ChartPanel.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Receives notification of changes to the chart, and redraws the chart.
 *
 * @param event  details of the chart change event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.refreshBuffer = true;
    Plot plot = this.chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable z = (Zoomable) plot;
        this.orientation = z.getOrientation();
    }
    repaint();
}
 
Example #7
Source File: ChartPanel.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Receives notification of changes to the chart, and redraws the chart.
 *
 * @param event  details of the chart change event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.refreshBuffer = true;
    Plot plot = this.chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable z = (Zoomable) plot;
        this.orientation = z.getOrientation();
    }
    repaint();
}
 
Example #8
Source File: ChartPanel.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Receives notification of changes to the chart, and redraws the chart.
 *
 * @param event  details of the chart change event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.refreshBuffer = true;
    Plot plot = this.chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable z = (Zoomable) plot;
        this.orientation = z.getOrientation();
    }
    repaint();
}
 
Example #9
Source File: JFreeChart.java    From openstock with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Sets a flag that controls whether or not listeners receive
 * {@link ChartChangeEvent} notifications.
 *
 * @param notify  a boolean.
 *
 * @see #isNotify()
 */
public void setNotify(boolean notify) {
    this.notify = notify;
    // if the flag is being set to true, there may be queued up changes...
    if (notify) {
        notifyListeners(new ChartChangeEvent(this));
    }
}
 
Example #10
Source File: JFreeChart.java    From ccu-historian with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Sets a flag that controls whether or not listeners receive
 * {@link ChartChangeEvent} notifications.
 *
 * @param notify  a boolean.
 *
 * @see #isNotify()
 */
public void setNotify(boolean notify) {
    this.notify = notify;
    // if the flag is being set to true, there may be queued up changes...
    if (notify) {
        notifyListeners(new ChartChangeEvent(this));
    }
}
 
Example #11
Source File: XYStepAreaChartTest.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #12
Source File: LineChartTest.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #13
Source File: XYBarChartTest.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #14
Source File: JFreeChart.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Sets the value in the rendering hints table for
 * {@link RenderingHints#KEY_TEXT_ANTIALIASING} and sends a
 * {@link ChartChangeEvent} to all registered listeners.
 *
 * @param val  the new value (<code>null</code> permitted).
 *
 * @since 1.0.5
 *
 * @see #getTextAntiAlias()
 * @see #setTextAntiAlias(boolean)
 */
public void setTextAntiAlias(Object val) {
    this.renderingHints.put(RenderingHints.KEY_TEXT_ANTIALIASING, val);
    notifyListeners(new ChartChangeEvent(this));
}
 
Example #15
Source File: GanttChartTest.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #16
Source File: CombinedRangeXYPlotTest.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Receives a chart change event.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.events.add(event);
}
 
Example #17
Source File: ScatterPlotTest.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #18
Source File: CombinedDomainCategoryPlotTest.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Receives a chart change event.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.events.add(event);
}
 
Example #19
Source File: XYStepChartTest.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #20
Source File: XYStepChartTest.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #21
Source File: StackedBarChartTest.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #22
Source File: TimeSeriesChartTest.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #23
Source File: TimeSeriesChartTest.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #24
Source File: BarChartTest.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #25
Source File: LineChart3DTest.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #26
Source File: CombinedDomainCategoryPlotTest.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Receives a chart change event.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.events.add(event);
}
 
Example #27
Source File: CombinedRangeCategoryPlotTest.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Receives a chart change event.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.events.add(event);
}
 
Example #28
Source File: CombinedDomainXYPlotTest.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Receives a chart change event.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.events.add(event);
}
 
Example #29
Source File: LineChartTest.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}
 
Example #30
Source File: ScatterPlotTest.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Event handler.
 *
 * @param event  the event.
 */
@Override
public void chartChanged(ChartChangeEvent event) {
    this.flag = true;
}