Place the application window in the center [message #463410] |
Sun, 11 February 2007 12:33  |
Eclipse User |
|
|
|
Originally posted by: jim.andersen.ple.cph.edu
Hello,
The main window of my RCP application is not centered in the middle of the
display window. I tryed to add some old java snippet code from
my AWT/Swing days to calculate the position and set the location of the
window, I put the code in the postWindowOpen (that calls setLocation). It
all works but has this side effect that a "shadow" window is quickly drawn
and then moved. Not so very nice. I'm sure that this can be done better, the
question is how?
/Jim
|
|
|
|
Re: Place the application window in the center [message #463414 is a reply to message #463412] |
Sun, 11 February 2007 13:21  |
Eclipse User |
|
|
|
Originally posted by: jim.andersen.ple.cph.edu
Works fine! Thank you.
/J
"Stefan Zugal" <csae7511@uibk.ac.at> skrev i meddelandet
news:eqnkr8$lks$1@utils.eclipse.org...
> Hi,
>
> there should be a method postWindowCreate in your WorkbenchWindowAdvisor.
> Try to place your code there.
>
> HTH,
> Stefan
>
> Jim Andersen schrieb:
>> Hello,
>> The main window of my RCP application is not centered in the middle of
>> the display window. I tryed to add some old java snippet code from
>> my AWT/Swing days to calculate the position and set the location of the
>> window, I put the code in the postWindowOpen (that calls setLocation). It
>> all works but has this side effect that a "shadow" window is quickly
>> drawn and then moved. Not so very nice. I'm sure that this can be done
>> better, the question is how?
>> /Jim
>>
|
|
|
Powered by
FUDForum. Page generated in 0.02929 seconds