ChartPanel subclass cant access super's chartMouseListeners

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Rachel M
Posts: 6
Joined: Mon Sep 26, 2005 8:06 pm

ChartPanel subclass cant access super's chartMouseListeners

Post by Rachel M » Mon Sep 26, 2005 8:17 pm

Hi,
I made a subclass of ChartPanel to allow me to right-click select an area of the graph and do something with it.

I wanted to use the chartMouseListeners to send the info to another class so it can respond to the selection, but they are only accessible from the superclass.

I could pass in the other class to respond to this event,but the chartMouseListeners seem to make more sense. Is there any way to do this without editing ChartPanel?

Thank you in advance,
Rachel

Jii
Posts: 128
Joined: Thu Apr 21, 2005 11:17 am

Post by Jii » Tue Sep 27, 2005 8:04 am

no not really

develop
Posts: 296
Joined: Wed Mar 23, 2005 10:01 pm

Post by develop » Wed Nov 02, 2005 3:56 pm

you need to make subclass of chartPanel. I have done this and i override all the mouseListener methods and it works great

Locked