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.
> I have an application that adds a ControlListerner to the > ProjectionControl of a DisplayImpl. This display gets > rebuilt when I change my projections or add in ScalarMaps > after some DataReferences are added. I figured that > as long as there is always one ProjectionControl associated > with a DisplayImpl, that no matter what I did to the display, > my listener would always be active. However, it appears > that when the display is rebuilt, all display listeners are > removed and are not added back in when the ProjectionControl > is added back (same for GraphicsModeControl and > DisplayRendererControl). So once the display is rebuilt, > I have no way of using the controlListener to listen for > ProjectionControl changes. Is this a bug? I've attached > a program that exhibits this behavior. Not a bug, just the way it works. The DisplayImpl.clearMaps() call clears up everything (it is desireable to have a method that clears up everything - the bug would be to find something that is not cleared up). The work-around is to re-add the ControlListerner after rebuilding the display. Bill
visad
archives: