Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » View listener
View listener [message #464059] Fri, 23 February 2007 05:32 Go to next message
Eclipse UserFriend
Originally posted by: sujji_parthiv.yahoo.co.in

Hi,

Is there any listener to implement when the control is focussed on the
view (selected...)

Thanks in advance,
Parthiv
Re: View listener [message #464063 is a reply to message #464059] Fri, 23 February 2007 06:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

Hello!
I actually did not fully understand your question.
There is such a method in a view:
/* (non-Javadoc)
* Asks this part to take focus within the workbench.
* <p>
* Subclasses must implement this method. For a detailed
description of the
* requirements see <code>IWorkbenchPart</code>
* </p>
*
* @see IWorkbenchPart
*/
public abstract void setFocus();
I doubt it is of any help actually, as it is called when your view gets
focus, so that you could set a focus to a certain control in your
workbench part, namely view here.
You might want to add a focusListener to every control you are creating
on your view, eh?
Control#addFocusListener

Parthiv wrote:
> Hi,
>
> Is there any listener to implement when the control is focussed on
> the view (selected...)
>
> Thanks in advance,
> Parthiv
>
>
Re: View listener [message #464078 is a reply to message #464059] Fri, 23 February 2007 11:35 Go to previous messageGo to next message
Eclipse UserFriend
You can use the part service from IWorkbenchWindow and add an
IPartListener2 ... that will tell you when your view part is active.

If you actually want to track focus, you need to add an SWT focus
listener to your controls.

Later,
PW
Re: View listener [message #464080 is a reply to message #464059] Fri, 23 February 2007 12:14 Go to previous message
Eclipse UserFriend
Originally posted by: tom.seidel.spiritlink.de

Parthiv schrieb:
> Hi,
>
> Is there any listener to implement when the control is focussed on
> the view (selected...)
>
> Thanks in advance,
> Parthiv
>
>
Hi Parthiv,

you could use the IPartListener2 to register a PartListener. With that
listener you can keep on track which view-parts become
activated/deactivated/opened/etc.

--
Cheerz,
Tom
Previous Topic:View instance
Next Topic:CheckboxCellEditor displays strings?
Goto Forum:
  


Current Time: Fri Mar 21 19:08:19 EDT 2025

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

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

Back to the top