Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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
>


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690