At 09:33 3/21/00 -0500, you wrote:
>Hello Folks,
>how can i set the default display size and still use the VisAD 2D
>implementation? i'd like to set it at 360 by 180 (i,e, to depict a
>rectangular latlon grid rather than a square).
>
>i'm having a little trouble understanding whether i can reference the
>setPreferredSize method in DisplayPanelJ2D. is this possible?
>
>thanks,
>-john
>
>John F. Moses
>Computer Sciences Corp.
>EOSDIS Science Operations, ESDIS Project Code 423
>BLD 32, E209I
>Goddard Space Flight Center, Greenbelt, Maryland, 20771
>Voice @ GSFC: (301) 614-5308
>FAX @ GSFC: (301) 614-5267
>Email: John.F.Moses@xxxxxxxxxxxxx
>Email: jfmoses@xxxxxxxxxxxxxxxxxxxx
John,
There are two parts to what you want to do. First you must set the
size of the actual DisplayPanelJ2D component to at least 360 x 180.
_From your message, it sounds like you are not having any trouble
with this part. You're right that you can use
DisplayPanelJ2D.setPreferredSize() to accomplish this:
DisplayImplJ2D display = new DisplayImplJ2D("display");
DisplayPanelJ2D panel = (DisplayPanelJ2D) display.getComponent();
panel.setPreferredSize(new Dimension(400, 200));
Secondly, follow TomW's instructions for setting the aspect ratio
of the display. For a Java2D example, see visad/examples/Test58,
which sets the aspect ratio in Java2D to a rectangular region like
you describe.
Curtis