> I wrote one email a few weeks ago talking about the vertical soundings,
> but i didnt understood what to do, so here i am..
> Well, the question i that ive got the next Types:
> time->( ( xCoord, yCoord, zCoord)-> concentration)
> That are mapped to a DisplayImlJ3D. I want to get a vertical sounding
> (like Vis5D ones) and resampling to:
> zcoord -> concentration
> And mapped it to a DisplayImplJ2D. Im able to trigger the sounding by
> moving around the cursor, but i want to trigger the sounding when the
> time (Animation) changes, even if i dont move the cursor. That is what i
> dont know how to do it.
> In the previous email, Bill told me to "to add a ControlListener to the
> of your 3-D display, and use it to trigger the CellImpl that
> derives your 2-D data from your 3-D data.", but, how do i trigger the
> cell with the ControlListener? With the doAction? And does it trigger my
> sounding when the time pass on?
> Thank you very much. Im waiting for your answers impaciently...
There are two good examples of doing this in the visad/bom
package. In visad/bom/FlexibleTrackManipulation.java see
the class AnimationControlListener which extends ControlListener.
It gets the 'current' time step from the AnimationControl and
uses it to select a Data object and pass it to setData, as:
In visad/bom/CollectiveBarbManipulation.java see the class
AnimationControlListener which extends ControlListener. It
triggers a CellImpl via a setData(null) on stepper_ref, which
is linked to the Stepper extension of CellImpl. The doAction()
of the CellImpl gets the 'current' time step from the
AnimationControl and uses it to select a Data object and pass
it to setData().
The solution in FlexibleTrackManipulation.java is simpler and
is the one you should folow.
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706
hibbard@xxxxxxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738