Re: Vertical soundings again...

Hi-

BIGJEFF wrote:
> 
> Hello:
> 
> 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
> AnimationControl
> 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...

Another way to do this would be to resample to:

time -> (zcoord -> concentration[])

and add a ScalarMap of time -> Animation to your 2D display.  Then
add the controlListener on the Animation in the main display and listen
for a controlChanged:

    animationControl.addControlListener(new ControlListener() {
        public void controlChanged(ControlEvent ce) {
           try {
              otherControl.setCurrent(animationControl.getCurrent());
           } catch (Exception e) {}
        }

which will set the currently displayed timestep in the 2D display's
AnimationControl (otherControl) to the same step as the control
(animationControl) in the main display. This will only work if the 
time Set is the same, which it should be if you resample the original
field.

Don
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************