Re: Alternative DataRenderer in FancySSCell

Hi Mathias,

My first question is, did you do DataReferenceImpl.setData() before adding
the DataReferenceImpls to the display?  If not, it would explain the "Data
is null" errors you are getting.  If you did call setData() first, however,
then it's probably a bug in BasicSSCell, and I'll look into it.

-Curtis

At 15:09 30-05-01 +0200, you wrote:
>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();
>    }
>  }


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