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.

RemoteDisplayImpl doesn't have a getComponent() method

DisplayImplJ2D has a getComponent method that returns a java.awt.component
for use with GUI applications.  Unfortunately, RemoteDisplayImpl does not
have this same method.  I understand that one of the constructors for
DisplayImplJ2D is a RemoteDisplay object, however, I also have to link my
RemoteDisplayImpl object with a DisplayImpl object.  I can do one or the
other, but not both.  Please see the following snipet of code to see what I
mean.

myDisplay = new DisplayImplJ2D("display1");

latMap = new ScalarMap( latitude,    myDisplay.YAxis );
lonMap = new ScalarMap( longitude, myDisplay.XAxis );
tempIsoMap = new ScalarMap( temperature,  myDisplay.IsoContour );
elevRGBMap = new ScalarMap( elevation,  myDisplay.RGB );

myDisplay.addMap( latMap );
myDisplay.addMap( lonMap );
myDisplay.addMap( tempIsoMap );
myDisplay.addMap( elevRGBMap );

RemoteDisplayImpl remote_display1 =  new RemoteDisplayImpl(myDisplay);

remote_display1.addReferences( new DirectManipulationRendererJ2D(), new
DataReference[] {ref_elev} );
remote_display1.addReferences( new DirectManipulationRendererJ2D(), new
DataReference[] {ref_temp} );

 JFrame jframe = new JFrame("VisAD Tutorial example 3_07");
jframe.getContentPane().add(remote_display1.getComponent());  //i'm not sure
what exactly should go here
jframe.setSize(480, 320);
jframe.setVisible(true);


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