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);