NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Helen, > Is there any way to detect there is a ScalarMap event generated from the > Rangewidget of visMap? > > If there is, can I first > double [] xxx = visMap.getRange(); > > and then do > visRangeMap.setRange((float)xxx[0], (float)xxx[1]); Yes. Define a class that implements the ScalarMapListener interface. It must implement the controlChanged(ScalarMapControlEvent evt) method, which can do nothing, and the mapChanged(ScalarMapEvent evt) method, which should test for evt.getId() = ScalarMapEvent.AUTO_SCALE or == ScalarMapEvent.MANUAL. When it find such an event, invoke your code to copy ranges from visMap to visRangeMap. You pass an instance of your class to the visMap.addScalarMapListener(ScalarMapListener listener) method. Good luck, Bill
visad
archives: