Action Listeners
Kapper Michael G Civ AFRL/PRSA
Michael.Kapper at edwards.af.mil
Sat May 19 13:45:02 MDT 2007
Thanks Bill, PickManipulationRendererJ3D is exactly what I was looking
for. But I'm still having an issue with how doAction() is triggered. I
would like it to be triggered only when the reference is right-clicked,
but now it is being called (I'm assuming) anytime one of its attributes
changes (eg. position). I did find a way around this by using the
getCloseIndex() method as follows.
pmr = new PickManipulationRendererJ3D();
cell = new CellImpl()
{ public void doAction() throws RemoteException, VisADException
{ if( pmr.getCloseIndex() > -1 )
{
...
}
}
}
This way I'm sure that doAction() is triggered only when the reference
was right-clicked. However, there are some caveats when I try to make
things a bit more complex which I think will be eliminated if doAction()
is only triggered by a right click. Is there a way to stop doAction()
in all cases other than a right click? Do I have to create my own
custom renderer?
Thanks again,
Mike
_____
From: Bill Hibbard [mailto:hiding at japan.com]
Sent: Friday, May 18, 2007 5:29 AM
To: Kapper Michael G Civ AFRL/PRSA; visad at unidata.ucar.edu
Subject: Re: Action Listeners
Hi Mike,
visad/bom/PickManipulationRendererJ3D.java may do
what you want. You can run:
java visad.bom.PickManipulationRendererJ3D
to get a demo. Click the right mouse button on various
objects in the scene. You won't change their values, but
will trigger events.
Good luck,
Bill
----- Original Message -----
From: "Kapper Michael G Civ AFRL/PRSA"
To: visad at unidata.ucar.edu
Subject: Action Listeners
Date: Thu, 17 May 2007 19:52:55 -0700
Hi everyone,
I've been playing around with the DirectManipulationRenderer's and the
various Action implementations as in Ugo Taddei's tutorial. Very cool
stuff, but I need to add a listener that would trigger the doAction()
method for specific events, not just when a point is moved. For
example, I want to have a surface or line defined by a GriddedSet which
could be right-clicked to bring up a dialog box. Is there an easy way
to do this?
Thanks,
Mike
--
<http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=en-mail_a_01>
More information about the visad
mailing list