views:

484

answers:

2

I want to know whether it is possible to listen to the mouse event of dragging in JFreeCharts. By default it is assign to zooming. I remove this zooming functionality with,

chartPanel.setDomainZoomable( false);
chartPanel.setRangeZoomable( false);

And I have used ChartMouseListener interface for listening to mouse events. I'm able to track click and move events. But I'm unable to track the drag event.
So I want to know where, is there a way for tracking mouse drag event? Please help me on this.

Thnax in advance...

+1  A: 

You can override mouseDragged() in ChartPanel.

trashgod
Thanx trashgod..It worked. :)
A: 

How to override mouseDragged() in ChartPanel?! Like this chartPanel.mouseDragged(new MouseEvent(........)); ?? Isn't this like passing new mouseevent to existing mouseDragged method? How can you replace mouseDragged method itself?

Billa
No, one would extend `ChartPanel` and override `mouseDragged()`, as discussed here http://java.sun.com/docs/books/tutorial/java/IandI/override.html
trashgod