Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: setting constant map properties

Bill/Jim-

Bill Hibbard wrote:

It will probably be easiest if you save your DataReferences
in your own arrays or Vectors. You can remove them from the
DisplayImpl by a call to removeReference(), then add again
with the new ConstantMap values.

In our IDV, we have a wrapper class for a DataReference
(DisplayableData) that allows us to control this.  Each
DisplayableData object can listen for changes to it's
associated ConstantMaps and then the knows how to tell
the display to remove the DataReference and re-add it with
the new ConstantMaps.

You could consider something like this, or as Bill says,
keep your own tabs on the DataRefs in a List.

Some of the other folks on the list have written complex
applications that may do something like this - perhaps they
can add to this?

There is one big performance hit in this. Changing ConstantMaps
on a DataReference causes the entire display to be rebuilt.
But, it's still the way to do it.

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
"There's someone in my head, but it's not me"    Roger Waters
*************************************************************



 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690