Hi Bruce,
You can access many of the MouseEvents by adding a
visad.DisplayListener to your DisplayImplJ3D. See
visad.DisplayEvent for a list of event types.
Good luck,
Bill
On Tue, 21 Dec 2004, Bruce Flynn wrote:
>
> I am trying to intercept MouseEvents from a JFrame containing a VisAD
> graph by registering a MouseListener on the glass pane. The problem is
> that I can't seem to get the glass pane to intercept the events with a
> VisAD graph in the frame. It does however work with other components.
> After doing some investigating, using the example P2_01 code provided
> by Ugo Taddei, it seems to only seems to malfunction with the
> DisplayImplJ3D, which is what I'm using. I can get the MouseEvents by
> adding the below code, but not when I change the display to
> DisplayImplJ3D.
>
> jframe.getGlassPane().addMouseListener( new MouseAdapter(){
> public void mouseClicked( MouseEvent evt ){
> System.out.println("MOUSE CLICKED");
> }
> });
> jframe.getGlassPane().setVisible(true);
>
> Any idea how to get MouseEvents using DisplayImplJ3D?
>
> I included both sources with P2_01.java containing the 3D display
>
> Thanks
> Bruce
>