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 Mathias, > > Unfortunately, the current visad.ss implementation does not let you > specify your own DataRenderer in the addReference call (it is smart > enough to use ImageRendererJ3D when applicable, though). However, > it should be fairly easy to extend FancySSCell to allow for the use > of a DirectManipulationRenderer. If you decide to do it, let me > know if you need any help. > > -Curtis Hi Curtis, So I'm on the way to extend FancySSCell to be able to add DataReferences with a DirectManipulationRender. But it looks like another problem appears. When I want to add more than one DataReferenceImpl to a FancySSCell I get an error ("Data is null: DataDisplayLink: prepareData") displayed in the display of the Cell and only the last added DataReference is visualized. Below is an excerpt of the code I'm using to add DataReferences to my FancySSCell. There 'set' and 'newSet' are instances of 'VisualizationSet' which only holds different DataReferenceImpl-Objects with there associated ConstantMap[] and DataRenderers. Btw., this happens not because of the extensions I added to FancySSCell. If I want to add two DataReferenceSets with neither associated ConstantMap[] nor associated DataRenderers I get the same error. In this case the not owerwritten FancySSCell-method addReference(DataReferenceImpl) is invoked. Thanks for any help, Mathias public void createVisualizationInDisplay(ExtendedFancySSCell display, VisualizationSet[] sets) { : // some other stuff : try { display.removeAllReferences(); display.clearMaps(); : // some other stuff : display.setMapsAuto(maps); DataReference ref; DataRenderer renderer; if (newSet != null) { for (int i = 0 ; i < newSet.length ; i++) { ref = (DataReferenceImpl)newSet[i].getDataReference(); renderer = newSet[i].getDataRenderer(); ConstantMap[] cmaps = newSet[i].getConstantMaps(); if (cmaps != null) { if (renderer != null) { display.addReference(renderer, (DataReferenceImpl)ref, cmaps); } else { display.addReference((DataReferenceImpl)ref, cmaps); } } else { if (renderer != null) { display.addReference(renderer, (DataReferenceImpl)ref, null); } else { System.out.println("adding: "+ref); display.addReference((DataReferenceImpl)ref); } } } } } catch (java.rmi.RemoteException exc1) { exc1.printStackTrace(); } catch (VisADException exc2) { exc2.printStackTrace(); } }
visad
archives: