Re: Problem with DataReferenceImp.setData()

  • To: Jim Koutsovasilis <jimk@xxxxxxxxxx>
  • Subject: Re: Problem with DataReferenceImp.setData()
  • From: Bill Hibbard <billh@xxxxxxxxxxxxx>
  • Date: Thu, 1 May 2003 21:55:54 -0500 (CDT)
Hi Jim,

You can make it work OK by inserting:

  display.reAutoScale();

before:

  dataRef.setData(createField());

I will have to look into whether this should be necessary,
but am travelling right now and will have to look into it
later. The reAutoScale() sets a correct setRange() for the
ScalarMap to RGBA, which does not get set for the UnionSet.

Cheers,
Bill

On Fri, 2 May 2003, Jim Koutsovasilis wrote:

> Hello,
>
> we are having a problem which involves a data reference
> being used for a UnionSet, and then for a FlatField.
>
> When the data reference's setData() is initially passed a
> UnionSet, the data is displayed.  Sometime later, the
> data reference's setData() is called again, but this time
> a FlatField is passed to it.
>
> The results are inconsistant.  Sometimes the FlatField
> is displayed, and sometimes it isn't.
>
> Attached is a sample program (DataRefBug.java)
> which illustrates the problem.
>
> You can run it in 2 ways:
>
>  > java DataRefBug
> - will display the UnionSet data first (a cross).  Click on
>   the "Change Data" button, and the data reference's
>   setData() is passed a FlatField.  In all our tests, the
>   visad window goes black, and the FlatField is not shown.
>
> OR
>
>  > javaDataRefBug 0
> - will display the FlatField first.  Click on the "Change Data"
>    button, and the data reference's setData() is passed a
>    UnionSet.  In all our tests, this works and the UnionSet
>    data is shown.
>
> You can continue to click the "Change Data" button to cycle
> between the UnionSet data and the FlatField data.
>
> Does anyone have any ideas?
>
> Why does the display correctly update when the FlatField
> is shown first and not when the UnionSet is shown first?
>
> Thanks,
> Jim.
> ---
> Jim Koutsovasilis
> Bureau of Meteorology, Australia
> jimk@xxxxxxxxxx
>
>


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