Java Code Examples for org.jfree.chart.plot.PiePlot#handleMouseWheelRotation()

The following examples show how to use org.jfree.chart.plot.PiePlot#handleMouseWheelRotation() . 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: MouseWheelHandler.java    From openstock with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Handles a mouse wheel event from the underlying chart panel.
 *
 * @param e  the event.
 */
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
    JFreeChart chart = this.chartPanel.getChart();
    if (chart == null) {
        return;
    }
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation(e.getWheelRotation());
    }
}
 
Example 2
Source File: ScrollHandlerFX.java    From jfreechart-fx with GNU Lesser General Public License v2.1 6 votes vote down vote up
@Override
public void handleScroll(ChartCanvas canvas, ScrollEvent e) {
    JFreeChart chart = canvas.getChart();
    if (chart == null) {
        return;
    }
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(canvas, zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation((int) e.getDeltaY());
    }
}
 
Example 3
Source File: MouseWheelHandler.java    From ccu-historian with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Handles a mouse wheel event from the underlying chart panel.
 *
 * @param e  the event.
 */
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
    JFreeChart chart = this.chartPanel.getChart();
    if (chart == null) {
        return;
    }
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation(e.getWheelRotation());
    }
}
 
Example 4
Source File: MouseWheelHandler.java    From SIMVA-SoS with Apache License 2.0 6 votes vote down vote up
/**
 * Handles a mouse wheel event from the underlying chart panel.
 *
 * @param e  the event.
 */
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
    JFreeChart chart = this.chartPanel.getChart();
    if (chart == null) {
        return;
    }
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation(e.getWheelRotation());
    }
}
 
Example 5
Source File: MouseWheelHandler.java    From ECG-Viewer with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Handles a mouse wheel event from the underlying chart panel.
 *
 * @param e  the event.
 */
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
    JFreeChart chart = this.chartPanel.getChart();
    if (chart == null) {
        return;
    }
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation(e.getWheelRotation());
    }
}
 
Example 6
Source File: MouseWheelHandler.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Handles a mouse wheel event from the underlying chart panel.
 *
 * @param e  the event.
 */
public void mouseWheelMoved(MouseWheelEvent e) {
    JFreeChart chart = this.chartPanel.getChart();
    if (chart == null) {
        return;
    }
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation(e.getWheelRotation());
    }
}
 
Example 7
Source File: MouseWheelHandler.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Handles a mouse wheel event from the underlying chart panel.
 *
 * @param e  the event.
 */
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
    JFreeChart chart = this.chartPanel.getChart();
    if (chart == null) {
        return;
    }
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation(e.getWheelRotation());
    }
}
 
Example 8
Source File: MouseWheelHandler.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Handles a mouse wheel event from the underlying chart panel.
 *
 * @param e  the event.
 */
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
    JFreeChart chart = this.chartPanel.getChart();
    if (chart == null) {
        return;
    }
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation(e.getWheelRotation());
    }
}
 
Example 9
Source File: ScrollHandlerFX.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void handleScroll(ChartCanvas canvas, ScrollEvent e) {
    JFreeChart chart = canvas.getChart();
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(canvas, zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation((int) e.getDeltaY());
    }
}
 
Example 10
Source File: TaScrollHandlerFX.java    From TAcharting with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void handleScroll(TaChartCanvas canvas, ScrollEvent e) {
    JFreeChart chart = canvas.getChart();
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(canvas, zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation((int) e.getDeltaY());
    }
}
 
Example 11
Source File: ScrollHandlerFX.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void handleScroll(ChartCanvas canvas, ScrollEvent e) {
    JFreeChart chart = canvas.getChart();
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(canvas, zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation((int) e.getDeltaY());
    }
}
 
Example 12
Source File: ScrollHandlerFX.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
@Override
public void handleScroll(ChartCanvas canvas, ScrollEvent e) {
    JFreeChart chart = canvas.getChart();
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(canvas, zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation((int) e.getDeltaY());
    }
}
 
Example 13
Source File: ScrollHandlerFX.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void handleScroll(ChartCanvas canvas, ScrollEvent e) {
    JFreeChart chart = canvas.getChart();
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(canvas, zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation((int) e.getDeltaY());
    }
}
 
Example 14
Source File: ScrollHandlerFX.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void handleScroll(ChartCanvas canvas, ScrollEvent e) {
    JFreeChart chart = canvas.getChart();
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(canvas, zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation((int) e.getDeltaY());
    }
}
 
Example 15
Source File: ScrollHandlerFX.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void handleScroll(ChartCanvas canvas, ScrollEvent e) {
    JFreeChart chart = canvas.getChart();
    Plot plot = chart.getPlot();
    if (plot instanceof Zoomable) {
        Zoomable zoomable = (Zoomable) plot;
        handleZoomable(canvas, zoomable, e);
    }
    else if (plot instanceof PiePlot) {
        PiePlot pp = (PiePlot) plot;
        pp.handleMouseWheelRotation((int) e.getDeltaY());
    }
}