Re: Changing the visibility of DataReferences?

Hi Harry,

The best way to toggle data depiction is with:

As for bulk adding and removing of references, you can remove them all with:

Add multiple references at once with:
  DisplayImpl.addReferences(DataRenderer, DataReference[])
  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.


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 
>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?

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