Re: question on DisplayRendering - setSize question

Hi Curtis,
i was able to get projection control & the aspect ratio to work O.K. but
still not able to reset the default size (i've tried your example as below
but it still has no effect on the display size).  something must be
ignoring the DisplayPanelJ2D in DisplayImplJ2D - do i need to use another
default display renderer (i.e., one of the other constructors for
DisplayImplJ2D?

i'm missing something for sure.

-john

P.S. also thanks tomw, you got me out of the stuck mode & re-started.  i
have been looking at/using the examples - both the NCEP & Test58, but
thought there might be a way to change the default size.

RE:


>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,
>
>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


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



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