Re: detecting which dataRef the mouse is over

Hi Mey-

I'm cc'ing the list because I think this needs clarification.

Mey Manickam wrote:

>  I am also keen in getting the Mouse-Over event.  I downloaded compiled
> version of visad.jar from How-to-get-visad.  It doesn't seem to
> recognise display.enableEvent(int).  Do I have to get source files and
> compile to get this method working? I am using DisplayImplJ3D.

enableEvent is a method of DisplayImpl, not the Display interface, so
you need to make sure your display is casted to a DisplayImpl before
enable event.  We might want to consider moving this up
to the LocalDisplay interface, since that is where the
method is defined.  I'll let someone else decide on that.  So, when
you create your display, make sure you do something like:

    DisplayImpl display = new DisplayImplJ3D("display");

instead of:

    Display display = new DisplayImpleJ3D("display");

or else cast it to a DisplayImpl before calling enableEvent:

    ((DisplayImpl)display).enableEvent(int id);

(as long as it really is a DisplayImpl and not a RemoteDisplay).

Sorry for the confusion.

Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307

  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: