Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

Re: Changing the visibility of DataReferences?

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
>


  • 2004 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: