Example usage for org.jfree.chart PolarChartPanel addMouseListener

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

Introduction

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

Prototype

public synchronized void addMouseListener(MouseListener l) 

Source Link

Document

Adds the specified mouse listener to receive mouse events from this component.

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  ww.  j a  v a 2s  .  c o  m*/
    getContentPane().add(new ChartComboBox(chartPanel), BorderLayout.SOUTH);
    Timer timer = new Timer();
    timer.scheduleAtFixedRate(new TimerTask() {

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

        }

    }, 0, 200);
}