Re: Variable Winds

Hi James,

> Thanks, that works as you describe. It's interesting to note that I can
> break this by specifying a font, eg:
>    Font txtfont = new Font("Arial", Font.PLAIN, 4);
>    tcontrol.setFont(txtfont);
> Should I be able to do this?

Thanks for finding this. The fix is in the visad.jar,
visad_src-2.0.jar and visad_examples.jar files in:

> I have a second question, which involves
> The main routine in PMR nicely demonstrates how to detect that a user
> has clicked on a variety of visad data. This is done by:
> * defining the data,
> * making a DataReference to that data
> * creating a CellImpl
> * linking that CellImpl to the DataReference
> * defining a doAction method in the CellImpl
> * having code in the doAction which proves it works!
>    eg "System.out.println("Real selected")
> This works fine...
> My problem is this: I'm also changing the data externally (eg in
> relation to the variable wind issue, the user presses "V" to toggle
> between two states, namely a variable wind and a not variable wind...
> this is changing the data which is linked to the PickManipulationRenderer).
> I need to differentiate between the 2 cases of:
> 1) user has clicked on the data and
> 2) the data has been changed exernally.
> Is there a way to do this?

There are two approaches:

1. At the end of your CellImpl.doAction(), save a copy of
the previous value of the Data. At the start of doAction(),
compare the current value to the previous value, and decide
what to do based on whether the value actually changed
(PickManipulationRendererJ3D won't actually change the Data

2. The external code that modifies Data values can also set
a flag. Then doAction() tests and clears this flag to determine
whether it is responding to an external event.

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

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