Re: RemoteDisplayImpl doesn't have a getComponent() method

Hi Vimal,

There are two halves to writing a simple client/server collaborative VisAD
application (which I assume you are trying to do).

The code example you gave is the server side, setting up the data and
display.  However, you should call addReferences() on the DisplayImpl, not
on the RemoteDisplayImpl.

On the server side, all you need to do with the RemoteDisplayImpl that you
have created is add it to a RemoteServer so that the client can access it.

On the client side, you'll get the RemoteDisplay from the RemoteServer, then
construct a local DisplayImpl using that RemoteDisplay.  The two
DisplayImpls will then be linked with respect to their ScalarMaps and
DataReferences.  That is, direct manipulation on either end should work. 

Let the list know if you still have problems.

-Curtis

At 16:03 6/29/00, you wrote:
>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);