Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Focus lost between Editor and Shell
Focus lost between Editor and Shell [message #442389] Mon, 16 January 2006 11:45 Go to next message
Nicolas Mura is currently offline Nicolas MuraFriend
Messages: 24
Registered: July 2009
Junior Member
Hi,
I have a focus problem in my rcp application (I'm using Swing component
with the SWT_AWT bridge)
First, I 've created an action that open a new Shell and activate it.
Now, in an EditorPart, if a JTextfield has the focus, if press a key
that call my action, I can see
the new Shell on the screen but when I close this Shell I lost the focus
and I can't put it back to
the JTextField (the component of the Editor that has the focus before I
open the Shell).
What can I do to prevent this?
thanks
Re: Focus lost between Editor and Shell [message #463030 is a reply to message #442389] Mon, 05 February 2007 18:21 Go to previous messageGo to next message
Daniel Beck is currently offline Daniel BeckFriend
Messages: 4
Registered: July 2009
Junior Member
nm wrote:
> Hi,
> I have a focus problem in my rcp application (I'm using Swing component
> with the SWT_AWT bridge)
> First, I 've created an action that open a new Shell and activate it.
> Now, in an EditorPart, if a JTextfield has the focus, if press a key
> that call my action, I can see
> the new Shell on the screen but when I close this Shell I lost the focus
> and I can't put it back to
> the JTextField (the component of the Editor that has the focus before I
> open the Shell).
> What can I do to prevent this?
> thanks


Hello Nicolas,

I have a similar problem. Did you find a solution to this?

Greetings,
Daniel
Re: Focus lost between Editor and Shell [message #463062 is a reply to message #463030] Mon, 05 February 2007 18:47 Go to previous message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
You can add a focus listener to some composite (SWT_AWT or its parent,
for instance) of your EditorPart.
When EditorPart's composite looses focus, you need to remember last
component that had focus. When EditorPart gains focus again, you should
revert focus to the component that you have remembered.

Snjeza

Daniel Beck wrote:
> nm wrote:
>> Hi,
>> I have a focus problem in my rcp application (I'm using Swing
>> component with the SWT_AWT bridge)
>> First, I 've created an action that open a new Shell and activate it.
>> Now, in an EditorPart, if a JTextfield has the focus, if press a key
>> that call my action, I can see
>> the new Shell on the screen but when I close this Shell I lost the
>> focus and I can't put it back to
>> the JTextField (the component of the Editor that has the focus before
>> I open the Shell).
>> What can I do to prevent this?
>> thanks
>
>
> Hello Nicolas,
>
> I have a similar problem. Did you find a solution to this?
>
> Greetings,
> Daniel
Previous Topic:Button - Action - Job
Next Topic:Synchronize views separator
Goto Forum:
  


Current Time: Wed Sep 11 19:44:57 GMT 2024

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

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

Back to the top