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

Retaining Controls for ScalarMaps

Hi all,

I use a refresh method for my displays that does the following (in
Pseudocode):

display.disableAction();
display.removeAllReferences();
display.clearMaps();
...
display.addMaps(allMaps);
display.addData(allDatas);

Where allMaps and allDatas are stored externally. The Problem I have is
that all Controls linked to my ScalarMaps disappeard when I remove the
corresponding ScalarMap from the display (or when I re-add them?). So if
I had a good looking colortable in my ColorControl or some good shapes
in my ShapeControl after the refresh everything is reset. How can I
prevent this reset? I saw that there is a setControl() in ScalarMap
which is package private. Is there a way to do something like:

Controls controls = allMaps.getControls();
...the above code...
allMaps.setControls(controls);

to reinitialize the Controls?

Thanks in advance, Mathias


--------------------------------------------------
Mathias Stümpert
mathias@xxxxxxxxxxxx
www.stuempert.de


 
 
  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