Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Place the application window in the center
Place the application window in the center [message #463410] Sun, 11 February 2007 12:33 Go to next message
Eclipse UserFriend
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 #463412 is a reply to message #463410] Sun, 11 February 2007 12:47 Go to previous messageGo to next message
Eclipse UserFriend
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
>
>
Re: Place the application window in the center [message #463414 is a reply to message #463412] Sun, 11 February 2007 13:21 Go to previous message
Eclipse UserFriend
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
>>
Previous Topic:Table Viewer
Next Topic:Maximized Wizard-Dialog
Goto Forum:
  


Current Time: Sun Mar 16 06:44:46 EDT 2025

Powered by FUDForum. Page generated in 0.02929 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top