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 Harry, The best way to toggle data depiction is with: DataRenderer.toggle(boolean) As for bulk adding and removing of references, you can remove them all with: DisplayImpl.removeAllReferences() Add multiple references at once with: DisplayImpl.addReferences(DataRenderer, DataReference[]) or: DisplayImpl.addReferences(DataRenderer, DataReference[], ConstantMap[][]) But hopefully you won't need to add or remove massive numbers of references over and over, since DataRenderer.toggle() is much faster. -Curtis At 03:51 PM 3/3/2004, Harry Hochheiser wrote: >I have a VisAD scene with a significant number (> 400) of DataReferenceImpl >objects. Based on user interactions, i'd like to selectively toggle the >visibility of individual items in this set. Currently, I'm doing this by >calling display.removeReference() when I want to make a reference invisible, >and addReference() when I want it to reappear. > >This works fine, but it is a bit slow, particularly when - as is often the >case - i want to adjust the visibility of multiple DataReferenceImpls all at >once. > >So, two questions: > >1) is this the appropriate way to adjust the visibility of DataReferenceImpl >objects? if not, what is? > >2) is there any way to do a bulk adding/removing of references? > >thanks, > >harry >
visad
archives: