Example usage for org.jfree.chart PolarChartPanel setMouseWheelEnabled

List of usage examples for org.jfree.chart PolarChartPanel setMouseWheelEnabled

Introduction

In this page you can find the example usage for org.jfree.chart PolarChartPanel setMouseWheelEnabled.

Prototype

public void setMouseWheelEnabled(boolean flag) 

Source Link

Document

Enables or disables mouse wheel support for the panel.

Usage

From source file:org.hxzon.demo.jfreechart.PolarChartDemo.java

public PolarChartDemo(String title) {
    super(title);
    PolarChartPanel chartPanel = new PolarChartPanel(polarChart1);
    //have a bug after show tooltips
    //        chartPanel.setHorizontalAxisTrace(true);
    //        chartPanel.setVerticalAxisTrace(true);
    chartPanel.setFillZoomRectangle(true);
    chartPanel.setMouseWheelEnabled(true);
    chartPanel.addMouseListener(new MyChartClickHandler(chartPanel));
    chartPanel.setPreferredSize(new Dimension(500, 270));
    getContentPane().add(chartPanel);//from   w w  w .  ja  v  a  2s. co  m
    getContentPane().add(new ChartComboBox(chartPanel), BorderLayout.SOUTH);
    Timer timer = new Timer();
    timer.scheduleAtFixedRate(new TimerTask() {

        @Override
        public void run() {
            addValue();

        }

    }, 0, 200);
}